zouxuan 5 년 전
부모
커밋
03cfdd9900

+ 4 - 4
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/MusicGroupStudentsDto.java

@@ -1,5 +1,6 @@
 package com.ym.mec.biz.dal.dto;
 
+import com.ym.mec.biz.dal.enums.PaymentStatusEnum;
 import io.swagger.annotations.ApiModelProperty;
 
 import java.math.BigDecimal;
@@ -40,8 +41,7 @@ public class MusicGroupStudentsDto{
     @ApiModelProperty(value = "学员状态 NORMAL(NORMAL, 在读), LEAVE(LEAVE, 请假), QUIT(QUIT, 退班)",required = false)
     private String studentStatus;
 
-    @ApiModelProperty(value = "缴费状态  PAID_COMPLETED(完成缴费), NON_PAYMENT(未缴费), PROCESSING(缴费中)",required = false)
-    private String paymentStatus;
+    private PaymentStatusEnum paymentStatus;
 
     @ApiModelProperty(value = "是否新增学员(1是0否)",required = false)
     private Integer isNewStudent;
@@ -170,11 +170,11 @@ public class MusicGroupStudentsDto{
         this.studentStatus = studentStatus;
     }
 
-    public String getPaymentStatus() {
+    public PaymentStatusEnum getPaymentStatus() {
         return paymentStatus;
     }
 
-    public void setPaymentStatus(String paymentStatus) {
+    public void setPaymentStatus(PaymentStatusEnum paymentStatus) {
         this.paymentStatus = paymentStatus;
     }
 

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/enums/PaymentStatusEnum.java

@@ -5,7 +5,7 @@ import com.ym.mec.common.enums.BaseEnum;
 public enum PaymentStatusEnum implements BaseEnum<Integer, PaymentStatusEnum> {
 	NO(0,"未开启缴费"),
 	OPEN(1,"开启缴费"),
-	YES(2,"已结束");
+	YES(2,"已缴费");
 
 	private Integer code;
 

+ 4 - 4
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentManageServiceImpl.java

@@ -278,10 +278,10 @@ public class StudentManageServiceImpl implements StudentManageService {
             pageInfo.setTotal(count);
             params.put("offset", pageInfo.getOffset());
             dataList = studentManageDao.queryMusicGroupStudent(params);
-            Map<Integer,String> maps = MapUtil.convertIntegerMap(musicGroupStudentFeeDao.findPaymentStatusMap(queryInfo.getMusicGroupId()));
-            dataList.forEach(e->{
-                e.setPaymentStatus(maps.get(e.getUserId()));
-            });
+//            Map<Integer,String> maps = MapUtil.convertIntegerMap(musicGroupStudentFeeDao.findPaymentStatusMap(queryInfo.getMusicGroupId()));
+//            dataList.forEach(e->{
+//                e.setPaymentStatus(maps.get(e.getUserId()));
+//            });
         }
         if (count == 0) {
             dataList = new ArrayList<>();

+ 5 - 10
mec-biz/src/main/resources/config/mybatis/StudentManageDao.xml

@@ -400,10 +400,7 @@
                 AND sr.music_group_status_ = #{studentStatus}
             </if>
             <if test="paymentStatus != null">
-                AND mgsf.payment_status_ = #{paymentStatus}
-            </if>
-            <if test="isLock != null">
-                AND mgsf.is_lock_ = #{isLock}
+                AND sr.payment_status_ = #{paymentStatus}
             </if>
             <if test="musicGroupId != null and musicGroupId != ''">
                 AND sr.music_group_id_ = #{musicGroupId}
@@ -424,7 +421,7 @@
         <result property="currentGrade" column="current_grade_"/>
         <result property="currentClass" column="current_class_"/>
         <result property="subjectName" column="subject_name_"/>
-        <result property="studentStatus" column="music_group_status_"/>
+        <result property="studentStatus" column="music_group_status_" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
         <result property="paymentStatus" column="payment_status_"/>
         <result property="musicGroupId" column="music_group_id_"/>
         <result property="isNewStudent" column="is_new_student_"/>
@@ -435,9 +432,9 @@
         <result property="paymentPeriodList" column="payment_period_list_"/>
     </resultMap>
     <select id="queryMusicGroupStudent" resultMap="MusicGroupStudentsDto">
-        SELECT sr.user_id_,su.username_ real_name_,su.gender_,su.phone_ parents_phone_,sr.current_grade_,mgsf.payment_status_,
-        sr.current_class_,sr.music_group_status_,mgsf.next_payment_date_,mgsf.course_fee_,mgsf.payment_period_list_,
-        s.name_ subject_name_,sr.music_group_id_,case when su.password_ is null then 0 else 1 end isActive_,mgsf.is_lock_,
+        SELECT sr.user_id_,su.username_ real_name_,su.gender_,su.phone_ parents_phone_,sr.current_grade_,
+        sr.current_class_,sr.music_group_status_,sr.payment_status_,
+        s.name_ subject_name_,sr.music_group_id_,case when su.password_ is null then 0 else 1 end isActive_,
         IF(DATE_FORMAT(sr.create_time_,'%Y-%m-%d') > DATE_FORMAT(mg.payment_expire_date_,'%Y-%m-%d'),1,0) is_new_student_
         FROM student_registration sr
         LEFT JOIN sys_user su ON sr.user_id_ = su.id_
@@ -446,7 +443,6 @@
         <if test="classGroupId != null">
             LEFT JOIN class_group_student_mapper cgsm ON cgsm.music_group_id_ = sr.music_group_id_
         </if>
-        LEFT JOIN music_group_student_fee_ mgsf ON mgsf.music_group_id_ = mg.id_ AND mgsf.user_id_ = su.id_
         <include refid="queryMusicGroupStudentSql"/>
         ORDER BY sr.id_ DESC
         <include refid="global.limit"/>
@@ -461,7 +457,6 @@
         <if test="classGroupId != null">
             LEFT JOIN class_group_student_mapper cgsm ON cgsm.music_group_id_ = sr.music_group_id_
         </if>
-        LEFT JOIN music_group_student_fee_ mgsf ON mgsf.music_group_id_ = mg.id_ AND mgsf.user_id_ = su.id_
         <include refid="queryMusicGroupStudentSql"/>
     </select>
 

+ 3 - 3
mec-web/src/main/java/com/ym/mec/web/controller/ExportController.java

@@ -919,7 +919,7 @@ public class ExportController extends BaseController {
                         row.setGender("女");
                     }
                 }
-                if (row.getPaymentStatus() != null) {
+                /*if (row.getPaymentStatus() != null) {
                     if (row.getPaymentStatus().equals("PAID_COMPLETED")) {
                         row.setPaymentStatus("完成缴费");
                     } else if (row.getPaymentStatus().equals("NON_PAYMENT")) {
@@ -927,7 +927,7 @@ public class ExportController extends BaseController {
                     } else if (row.getPaymentStatus().equals("PROCESSING")) {
                         row.setPaymentStatus("缴费中");
                     }
-                }
+                }*/
                 if (row.getStudentStatus().equals("NORMAL")) {
                     row.setStudentStatus("在读");
                 } else {
@@ -950,7 +950,7 @@ public class ExportController extends BaseController {
             String[] header = {"学员编号", "学员姓名", "性别", "联系电话", "年级", "班级", "专业", "学员状态", "新增学员", "缴费金额",
                     "下次缴费日期", "报名缴费", "是否激活"};
             String[] body = {"userId", "realName", "gender", "phone", "currentGrade", "currentClass", "subjectName", "studentStatus", "isNewStudentStr",
-                    "courseFee", "nextPaymentDateStr", "paymentStatus", "activeName"};
+                    "courseFee", "nextPaymentDateStr", "paymentStatus.desc", "activeName"};
             HSSFWorkbook workbook = POIUtil.exportExcel(header, body, musicGroupStudentsDtoPageInfo.getRows());
             response.setContentType("application/octet-stream");
             response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");