yonge 4 years ago
parent
commit
e846f9f17f

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherServiceImpl.java

@@ -551,7 +551,7 @@ public class TeacherServiceImpl extends BaseServiceImpl<Integer, Teacher>  imple
 					List<StudentPaymentOrder> paymentOrders = collect.get(e.getUserId());
 					
 					if(paymentOrders != null && paymentOrders.size() > 0){
-						e.setPaymentAmount(paymentOrders.stream().map(t -> t.getActualAmount()).reduce(BigDecimal.ZERO, BigDecimal::add));
+						e.setPaymentAmount(paymentOrders.stream().map(t -> t.getExpectAmount()).reduce(BigDecimal.ZERO, BigDecimal::add));
 						e.setPayTime(paymentOrders.get(0).getPayTime());
 					}
 				});

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

@@ -49,6 +49,7 @@
         <result column="has_cloud_teacher_" property="hasCloudTeacher"/>
         <result column="none_need_cloud_teacher_" property="noneNeedCloudTeacher"/>
         <result column="membership_end_time_" property="membershipEndTime"/>
+        <result column="music_group_payment_calender_id_" property="musicGroupPaymentCalenderId"/>
     </resultMap>
 
     <resultMap type="com.ym.mec.biz.dal.dto.StudentMusicGroupDto" id="StudentMusicGroupDto"
@@ -201,6 +202,9 @@
             <if test="updateTime != null">
                 update_time_,
             </if>
+            <if test="musicGroupPaymentCalenderId != null">
+                music_group_payment_calender_id_,
+            </if>
         </trim>
         VALUES
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -270,6 +274,9 @@
             <if test="updateTime != null">
                 NOW(),
             </if>
+            <if test="musicGroupPaymentCalenderId != null">
+                #{musicGroupPaymentCalenderId},
+            </if>
         </trim>
     </insert>
 
@@ -352,6 +359,9 @@
             <if test="noneNeedCloudTeacher != null">
                 none_need_cloud_teacher_ =#{noneNeedCloudTeacher},
             </if>
+            <if test="musicGroupPaymentCalenderId != null">
+                music_group_payment_calender_id_ =#{musicGroupPaymentCalenderId},
+            </if>
         </set>
         WHERE id_ = #{id}
     </update>
@@ -715,7 +725,7 @@
         INSERT INTO student_registration
         (parents_phone_, id_, user_id_, name_, music_group_id_, current_grade_, current_class_, subject_id_,
         is_allow_adjust_, kit_purchase_method_, remark_, create_time_, update_time_,
-        parents_name_, parents_company_, payment_status_, actual_subject_id_, music_group_status_, is_merge_)
+        parents_name_, parents_company_, payment_status_, actual_subject_id_, music_group_status_, is_merge_,music_group_payment_calender_id_)
         VALUES
         <foreach collection="list" item="item" index="index" separator=",">
             (#{item.parentsPhone}, #{item.id}, #{item.userId}, #{item.name}, #{item.musicGroupId}, #{item.currentGrade},
@@ -724,7 +734,7 @@
             #{item.kitPurchaseMethod,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
             #{item.remark}, now(), now(), #{item.parentsName}, #{item.parentsCompany},
             #{item.paymentStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}, #{item.subjectId},
-            #{item.musicGroupStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}, #{item.isMerge})
+            #{item.musicGroupStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}, #{item.isMerge},#{item.musicGroupPaymentCalenderId})
         </foreach>
     </insert>
 
@@ -733,12 +743,12 @@
         INSERT INTO student_registration
         (parents_phone_, user_id_, name_, music_group_id_, current_grade_, current_class_, subject_id_,
         create_time_, update_time_, parents_name_, payment_status_, actual_subject_id_, music_group_status_,
-        temporary_course_fee_, class_group_id_,current_grade_num_,current_grade_date_)
+        temporary_course_fee_, class_group_id_,current_grade_num_,current_grade_date_,music_group_payment_calender_id_)
         VALUES (#{parentsPhone}, #{userId}, #{name}, #{musicGroupId}, #{currentGrade}, #{currentClass}, #{subjectId},
         now(), now(), #{parentsName}, #{paymentStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
         #{subjectId},
         #{musicGroupStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}, #{temporaryCourseFee},
-        #{classGroupId},#{currentGradeNum},#{currentGradeDate})
+        #{classGroupId},#{currentGradeNum},#{currentGradeDate},#{musicGroupPaymentCalenderId})
     </insert>
 
     <!-- 查询乐团userIdList的学生 -->