Explorar o código

Merge branch 'master' of http://git.dayaedu.com/yonge/mec

zouxuan %!s(int64=5) %!d(string=hai) anos
pai
achega
069bc0df63

+ 5 - 6
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ClassGroupServiceImpl.java

@@ -1293,14 +1293,13 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
         }
         Integer schoolId = musicGroup.getSchoolId();
 
-        List<Integer> subjectIdSet = new ArrayList<>();
-
         List<Integer> studentIdList = classGroup4MixDto.getStudents();
+
         List<StudentRegistration> studentList = studentRegistrationService.findStudentListByUserIdList(musicGroupId, studentIdList);
-        for (StudentRegistration student : studentList) {
-            subjectIdSet.add(student.getSubjectId());
-        }
-        List<Subject> subjectList = subjectService.findBySubjectByIdList(subjectIdSet);
+
+        List<Integer> subjectIdList = studentList.stream().map(studentRegistration -> studentRegistration.getActualSubjectId()).collect(Collectors.toList());
+
+        List<Subject> subjectList = subjectService.findBySubjectByIdList(subjectIdList);
 
         String subjectIds = subjectList.stream().map(subject -> subject.getId().toString()).collect(Collectors.joining(","));
         String subjectNames = subjectList.stream().map(subject -> subject.getName()).collect(Collectors.joining("/"));

+ 4 - 4
mec-biz/src/main/resources/config/mybatis/SysUserCashAccountDetailMapper.xml

@@ -19,7 +19,7 @@
         <result column="comment_" property="comment"/>
         <result column="create_time_" property="createTime"/>
         <result column="update_time_" property="updateTime"/>
-        <result column="attribute_" property="attribute"/>
+        <result column="attribute1_" property="attribute"/>
         <result column="channel_" property="channel"/>
         <result column="platform_account_no_" property="platformAccountNo"/>
     </resultMap>
@@ -53,7 +53,7 @@
             <if test="comment!=null">comment_,</if>
             <if test="createTime!=null">create_time_,</if>
             <if test="updateTime!=null">update_time_,</if>
-            <if test="attribute!=null">attribute_,</if>
+            <if test="attribute!=null">attribute1_,</if>
             <if test="channel!=null">channel_,</if>
             <if test="platformAccountNo!=null">platform_account_no_,</if>
         </trim>
@@ -80,7 +80,7 @@
     <insert id="batchInsert" parameterType="com.ym.mec.biz.dal.entity.SysUserCashAccountDetail" useGeneratedKeys="true"
             keyColumn="id" keyProperty="id">
         INSERT INTO sys_user_cash_account_detail
-        (user_id_,trans_no_,type_,trans_type_,status_,amount_,balance_,description_,comment_,create_time_,update_time_,attribute_,channel_,platform_account_no_)
+        (user_id_,trans_no_,type_,trans_type_,status_,amount_,balance_,description_,comment_,create_time_,update_time_,attribute1_,channel_,platform_account_no_)
         VALUE
         <foreach collection="sysUserCashAccountDetails" item="sysUserCashAccountDetail" separator=",">
             (#{sysUserCashAccountDetail.userId},#{sysUserCashAccountDetail.transNo},#{sysUserCashAccountDetail.type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{sysUserCashAccountDetail.transType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{sysUserCashAccountDetail.status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{sysUserCashAccountDetail.amount},#{sysUserCashAccountDetail.balance},#{sysUserCashAccountDetail.description},#{sysUserCashAccountDetail.comment},now(),now(),#{sysUserCashAccountDetail.attribute},#{sysUserCashAccountDetail.channel},#{sysUserCashAccountDetail.platformAccountNo})
@@ -122,7 +122,7 @@
                 trans_type_ = #{transType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
             </if>
             <if test="attribute != null">
-                attribute_ = #{attribute},
+                attribute1_ = #{attribute},
             </if>
             <if test="channel != null">
                 channel_ = #{channel},