zouxuan 5 年之前
父节点
当前提交
291ace2db6

+ 14 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/MusicGroupStudentFeeDao.java

@@ -1,5 +1,6 @@
 package com.ym.mec.biz.dal.dao;
 
+import com.ym.mec.biz.dal.dto.UpdateStudentFeeDto;
 import com.ym.mec.biz.dal.entity.MusicGroupStudentFee;
 import com.ym.mec.common.dal.BaseDAO;
 import org.apache.ibatis.annotations.Param;
@@ -128,4 +129,17 @@ public interface MusicGroupStudentFeeDao extends BaseDAO<Long, MusicGroupStudent
 	 * @return
 	 */
 	List<Map<Integer, String>> findPaymentStatusMap(String musicGroupId);
+
+	/**
+	 * 修改单个学员缴费周期
+	 * @param fee
+	 */
+    void updateStudentFee(@Param("fee") UpdateStudentFeeDto fee);
+
+	/**
+	 * 根据乐团编号获取fee表
+	 * @param musicGroupId
+	 * @return
+	 */
+	List<MusicGroupStudentFee> queryByMusicGroupId(String musicGroupId);
 }

+ 12 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/UpdateStudentFeeDto.java

@@ -9,6 +9,9 @@ public class UpdateStudentFeeDto {
     @ApiModelProperty(value = "学员编号",required = false)
     private Integer studentId;
 
+    @ApiModelProperty(value = "乐团编号",required = false)
+    private String musicGroupId;
+
     @ApiModelProperty(value = "缴费月份",required = false)
     private List<Integer> month;
 
@@ -16,7 +19,15 @@ public class UpdateStudentFeeDto {
     private Integer isLock = 0;
 
     @ApiModelProperty(value = "课程费用",required = false)
-    private BigDecimal amount;
+    private BigDecimal amount = BigDecimal.ZERO;
+
+    public String getMusicGroupId() {
+        return musicGroupId;
+    }
+
+    public void setMusicGroupId(String musicGroupId) {
+        this.musicGroupId = musicGroupId;
+    }
 
     public Integer getStudentId() {
         return studentId;

+ 2 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/MusicGroupPaymentCalenderService.java

@@ -1,6 +1,7 @@
 package com.ym.mec.biz.service;
 
 import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender;
+import com.ym.mec.biz.dal.entity.MusicGroupStudentFee;
 import com.ym.mec.common.service.BaseService;
 
 import java.util.Date;
@@ -20,5 +21,5 @@ public interface MusicGroupPaymentCalenderService extends BaseService<Long, Musi
 	 * @param latestPaidDate
 	 * @return
 	 */
-	Date getNextPaymentDate(String musicGroupId, Date latestPaidDate);
+	Date getNextPaymentDate(String musicGroupId, Date latestPaidDate, MusicGroupStudentFee fee);
 }

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

@@ -269,5 +269,5 @@ public interface MusicGroupService extends BaseService<String, MusicGroup> {
 	 * 补全musicGroupStudentFee表数据
 	 * @param musicGroupIds
 	 */
-	void musicGroupStudentFeePatch(List<String> musicGroupIds);
+//	void musicGroupStudentFeePatch(List<String> musicGroupIds);
 }

+ 39 - 27
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupPaymentCalenderServiceImpl.java

@@ -1,9 +1,12 @@
 package com.ym.mec.biz.service.impl;
 
-import java.util.Date;
-import java.util.List;
+import java.io.Serializable;
+import java.util.*;
 import java.util.stream.Collectors;
 
+import com.ym.mec.biz.dal.entity.MusicGroupStudentFee;
+import io.swagger.models.auth.In;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -38,37 +41,46 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 	}
 
 	@Override
-	public Date getNextPaymentDate(String musicGroupId, Date latestPaidDate) {
-		List<MusicGroupPaymentCalender> musicGroupPaymentCalenderList = musicGroupPaymentCalenderDao.findByMusicGroupId(musicGroupId);
-		if (musicGroupPaymentCalenderList != null && musicGroupPaymentCalenderList.size() > 0) {
+	public Date getNextPaymentDate(String musicGroupId, Date latestPaidDate, MusicGroupStudentFee fee) {
+		List<Integer> months = null;
+		if(fee != null){
+			String paymentPeriodList = fee.getPaymentPeriodList();
+			if(StringUtils.isEmpty(paymentPeriodList)){
+				return null;
+			}else {
+				months = new ArrayList(Arrays.asList(paymentPeriodList.split(",")));
+				Collections.sort(months);
+			}
+		}else {
+			List<MusicGroupPaymentCalender> musicGroupPaymentCalenderList = musicGroupPaymentCalenderDao.findByMusicGroupId(musicGroupId);
+			if (musicGroupPaymentCalenderList != null && musicGroupPaymentCalenderList.size() > 0) {
+				months = musicGroupPaymentCalenderList.stream().map(e -> e.getPaymentMonth()).sorted().collect(Collectors.toList());
+			}
+		}
+		if (months != null && months.size() > 0) {
 			Date date = latestPaidDate;
 			if (date == null) {
 				date = new Date();
 			}
-			List<Integer> months = musicGroupPaymentCalenderList.stream().map(e -> e.getPaymentMonth()).sorted().collect(Collectors.toList());
-
-			if (months.size() > 0) {
-
-				// 获取当前月份
-				int currentMonth = Integer.parseInt(DateUtil.getMonth(date));
-				int nextMonth = months.get(0);
-				for (int i = 0; i < months.size(); i++) {
-					if (currentMonth < months.get(i)) {
-						nextMonth = months.get(i);
-						break;
-					}
-				}
-				// 修改学员付费周期
-				Date nextPaymentDate = null;
-				if (nextMonth > currentMonth) {
-					nextPaymentDate = DateUtil.addMonths(date, nextMonth - currentMonth);
-				} else if (nextMonth < currentMonth) {
-					nextPaymentDate = DateUtil.addMonths(date, 12 - currentMonth + nextMonth);
-				} else {
-					nextPaymentDate = DateUtil.addMonths(date, 12);
+			// 获取当前月份
+			int currentMonth = Integer.parseInt(DateUtil.getMonth(date));
+			int nextMonth = months.get(0);
+			for (int i = 0; i < months.size(); i++) {
+				if (currentMonth < months.get(i)) {
+					nextMonth = months.get(i);
+					break;
 				}
-				return DateUtil.getFirstDayOfMonth(nextPaymentDate);
 			}
+			// 修改学员付费周期
+			Date nextPaymentDate = null;
+			if (nextMonth > currentMonth) {
+				nextPaymentDate = DateUtil.addMonths(date, nextMonth - currentMonth);
+			} else if (nextMonth < currentMonth) {
+				nextPaymentDate = DateUtil.addMonths(date, 12 - currentMonth + nextMonth);
+			} else {
+				nextPaymentDate = DateUtil.addMonths(date, 12);
+			}
+			return DateUtil.getFirstDayOfMonth(nextPaymentDate);
 		}
 		return null;
 	}

+ 36 - 29
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java

@@ -269,11 +269,11 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
                 studentRegistrationDao.batchInsert(studentRegistrationList);
             }
             musicGroupDao.update(musicGroup);
-            List<MusicGroupStudentFee> musicGroupStudentFees = musicGroupStudentFeeDao.initMusicGroupStudentFee(musicGroupId);
-            if(musicGroupStudentFees != null && musicGroupStudentFees.size() > 0){
-                Date nextPaymentDate = musicGroupPaymentCalenderService.getNextPaymentDate(musicGroupId, null);
-                musicGroupStudentFeeDao.batchInsert(musicGroupStudentFees,nextPaymentDate,"PAID_COMPLETED");
-            }
+//            List<MusicGroupStudentFee> musicGroupStudentFees = musicGroupStudentFeeDao.initMusicGroupStudentFee(musicGroupId);
+//            if(musicGroupStudentFees != null && musicGroupStudentFees.size() > 0){
+//                Date nextPaymentDate = musicGroupPaymentCalenderService.getNextPaymentDate(musicGroupId, null,null);
+//                musicGroupStudentFeeDao.batchInsert(musicGroupStudentFees,nextPaymentDate,"PAID_COMPLETED");
+//            }
             musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroupId, "跨团调整", sysUser.getId(),""));
         }
 
@@ -805,13 +805,13 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
             //删除原有的声部商品组合
             musicGroupSubjectGoodsGroupDao.delByMusicGroupId(subFeeSettingDto.getMusicGroupId());
             //如果是进行中,补充缴费信息
-            if(musicGroup.getStatus() == MusicGroupStatusEnum.PROGRESS){
-                List<MusicGroupStudentFee> musicGroupStudentFees = musicGroupStudentFeeDao.initMusicGroupStudentFee(musicGroupId);
-                if(musicGroupStudentFees != null && musicGroupStudentFees.size() > 0){
-                    Date nextPaymentDate = musicGroupPaymentCalenderService.getNextPaymentDate(musicGroupId, null);
-                    musicGroupStudentFeeDao.batchInsert(musicGroupStudentFees,nextPaymentDate,"PAID_COMPLETED");
-                }
-            }
+//            if(musicGroup.getStatus() == MusicGroupStatusEnum.PROGRESS){
+//                List<MusicGroupStudentFee> musicGroupStudentFees = musicGroupStudentFeeDao.initMusicGroupStudentFee(musicGroupId);
+//                if(musicGroupStudentFees != null && musicGroupStudentFees.size() > 0){
+//                    Date nextPaymentDate = musicGroupPaymentCalenderService.getNextPaymentDate(musicGroupId, null,null);
+//                    musicGroupStudentFeeDao.batchInsert(musicGroupStudentFees,nextPaymentDate,"PAID_COMPLETED");
+//                }
+//            }
             List<MusicGroupSubjectPlan> musicGroupSubjectPlans = subFeeSettingDto.getMusicGroupSubjectPlans();
             if (musicGroupSubjectPlans != null && musicGroupSubjectPlans.size() > 0) {
                 musicGroupSubjectPlans.forEach(e->{
@@ -861,7 +861,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
         //生成学员费用表
         List<MusicGroupStudentFee> musicGroupStudentFees = musicGroupStudentFeeDao.initMusicGroupStudentFee(musicGroupId);
         if(musicGroupStudentFees != null && musicGroupStudentFees.size() > 0){
-            musicGroupStudentFeeDao.batchInsert(musicGroupStudentFees,musicGroupPaymentCalenderService.getNextPaymentDate(musicGroupId, null),"PAID_COMPLETED");
+            musicGroupStudentFeeDao.batchInsert(musicGroupStudentFees,musicGroupPaymentCalenderService.getNextPaymentDate(musicGroupId, null,null),"PAID_COMPLETED");
         }
         //记录操作日志
         musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroupId,"确认开团(筹备中 -> 进行中)",sysUser.getId(),""));
@@ -969,18 +969,18 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
         }
     }
 
-    @Override
-    public void musicGroupStudentFeePatch(List<String> musicGroupIds) {
-        if(musicGroupIds != null && musicGroupIds.size() > 0){
-            List<MusicGroupStudentFee> musicGroupStudentFees = null;
-            for (String musicGroupId: musicGroupIds) {
-                musicGroupStudentFees = musicGroupStudentFeeDao.initMusicGroupStudentFee(musicGroupId);
-                if(musicGroupStudentFees != null && musicGroupStudentFees.size() > 0){
-                    musicGroupStudentFeeDao.batchInsert(musicGroupStudentFees,musicGroupPaymentCalenderService.getNextPaymentDate(musicGroupId, null),"PAID_COMPLETED");
-                }
-            }
-        }
-    }
+//    @Override
+//    public void musicGroupStudentFeePatch(List<String> musicGroupIds) {
+//        if(musicGroupIds != null && musicGroupIds.size() > 0){
+//            List<MusicGroupStudentFee> musicGroupStudentFees = null;
+//            for (String musicGroupId: musicGroupIds) {
+//                musicGroupStudentFees = musicGroupStudentFeeDao.initMusicGroupStudentFee(musicGroupId);
+//                if(musicGroupStudentFees != null && musicGroupStudentFees.size() > 0){
+//                    musicGroupStudentFeeDao.batchInsert(musicGroupStudentFees,musicGroupPaymentCalenderService.getNextPaymentDate(musicGroupId, null,null),"PAID_COMPLETED");
+//                }
+//            }
+//        }
+//    }
 
     @Override
     public List<MusicCardDto> queryUserMusicGroups(Integer userId) {
@@ -1135,7 +1135,14 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
         musicGroupDao.update(musicGroup);
 
         // 重新设置下次缴费时间
-        musicGroupStudentFeeDao.updateNextPaymentDate(musicGroupId, musicGroupPaymentCalenderService.getNextPaymentDate(musicGroupId, null));
+        List<MusicGroupStudentFee> fees = musicGroupStudentFeeDao.queryByMusicGroupId(musicGroupId);
+        Date date = new Date();
+        fees.forEach(e->{
+            e.setNextPaymentDate(musicGroupPaymentCalenderService.getNextPaymentDate(musicGroupId, null,e));
+            e.setUpdateTime(date);
+        });
+        musicGroupStudentFeeDao.batchUpdate(fees);
+//        musicGroupStudentFeeDao.updateNextPaymentDate(musicGroupId, musicGroupPaymentCalenderService.getNextPaymentDate(musicGroupId, null));
         musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroupId,"恢复乐团",sysUser.getId(),""));
 
         //恢复课表
@@ -1499,7 +1506,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
                 musicGroupStudentFee.setLatestPaidTime(date);
                 musicGroupStudentFee.setPaymentStatus(PaymentStatus.PAID_COMPLETED);
                 musicGroupStudentFee.setTemporaryCourseFee(new BigDecimal(0));
-                musicGroupStudentFee.setNextPaymentDate(musicGroupPaymentCalenderService.getNextPaymentDate(musicGroupId, musicGroupStudentFee.getNextPaymentDate()));
+                musicGroupStudentFee.setNextPaymentDate(musicGroupPaymentCalenderService.getNextPaymentDate(musicGroupId, musicGroupStudentFee.getNextPaymentDate(),musicGroupStudentFee));
                 musicGroupStudentFeeDao.update(musicGroupStudentFee);
         		return null;
         	}else{
@@ -1574,7 +1581,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
             musicGroupStudentFee.setLatestPaidTime(date);
             musicGroupStudentFee.setPaymentStatus(PaymentStatus.PAID_COMPLETED);
             musicGroupStudentFee.setTemporaryCourseFee(new BigDecimal(0));
-            musicGroupStudentFee.setNextPaymentDate(musicGroupPaymentCalenderService.getNextPaymentDate(musicGroupId, musicGroupStudentFee.getNextPaymentDate()));
+            musicGroupStudentFee.setNextPaymentDate(musicGroupPaymentCalenderService.getNextPaymentDate(musicGroupId, musicGroupStudentFee.getNextPaymentDate(),musicGroupStudentFee));
             musicGroupStudentFeeDao.update(musicGroupStudentFee);
 
             //插入交易明细
@@ -1795,7 +1802,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
                 //生成学员费用表
                 List<MusicGroupStudentFee> musicGroupStudentFees = musicGroupStudentFeeDao.initMusicGroupStudentFee(musicGroupId);
                 if(musicGroupStudentFees != null && musicGroupStudentFees.size() > 0){
-                    musicGroupStudentFeeDao.batchInsert(musicGroupStudentFees,musicGroupPaymentCalenderService.getNextPaymentDate(musicGroupId, null),"PAID_COMPLETED");
+                    musicGroupStudentFeeDao.batchInsert(musicGroupStudentFees,musicGroupPaymentCalenderService.getNextPaymentDate(musicGroupId, null,null),"PAID_COMPLETED");
                 }
             }
 		}

+ 13 - 14
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupStudentFeeServiceImpl.java

@@ -1,18 +1,9 @@
 package com.ym.mec.biz.service.impl;
 
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import com.ym.mec.biz.dal.dto.UpdateStudentFeeDto;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
 import com.ym.mec.biz.dal.dao.MusicGroupDao;
 import com.ym.mec.biz.dal.dao.MusicGroupStudentFeeDao;
 import com.ym.mec.biz.dal.dao.SysConfigDao;
+import com.ym.mec.biz.dal.dto.UpdateStudentFeeDto;
 import com.ym.mec.biz.dal.entity.MusicGroup;
 import com.ym.mec.biz.dal.entity.MusicGroupStudentFee;
 import com.ym.mec.biz.dal.entity.MusicGroupStudentFee.PaymentStatus;
@@ -23,6 +14,12 @@ import com.ym.mec.biz.service.SysMessageService;
 import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
 import com.ym.mec.thirdparty.message.MessageSenderPluginContext.MessageSender;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.math.BigDecimal;
+import java.util.*;
+import java.util.stream.Collectors;
 
 @Service
 public class MusicGroupStudentFeeServiceImpl extends BaseServiceImpl<Long, MusicGroupStudentFee> implements MusicGroupStudentFeeService {
@@ -54,9 +51,10 @@ public class MusicGroupStudentFeeServiceImpl extends BaseServiceImpl<Long, Music
 		List<MusicGroupStudentFee> updateList = new ArrayList<MusicGroupStudentFee>();
 
 		List<MusicGroupStudentFee> musicGroupStudentFeeList = musicGroupStudentFeeDao.queryWillRenewList(days);
-
 		for (MusicGroupStudentFee musicGroupStudentFee : musicGroupStudentFeeList) {
-			if (musicGroupStudentFee.getPaymentStatus() == PaymentStatus.PAID_COMPLETED && (musicGroupStudentFee.getCourseFee() != null && musicGroupStudentFee.getCourseFee().doubleValue() > 0)) {
+			//课程费用为空,或者课程费用为0,只更新下次缴费时间
+			if (musicGroupStudentFee.getPaymentStatus() == PaymentStatus.PAID_COMPLETED &&
+					(musicGroupStudentFee.getCourseFee() != null && musicGroupStudentFee.getCourseFee().doubleValue() > 0)) {
 				musicGroupStudentFee.setPaymentStatus(PaymentStatus.NON_PAYMENT);
 				musicGroupStudentFee.setUpdateTime(date);
 				updateList.add(musicGroupStudentFee);
@@ -66,7 +64,7 @@ public class MusicGroupStudentFeeServiceImpl extends BaseServiceImpl<Long, Music
 		if (updateList.size() > 0) {
 			musicGroupStudentFeeDao.batchUpdate(updateList);
 			MusicGroup musicGroup = musicGroupDao.get(updateList.get(0).getMusicGroupId());
-			Map<Integer, String> push = new HashMap<Integer, String>();
+			Map<Integer, String> push = new HashMap<>();
 			for (MusicGroupStudentFee sf : updateList) {
 				push.put(sf.getUserId(), sf.getUserId() + "");
 			}
@@ -83,7 +81,8 @@ public class MusicGroupStudentFeeServiceImpl extends BaseServiceImpl<Long, Music
 
 	@Override
 	public void updateStudentFee(UpdateStudentFeeDto studentFeeDto) {
-
+		//修改学员缴费周期和是否锁定
+		musicGroupStudentFeeDao.updateStudentFee(studentFeeDto);
 	}
 
 }

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

@@ -570,10 +570,6 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
                 sysUserCashAccountDao.insert(new SysUserCashAccount(userId, "CNY"));
                 //添加用户电子签章账户
 //                contractService.register(userId, sysUser.getRealName(), sysUser.getIdCardNo(), sysUser.getPhone());
-                //注册到融云
-//                if (StringUtils.isEmpty(sysUser.getAvatar())) {
-//                    sysUser.setAvatar(sysConfigDao.findConfigValue(SysConfigService.USER_DEFAULT_HEAD_URL));
-//                }
                 ImResult register = imFeignService.register(new ImUserModel(userId.toString(), sysUser.getUsername(), null));
                 sysUser.setImToken(register.getToken());
                 teacherDao.updateUser(sysUser);
@@ -610,7 +606,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
                 MusicGroupSubjectPlan musicOneSubjectClassPlan = musicGroupSubjectPlanDao.getMusicOneSubjectClassPlan(musicGroupId, studentRegistration.getActualSubjectId());
                 studentAddDto.setCourseFee(musicOneSubjectClassPlan.getFee());
             }
-            Date nextPaymentDate = musicGroupPaymentCalenderService.getNextPaymentDate(musicGroupId, null);
+            Date nextPaymentDate = musicGroupPaymentCalenderService.getNextPaymentDate(musicGroupId, null,null);
 
             //生成订单
             StudentPaymentOrder studentPaymentOrder = new StudentPaymentOrder();

+ 13 - 2
mec-biz/src/main/resources/config/mybatis/MusicGroupStudentFeeMapper.xml

@@ -139,7 +139,9 @@
     </update>
 
     <select id="queryWillRenewList" resultMap="MusicGroupStudentFee">
-        SELECT * FROM music_group_student_fee_ WHERE next_payment_date_ IS NOT NULL AND payment_status_ = 'PAID_COMPLETED' and date_add(now(), interval #{days} day) >= next_payment_date_
+        SELECT * FROM music_group_student_fee_
+        WHERE next_payment_date_ IS NOT NULL AND payment_status_ = 'PAID_COMPLETED'
+        and date_add(now(), interval #{days} day) >= next_payment_date_
     </select>
 
     <select id="countContinuosAbsenteeismStudentNum" resultType="java.util.Map">
@@ -187,6 +189,9 @@
     <select id="findPaymentStatusMap" resultType="java.util.Map">
         SELECT user_id_ 'key',payment_status_ 'value' FROM music_group_student_fee_ WHERE music_group_id_ = #{musicGroupId}
     </select>
+    <select id="queryByMusicGroupId" resultMap="MusicGroupStudentFee">
+        SELECT * FROM music_group_student_fee_ WHERE music_group_id_ = #{musicGroupId}
+    </select>
 
     <update id="batchUpdate" parameterType="java.util.List">
     	<foreach collection="list" item="item" index="index" open="" close="" separator=";">
@@ -230,6 +235,12 @@
         </foreach>
     </update>
     <update id="updateCourseFee">
-        UPDATE music_group_student_fee_ SET course_fee_ = #{courseFee} WHERE music_group_id_ = #{musicGroupId} AND subject_id_ = #{subjectId}
+        UPDATE music_group_student_fee_ SET course_fee_ = #{courseFee}
+        WHERE music_group_id_ = #{musicGroupId} AND subject_id_ = #{subjectId} AND is_lock_ = 0
+    </update>
+    <update id="updateStudentFee">
+        UPDATE music_group_student_fee_
+        SET course_fee_ = #{courseFee},is_lock_ = #{isLock},payment_period_list_ = #{paymentPeriodList}
+        WHERE music_group_id_ = #{musicGroupId} AND user_id_ = #{userId}
     </update>
 </mapper>

+ 6 - 6
mec-web/src/main/java/com/ym/mec/web/controller/MusicGroupController.java

@@ -63,12 +63,12 @@ public class MusicGroupController extends BaseController {
 		return succeed(musicGroupService.findMusicGroupSubjectInfo(musicGroupId));
 	}
 
-	@ApiOperation(value = "用户费用表,数据补全")
-	@PostMapping("/musicGroupStudentFeePatch")
-	public Object musicGroupStudentFeePatch(@RequestBody List<String> musicGroupIds){
-		musicGroupService.musicGroupStudentFeePatch(musicGroupIds);
-		return succeed();
-	}
+//	@ApiOperation(value = "用户费用表,数据补全")
+//	@PostMapping("/musicGroupStudentFeePatch")
+//	public Object musicGroupStudentFeePatch(@RequestBody List<String> musicGroupIds){
+//		musicGroupService.musicGroupStudentFeePatch(musicGroupIds);
+//		return succeed();
+//	}
 
 	@ApiOperation(value = "修改乐团声部信息")
 	@PostMapping("/updateSubjectInfo")

+ 0 - 1
mec-web/src/main/java/com/ym/mec/web/controller/MusicGroupPaymentCalenderController.java

@@ -68,5 +68,4 @@ public class MusicGroupPaymentCalenderController extends BaseController {
     public Object queryPage(QueryInfo queryInfo) {
         return succeed(musicGroupPaymentCalenderService.queryPage(queryInfo));
     }
-
 }

+ 9 - 0
mec-web/src/main/java/com/ym/mec/web/controller/StudentManageController.java

@@ -10,8 +10,11 @@ import com.ym.mec.biz.service.MusicGroupStudentFeeService;
 import com.ym.mec.biz.service.StudentManageService;
 import com.ym.mec.biz.service.StudentRegistrationService;
 import com.ym.mec.common.controller.BaseController;
+import com.ym.mec.common.exception.BizException;
 import io.swagger.annotations.*;
 import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
@@ -35,6 +38,7 @@ public class StudentManageController extends BaseController {
     private MusicGroupStudentFeeService musicGroupStudentFeeService;
     @Autowired
     private EmployeeDao employeeDao;
+    private final Logger LOGGER = LoggerFactory.getLogger(this.getClass());
 
     @ApiOperation(value = "获取学生列表")
     @GetMapping("/queryStudentList")
@@ -189,6 +193,11 @@ public class StudentManageController extends BaseController {
     @GetMapping(value = "/updateStudentFee")
     @PreAuthorize("@pcs.hasPermissions('studentManage/updateStudentFee')")
     public Object updateStudentFee(@RequestBody UpdateStudentFeeDto studentFeeDto) {
+        SysUser sysUser = sysUserFeignService.queryUserInfo();
+        if(sysUser == null){
+            throw new BizException("用户信息获取失败");
+        }
+        LOGGER.info("修改学员缴费金额和缴费周期,user:{},参数:{}",sysUser.getId(),studentFeeDto);
         musicGroupStudentFeeService.updateStudentFee(studentFeeDto);
         return succeed();
     }