Ver código fonte

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

# Conflicts:
#	mec-biz/src/main/java/com/ym/mec/biz/service/impl/ClassGroupServiceImpl.java
Joburgess 5 anos atrás
pai
commit
bc9d4e11ea
36 arquivos alterados com 561 adições e 225 exclusões
  1. 0 6
      mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/web/controller/TokenController.java
  2. 69 65
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/ClassGroupStudentMapperDao.java
  3. 7 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/TeacherDefaultMusicGroupSalaryDao.java
  4. 5 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/TeacherDefaultVipGroupSalaryDao.java
  5. 92 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/ClassGroupAdjustDto.java
  6. 17 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/ClassGroupStudentMapperDto.java
  7. 11 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/TeacherCloseDto.java
  8. 4 4
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/StudentRegistration.java
  9. 20 20
      mec-biz/src/main/java/com/ym/mec/biz/dal/enums/ClassGroupStudentStatusEnum.java
  10. 7 0
      mec-biz/src/main/java/com/ym/mec/biz/service/ClassGroupService.java
  11. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/StudentWithdrawService.java
  12. 7 0
      mec-biz/src/main/java/com/ym/mec/biz/service/TeacherDefaultVipGroupSalaryService.java
  13. 92 40
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ClassGroupServiceImpl.java
  14. 53 14
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleTeacherSalaryServiceImpl.java
  15. 1 10
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/PayServiceImpl.java
  16. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentRegistrationServiceImpl.java
  17. 10 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherDefaultMusicGroupSalaryServiceImpl.java
  18. 19 3
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherDefaultVipGroupSalaryServiceImpl.java
  19. 1 1
      mec-biz/src/main/resources/config/mybatis/ClassGroupStudentMapperMapper.xml
  20. 1 3
      mec-biz/src/main/resources/config/mybatis/StudentRegistrationMapper.xml
  21. 5 1
      mec-biz/src/main/resources/config/mybatis/TeacherDefaultMusicGroupSalaryMapper.xml
  22. 3 0
      mec-biz/src/main/resources/config/mybatis/TeacherDefaultVipGroupSalaryMapper.xml
  23. 2 1
      mec-biz/src/main/resources/config/mybatis/TeacherMapper.xml
  24. 4 0
      mec-client-api/src/main/java/com/ym/mec/task/TaskRemoteService.java
  25. 5 0
      mec-client-api/src/main/java/com/ym/mec/task/fallback/TaskRemoteServiceFallback.java
  26. 13 21
      mec-student/src/main/java/com/ym/mec/student/controller/CourseController.java
  27. 18 0
      mec-task/src/main/java/com/ym/mec/task/jobs/PushNoSignInMessage.java
  28. 18 0
      mec-task/src/main/java/com/ym/mec/task/jobs/PushNoSignOutMessage.java
  29. 18 0
      mec-task/src/main/java/com/ym/mec/task/jobs/VipGroupTeacherSalarySettlement.java
  30. 1 1
      mec-web/src/main/java/com/ym/mec/web/config/ResourceServerConfig.java
  31. 11 12
      mec-web/src/main/java/com/ym/mec/web/controller/ClassGroupController.java
  32. 18 0
      mec-web/src/main/java/com/ym/mec/web/controller/CourseScheduleController.java
  33. 5 9
      mec-web/src/main/java/com/ym/mec/web/controller/StudentManageController.java
  34. 10 0
      mec-web/src/main/java/com/ym/mec/web/controller/TaskController.java
  35. 10 8
      mec-web/src/main/java/com/ym/mec/web/controller/TeacherDefaultVipGroupSalaryController.java
  36. 1 1
      mec-web/src/main/java/com/ym/mec/web/controller/teacher/TeacherDefaultMusicGroupSalaryController.java

+ 0 - 6
mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/web/controller/TokenController.java

@@ -7,16 +7,13 @@ import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.entity.HttpResponseResult;
 import com.ym.mec.common.security.AuthUser;
 import com.ym.mec.common.security.SecurityUtils;
-
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
-
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.*;
-import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.security.oauth2.common.OAuth2AccessToken;
 import org.springframework.security.oauth2.provider.token.DefaultTokenServices;
 import org.springframework.util.LinkedMultiValueMap;
@@ -68,7 +65,6 @@ public class TokenController extends BaseController {
 
 	@ApiOperation(value = "获取用户信息")
     @GetMapping("/api/queryUserInfo")
-    @PreAuthorize("@pcs.hasPermissions('/api/queryUserInfo')")
     public Object apiQueryUserInfo() {
 		AuthUser authUser = SecurityUtils.getUser();
 		if(authUser != null){
@@ -88,7 +84,6 @@ public class TokenController extends BaseController {
     }
 
 	@PostMapping(value = "/refreshToken",consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
-    @PreAuthorize("@pcs.hasPermissions('refreshToken')")
 	@ApiOperation(value = "刷新token")
 	public HttpResponseResult refreshToken(String refreshToken, String clientId, String clientSecret) throws IOException {
 		String url = "http://auth-server/oauth/token";
@@ -111,7 +106,6 @@ public class TokenController extends BaseController {
 	}
 
 	@PostMapping(value = "exit",consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
-    @PreAuthorize("@pcs.hasPermissions('exit')")
 	@ApiOperation(value = "退出登录")
 	public HttpResponseResult logout(@RequestHeader(value = HttpHeaders.AUTHORIZATION) String authHeader) {
 		if (StringUtils.isBlank(authHeader)) {

+ 69 - 65
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/ClassGroupStudentMapperDao.java

@@ -11,77 +11,81 @@ import java.util.Map;
 
 public interface ClassGroupStudentMapperDao extends BaseDAO<Long, ClassGroupStudentMapper> {
 
-	/**
-	 * 批量插入学生
-	 * @param classGroupStudentMapperList
-	 * @return
-	 */
-	int classGroupStudentsInsert(@Param("classGroupStudentMapperList") List<ClassGroupStudentMapper> classGroupStudentMapperList);
+    /**
+     * 批量插入学生
+     *
+     * @param classGroupStudentMapperList
+     * @return
+     */
+    int classGroupStudentsInsert(@Param("classGroupStudentMapperList") List<ClassGroupStudentMapper> classGroupStudentMapperList);
 
-	/**
-	 * 根据班级和学生编号查询
-	 * @param classGroupId
-	 * @param userId
-	 * @return
-	 */
-	ClassGroupStudentMapper query(@Param("classGroupId") int classGroupId, @Param("userId") Integer userId);
+    /**
+     * 根据班级和学生编号查询
+     *
+     * @param classGroupId
+     * @param userId
+     * @return
+     */
+    ClassGroupStudentMapper query(@Param("classGroupId") int classGroupId, @Param("userId") Integer userId);
 
-	/**
-	 * 根据乐团编号删除指定学生
-	 * @param musicGroupId 乐团编号
-	 * @param userId 学生编号
-	 * @return
-	 */
-	int deleteStudentByMusicGroupId(@Param("musicGroupId") String musicGroupId, @Param("userId") Integer userId);
+    /**
+     * 根据乐团编号删除指定学生
+     *
+     * @param musicGroupId 乐团编号
+     * @param userId       学生编号
+     * @return
+     */
+    int deleteStudentByMusicGroupId(@Param("musicGroupId") String musicGroupId, @Param("userId") Integer userId);
 
-	/**
-	 * 根据班级编号删除关联
-	 * @param classGroupId
-	 */
-	void deleteByClassId(Integer classGroupId);
+    /**
+     * 根据班级编号删除关联
+     *
+     * @param classGroupId
+     */
+    void deleteByClassId(Integer classGroupId);
 
-	/**
-	 * @Author: Joburgess
-	 * @Date: 2019/10/17
-	 * @params [classGroupId, userId]
-	 * @return int
-	 * @describe 删除班级上的指定学生
-	 */
-	int deleteStudentByClassGroupId(@Param("classGroupId") Long classGroupId,@Param("userId") Long userId);
+    /**
+     * @return int
+     * @Author: Joburgess
+     * @Date: 2019/10/17
+     * @params [classGroupId, userId]
+     * @describe 删除班级上的指定学生
+     */
+    int deleteStudentByClassGroupId(@Param("classGroupId") Long classGroupId, @Param("userId") Long userId);
 
-	/**
-	 * @describe 根据班级编号获取班级学生名称列表
-	 * @author Joburgess
-	 * @date 2019/10/18
-	 * @param classGroupId: 班级编号
-	 * @return java.lang.String[]
-	 */
-	String[] findStudentNumByClassGroupId(@Param("classGroupId") Long classGroupId);
+    /**
+     * @param classGroupId: 班级编号
+     * @return java.lang.String[]
+     * @describe 根据班级编号获取班级学生名称列表
+     * @author Joburgess
+     * @date 2019/10/18
+     */
+    String[] findStudentNumByClassGroupId(@Param("classGroupId") Long classGroupId);
 
-	/**
-	 * @describe 获取班级学生
-	 * @author Joburgess
-	 * @date 2019/10/18
-	 * @param params:
-	 * @return java.util.List<com.ym.mec.biz.dal.dto.TeacherClassStudentDto>
-	 */
-	List<TeacherClassStudentDto> findClassStudent(Map<String,Object> params);
+    /**
+     * @param params:
+     * @return java.util.List<com.ym.mec.biz.dal.dto.TeacherClassStudentDto>
+     * @describe 获取班级学生
+     * @author Joburgess
+     * @date 2019/10/18
+     */
+    List<TeacherClassStudentDto> findClassStudent(Map<String, Object> params);
 
-	/**
-	 * @describe 统计班级学生数量
-	 * @author Joburgess
-	 * @date 2019/10/18
-	 * @param params:
-	 * @return int
-	 */
-	int findClassStudentNum(Map<String,Object> params);
+    /**
+     * @param params:
+     * @return int
+     * @describe 统计班级学生数量
+     * @author Joburgess
+     * @date 2019/10/18
+     */
+    int findClassStudentNum(Map<String, Object> params);
 
-	/**
-	 * @describe 获取点名列表
-	 * @author Joburgess
-	 * @date 2019/10/19
-	 * @param courseScheduleId: 课程编号
-	 * @return java.util.List<com.ym.mec.biz.dal.entity.StudentAttendance>
-	 */
-	List<StudentAttendanceViewDto> findStudentByCourse(Long courseScheduleId);
+    /**
+     * @param courseScheduleId: 课程编号
+     * @return java.util.List<com.ym.mec.biz.dal.entity.StudentAttendance>
+     * @describe 获取点名列表
+     * @author Joburgess
+     * @date 2019/10/19
+     */
+    List<StudentAttendanceViewDto> findStudentByCourse(Long courseScheduleId);
 }

+ 7 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/TeacherDefaultMusicGroupSalaryDao.java

@@ -20,4 +20,11 @@ public interface TeacherDefaultMusicGroupSalaryDao extends BaseDAO<Long, Teacher
      * @return
      */
     List<TeacherDefaultMusicGroupSalary> getTeacherSalaryByUserIdAndType(@Param("userId") int userId, @Param("classGroupType") String classGroupType, @Param("settlementType") SalarySettlementTypeEnum settlementType);
+
+    /**
+     * 根据教师编号和结算类型删除
+     * @param userId
+     * @param settlementType
+     */
+    void delByTeacherId(@Param("userId")Integer userId, @Param("settlementType") String settlementType);
 }

+ 5 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/TeacherDefaultVipGroupSalaryDao.java

@@ -16,4 +16,9 @@ public interface TeacherDefaultVipGroupSalaryDao extends BaseDAO<Long, TeacherDe
     TeacherDefaultVipGroupSalary findByTeacherAndCategory(@Param("userId") Long userId,
                                                           @Param("categoryId") Long categoryId);
 
+    /**
+     * 根据教师编号删除vip课课酬设置
+     * @param userId
+     */
+    void delByTeacherId(Integer userId);
 }

+ 92 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/ClassGroupAdjustDto.java

@@ -0,0 +1,92 @@
+package com.ym.mec.biz.dal.dto;
+
+import com.ym.mec.biz.dal.entity.ClassGroupStudentMapper;
+import com.ym.mec.biz.dal.entity.ClassGroupTeacherMapper;
+import com.ym.mec.biz.dal.enums.YesOrNoEnum;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.time.LocalDateTime;
+import java.util.List;
+
+/**
+ * 班级调整
+ */
+public class ClassGroupAdjustDto {
+
+    @ApiModelProperty(value = "乐团id", required = true)
+    private String musicGroupId;
+
+    @ApiModelProperty(value = "班级名称", required = true)
+    private String classGroupName;
+
+    @ApiModelProperty(value = "学生-班级", required = true)
+    private List<ClassGroupStudentMapperDto> classGroupStudentMapperDtoList;
+
+    @ApiModelProperty(value = "老师设置", required = true)
+    private List<ClassGroupTeacherMapper> classGroupTeacherMapperList;
+
+    @ApiModelProperty(value = "是否永久 方式1-永久 0-临时", required = true)
+    private YesOrNoEnum type;
+
+    @ApiModelProperty(value = "开始时间", required = true)
+    private LocalDateTime startDate;
+
+    @ApiModelProperty(value = "结束时间", required = true)
+    private LocalDateTime endDate;
+
+    public String getClassGroupName() {
+        return classGroupName;
+    }
+
+    public void setClassGroupName(String classGroupName) {
+        this.classGroupName = classGroupName;
+    }
+
+    public YesOrNoEnum getType() {
+        return type;
+    }
+
+    public void setType(YesOrNoEnum type) {
+        this.type = type;
+    }
+
+    public LocalDateTime getStartDate() {
+        return startDate;
+    }
+
+    public void setStartDate(LocalDateTime startDate) {
+        this.startDate = startDate;
+    }
+
+    public LocalDateTime getEndDate() {
+        return endDate;
+    }
+
+    public void setEndDate(LocalDateTime endDate) {
+        this.endDate = endDate;
+    }
+
+    public List<ClassGroupTeacherMapper> getClassGroupTeacherMapperList() {
+        return classGroupTeacherMapperList;
+    }
+
+    public void setClassGroupTeacherMapperList(List<ClassGroupTeacherMapper> classGroupTeacherMapperList) {
+        this.classGroupTeacherMapperList = classGroupTeacherMapperList;
+    }
+
+    public List<ClassGroupStudentMapperDto> getClassGroupStudentMapperDtoList() {
+        return classGroupStudentMapperDtoList;
+    }
+
+    public void setClassGroupStudentMapperDtoList(List<ClassGroupStudentMapperDto> classGroupStudentMapperDtoList) {
+        this.classGroupStudentMapperDtoList = classGroupStudentMapperDtoList;
+    }
+
+    public String getMusicGroupId() {
+        return musicGroupId;
+    }
+
+    public void setMusicGroupId(String musicGroupId) {
+        this.musicGroupId = musicGroupId;
+    }
+}

+ 17 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/ClassGroupStudentMapperDto.java

@@ -0,0 +1,17 @@
+package com.ym.mec.biz.dal.dto;
+
+import com.ym.mec.biz.dal.entity.ClassGroupStudentMapper;
+import io.swagger.annotations.ApiModelProperty;
+
+public class ClassGroupStudentMapperDto extends ClassGroupStudentMapper {
+    @ApiModelProperty(value = "科目编号",required = true)
+    private Integer actual_subject_id_;
+
+    public Integer getActual_subject_id_() {
+        return actual_subject_id_;
+    }
+
+    public void setActual_subject_id_(Integer actual_subject_id_) {
+        this.actual_subject_id_ = actual_subject_id_;
+    }
+}

+ 11 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/TeacherCloseDto.java

@@ -19,6 +19,9 @@ public class TeacherCloseDto {
     @ApiModelProperty(value = "课程类型")
     private String courseScheduleType;
 
+    @ApiModelProperty(value = "课程编号")
+    private Integer courseScheduleId;
+
     @ApiModelProperty(value = "上课类型(主教助教)")
     private String teacherRole;
 
@@ -43,6 +46,14 @@ public class TeacherCloseDto {
     @ApiModelProperty(value = "补贴")
     private BigDecimal subsidy;
 
+    public Integer getCourseScheduleId() {
+        return courseScheduleId;
+    }
+
+    public void setCourseScheduleId(Integer courseScheduleId) {
+        this.courseScheduleId = courseScheduleId;
+    }
+
     public String getClassTime() {
         return classTime;
     }

+ 4 - 4
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/StudentRegistration.java

@@ -78,8 +78,8 @@ public class StudentRegistration {
     @ApiModelProperty(value = "用户所在乐团状态)",required = false)
     private ClassGroupStudentStatusEnum musicGroupStatus;
 
-    @ApiModelProperty(value = "班级id", hidden = true)
-    private Integer classGroupId;
+    @ApiModelProperty(value = "班级ids", hidden = true)
+    private String classGroupId;
 
     @ApiModelProperty(value = "零时课程费用", hidden = true)
     private BigDecimal temporaryCourseFee;
@@ -228,11 +228,11 @@ public class StudentRegistration {
         return paymentStatus;
     }
 
-    public Integer getClassGroupId() {
+    public String getClassGroupId() {
         return classGroupId;
     }
 
-    public void setClassGroupId(Integer classGroupId) {
+    public void setClassGroupId(String classGroupId) {
         this.classGroupId = classGroupId;
     }
 

+ 20 - 20
mec-biz/src/main/java/com/ym/mec/biz/dal/enums/ClassGroupStudentStatusEnum.java

@@ -6,31 +6,31 @@ import com.ym.mec.common.enums.BaseEnum;
  * 班级类型(普通班级、合奏班级)
  */
 public enum ClassGroupStudentStatusEnum implements BaseEnum<String, ClassGroupStudentStatusEnum> {
-	NORMAL("NORMAL", "在读"), LEAVE("LEAVE", "请假"), QUIT("QUIT", "退团");
+    NORMAL("NORMAL", "在读"), LEAVE("LEAVE", "请假"), QUIT("QUIT", "退班");
 
-	private String code;
+    private String code;
 
-	private String msg;
+    private String msg;
 
-	ClassGroupStudentStatusEnum(String code, String msg) {
-		this.code = code;
-		this.msg = msg;
-	}
+    ClassGroupStudentStatusEnum(String code, String msg) {
+        this.code = code;
+        this.msg = msg;
+    }
 
-	public void setCode(String code) {
-		this.code = code;
-	}
+    public void setCode(String code) {
+        this.code = code;
+    }
 
-	public String getMsg() {
-		return msg;
-	}
+    public String getMsg() {
+        return msg;
+    }
 
-	public void setMsg(String msg) {
-		this.msg = msg;
-	}
+    public void setMsg(String msg) {
+        this.msg = msg;
+    }
 
-	@Override
-	public String getCode() {
-		return this.code;
-	}
+    @Override
+    public String getCode() {
+        return this.code;
+    }
 }

+ 7 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/ClassGroupService.java

@@ -237,4 +237,11 @@ public interface ClassGroupService extends BaseService<Integer, ClassGroup> {
      * @return java.util.List<com.ym.mec.biz.dal.dto.StudentAttendanceViewDto>
      */
     List<StudentAttendanceViewDto> findAttendanceStudentByCourse(Long courseScheduleId);
+
+    /**
+     * 班级调整
+     * @param classGroupAdjustDto
+     * @return
+     */
+    ClassGroup classGroupAdjust(ClassGroupAdjustDto classGroupAdjustDto) throws Exception;
 }

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

@@ -24,7 +24,7 @@ public interface StudentWithdrawService extends BaseService<String, StudentWithd
     PageInfo<WithdrawInfoDto> queryWithdrawPage(CashAccountDetail cashAccountDetail);
 
     /**
-     *
+     *  新增提现记录
      * @param studentWithdraw
      */
     void add(StudentWithdraw studentWithdraw) throws Exception;

+ 7 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/TeacherDefaultVipGroupSalaryService.java

@@ -3,6 +3,8 @@ package com.ym.mec.biz.service;
 import com.ym.mec.biz.dal.entity.TeacherDefaultVipGroupSalary;
 import com.ym.mec.common.service.BaseService;
 
+import java.util.List;
+
 public interface TeacherDefaultVipGroupSalaryService extends BaseService<Long, TeacherDefaultVipGroupSalary> {
 
     /**
@@ -14,4 +16,9 @@ public interface TeacherDefaultVipGroupSalaryService extends BaseService<Long, T
      */
     TeacherDefaultVipGroupSalary findByTeacherAndCategory(Long userId, Long categoryId);
 
+    /**
+     * 批量新增修改教师vip课酬设置
+     * @param teacherDefaultVipGroupSalaries
+     */
+    void upSet(List<TeacherDefaultVipGroupSalary> teacherDefaultVipGroupSalaries);
 }

+ 92 - 40
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ClassGroupServiceImpl.java

@@ -131,7 +131,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
             classGroupStudentMapper.setStatus(ClassGroupStudentStatusEnum.NORMAL);
             classGroupStudentList.add(classGroupStudentMapper);
             StudentRegistration studentRegistration = new StudentRegistration();
-            studentRegistration.setClassGroupId(classGroup.getId());
+            studentRegistration.setClassGroupId(classGroup.getId().toString());
             studentRegistration.setUserId(Integer.getInteger(userId));
             studentRegistration.setMusicGroupId(classGroup.getMusicGroupId());
             studentRegistrationDao.updateByUserIdAndMusicGroupId(studentRegistration);
@@ -313,8 +313,8 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
                     Float monthConsumeRate=overCoursesOfMonth.divide(overCoursesOfMonth,2,BigDecimal.ROUND_HALF_UP).floatValue();
                     vipGroup.setMonthAvg(monthConsumeRate);
                 }
-
             });
+
         }
         if (count == 0) {
             dataList = new ArrayList<>();
@@ -344,7 +344,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
     @Override
     public List<ClassGroupTeachersDto> getClassGroupAndTeacherSalary(String musicGroupId, SalarySettlementTypeEnum type) throws Exception {
         //乐团班级及班级老师
-        List<ClassGroupTeachersDto> classGroupAndTeachers = getClassGroupAndTeachers(musicGroupId,"NORMAL,MIX,HIGH");
+        List<ClassGroupTeachersDto> classGroupAndTeachers = getClassGroupAndTeachers(musicGroupId, "NORMAL,MIX,HIGH");
 
         for (ClassGroupTeachersDto classGroupAndTeacher : classGroupAndTeachers) {
             //班级的教师列表
@@ -354,7 +354,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
                 String courseType = classGroupAndTeacher.getType().equals(ClassGroupTypeEnum.NORMAL) ? "SINGLE" : classGroupAndTeacher.getType().getCode();
                 List<TeacherDefaultMusicGroupSalary> teacherSalaryByUserIdAndType = teacherDefaultMusicGroupSalaryService.getTeacherSalaryByUserIdAndType(classGroupTeacherMapper.getUserId(), courseType, type);
                 if (teacherSalaryByUserIdAndType == null) {
-                    throw new Exception("userId:"+classGroupTeacherMapper.getUserId()+"名字:"+classGroupTeacherMapper.getUserName()+" 老师没有设置课酬");
+                    throw new Exception("userId:" + classGroupTeacherMapper.getUserId() + "名字:" + classGroupTeacherMapper.getUserName() + " 老师没有设置课酬");
                 }
                 classGroupTeacherMapper.setTeacherDefaultMusicGroupSalaryList(teacherSalaryByUserIdAndType);
             }
@@ -376,19 +376,19 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
             params.put("offset", pageInfo.getOffset());
             courseListDtos = classGroupDao.queryCoursePage(params);
             courseListDtos.forEach(e -> {
-                if (ClassGroupTypeEnum.VIP==e.getType()) {
+                if (ClassGroupTypeEnum.VIP == e.getType()) {
                     //获取vip课的学生名称列表
                     List<String> vipStuNames = classGroupDao.findVipStuNames(e.getMusicGroupId());
                     if (vipStuNames != null && vipStuNames.size() > 0) {
                         e.setStudentNames(StringUtils.join(vipStuNames, ","));
                     }
-                    if(e.getOffLineClassesNum()>0&&e.getOffLineClassesNum()<=0){
+                    if (e.getOffLineClassesNum() > 0 && e.getOffLineClassesNum() <= 0) {
                         e.setClassMode(1);
-                    }else if(e.getOffLineClassesNum()>0&&e.getOffLineClassesNum()>0){
+                    } else if (e.getOffLineClassesNum() > 0 && e.getOffLineClassesNum() > 0) {
                         e.setClassMode(3);
-                    }else if(e.getOnlineClassesNum()<0&&e.getOffLineClassesNum()>=0){
+                    } else if (e.getOnlineClassesNum() < 0 && e.getOffLineClassesNum() >= 0) {
                         e.setClassMode(2);
-                    }else{
+                    } else {
                         e.setClassMode(0);
                     }
                 } else {
@@ -430,7 +430,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
                 teachers.removeAll(Collections.singleton(null));
                 //获取乐团群用户总数
                 BigDecimal count = musicGroupUserNumMap.get(e.getId());
-                e.setCount(count == null?0:count.intValue() + teachers.size());
+                e.setCount(count == null ? 0 : count.intValue() + teachers.size());
                 e.setId("mg" + e.getId());
             });
         } else {
@@ -440,11 +440,11 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
         if (imGroupModels1 != null && imGroupModels1.size() > 0) {
             Set<String> classGroupIds = imGroupModels1.stream().map(e -> e.getId()).collect(Collectors.toSet());
             //获取班级老师总数map
-            List<Map<Integer, Integer>> nums = classGroupDao.countTeacherNums(StringUtils.join(classGroupIds,","));
+            List<Map<Integer, Integer>> nums = classGroupDao.countTeacherNums(StringUtils.join(classGroupIds, ","));
             Map<Integer, Integer> numsMap = MapUtil.convertMybatisMap(nums);
             imGroupModels1.forEach(e -> {
                 Integer num = numsMap.get(e.getId());
-                e.setCount(num == null?0:num + e.getCount());
+                e.setCount(num == null ? 0 : num + e.getCount());
                 e.setId("cg" + e.getId());
             });
             imGroupModels.addAll(imGroupModels1);
@@ -521,15 +521,15 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public void addMusicGroupTeam(Integer teacherId, String musicGroupId,Integer improventClassesNum) throws Exception {
+    public void addMusicGroupTeam(Integer teacherId, String musicGroupId, Integer improventClassesNum) throws Exception {
         //所有学员都已经分配
         List<StudentRegistration> students = studentRegistrationDao.getNoClassStuBySubjectId(musicGroupId, null);
-        if(students != null && students.size() > 0){
+        if (students != null && students.size() > 0) {
             throw new Exception("还有学员未分配班级");
         }
         //所有单技班都有合奏班
         List<ClassGroup> classGroupList = classGroupDao.findNoClassSubjects(musicGroupId);
-        if(classGroupList != null && classGroupList.size() > 0){
+        if (classGroupList != null && classGroupList.size() > 0) {
             throw new Exception("还有单技班未分配合奏");
         }
         //设置教学主管
@@ -544,12 +544,12 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
     @Override
     public List<TeacherClassGroupDto> findTeacherClassGroups(String type) {
         SysUser user = sysUserFeignService.queryUserInfo();
-        if(Objects.isNull(user)){
+        if (Objects.isNull(user)) {
             throw new BizException("请登录");
         }
 
         List<TeacherClassGroupDto> teacherMusicClassGroup;
-        switch (type){
+        switch (type) {
             case "VIP":
                 teacherMusicClassGroup = classGroupDao.findTeacherVipClassGroup(user.getId().longValue());
                 break;
@@ -559,7 +559,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
             default:
                 throw new BizException("请指定课程类型");
         }
-        if(CollectionUtils.isEmpty(teacherMusicClassGroup)){
+        if (CollectionUtils.isEmpty(teacherMusicClassGroup)) {
             return teacherMusicClassGroup;
         }
 
@@ -575,16 +575,16 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
 
         teacherMusicClassGroup.forEach(teacherClassGroupDto -> {
 
-            if(teacherClassGroupDto.getType()==ClassGroupTypeEnum.VIP){
+            if (teacherClassGroupDto.getType() == ClassGroupTypeEnum.VIP) {
                 String[] studentNums = classGroupStudentMapperDao.findStudentNumByClassGroupId(teacherClassGroupDto.getClassGroupId());
-                teacherClassGroupDto.setStudentNames(StringUtils.join(studentNums,","));
-                if(teacherClassGroupDto.getOffLineClassesNum()>0&&teacherClassGroupDto.getOffLineClassesNum()<=0){
+                teacherClassGroupDto.setStudentNames(StringUtils.join(studentNums, ","));
+                if (teacherClassGroupDto.getOffLineClassesNum() > 0 && teacherClassGroupDto.getOffLineClassesNum() <= 0) {
                     teacherClassGroupDto.setClassMode(1);
-                }else if(teacherClassGroupDto.getOffLineClassesNum()>0&&teacherClassGroupDto.getOffLineClassesNum()>0){
+                } else if (teacherClassGroupDto.getOffLineClassesNum() > 0 && teacherClassGroupDto.getOffLineClassesNum() > 0) {
                     teacherClassGroupDto.setClassMode(3);
-                }else if(teacherClassGroupDto.getOnlineClassesNum()<0&&teacherClassGroupDto.getOffLineClassesNum()>=0){
+                } else if (teacherClassGroupDto.getOnlineClassesNum() < 0 && teacherClassGroupDto.getOffLineClassesNum() >= 0) {
                     teacherClassGroupDto.setClassMode(2);
-                }else{
+                } else {
                     teacherClassGroupDto.setClassMode(0);
                 }
 
@@ -603,17 +603,17 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
                 }
 
             }
-            String subjectIdList=teacherClassGroupDto.getSubjectIdList();
-            if(StringUtils.isNotEmpty(subjectIdList)){
-                if(Objects.nonNull(musicGroupIdAndNum)&&Objects.nonNull(musicGroupIdAndNum.get(teacherClassGroupDto.getMusicGroupId()))){
+            String subjectIdList = teacherClassGroupDto.getSubjectIdList();
+            if (StringUtils.isNotEmpty(subjectIdList)) {
+                if (Objects.nonNull(musicGroupIdAndNum) && Objects.nonNull(musicGroupIdAndNum.get(teacherClassGroupDto.getMusicGroupId()))) {
                     teacherClassGroupDto.setThreeClassNoAttendanceStudentNum(musicGroupIdAndNum.get(teacherClassGroupDto.getMusicGroupId()));
                 }
                 String[] subjectIds = subjectIdList.split(",");
-                List<String> subjectNameList=new ArrayList<>();
+                List<String> subjectNameList = new ArrayList<>();
                 for (String subjectId : subjectIds) {
                     subjectNameList.add(subjectMapBySubjectIdsList.get(Integer.parseInt(subjectId)));
                 }
-                teacherClassGroupDto.setSubjectNames(StringUtils.join(subjectNameList,","));
+                teacherClassGroupDto.setSubjectNames(StringUtils.join(subjectNameList, ","));
             }
         });
 
@@ -623,11 +623,11 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
     @Override
     @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
     public boolean updateClassStudentNum(Long classGroupId, Integer num) {
-        ClassGroup classGroup=classGroupDao.lockClassGroup(classGroupId);
-        if(Objects.isNull(classGroup)){
+        ClassGroup classGroup = classGroupDao.lockClassGroup(classGroupId);
+        if (Objects.isNull(classGroup)) {
             throw new BizException("班级不存在");
         }
-        classGroup.setStudentNum(classGroup.getStudentNum()+num);
+        classGroup.setStudentNum(classGroup.getStudentNum() + num);
         classGroup.setUpdateTime(new Date());
 
         classGroupDao.update(classGroup);
@@ -637,34 +637,34 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
 
     @Override
     public TeacherClassHeadInfo findTeacherClassGroupInfo(Long classGroupId) {
-        if(Objects.isNull(classGroupId)){
+        if (Objects.isNull(classGroupId)) {
             throw new BizException("请指定班级");
         }
 
         ClassGroup classGroup = classGroupDao.get(classGroupId.intValue());
 
-        if(Objects.isNull(classGroup)){
+        if (Objects.isNull(classGroup)) {
             throw new BizException("未找到该班级");
         }
 
-        TeacherClassHeadInfo teacherClassHeadInfo=new TeacherClassHeadInfo();
+        TeacherClassHeadInfo teacherClassHeadInfo = new TeacherClassHeadInfo();
         teacherClassHeadInfo.setStudentNum(classGroup.getStudentNum());
         teacherClassHeadInfo.setCurrentClassTimes(classGroup.getCurrentClassTimes());
         teacherClassHeadInfo.setTotalClassTimes(classGroup.getTotalClassTimes());
         ClassGroupTeacherMapper bishopTeacher = classGroupTeacherMapperDao.findByClassGroupAndRole(classGroupId, TeachTypeEnum.BISHOP);
-        if(Objects.nonNull(bishopTeacher)){
+        if (Objects.nonNull(bishopTeacher)) {
             teacherClassHeadInfo.setBishopTeacherId(bishopTeacher.getId());
             teacherClassHeadInfo.setBishopTeacher(bishopTeacher.getUserName());
         }
         ClassGroupTeacherMapper teachingTeacher = classGroupTeacherMapperDao.findByClassGroupAndRole(classGroupId, TeachTypeEnum.TEACHING);
-        if(Objects.nonNull(teachingTeacher)){
+        if (Objects.nonNull(teachingTeacher)) {
             teacherClassHeadInfo.setTeachingTeacherId(teachingTeacher.getId());
             teacherClassHeadInfo.setTeachingTeacher(teachingTeacher.getUserName());
         }
 
-        if(classGroup.getType()==ClassGroupTypeEnum.VIP){
+        if (classGroup.getType() == ClassGroupTypeEnum.VIP) {
             String[] studentNums = classGroupStudentMapperDao.findStudentNumByClassGroupId(classGroupId);
-            teacherClassHeadInfo.setStudentNames(StringUtils.join(studentNums,","));
+            teacherClassHeadInfo.setStudentNames(StringUtils.join(studentNums, ","));
         }
 
         return teacherClassHeadInfo;
@@ -691,9 +691,61 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
 
     @Override
     public List<StudentAttendanceViewDto> findAttendanceStudentByCourse(Long courseScheduleId) {
-        if(Objects.isNull(courseScheduleId)){
+        if (Objects.isNull(courseScheduleId)) {
             throw new BizException("请指定课程编号");
         }
         return classGroupStudentMapperDao.findStudentByCourse(courseScheduleId);
     }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public ClassGroup classGroupAdjust(ClassGroupAdjustDto classGroupAdjustDto) throws Exception {
+        Date date = new Date();
+
+        List<ClassGroupStudentMapperDto> classGroupStudentMapperDtoList = classGroupAdjustDto.getClassGroupStudentMapperDtoList();
+        String subject_id_list_ = "";
+        for (ClassGroupStudentMapper classGroupStudentMapperDto : classGroupStudentMapperDtoList) {
+            //1、永久调整,删除学生班级关联关系
+            if (classGroupAdjustDto.getType().equals(YesOrNoEnum.YES)) {
+                ClassGroupStudentMapper classStudentMapper = classGroupStudentMapperDao.query(classGroupStudentMapperDto.getClassGroupId(), classGroupStudentMapperDto.getUserId());
+                classStudentMapper.setStatus(ClassGroupStudentStatusEnum.QUIT);
+                classGroupStudentMapperDao.update(classStudentMapper);
+            }
+            subject_id_list_ += classGroupStudentMapperDto.getUserId() + ",";
+        }
+
+
+        subject_id_list_ = subject_id_list_.substring(0, subject_id_list_.length() - 1);
+
+        //2、新建班级
+        ClassGroup classGroup = new ClassGroup();
+        classGroup.setMusicGroupId(classGroupAdjustDto.getMusicGroupId());
+        classGroup.setSubjectIdList(subject_id_list_);
+        classGroup.setName(classGroupAdjustDto.getClassGroupName());
+        classGroup.setExpectStudentNum(classGroupStudentMapperDtoList.size());
+        classGroup.setStudentNum(classGroupStudentMapperDtoList.size());
+        classGroup.setType(ClassGroupTypeEnum.NORMAL);
+        classGroup.setDelFlag(YesOrNoEnum.NO);
+        classGroup.setCreateTime(date);
+        classGroup.setUpdateTime(date);
+        classGroupDao.insert(classGroup);
+
+        //3、将学生加入新班级(学生注册表,关联表)
+        List<ClassGroupStudentMapper> classGroupStudentMapperList = new ArrayList<>();
+        for (ClassGroupStudentMapperDto classGroupStudentMapperDto : classGroupStudentMapperDtoList) {
+            classGroupStudentMapperDto.setClassGroupId(classGroup.getId());
+            classGroupStudentMapperList.add(classGroupStudentMapperDto);
+        }
+        classGroupStudentMapperDao.classGroupStudentsInsert(classGroupStudentMapperList);
+
+
+        //4、将老师加入关联关系
+        List<ClassGroupTeacherMapper> classGroupTeacherMapperList = classGroupAdjustDto.getClassGroupTeacherMapperList();
+        for (ClassGroupTeacherMapper classGroupTeacherMapper : classGroupTeacherMapperList) {
+            classGroupTeacherMapper.setClassGroupId(classGroup.getId());
+            classGroupTeacherMapper.setMusicGroupId(classGroupAdjustDto.getMusicGroupId());
+        }
+        classGroupTeacherMapperDao.classGroupTeachersInsert(classGroupTeacherMapperList);
+        return classGroup;
+    }
 }

+ 53 - 14
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleTeacherSalaryServiceImpl.java

@@ -1,26 +1,53 @@
 package com.ym.mec.biz.service.impl;
 
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.CollectionUtils;
+
 import com.alibaba.fastjson.JSON;
-import com.ym.mec.biz.dal.dao.*;
+import com.ym.mec.biz.dal.dao.CourseScheduleComplaintsDao;
+import com.ym.mec.biz.dal.dao.CourseScheduleStudentPaymentDao;
+import com.ym.mec.biz.dal.dao.CourseScheduleTeacherSalaryDao;
+import com.ym.mec.biz.dal.dao.StudentPaymentOrderDao;
+import com.ym.mec.biz.dal.dao.SysConfigDao;
+import com.ym.mec.biz.dal.dao.TeacherDefaultVipGroupSalaryDao;
+import com.ym.mec.biz.dal.dao.VipGroupActivityDao;
 import com.ym.mec.biz.dal.dto.VipGroupSalarySettlementDto;
-import com.ym.mec.biz.dal.entity.*;
-import com.ym.mec.biz.dal.enums.*;
+import com.ym.mec.biz.dal.entity.CourseSchedule;
+import com.ym.mec.biz.dal.entity.CourseScheduleComplaints;
+import com.ym.mec.biz.dal.entity.CourseScheduleStudentPayment;
+import com.ym.mec.biz.dal.entity.CourseScheduleTeacherSalary;
+import com.ym.mec.biz.dal.entity.SysConfig;
+import com.ym.mec.biz.dal.entity.SysUserCashAccount;
+import com.ym.mec.biz.dal.entity.SysUserCashAccountDetail;
+import com.ym.mec.biz.dal.entity.TeacherDefaultVipGroupSalary;
+import com.ym.mec.biz.dal.entity.VipGroup;
+import com.ym.mec.biz.dal.entity.VipGroupActivity;
+import com.ym.mec.biz.dal.enums.AuditStatusEnum;
+import com.ym.mec.biz.dal.enums.DealStatusEnum;
+import com.ym.mec.biz.dal.enums.PlatformCashAccountDetailTypeEnum;
+import com.ym.mec.biz.dal.enums.TeachModeEnum;
+import com.ym.mec.biz.dal.enums.TeachTypeEnum;
+import com.ym.mec.biz.dal.enums.VipGroupActivityTypeEnum;
 import com.ym.mec.biz.service.CourseScheduleTeacherSalaryService;
+import com.ym.mec.biz.service.SysConfigService;
 import com.ym.mec.biz.service.SysUserCashAccountDetailService;
 import com.ym.mec.biz.service.SysUserCashAccountService;
 import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.util.CollectionUtils;
-
-import java.math.BigDecimal;
-import java.util.*;
-import java.util.stream.Collectors;
 
 @Service
 public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long, CourseScheduleTeacherSalary>  implements CourseScheduleTeacherSalaryService {
@@ -41,6 +68,9 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
 	private SysUserCashAccountDetailService sysUserCashAccountDetailService;
 	@Autowired
 	private StudentPaymentOrderDao studentPaymentOrderDao;
+	
+	@Autowired
+	private SysConfigDao sysConfigDao;
 
 	private static final Logger LOGGER = LoggerFactory
 			.getLogger(CourseScheduleTeacherSalaryServiceImpl.class);
@@ -124,10 +154,19 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
 	@Override
 	@Transactional(rollbackFor = Exception.class)
 	public void teacherSalarySettlement() {
+		
+		int days = 7;
+		
+		SysConfig sysConfig = sysConfigDao.findByParamName(SysConfigService.VIP_SETTLEMENT_CYCLE);
+		if(sysConfig != null){
+			days = Integer.parseInt(sysConfig.getParanValue());
+		}
+		
 		//获取教师未结算课程记录
-		List<CourseScheduleTeacherSalary> someDayAgoTeacherCourseSalaryNoSettlement = courseScheduleTeacherSalaryDao.findSomeDayAgoTeacherCourseSalaryNoSettlement(7);
+		List<CourseScheduleTeacherSalary> someDayAgoTeacherCourseSalaryNoSettlement = courseScheduleTeacherSalaryDao.findSomeDayAgoTeacherCourseSalaryNoSettlement(days);
 		if(CollectionUtils.isEmpty(someDayAgoTeacherCourseSalaryNoSettlement)){
 			LOGGER.info("未获取到未结算课酬记录!");
+			return;
 		}
 		Date now=new Date();
 		//获取未结算课程编号列表

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

@@ -46,19 +46,10 @@ public class PayServiceImpl implements PayService {
         //支付通道决策
         SysAccount routingAccount = getRoutingAccount(amount);
         HashMap<String, Object> unionPay = new HashMap<>();
-        String type = "YQPAY";
         Map payMap;
-//        if (routingAccount != null) {
-//            //易乾支付
-//            payMap = YqPayUtil.getPayMap(amount, orderNo, notifyUrl, returnUrl, orderSubject, orderBody, routingAccount.getMerNo());
-//        } else {
-//            type = "UNIONPAY";
-//            payMap = UnionPay.getPayMap(amount, orderNo, notifyUrl, returnUrl, orderSubject);
-//        }
-        type = "UNIONPAY";
         payMap = UnionPay.getPayMap(amount, orderNo, notifyUrl, returnUrl, orderSubject);
         unionPay.put("orderNo", orderNo);
-        unionPay.put("type", type);
+        unionPay.put("type", "UNIONPAY");
         unionPay.put("payMap", payMap);
         return unionPay;
     }

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

@@ -379,7 +379,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
             //学生报名表
             studentRegistrationDao.insert(studentRegistration);
             if (studentRegistration.getClassGroupId() != null) {
-                ClassGroup classGroup = classGroupDao.get(studentRegistration.getClassGroupId());
+                ClassGroup classGroup = classGroupDao.get(Integer.parseInt(studentRegistration.getClassGroupId()));
                 if (classGroup != null) {
                     if (classGroup.getMusicGroupId().equals(studentRegistration.getMusicGroupId())) {
                         throw new Exception("班级录入错误");
@@ -393,7 +393,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
                     throw new Exception("班级不存在");
                 }
                 //新增班级学生关系
-                classGroupStudentMapperDao.insert(new ClassGroupStudentMapper(studentRegistration.getClassGroupId(), userId));
+                classGroupStudentMapperDao.insert(new ClassGroupStudentMapper(Integer.parseInt(studentRegistration.getClassGroupId()), userId));
                 //乐团学生费用表
                 MusicGroupSubjectPlan musicOneSubjectClassPlan = musicGroupSubjectPlanDao.getMusicOneSubjectClassPlan(studentRegistration.getMusicGroupId(), studentRegistration.getActualSubjectId());
                 //获取当前月

+ 10 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherDefaultMusicGroupSalaryServiceImpl.java

@@ -34,7 +34,15 @@ public class TeacherDefaultMusicGroupSalaryServiceImpl extends BaseServiceImpl<L
 	@Override
 	public void batchUpset(List<TeacherDefaultMusicGroupSalary> teacherDefaultMusicGroupSalaries) {
 		if(teacherDefaultMusicGroupSalaries != null && teacherDefaultMusicGroupSalaries.size() > 0){
-			Date date = new Date();
+			//删除当前教师所有的结算类型的数据
+			TeacherDefaultMusicGroupSalary salary = teacherDefaultMusicGroupSalaries.get(0);
+			teacherDefaultMusicGroupSalaryDao.delByTeacherId(salary.getUserId(),salary.getSettlementType().getCode());
+			//批量新增
+			teacherDefaultMusicGroupSalaries.forEach(e->{
+				teacherDefaultMusicGroupSalaryDao.insert(e);
+			});
+
+			/*Date date = new Date();
 			teacherDefaultMusicGroupSalaries.forEach(e->{
 				if(e.getId() == null){
 					teacherDefaultMusicGroupSalaryDao.insert(e);
@@ -46,7 +54,7 @@ public class TeacherDefaultMusicGroupSalaryServiceImpl extends BaseServiceImpl<L
 						teacherDefaultMusicGroupSalaryDao.update(e);
 					}
 				}
-			});
+			});*/
 		}
 	}
 }

+ 19 - 3
mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherDefaultVipGroupSalaryServiceImpl.java

@@ -1,13 +1,15 @@
 package com.ym.mec.biz.service.impl;
 
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
 import com.ym.mec.biz.dal.dao.TeacherDefaultVipGroupSalaryDao;
 import com.ym.mec.biz.dal.entity.TeacherDefaultVipGroupSalary;
 import com.ym.mec.biz.service.TeacherDefaultVipGroupSalaryService;
 import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
 
 @Service
 public class TeacherDefaultVipGroupSalaryServiceImpl extends BaseServiceImpl<Long, TeacherDefaultVipGroupSalary>  implements TeacherDefaultVipGroupSalaryService {
@@ -24,4 +26,18 @@ public class TeacherDefaultVipGroupSalaryServiceImpl extends BaseServiceImpl<Lon
 	public TeacherDefaultVipGroupSalary findByTeacherAndCategory(Long userId, Long categoryId) {
 		return teacherDefaultVipGroupSalaryDao.findByTeacherAndCategory(userId,categoryId);
 	}
+
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public void upSet(List<TeacherDefaultVipGroupSalary> teacherDefaultVipGroupSalaries) {
+		if(teacherDefaultVipGroupSalaries != null && teacherDefaultVipGroupSalaries.size() > 0){
+			//根据教师编号删除
+			TeacherDefaultVipGroupSalary salary = teacherDefaultVipGroupSalaries.get(0);
+			teacherDefaultVipGroupSalaryDao.delByTeacherId(salary.getUserId());
+			//新增
+			teacherDefaultVipGroupSalaries.forEach(e->{
+				teacherDefaultVipGroupSalaryDao.insert(e);
+			});
+		}
+	}
 }

+ 1 - 1
mec-biz/src/main/resources/config/mybatis/ClassGroupStudentMapperMapper.xml

@@ -77,7 +77,7 @@
     </insert>
     
     <select id="query" resultMap="ClassGroupStudentMapper" parameterType="map">
-		SELECT * FROM class_group_student_mapper where class_group_id_ = #{classGroupId} and user_id_ = #{userId}
+		SELECT * FROM class_group_student_mapper where class_group_id_ = #{classGroupId} and user_id_ = #{userId} AND status_ IN ('NORMAL','LEAVE')
 	</select>
     <select id="findStudentNumByClassGroupId" resultType="string">
         SELECT

+ 1 - 3
mec-biz/src/main/resources/config/mybatis/StudentRegistrationMapper.xml

@@ -28,8 +28,6 @@
         <result column="parents_company_" property="parentsCompany"/>
         <result column="payment_status_" property="paymentStatus"
                 typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
-        <result column="last_payment_date_" property="lastPaymentDate"/>
-        <result column="next_payment_date_" property="nextPaymentDate"/>
         <result column="music_group_status_" property="musicGroupStatus"/>
     </resultMap>
     
@@ -297,6 +295,6 @@
 
     <!-- 获取班级下的学生 -->
     <select id="findClassGroupStu" resultMap="StudentRegistration">
-        SELECT * FROM student_registration WHERE music_group_id_= #{musicGroupId} AND class_group_id_=#{classGroupId}
+        SELECT * FROM student_registration WHERE music_group_id_= #{musicGroupId} AND FIND_IN_SET(#{classGroupId},class_group_id_)
     </select>
 </mapper>

+ 5 - 1
mec-biz/src/main/resources/config/mybatis/TeacherDefaultMusicGroupSalaryMapper.xml

@@ -77,7 +77,11 @@
 		DELETE FROM teacher_default_music_group_salary WHERE id_ = #{id}
 	</delete>
 
-	<!-- 分页查询 -->
+    <delete id="delByTeacherId">
+		DELETE FROM teacher_default_music_group_salary WHERE user_id_ = #{userId} AND settlement_type_ = #{settlementType}
+	</delete>
+
+    <!-- 分页查询 -->
 	<select id="queryPage" resultMap="TeacherDefaultMusicGroupSalary" parameterType="map">
 		SELECT * FROM teacher_default_music_group_salary tdmgs
 		<include refid="querySalary"/>

+ 3 - 0
mec-biz/src/main/resources/config/mybatis/TeacherDefaultVipGroupSalaryMapper.xml

@@ -62,6 +62,9 @@
     <delete id="delete">
 		DELETE FROM teacher_default_vip_group_salary WHERE id_ = #{id} 
 	</delete>
+    <delete id="delByTeacherId">
+        DELETE FROM teacher_default_vip_group_salary WHERE user_id_ = #{userId}
+    </delete>
 
     <!-- 分页查询 -->
     <select id="queryPage" resultMap="TeacherDefaultVipGroupSalary" parameterType="map">

+ 2 - 1
mec-biz/src/main/resources/config/mybatis/TeacherMapper.xml

@@ -281,9 +281,10 @@
         <result property="actualSalary" column="actual_salary_"/>
         <result property="subsidy" column="subsidy_"/>
         <result property="settlementTime" column="settlement_time_"/>
+        <result property="courseScheduleId" column="course_schedule_id_"/>
     </resultMap>
     <select id="queryCloses" resultMap="TeacherCloseDto">
-        SELECT cs.class_date_,cs.start_class_time_,cg.name_ class_name_,cs.type_ class_type_,
+        SELECT cs.id_ course_schedule_id_,cs.class_date_,cs.start_class_time_,cg.name_ class_name_,cs.type_ class_type_,
         csts.teacher_role_,cg.current_class_times_,cg.total_class_times_,
         ta.sign_in_status_,ta.sign_out_status_,csts.actual_salary_,csts.settlement_time_,csts.subsidy_
         FROM course_schedule cs

+ 4 - 0
mec-client-api/src/main/java/com/ym/mec/task/TaskRemoteService.java

@@ -25,4 +25,8 @@ public interface TaskRemoteService {
 	@GetMapping("task/pushNoSignOutMessage")
 	// 推送未签退消息提醒
 	public void pushNoSignOutMessage();
+	
+	@GetMapping("task/vipGroupTeacherSalarySettlement")
+	// vip课课酬结算
+	public void vipGroupTeacherSalarySettlement();
 }

+ 5 - 0
mec-client-api/src/main/java/com/ym/mec/task/fallback/TaskRemoteServiceFallback.java

@@ -37,4 +37,9 @@ public class TaskRemoteServiceFallback implements TaskRemoteService {
 		logger.info("推送未签退消息提醒的服务调用失败");
 	}
 
+	@Override
+	public void vipGroupTeacherSalarySettlement() {
+		logger.info("vip课课酬结算的服务调用失败");
+	}
+
 }

+ 13 - 21
mec-student/src/main/java/com/ym/mec/student/controller/CourseController.java

@@ -1,25 +1,24 @@
 package com.ym.mec.student.controller;
 
-import java.math.BigDecimal;
-
-import com.ym.mec.auth.api.client.SysUserFeignService;
-import com.ym.mec.auth.api.entity.SysUser;
-import com.ym.mec.biz.dal.page.StudentPayLogQueryInfo;
-import com.ym.mec.biz.service.ClassGroupService;
-import com.ym.mec.biz.service.MusicGroupService;
-import com.ym.mec.common.controller.BaseController;
-import com.ym.mec.common.page.QueryInfo;
-
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
+import com.ym.mec.auth.api.client.SysUserFeignService;
+import com.ym.mec.auth.api.entity.SysUser;
+import com.ym.mec.biz.dal.page.StudentPayLogQueryInfo;
+import com.ym.mec.biz.service.ClassGroupService;
+import com.ym.mec.biz.service.MusicGroupService;
+import com.ym.mec.common.controller.BaseController;
+import com.ym.mec.common.page.QueryInfo;
+
 @RequestMapping("course")
 @Api(tags = "课程服务")
 @RestController
@@ -34,6 +33,7 @@ public class CourseController extends BaseController {
 
     @ApiOperation("获取学生所购买课程列表")
     @GetMapping(value = "/queryUserMusicGroups")
+    @PreAuthorize("@pcs.hasPermissions('course/queryUserMusicGroups')")
     public Object queryCoursePage(QueryInfo queryInfo){
         SysUser sysUser = sysUserFeignService.queryUserInfo();
         if(sysUser == null){
@@ -44,6 +44,7 @@ public class CourseController extends BaseController {
 
     @ApiOperation("获取学员所有聊天群组")
     @GetMapping(value = "/queryUserGroups")
+    @PreAuthorize("@pcs.hasPermissions('course/queryUserGroups')")
     public Object queryUserGroups(String search){
         SysUser sysUser = sysUserFeignService.queryUserInfo();
         if(sysUser == null){
@@ -54,6 +55,7 @@ public class CourseController extends BaseController {
 
     @ApiOperation(value = "根据群编号,获取群组基本信息")
     @GetMapping("/findGroupById")
+    @PreAuthorize("@pcs.hasPermissions('course/findGroupById')")
     public Object findGroupById(String groupId){
         if(StringUtils.isEmpty(groupId)){
             return failed("参数校验错误");
@@ -68,6 +70,7 @@ public class CourseController extends BaseController {
 
     @ApiOperation(value = "分页获取学员购买记录")
     @PostMapping("/queryStudentPayLog")
+    @PreAuthorize("@pcs.hasPermissions('course/queryStudentPayLog')")
     public Object queryStudentPayLog(StudentPayLogQueryInfo studentPayLogQueryInfo){
         SysUser sysUser = sysUserFeignService.queryUserInfo();
         if(sysUser == null || sysUser.getId() == null){
@@ -76,15 +79,4 @@ public class CourseController extends BaseController {
         studentPayLogQueryInfo.setUserId(sysUser.getId());
         return succeed(classGroupService.queryStudentPayLog(studentPayLogQueryInfo));
     }
-
-	@ApiOperation(value = "课酬调整")
-	@PostMapping("/updateTeacherCoursesSalary")
-	public Object updateTeacherCoursesSalary(Long courseScheduleId, Integer teacherId, BigDecimal salary, BigDecimal subsidy, String scope) {
-		SysUser sysUser = sysUserFeignService.queryUserInfo();
-		if (sysUser == null || sysUser.getId() == null) {
-			return failed("获取用户失败");
-		}
-		musicGroupService.updateTeacherCoursesSalary(courseScheduleId, teacherId, salary, subsidy, scope);
-		return succeed();
-	}
 }

+ 18 - 0
mec-task/src/main/java/com/ym/mec/task/jobs/PushNoSignInMessage.java

@@ -0,0 +1,18 @@
+package com.ym.mec.task.jobs;
+
+import org.springframework.beans.factory.annotation.Autowired;
+
+import com.ym.mec.task.TaskRemoteService;
+import com.ym.mec.task.core.BaseTask;
+import com.ym.mec.task.core.TaskException;
+
+public class PushNoSignInMessage  extends BaseTask {
+
+	@Autowired
+	private TaskRemoteService taskRemoteService;
+
+	@Override
+	public void execute() throws TaskException {
+		taskRemoteService.pushNoSignInMessage();
+	}
+}

+ 18 - 0
mec-task/src/main/java/com/ym/mec/task/jobs/PushNoSignOutMessage.java

@@ -0,0 +1,18 @@
+package com.ym.mec.task.jobs;
+
+import org.springframework.beans.factory.annotation.Autowired;
+
+import com.ym.mec.task.TaskRemoteService;
+import com.ym.mec.task.core.BaseTask;
+import com.ym.mec.task.core.TaskException;
+
+public class PushNoSignOutMessage extends BaseTask {
+
+	@Autowired
+	private TaskRemoteService taskRemoteService;
+
+	@Override
+	public void execute() throws TaskException {
+		taskRemoteService.pushNoSignOutMessage();
+	}
+}

+ 18 - 0
mec-task/src/main/java/com/ym/mec/task/jobs/VipGroupTeacherSalarySettlement.java

@@ -0,0 +1,18 @@
+package com.ym.mec.task.jobs;
+
+import org.springframework.beans.factory.annotation.Autowired;
+
+import com.ym.mec.task.TaskRemoteService;
+import com.ym.mec.task.core.BaseTask;
+import com.ym.mec.task.core.TaskException;
+
+public class VipGroupTeacherSalarySettlement extends BaseTask {
+
+	@Autowired
+	private TaskRemoteService taskRemoteService;
+
+	@Override
+	public void execute() throws TaskException {
+		taskRemoteService.vipGroupTeacherSalarySettlement();
+	}
+}

+ 1 - 1
mec-web/src/main/java/com/ym/mec/web/config/ResourceServerConfig.java

@@ -24,7 +24,7 @@ public class ResourceServerConfig extends ResourceServerConfigurerAdapter {
 
 	@Override
 	public void configure(HttpSecurity http) throws Exception {
-		http.csrf().disable().exceptionHandling().accessDeniedHandler(baseAccessDeniedHandler).authenticationEntryPoint(baseAuthenticationEntryPoint).and().authorizeRequests().antMatchers("/v2/api-docs").permitAll().anyRequest().authenticated().and().httpBasic();
+		http.csrf().disable().exceptionHandling().accessDeniedHandler(baseAccessDeniedHandler).authenticationEntryPoint(baseAuthenticationEntryPoint).and().authorizeRequests().antMatchers("/v2/api-docs","/classGroup/revisionClassGroup").permitAll().anyRequest().authenticated().and().httpBasic();
 	}
 
 	@Override

+ 11 - 12
mec-web/src/main/java/com/ym/mec/web/controller/ClassGroupController.java

@@ -1,5 +1,6 @@
 package com.ym.mec.web.controller;
 
+import com.ym.mec.biz.dal.dto.ClassGroupAdjustDto;
 import com.ym.mec.biz.dal.dto.HighClassGroupDto;
 import com.ym.mec.biz.dal.entity.ClassGroup;
 import com.ym.mec.biz.dal.entity.ClassGroupTeacherMapper;
@@ -93,7 +94,7 @@ public class ClassGroupController extends BaseController {
     @GetMapping("/findClassGroupAboutMix")
     @PreAuthorize("@pcs.hasPermissions('classGroup/findClassGroupAboutMix')")
     public HttpResponseResult findClassGroupAboutMix(@ApiParam(value = "乐团编号", required = true) @RequestParam String musicGroupId,
-                                         @ApiParam(value = "班级编号", required = false) Integer mixClassGroupId) {
+                                                     @ApiParam(value = "班级编号", required = false) Integer mixClassGroupId) {
         return succeed(classGroupService.findClassGroup(musicGroupId, mixClassGroupId));
     }
 
@@ -140,7 +141,7 @@ public class ClassGroupController extends BaseController {
     @GetMapping("/findMusicGroupClassTeacher")
     @PreAuthorize("@pcs.hasPermissions('classGroup/findMusicGroupClassTeacher')")
     public HttpResponseResult findMusicGroupClassTeacher(@ApiParam(value = "乐团编号", required = true) @RequestParam String musicGroupId) {
-        return succeed(classGroupService.getClassGroupAndTeachers(musicGroupId,"NORMAL,MIX"));
+        return succeed(classGroupService.getClassGroupAndTeachers(musicGroupId, "NORMAL,MIX"));
     }
 
     @ApiOperation(value = "获取乐团班级老师课酬")
@@ -182,23 +183,21 @@ public class ClassGroupController extends BaseController {
     @PreAuthorize("@pcs.hasPermissions('classGroup/addMusicGroupTeam')")
     @ApiImplicitParams({@ApiImplicitParam(name = "musicGroupId", value = "乐团编号", required = true, dataType = "String"),
             @ApiImplicitParam(name = "teacherId", value = "老师编号", required = true, dataType = "Integer")})
-    public Object addMusicGroupTeam(Integer teacherId,String musicGroupId,Integer improventClassesNum) throws Exception {
-        if(teacherId == null || StringUtils.isEmpty(musicGroupId) || improventClassesNum == null){
+    public Object addMusicGroupTeam(Integer teacherId, String musicGroupId, Integer improventClassesNum) throws Exception {
+        if (teacherId == null || StringUtils.isEmpty(musicGroupId) || improventClassesNum == null) {
             return failed("参数校验错误");
         }
-        classGroupService.addMusicGroupTeam(teacherId,musicGroupId,improventClassesNum);
+        classGroupService.addMusicGroupTeam(teacherId, musicGroupId, improventClassesNum);
         return succeed();
     }
 
 
-    @ApiOperation(value = "合并班级")
-    @PostMapping("/mergeClassGroup")
-    @PreAuthorize("@pcs.hasPermissions('classGroup/mergeClassGroup')")
+    @ApiOperation(value = "调整班级")
+    @PostMapping("/revisionClassGroup")
+    @PreAuthorize("@pcs.hasPermissions('classGroup/revisionClassGroup')")
     @ApiImplicitParams({@ApiImplicitParam(name = "classGroupIds", value = "班级编号,号分割", required = true, dataType = "String")})
-    public HttpResponseResult mergeClassGroup(String classGroupIds) throws Exception {
-        //软删除班级
-
-        return succeed();
+    public HttpResponseResult revisionClassGroup(@RequestBody ClassGroupAdjustDto classGroupAdjustDto) throws Exception {
+        return succeed(classGroupService.classGroupAdjust(classGroupAdjustDto));
     }
 
 }

+ 18 - 0
mec-web/src/main/java/com/ym/mec/web/controller/CourseScheduleController.java

@@ -4,6 +4,7 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
 
+import java.math.BigDecimal;
 import java.util.Date;
 import java.util.List;
 import java.util.Map;
@@ -22,6 +23,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
+import com.ym.mec.auth.api.client.SysUserFeignService;
+import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.dao.ClassGroupTeacherMapperDao;
 import com.ym.mec.biz.dal.dto.ClassDateAdjustDto;
 import com.ym.mec.biz.dal.dto.CreateCourseScheduleDto;
@@ -51,6 +54,9 @@ public class CourseScheduleController extends BaseController {
     private StudentAttendanceService studentAttendanceService;
     @Autowired
     private ClassGroupTeacherMapperDao classGroupTeacherMapperDao;
+
+    @Autowired
+    private SysUserFeignService sysUserFeignService;
     
     @Autowired
     private MusicGroupService musicGroupService;
@@ -154,4 +160,16 @@ public class CourseScheduleController extends BaseController {
         return succeed();
     }
 
+	@ApiOperation(value = "课酬调整")
+	@PostMapping("/updateTeacherCoursesSalary")
+    @PreAuthorize("@pcs.hasPermissions('course/updateTeacherCoursesSalary')")
+	public Object updateTeacherCoursesSalary(Long courseScheduleId, Integer teacherId, BigDecimal salary, BigDecimal subsidy, String scope) {
+		SysUser sysUser = sysUserFeignService.queryUserInfo();
+		if (sysUser == null || sysUser.getId() == null) {
+			return failed("获取用户失败");
+		}
+		musicGroupService.updateTeacherCoursesSalary(courseScheduleId, teacherId, salary, subsidy, scope);
+		return succeed();
+	}
+
 }

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

@@ -1,23 +1,20 @@
 package com.ym.mec.web.controller;
 
+import com.ym.mec.biz.dal.page.StudentManageAttendanceQueryInfo;
+import com.ym.mec.biz.dal.page.StudentManageCourseQueryInfo;
+import com.ym.mec.biz.dal.page.StudentManageQueryInfo;
 import com.ym.mec.biz.dal.page.TeacherPaymentRecordInfo;
-import com.ym.mec.common.page.QueryInfo;
+import com.ym.mec.biz.service.StudentManageService;
+import com.ym.mec.common.controller.BaseController;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
-
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
-import com.ym.mec.biz.dal.page.StudentManageAttendanceQueryInfo;
-import com.ym.mec.biz.dal.page.StudentManageCourseQueryInfo;
-import com.ym.mec.biz.dal.page.StudentManageQueryInfo;
-import com.ym.mec.biz.service.StudentManageService;
-import com.ym.mec.common.controller.BaseController;
-
 /**
  * @Author Joburgess
  * @Date 2019/9/19
@@ -85,5 +82,4 @@ public class StudentManageController extends BaseController {
     public Object queryStudentPayment(TeacherPaymentRecordInfo queryInfo){
         return succeed(studentManageService.queryStudentPayment(queryInfo));
     }
-
 }

+ 10 - 0
mec-web/src/main/java/com/ym/mec/web/controller/TaskController.java

@@ -6,6 +6,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 import com.ym.mec.biz.service.CourseScheduleService;
+import com.ym.mec.biz.service.CourseScheduleTeacherSalaryService;
 import com.ym.mec.biz.service.MusicGroupStudentFeeService;
 import com.ym.mec.biz.service.TeacherAttendanceService;
 import com.ym.mec.biz.service.VipGroupService;
@@ -27,6 +28,9 @@ public class TaskController extends BaseController {
 	@Autowired
 	private TeacherAttendanceService teacherAttendanceService;
 	
+	@Autowired
+	private CourseScheduleTeacherSalaryService courseScheduleTeacherSalaryService;
+	
 	@GetMapping("/refreshPaymentFeeStatus")
 	// 刷新付费状态
 	public void refreshPaymentFeeStatus() {
@@ -39,6 +43,12 @@ public class TaskController extends BaseController {
 		vipGroupService.awardedMonthlyRewards();
 	}
 
+	@GetMapping("/vipGroupTeacherSalarySettlement")
+	// vip课课酬结算
+	public void vipGroupTeacherSalarySettlement() {
+		courseScheduleTeacherSalaryService.teacherSalarySettlement();
+	}
+
 	@GetMapping("/updateCourseScheduleToOverStatus")
 	// 更新课程状态至已结束
 	public void updateCourseScheduleToOverStatus() {

+ 10 - 8
mec-web/src/main/java/com/ym/mec/web/controller/TeacherDefaultVipGroupSalaryController.java

@@ -8,10 +8,9 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
 
 /**
  * @Author Joburgess
@@ -34,14 +33,17 @@ public class TeacherDefaultVipGroupSalaryController extends BaseController {
 
     @ApiOperation(value = "获取教师的vip课酬列表")
     @GetMapping("/queryPageByTeacherId")
+    @PreAuthorize("@pcs.hasPermissions('teacherDefaultVipGroupSalary/queryPageByTeacherId')")
     public Object queryPageByTeacherId(QueryInfo queryInfo){
         return succeed(teacherDefaultVipGroupSalaryService.queryPage(queryInfo));
     }
 
-    @ApiOperation(value = "修改教师vip课酬")
-    @PostMapping("/set")
-    public Object setVipGroupSalary(TeacherDefaultVipGroupSalary teacherDefaultVipGroupSalary){
-        return succeed(teacherDefaultVipGroupSalaryService.update(teacherDefaultVipGroupSalary));
+    @ApiOperation(value = "批量新增、修改教师vip课酬")
+    @PostMapping("/upSet")
+    @PreAuthorize("@pcs.hasPermissions('teacherDefaultVipGroupSalary/upSet')")
+    public Object setVipGroupSalary(@RequestBody List<TeacherDefaultVipGroupSalary> teacherDefaultVipGroupSalaries){
+        teacherDefaultVipGroupSalaryService.upSet(teacherDefaultVipGroupSalaries);
+        return succeed();
     }
 
 }

+ 1 - 1
mec-web/src/main/java/com/ym/mec/web/controller/teacher/TeacherDefaultMusicGroupSalaryController.java

@@ -26,7 +26,7 @@ public class TeacherDefaultMusicGroupSalaryController extends BaseController {
     @Autowired
     private TeacherDefaultMusicGroupSalaryService teacherDefaultMusicGroupSalaryService;
 
-    @ApiOperation(value = "批量新增、修改、删除教师乐团课薪酬")
+    @ApiOperation(value = "批量新增、修改教师乐团课薪酬")
     @PostMapping("/batchUpset")
     public Object batchUpset(@RequestBody List<TeacherDefaultMusicGroupSalary> teacherDefaultMusicGroupSalaries) {
         teacherDefaultMusicGroupSalaryService.batchUpset(teacherDefaultMusicGroupSalaries);