Browse Source

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

chengpeng 5 years ago
parent
commit
bdc3918eca
65 changed files with 2968 additions and 417 deletions
  1. 7 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleDao.java
  2. 9 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleHistoryDao.java
  3. 9 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/MusicGroupQuitDao.java
  4. 1 2
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/SysUserBankCardDao.java
  5. 9 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/VipGroupActivityDao.java
  6. 9 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/VipGroupDefaultClassesCycleDao.java
  7. 9 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/VipGroupDefaultClassesUnitPriceDao.java
  8. 36 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/RegisterPayDto.java
  9. 180 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/CourseScheduleHistory.java
  10. 92 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/MusicGroupQuit.java
  11. 17 7
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/StudentWithdraw.java
  12. 67 19
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/TeacherLeaveRecord.java
  13. 213 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/VipGroupActivity.java
  14. 22 22
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/VipGroupCategory.java
  15. 81 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/VipGroupDefaultClassesCycle.java
  16. 92 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/VipGroupDefaultClassesUnitPrice.java
  17. 8 0
      mec-biz/src/main/java/com/ym/mec/biz/service/CourseScheduleHistoryService.java
  18. 8 0
      mec-biz/src/main/java/com/ym/mec/biz/service/MusicGroupQuitService.java
  19. 5 0
      mec-biz/src/main/java/com/ym/mec/biz/service/StudentWithdrawService.java
  20. 1 2
      mec-biz/src/main/java/com/ym/mec/biz/service/SysUserBankCardService.java
  21. 8 0
      mec-biz/src/main/java/com/ym/mec/biz/service/VipGroupActivityService.java
  22. 8 0
      mec-biz/src/main/java/com/ym/mec/biz/service/VipGroupDefaultClassesCycleService.java
  23. 8 0
      mec-biz/src/main/java/com/ym/mec/biz/service/VipGroupDefaultClassesUnitPriceService.java
  24. 23 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleHistoryServiceImpl.java
  25. 16 6
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java
  26. 10 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/DemoGroupServiceImpl.java
  27. 23 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupQuitServiceImpl.java
  28. 50 12
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentWithdrawServiceImpl.java
  29. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/SysUserBankCardServiceImpl.java
  30. 23 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupActivityServiceImpl.java
  31. 23 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupDefaultClassesCycleServiceImpl.java
  32. 23 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupDefaultClassesUnitPriceServiceImpl.java
  33. 112 0
      mec-biz/src/main/resources/config/mybatis/CourseScheduleHistoryMapper.xml
  34. 12 0
      mec-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml
  35. 80 0
      mec-biz/src/main/resources/config/mybatis/MusicGroupQuitMapper.xml
  36. 7 7
      mec-biz/src/main/resources/config/mybatis/StudentWithdrawMapper.xml
  37. 1 10
      mec-biz/src/main/resources/config/mybatis/SysUserBankCardMapper.xml
  38. 9 4
      mec-biz/src/main/resources/config/mybatis/SysUserCashAccountDetailMapper.xml
  39. 94 67
      mec-biz/src/main/resources/config/mybatis/TeacherLeaveRecordMapper.xml
  40. 124 0
      mec-biz/src/main/resources/config/mybatis/VipGroupActivityMapper.xml
  41. 59 53
      mec-biz/src/main/resources/config/mybatis/VipGroupCategoryMapper.xml
  42. 76 0
      mec-biz/src/main/resources/config/mybatis/VipGroupDefaultClassesCycleMapper.xml
  43. 80 0
      mec-biz/src/main/resources/config/mybatis/VipGroupDefaultClassesUnitPriceMapper.xml
  44. 0 13
      mec-education/src/main/java/com/ym/mec/education/controller/App.java
  45. 5 8
      mec-education/src/main/java/com/ym/mec/education/controller/CourseScheduleController.java
  46. 5 6
      mec-education/src/main/java/com/ym/mec/education/controller/StudentAttendanceController.java
  47. 2 2
      mec-education/src/main/java/com/ym/mec/education/resp/StudentAttendanceResp.java
  48. 11 4
      mec-education/src/main/java/com/ym/mec/education/service/ICourseScheduleService.java
  49. 13 3
      mec-education/src/main/java/com/ym/mec/education/service/IStudentAttendanceService.java
  50. 36 19
      mec-education/src/main/java/com/ym/mec/education/service/impl/CourseScheduleServiceImpl.java
  51. 98 99
      mec-education/src/main/java/com/ym/mec/education/service/impl/StudentAttendanceServiceImpl.java
  52. 3 2
      mec-student/src/main/java/com/ym/mec/student/controller/RegisterController.java
  53. 25 13
      mec-student/src/main/java/com/ym/mec/student/controller/SysMessageController.java
  54. BIN
      mec-thirdparty/libs/SADK-3.2.5.2.jar
  55. 7 0
      mec-thirdparty/pom.xml
  56. 288 0
      mec-thirdparty/src/main/java/com/ym/mec/thirdparty/yqpay/CFCARAUtil.java
  57. 384 0
      mec-thirdparty/src/main/java/com/ym/mec/thirdparty/yqpay/DateUtils.java
  58. 72 0
      mec-thirdparty/src/main/java/com/ym/mec/thirdparty/yqpay/Intfc.java
  59. 50 0
      mec-thirdparty/src/main/java/com/ym/mec/thirdparty/yqpay/Msg.java
  60. 81 0
      mec-thirdparty/src/main/java/com/ym/mec/thirdparty/yqpay/NotifyMsg.java
  61. 68 0
      mec-thirdparty/src/main/java/com/ym/mec/thirdparty/yqpay/RspMsg.java
  62. 50 0
      mec-thirdparty/src/main/java/com/ym/mec/thirdparty/yqpay/YqPayUtil.java
  63. 12 3
      mec-web/src/main/java/com/ym/mec/web/controller/StudentWithdrawController.java
  64. 2 10
      mec-web/src/main/java/com/ym/mec/web/controller/SysUserBankCardController.java
  65. 10 20
      mec-web/src/main/java/com/ym/mec/web/controller/SysUserCashAccountDetailController.java

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

@@ -116,6 +116,13 @@ public interface CourseScheduleDao extends BaseDAO<Long, CourseSchedule> {
 
     /**
      * @Author: Joburgess
+     * @Date: 2019/9/29
+     * 获取班级的声部
+     */
+    String[] findClassSubjects(List<Integer> ids);
+
+    /**
+     * @Author: Joburgess
      * @Date: 2019/9/24
      * 根据id批量获取课程
      */

+ 9 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleHistoryDao.java

@@ -0,0 +1,9 @@
+package com.ym.mec.biz.dal.dao;
+
+import com.ym.mec.biz.dal.entity.CourseScheduleHistory;
+import com.ym.mec.common.dal.BaseDAO;
+
+public interface CourseScheduleHistoryDao extends BaseDAO<Long, CourseScheduleHistory> {
+
+	
+}

+ 9 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/MusicGroupQuitDao.java

@@ -0,0 +1,9 @@
+package com.ym.mec.biz.dal.dao;
+
+import com.ym.mec.biz.dal.entity.MusicGroupQuit;
+import com.ym.mec.common.dal.BaseDAO;
+
+public interface MusicGroupQuitDao extends BaseDAO<Long, MusicGroupQuit> {
+
+	
+}

+ 1 - 2
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/SysUserBankCardDao.java

@@ -14,9 +14,8 @@ public interface SysUserBankCardDao extends BaseDAO<Long, SysUserBankCard> {
 
     /**
      * 获取用户银行卡列表
-     * @param search
      * @param userId
      * @return
      */
-    List<SysUserBankCard> findByUser(@Param("search") String search,@Param("userId") Integer userId);
+    List<SysUserBankCard> findByUser(@Param("userId") Integer userId);
 }

+ 9 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/VipGroupActivityDao.java

@@ -0,0 +1,9 @@
+package com.ym.mec.biz.dal.dao;
+
+import com.ym.mec.biz.dal.entity.VipGroupActivity;
+import com.ym.mec.common.dal.BaseDAO;
+
+public interface VipGroupActivityDao extends BaseDAO<Integer, VipGroupActivity> {
+
+	
+}

+ 9 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/VipGroupDefaultClassesCycleDao.java

@@ -0,0 +1,9 @@
+package com.ym.mec.biz.dal.dao;
+
+import com.ym.mec.biz.dal.entity.VipGroupDefaultClassesCycle;
+import com.ym.mec.common.dal.BaseDAO;
+
+public interface VipGroupDefaultClassesCycleDao extends BaseDAO<Integer, VipGroupDefaultClassesCycle> {
+
+	
+}

+ 9 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/VipGroupDefaultClassesUnitPriceDao.java

@@ -0,0 +1,9 @@
+package com.ym.mec.biz.dal.dao;
+
+import com.ym.mec.biz.dal.entity.VipGroupDefaultClassesUnitPrice;
+import com.ym.mec.common.dal.BaseDAO;
+
+public interface VipGroupDefaultClassesUnitPriceDao extends BaseDAO<Integer, VipGroupDefaultClassesUnitPrice> {
+
+	
+}

+ 36 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/RegisterPayDto.java

@@ -0,0 +1,36 @@
+package com.ym.mec.biz.dal.dto;
+
+import java.util.Arrays;
+
+/**
+ * 学团注册支付
+ */
+public class RegisterPayDto {
+    private Integer registerId;
+    private String goodsGroupIds;
+    private String goodsIds;
+
+    public Integer getRegisterId() {
+        return registerId;
+    }
+
+    public void setRegisterId(Integer registerId) {
+        this.registerId = registerId;
+    }
+
+    public String getGoodsGroupId() {
+        return goodsGroupIds;
+    }
+
+    public void setGoodsGroupId(String goodsGroupIds) {
+        this.goodsGroupIds = goodsGroupIds;
+    }
+
+    public String getGoodsIds() {
+        return goodsIds;
+    }
+
+    public void setGoodsIds(String goodsIds) {
+        this.goodsIds = goodsIds;
+    }
+}

+ 180 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/CourseScheduleHistory.java

@@ -0,0 +1,180 @@
+package com.ym.mec.biz.dal.entity;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * 对应数据库表(course_schedule_history):
+ */
+public class CourseScheduleHistory {
+
+	/**  */
+	private Long id;
+	
+	/** 班级编号 */
+	private Integer classGroupId;
+	
+	/** 课程状态 */
+	private String status;
+	
+	/** 补贴 */
+	private java.math.BigDecimal subsidy;
+	
+	/** 上课日期 */
+	private java.util.Date classDate;
+	
+	/** 上课时间 */
+	private java.util.Date startClassTime;
+	
+	/** 结束时间 */
+	private java.util.Date endClassTime;
+	
+	/** 上课教师 */
+	private Integer teacherId;
+	
+	/** 实际上课教师 */
+	private Integer actualTeacherId;
+	
+	/**  */
+	private java.util.Date createTime;
+	
+	/**  */
+	private java.util.Date updateTime;
+	
+	/** 教学形式(线上、线下) */
+	private String teachMode;
+	
+	/** 投诉状态 */
+	private String complaintStatus;
+	
+	/** 课程类型(单技课、小班课、合奏课、综合课、练习课、启蒙课、集训课、VIP课、试听课) */
+	private String type;
+	
+	/** 课程编号 */
+	private Long courseScheduleId;
+	
+	public void setId(Long id){
+		this.id = id;
+	}
+	
+	public Long getId(){
+		return this.id;
+	}
+			
+	public void setClassGroupId(Integer classGroupId){
+		this.classGroupId = classGroupId;
+	}
+	
+	public Integer getClassGroupId(){
+		return this.classGroupId;
+	}
+			
+	public void setStatus(String status){
+		this.status = status;
+	}
+	
+	public String getStatus(){
+		return this.status;
+	}
+			
+	public void setSubsidy(java.math.BigDecimal subsidy){
+		this.subsidy = subsidy;
+	}
+	
+	public java.math.BigDecimal getSubsidy(){
+		return this.subsidy;
+	}
+			
+	public void setClassDate(java.util.Date classDate){
+		this.classDate = classDate;
+	}
+	
+	public java.util.Date getClassDate(){
+		return this.classDate;
+	}
+			
+	public void setStartClassTime(java.util.Date startClassTime){
+		this.startClassTime = startClassTime;
+	}
+	
+	public java.util.Date getStartClassTime(){
+		return this.startClassTime;
+	}
+			
+	public void setEndClassTime(java.util.Date endClassTime){
+		this.endClassTime = endClassTime;
+	}
+	
+	public java.util.Date getEndClassTime(){
+		return this.endClassTime;
+	}
+			
+	public void setTeacherId(Integer teacherId){
+		this.teacherId = teacherId;
+	}
+	
+	public Integer getTeacherId(){
+		return this.teacherId;
+	}
+			
+	public void setActualTeacherId(Integer actualTeacherId){
+		this.actualTeacherId = actualTeacherId;
+	}
+	
+	public Integer getActualTeacherId(){
+		return this.actualTeacherId;
+	}
+			
+	public void setCreateTime(java.util.Date createTime){
+		this.createTime = createTime;
+	}
+	
+	public java.util.Date getCreateTime(){
+		return this.createTime;
+	}
+			
+	public void setUpdateTime(java.util.Date updateTime){
+		this.updateTime = updateTime;
+	}
+	
+	public java.util.Date getUpdateTime(){
+		return this.updateTime;
+	}
+			
+	public void setTeachMode(String teachMode){
+		this.teachMode = teachMode;
+	}
+	
+	public String getTeachMode(){
+		return this.teachMode;
+	}
+			
+	public void setComplaintStatus(String complaintStatus){
+		this.complaintStatus = complaintStatus;
+	}
+	
+	public String getComplaintStatus(){
+		return this.complaintStatus;
+	}
+			
+	public void setType(String type){
+		this.type = type;
+	}
+	
+	public String getType(){
+		return this.type;
+	}
+			
+	public void setCourseScheduleId(Long courseScheduleId){
+		this.courseScheduleId = courseScheduleId;
+	}
+	
+	public Long getCourseScheduleId(){
+		return this.courseScheduleId;
+	}
+			
+	@Override
+	public String toString() {
+		return ToStringBuilder.reflectionToString(this);
+	}
+
+}

+ 92 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/MusicGroupQuit.java

@@ -0,0 +1,92 @@
+package com.ym.mec.biz.dal.entity;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * 对应数据库表(music_group_quit):
+ */
+public class MusicGroupQuit {
+
+	/**  */
+	private Long id;
+	
+	/** 用户编号 */
+	private Integer userId;
+	
+	/** 乐团编号 */
+	private Integer musicGroupId;
+	
+	/** 加入时间 */
+	private java.util.Date joinDate;
+	
+	/** 退出时间 */
+	private java.util.Date quitDate;
+	
+	/**  */
+	private java.util.Date createTime;
+	
+	/** 原因 */
+	private String reason;
+	
+	public void setId(Long id){
+		this.id = id;
+	}
+	
+	public Long getId(){
+		return this.id;
+	}
+			
+	public void setUserId(Integer userId){
+		this.userId = userId;
+	}
+	
+	public Integer getUserId(){
+		return this.userId;
+	}
+			
+	public void setMusicGroupId(Integer musicGroupId){
+		this.musicGroupId = musicGroupId;
+	}
+	
+	public Integer getMusicGroupId(){
+		return this.musicGroupId;
+	}
+			
+	public void setJoinDate(java.util.Date joinDate){
+		this.joinDate = joinDate;
+	}
+	
+	public java.util.Date getJoinDate(){
+		return this.joinDate;
+	}
+			
+	public void setQuitDate(java.util.Date quitDate){
+		this.quitDate = quitDate;
+	}
+	
+	public java.util.Date getQuitDate(){
+		return this.quitDate;
+	}
+			
+	public void setCreateTime(java.util.Date createTime){
+		this.createTime = createTime;
+	}
+	
+	public java.util.Date getCreateTime(){
+		return this.createTime;
+	}
+			
+	public void setReason(String reason){
+		this.reason = reason;
+	}
+	
+	public String getReason(){
+		return this.reason;
+	}
+			
+	@Override
+	public String toString() {
+		return ToStringBuilder.reflectionToString(this);
+	}
+
+}

+ 17 - 7
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/StudentWithdraw.java

@@ -13,13 +13,15 @@ import java.math.BigDecimal;
  */
 public class StudentWithdraw {
 
+	private Integer id;
+
 	/** 提现流水号 */
 	@ApiModelProperty(value = "提现流水号",required = false)
-	private String id;
+	private String withdrawNo;
 	
 	/** 用户编号 */
 	@ApiModelProperty(value = "用户编号",required = false)
-	private Long userId;
+	private Integer userId;
 	
 	/** 银行卡号 */
 	@ApiModelProperty(value = "银行卡号",required = false)
@@ -58,20 +60,28 @@ public class StudentWithdraw {
 	
 	/** 修改时间 */
 	private java.util.Date modifyTime;
-	
-	public void setId(String id){
+
+	public String getWithdrawNo() {
+		return withdrawNo;
+	}
+
+	public void setWithdrawNo(String withdrawNo) {
+		this.withdrawNo = withdrawNo;
+	}
+
+	public void setId(Integer id){
 		this.id = id;
 	}
 	
-	public String getId(){
+	public Integer getId(){
 		return this.id;
 	}
 			
-	public void setUserId(Long userId){
+	public void setUserId(Integer userId){
 		this.userId = userId;
 	}
 	
-	public Long getUserId(){
+	public Integer getUserId(){
 		return this.userId;
 	}
 			

+ 67 - 19
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/TeacherLeaveRecord.java

@@ -1,11 +1,9 @@
 package com.ym.mec.biz.dal.entity;
 
-import com.ym.mec.biz.dal.enums.AuditStatusEnum;
-
-import io.swagger.annotations.ApiModelProperty;
-
 import org.apache.commons.lang3.builder.ToStringBuilder;
 
+import com.ym.mec.biz.dal.enums.AuditStatusEnum;
+
 /**
  * 对应数据库表(teacher_leave_record):
  */
@@ -15,23 +13,18 @@ public class TeacherLeaveRecord {
 	private Long id;
 	
 	/**  */
-	@ApiModelProperty(value = "用户编号",required = false)
 	private Integer userId;
 	
 	/** 请假天数 */
-	@ApiModelProperty(value = "请假天数",required = false)
-	private Integer days;
+	private double days;
 	
 	/** 请假类型 */
-	@ApiModelProperty(value = "请假类型",required = false)
 	private String type;
 	
 	/** 请假状态(审批中、拒绝、通过) */
-	@ApiModelProperty(value = "请假审核状态",required = false)
 	private AuditStatusEnum status;
 	
 	/** 备注 */
-	@ApiModelProperty(value = "备注",required = false)
 	private String remark;
 	
 	/**  */
@@ -40,6 +33,21 @@ public class TeacherLeaveRecord {
 	/**  */
 	private java.util.Date updateTime;
 	
+	/** 请假开始时间 */
+	private java.util.Date startTime;
+	
+	/** 请假结束时间 */
+	private java.util.Date endTime;
+	
+	/** 课程调整 */
+	private String coursesScheduleJson;
+	
+	/** 流程定义 */
+	private String wfProcessId;
+	
+	/** 流程实例 */
+	private String wfOrderId;
+	
 	public void setId(Long id){
 		this.id = id;
 	}
@@ -56,11 +64,11 @@ public class TeacherLeaveRecord {
 		return this.userId;
 	}
 			
-	public void setDays(Integer days){
+	public void setDays(double days){
 		this.days = days;
 	}
 	
-	public Integer getDays(){
+	public double getDays(){
 		return this.days;
 	}
 			
@@ -71,15 +79,15 @@ public class TeacherLeaveRecord {
 	public String getType(){
 		return this.type;
 	}
-
-	public AuditStatusEnum getStatus() {
-		return status;
-	}
-
-	public void setStatus(AuditStatusEnum status) {
+			
+	public void setStatus(AuditStatusEnum status){
 		this.status = status;
 	}
-
+	
+	public AuditStatusEnum getStatus(){
+		return this.status;
+	}
+			
 	public void setRemark(String remark){
 		this.remark = remark;
 	}
@@ -104,6 +112,46 @@ public class TeacherLeaveRecord {
 		return this.updateTime;
 	}
 			
+	public void setStartTime(java.util.Date startTime){
+		this.startTime = startTime;
+	}
+	
+	public java.util.Date getStartTime(){
+		return this.startTime;
+	}
+			
+	public void setEndTime(java.util.Date endTime){
+		this.endTime = endTime;
+	}
+	
+	public java.util.Date getEndTime(){
+		return this.endTime;
+	}
+			
+	public void setCoursesScheduleJson(String coursesScheduleJson){
+		this.coursesScheduleJson = coursesScheduleJson;
+	}
+	
+	public String getCoursesScheduleJson(){
+		return this.coursesScheduleJson;
+	}
+			
+	public void setWfProcessId(String wfProcessId){
+		this.wfProcessId = wfProcessId;
+	}
+	
+	public String getWfProcessId(){
+		return this.wfProcessId;
+	}
+			
+	public void setWfOrderId(String wfOrderId){
+		this.wfOrderId = wfOrderId;
+	}
+	
+	public String getWfOrderId(){
+		return this.wfOrderId;
+	}
+			
 	@Override
 	public String toString() {
 		return ToStringBuilder.reflectionToString(this);

+ 213 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/VipGroupActivity.java

@@ -0,0 +1,213 @@
+package com.ym.mec.biz.dal.entity;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * 对应数据库表(vip_group_activity):
+ */
+public class VipGroupActivity {
+
+	/**  */
+	private Integer id;
+	
+	/**  */
+	private String name;
+	
+	/**  */
+	private String description;
+	
+	/**  */
+	private String vipGroupCategoryIdList;
+	
+	/**  */
+	private java.util.Date startTime;
+	
+	/**  */
+	private java.util.Date endTime;
+	
+	/**  */
+	private Integer organId;
+	
+	/**  */
+	private java.util.Date coursesStartTime;
+	
+	/**  */
+	private java.util.Date coursesEndTime;
+	
+	/** 活动类型(基础活动、折扣、赠送课时) */
+	private String type;
+	
+	/**  */
+	private String attribute1;
+	
+	/**  */
+	private String attribute2;
+	
+	/**  */
+	private String attribute3;
+	
+	/** 薪水只读标识(1-只读 0-可写) */
+	private String salaryReadonlyFlag;
+	
+	/** 赠送课时支付薪水标识(1-计课酬  0-不计课酬) */
+	private String giveClassPaySalaryFlag;
+	
+	/**  */
+	private java.util.Date createTime;
+	
+	/**  */
+	private java.util.Date updateTime;
+	
+	/** 结算标准 */
+	private String salarySettlementJson;
+	
+	public void setId(Integer id){
+		this.id = id;
+	}
+	
+	public Integer getId(){
+		return this.id;
+	}
+			
+	public void setName(String name){
+		this.name = name;
+	}
+	
+	public String getName(){
+		return this.name;
+	}
+			
+	public void setDescription(String description){
+		this.description = description;
+	}
+	
+	public String getDescription(){
+		return this.description;
+	}
+			
+	public void setVipGroupCategoryIdList(String vipGroupCategoryIdList){
+		this.vipGroupCategoryIdList = vipGroupCategoryIdList;
+	}
+	
+	public String getVipGroupCategoryIdList(){
+		return this.vipGroupCategoryIdList;
+	}
+			
+	public void setStartTime(java.util.Date startTime){
+		this.startTime = startTime;
+	}
+	
+	public java.util.Date getStartTime(){
+		return this.startTime;
+	}
+			
+	public void setEndTime(java.util.Date endTime){
+		this.endTime = endTime;
+	}
+	
+	public java.util.Date getEndTime(){
+		return this.endTime;
+	}
+			
+	public void setOrganId(Integer organId){
+		this.organId = organId;
+	}
+	
+	public Integer getOrganId(){
+		return this.organId;
+	}
+			
+	public void setCoursesStartTime(java.util.Date coursesStartTime){
+		this.coursesStartTime = coursesStartTime;
+	}
+	
+	public java.util.Date getCoursesStartTime(){
+		return this.coursesStartTime;
+	}
+			
+	public void setCoursesEndTime(java.util.Date coursesEndTime){
+		this.coursesEndTime = coursesEndTime;
+	}
+	
+	public java.util.Date getCoursesEndTime(){
+		return this.coursesEndTime;
+	}
+			
+	public void setType(String type){
+		this.type = type;
+	}
+	
+	public String getType(){
+		return this.type;
+	}
+			
+	public void setAttribute1(String attribute1){
+		this.attribute1 = attribute1;
+	}
+	
+	public String getAttribute1(){
+		return this.attribute1;
+	}
+			
+	public void setAttribute2(String attribute2){
+		this.attribute2 = attribute2;
+	}
+	
+	public String getAttribute2(){
+		return this.attribute2;
+	}
+			
+	public void setAttribute3(String attribute3){
+		this.attribute3 = attribute3;
+	}
+	
+	public String getAttribute3(){
+		return this.attribute3;
+	}
+			
+	public void setSalaryReadonlyFlag(String salaryReadonlyFlag){
+		this.salaryReadonlyFlag = salaryReadonlyFlag;
+	}
+	
+	public String getSalaryReadonlyFlag(){
+		return this.salaryReadonlyFlag;
+	}
+			
+	public void setGiveClassPaySalaryFlag(String giveClassPaySalaryFlag){
+		this.giveClassPaySalaryFlag = giveClassPaySalaryFlag;
+	}
+	
+	public String getGiveClassPaySalaryFlag(){
+		return this.giveClassPaySalaryFlag;
+	}
+			
+	public void setCreateTime(java.util.Date createTime){
+		this.createTime = createTime;
+	}
+	
+	public java.util.Date getCreateTime(){
+		return this.createTime;
+	}
+			
+	public void setUpdateTime(java.util.Date updateTime){
+		this.updateTime = updateTime;
+	}
+	
+	public java.util.Date getUpdateTime(){
+		return this.updateTime;
+	}
+			
+	public void setSalarySettlementJson(String salarySettlementJson){
+		this.salarySettlementJson = salarySettlementJson;
+	}
+	
+	public String getSalarySettlementJson(){
+		return this.salarySettlementJson;
+	}
+			
+	@Override
+	public String toString() {
+		return ToStringBuilder.reflectionToString(this);
+	}
+
+}

+ 22 - 22
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/VipGroupCategory.java

@@ -13,12 +13,6 @@ public class VipGroupCategory {
 	/** 名称 */
 	private String name;
 	
-	/** 线上薪水 */
-	private long onlineClassesSalary;
-	
-	/** 线下薪水 */
-	private long offlineClassesSalary;
-	
 	/**  */
 	private String delFlag;
 	
@@ -28,6 +22,12 @@ public class VipGroupCategory {
 	/**  */
 	private java.util.Date updateTime;
 	
+	/** 单节课时 */
+	private Integer singleClassMinutes;
+	
+	/** 学生数 */
+	private Integer studentNum;
+	
 	public void setId(Integer id){
 		this.id = id;
 	}
@@ -44,22 +44,6 @@ public class VipGroupCategory {
 		return this.name;
 	}
 			
-	public void setOnlineClassesSalary(long onlineClassesSalary){
-		this.onlineClassesSalary = onlineClassesSalary;
-	}
-	
-	public long getOnlineClassesSalary(){
-		return this.onlineClassesSalary;
-	}
-			
-	public void setOfflineClassesSalary(long offlineClassesSalary){
-		this.offlineClassesSalary = offlineClassesSalary;
-	}
-	
-	public long getOfflineClassesSalary(){
-		return this.offlineClassesSalary;
-	}
-			
 	public void setDelFlag(String delFlag){
 		this.delFlag = delFlag;
 	}
@@ -84,6 +68,22 @@ public class VipGroupCategory {
 		return this.updateTime;
 	}
 			
+	public void setSingleClassMinutes(Integer singleClassMinutes){
+		this.singleClassMinutes = singleClassMinutes;
+	}
+	
+	public Integer getSingleClassMinutes(){
+		return this.singleClassMinutes;
+	}
+			
+	public void setStudentNum(Integer studentNum){
+		this.studentNum = studentNum;
+	}
+	
+	public Integer getStudentNum(){
+		return this.studentNum;
+	}
+			
 	@Override
 	public String toString() {
 		return ToStringBuilder.reflectionToString(this);

+ 81 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/VipGroupDefaultClassesCycle.java

@@ -0,0 +1,81 @@
+package com.ym.mec.biz.dal.entity;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * 对应数据库表(vip_group_default_classes_cycle):
+ */
+public class VipGroupDefaultClassesCycle {
+
+	/**  */
+	private Integer id;
+	
+	/** 最小课次 */
+	private Integer minClassTimes;
+	
+	/** 最大课次 */
+	private Integer maxClassTimes;
+	
+	/** 最大排课范围(月份) */
+	private Integer month;
+	
+	/**  */
+	private java.util.Date createTime;
+	
+	/**  */
+	private java.util.Date updateTime;
+	
+	public void setId(Integer id){
+		this.id = id;
+	}
+	
+	public Integer getId(){
+		return this.id;
+	}
+			
+	public void setMinClassTimes(Integer minClassTimes){
+		this.minClassTimes = minClassTimes;
+	}
+	
+	public Integer getMinClassTimes(){
+		return this.minClassTimes;
+	}
+			
+	public void setMaxClassTimes(Integer maxClassTimes){
+		this.maxClassTimes = maxClassTimes;
+	}
+	
+	public Integer getMaxClassTimes(){
+		return this.maxClassTimes;
+	}
+			
+	public void setMonth(Integer month){
+		this.month = month;
+	}
+	
+	public Integer getMonth(){
+		return this.month;
+	}
+			
+	public void setCreateTime(java.util.Date createTime){
+		this.createTime = createTime;
+	}
+	
+	public java.util.Date getCreateTime(){
+		return this.createTime;
+	}
+			
+	public void setUpdateTime(java.util.Date updateTime){
+		this.updateTime = updateTime;
+	}
+	
+	public java.util.Date getUpdateTime(){
+		return this.updateTime;
+	}
+			
+	@Override
+	public String toString() {
+		return ToStringBuilder.reflectionToString(this);
+	}
+
+}

+ 92 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/VipGroupDefaultClassesUnitPrice.java

@@ -0,0 +1,92 @@
+package com.ym.mec.biz.dal.entity;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * 对应数据库表(vip_group_default_classes_unit_price_):
+ */
+public class VipGroupDefaultClassesUnitPrice {
+
+	/**  */
+	private Integer id;
+	
+	/**  */
+	private Integer organId;
+	
+	/**  */
+	private Integer vipGroupCategoryId;
+	
+	/**  */
+	private long onlineClassesUnitPrice;
+	
+	/**  */
+	private long offlineClassesUnitPrice;
+	
+	/**  */
+	private java.util.Date createTime;
+	
+	/**  */
+	private java.util.Date updateTime;
+	
+	public void setId(Integer id){
+		this.id = id;
+	}
+	
+	public Integer getId(){
+		return this.id;
+	}
+			
+	public void setOrganId(Integer organId){
+		this.organId = organId;
+	}
+	
+	public Integer getOrganId(){
+		return this.organId;
+	}
+			
+	public void setVipGroupCategoryId(Integer vipGroupCategoryId){
+		this.vipGroupCategoryId = vipGroupCategoryId;
+	}
+	
+	public Integer getVipGroupCategoryId(){
+		return this.vipGroupCategoryId;
+	}
+			
+	public void setOnlineClassesUnitPrice(long onlineClassesUnitPrice){
+		this.onlineClassesUnitPrice = onlineClassesUnitPrice;
+	}
+	
+	public long getOnlineClassesUnitPrice(){
+		return this.onlineClassesUnitPrice;
+	}
+			
+	public void setOfflineClassesUnitPrice(long offlineClassesUnitPrice){
+		this.offlineClassesUnitPrice = offlineClassesUnitPrice;
+	}
+	
+	public long getOfflineClassesUnitPrice(){
+		return this.offlineClassesUnitPrice;
+	}
+			
+	public void setCreateTime(java.util.Date createTime){
+		this.createTime = createTime;
+	}
+	
+	public java.util.Date getCreateTime(){
+		return this.createTime;
+	}
+			
+	public void setUpdateTime(java.util.Date updateTime){
+		this.updateTime = updateTime;
+	}
+	
+	public java.util.Date getUpdateTime(){
+		return this.updateTime;
+	}
+			
+	@Override
+	public String toString() {
+		return ToStringBuilder.reflectionToString(this);
+	}
+
+}

+ 8 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/CourseScheduleHistoryService.java

@@ -0,0 +1,8 @@
+package com.ym.mec.biz.service;
+
+import com.ym.mec.biz.dal.entity.CourseScheduleHistory;
+import com.ym.mec.common.service.BaseService;
+
+public interface CourseScheduleHistoryService extends BaseService<Long, CourseScheduleHistory> {
+
+}

+ 8 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/MusicGroupQuitService.java

@@ -0,0 +1,8 @@
+package com.ym.mec.biz.service;
+
+import com.ym.mec.biz.dal.entity.MusicGroupQuit;
+import com.ym.mec.common.service.BaseService;
+
+public interface MusicGroupQuitService extends BaseService<Long, MusicGroupQuit> {
+
+}

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

@@ -23,4 +23,9 @@ public interface StudentWithdrawService extends BaseService<String, StudentWithd
      */
     PageInfo<WithdrawInfoDto> queryWithdrawPage(CashAccountDetail cashAccountDetail);
 
+    /**
+     *
+     * @param studentWithdraw
+     */
+    void add(StudentWithdraw studentWithdraw) throws Exception;
 }

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

@@ -16,9 +16,8 @@ public interface SysUserBankCardService extends BaseService<Long, SysUserBankCar
 
     /**
      * 获取学员银行卡列表
-     * @param search
      * @param id
      * @return
      */
-    List<SysUserBankCard> findByUser(String search, Integer id);
+    List<SysUserBankCard> findByUser(Integer id);
 }

+ 8 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/VipGroupActivityService.java

@@ -0,0 +1,8 @@
+package com.ym.mec.biz.service;
+
+import com.ym.mec.biz.dal.entity.VipGroupActivity;
+import com.ym.mec.common.service.BaseService;
+
+public interface VipGroupActivityService extends BaseService<Integer, VipGroupActivity> {
+
+}

+ 8 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/VipGroupDefaultClassesCycleService.java

@@ -0,0 +1,8 @@
+package com.ym.mec.biz.service;
+
+import com.ym.mec.biz.dal.entity.VipGroupDefaultClassesCycle;
+import com.ym.mec.common.service.BaseService;
+
+public interface VipGroupDefaultClassesCycleService extends BaseService<Integer, VipGroupDefaultClassesCycle> {
+
+}

+ 8 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/VipGroupDefaultClassesUnitPriceService.java

@@ -0,0 +1,8 @@
+package com.ym.mec.biz.service;
+
+import com.ym.mec.biz.dal.entity.VipGroupDefaultClassesUnitPrice;
+import com.ym.mec.common.service.BaseService;
+
+public interface VipGroupDefaultClassesUnitPriceService extends BaseService<Integer, VipGroupDefaultClassesUnitPrice> {
+
+}

+ 23 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleHistoryServiceImpl.java

@@ -0,0 +1,23 @@
+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.CourseScheduleHistoryDao;
+import com.ym.mec.biz.dal.entity.CourseScheduleHistory;
+import com.ym.mec.biz.service.CourseScheduleHistoryService;
+import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.service.impl.BaseServiceImpl;
+
+@Service
+public class CourseScheduleHistoryServiceImpl extends BaseServiceImpl<Long, CourseScheduleHistory>  implements CourseScheduleHistoryService {
+	
+	@Autowired
+	private CourseScheduleHistoryDao courseScheduleHistoryDao;
+
+	@Override
+	public BaseDAO<Long, CourseScheduleHistory> getDAO() {
+		return courseScheduleHistoryDao;
+	}
+	
+}

+ 16 - 6
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java

@@ -47,6 +47,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 	@Override
 	public void batchAddCourseSchedule(List<CourseSchedule> courseSchedules) {
 		checkCourseSchedule(courseSchedules);
+        createCourseScheduleName(courseSchedules);
 		courseScheduleDao.batchAddCourseSchedules(courseSchedules);
 	}
 
@@ -145,16 +146,25 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 	/**
 	 * @Author: Joburgess
 	 * @Date: 2019/9/29
-	 * 创建课程名
+	 * 生成课程名
 	 */
 	private void createCourseScheduleName(List<CourseSchedule> courseSchedules){
+        List<Integer> classGroupIds = courseSchedules.stream().map(CourseSchedule::getClassGroupId).collect(Collectors.toList());
+        HashSet<Integer> temp=new HashSet<>(classGroupIds);
+        classGroupIds=new ArrayList<>(temp);
+        Map<Integer,String> classIdSubjectNameMap=convertToMap(courseScheduleDao.findClassSubjects(classGroupIds));
+        courseSchedules.forEach(courseSchedule -> {
+            StringBuilder className=new StringBuilder(classIdSubjectNameMap.get(courseSchedule.getClassGroupId()));
+            className.append("-");
+            className.append(courseSchedule.getType().getMsg());
+            courseSchedule.setName(className.toString());
+        });
+    }
 
-	}
-
-	private Map<Integer,Integer> convertToMap(String[] result){
-		Map<Integer,Integer> map=new HashMap<>();
+	private Map<Integer,String> convertToMap(String[] result){
+		Map<Integer,String> map=new HashMap<>();
 		for(String s:result){
-			map.put(Integer.valueOf(s.split(",")[0]),Integer.valueOf(s.split(",")[1]));
+			map.put(Integer.valueOf(s.split("-")[0]),s.split("-")[1].replace(",","/"));
 		}
 		return map;
 	}

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

@@ -24,6 +24,9 @@ import org.springframework.transaction.annotation.Transactional;
 
 import java.util.*;
 
+/**
+ * @author Joburgess
+ */
 @Service
 public class DemoGroupServiceImpl extends BaseServiceImpl<Long, DemoGroup>  implements DemoGroupService {
 	
@@ -126,10 +129,15 @@ public class DemoGroupServiceImpl extends BaseServiceImpl<Long, DemoGroup>  impl
 
 		//创建课程
 		DemoGroupCoursesPlan demoGroupCoursesPlan=demoGroupCoursesPlanDao.get(coursePlanId);
-		courseScheduleDao.batchAddCourseSchedules(demoGroupDao.createCourseScheduleByDemoGroup(
+		List<CourseSchedule> courseScheduleByDemoGroup = demoGroupDao.createCourseScheduleByDemoGroup(
 				demoGroup,
 				demoGroupCoursesPlan.getCoursesStartTime(),
-				classGroup.getId().longValue()));
+				classGroup.getId().longValue());
+		String[] classSubjects = courseScheduleDao.findClassSubjects(Arrays.asList(new Integer[]{classGroup.getId()}));
+		StringBuilder className=new StringBuilder(classSubjects[0].split("-")[1]);
+		className.append("-");
+		className.append(CourseSchedule.CourseScheduleType.DEMO.getMsg());
+		courseScheduleDao.batchAddCourseSchedules(courseScheduleByDemoGroup);
 
 		//更新所属分部列表
 		List<Integer> organIds = demoGroupDao.organIdListByDemoGroupId(demoGroup.getId());

+ 23 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupQuitServiceImpl.java

@@ -0,0 +1,23 @@
+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.MusicGroupQuitDao;
+import com.ym.mec.biz.dal.entity.MusicGroupQuit;
+import com.ym.mec.biz.service.MusicGroupQuitService;
+import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.service.impl.BaseServiceImpl;
+
+@Service
+public class MusicGroupQuitServiceImpl extends BaseServiceImpl<Long, MusicGroupQuit>  implements MusicGroupQuitService {
+	
+	@Autowired
+	private MusicGroupQuitDao musicGroupQuitDao;
+
+	@Override
+	public BaseDAO<Long, MusicGroupQuit> getDAO() {
+		return musicGroupQuitDao;
+	}
+	
+}

+ 50 - 12
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentWithdrawServiceImpl.java

@@ -1,34 +1,38 @@
 package com.ym.mec.biz.service.impl;
 
 import com.google.common.collect.Lists;
-import com.ym.mec.auth.api.client.SysUserFeignService;
-import com.ym.mec.auth.api.entity.SysUser;
+import com.ym.mec.biz.dal.dao.StudentWithdrawDao;
+import com.ym.mec.biz.dal.dao.SysUserCashAccountDao;
 import com.ym.mec.biz.dal.dto.CashAccountDetail;
 import com.ym.mec.biz.dal.dto.WithdrawDto;
 import com.ym.mec.biz.dal.dto.WithdrawInfoDto;
+import com.ym.mec.biz.dal.entity.StudentWithdraw;
 import com.ym.mec.biz.dal.entity.SysUserCashAccount;
 import com.ym.mec.biz.dal.entity.SysUserCashAccountDetail;
 import com.ym.mec.biz.dal.enums.PlatformCashAccountDetailTypeEnum;
+import com.ym.mec.biz.dal.enums.PlatformCashAccountStatusEnum;
+import com.ym.mec.biz.dal.enums.TransTypeEnum;
+import com.ym.mec.biz.service.StudentWithdrawService;
 import com.ym.mec.biz.service.SysUserCashAccountDetailService;
 import com.ym.mec.biz.service.SysUserCashAccountService;
-import com.ym.mec.biz.dal.enums.TransTypeEnum;
+import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.page.PageInfo;
+import com.ym.mec.common.service.impl.BaseServiceImpl;
 import com.ym.mec.util.date.DateUtil;
 import com.ym.mec.util.string.IdWorker;
+import org.apache.commons.lang3.RandomStringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import com.ym.mec.biz.dal.dao.StudentWithdrawDao;
-import com.ym.mec.biz.dal.entity.StudentWithdraw;
-import com.ym.mec.biz.service.StudentWithdrawService;
-import com.ym.mec.common.dal.BaseDAO;
-import com.ym.mec.common.service.impl.BaseServiceImpl;
 import org.springframework.transaction.annotation.Transactional;
+
 import java.math.BigDecimal;
-import java.util.*;
+import java.util.Date;
+import java.util.List;
+import java.util.Objects;
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReentrantLock;
 
@@ -37,6 +41,8 @@ public class StudentWithdrawServiceImpl extends BaseServiceImpl<String, StudentW
 
 	@Autowired
 	private StudentWithdrawDao studentWithdrawDao;
+	@Autowired
+	private SysUserCashAccountDao sysUserCashAccountDao;
 
 	@Override
 	public BaseDAO<String, StudentWithdraw> getDAO() {
@@ -97,7 +103,7 @@ public class StudentWithdrawServiceImpl extends BaseServiceImpl<String, StudentW
 		accountDetailPageInfo.getRows().forEach(data ->{
 			WithdrawInfoDto withdrawInfoDto = new WithdrawInfoDto();
 			StudentWithdraw studentWithdraw = studentWithdrawDao.getByUserId(data.getUserId().longValue());
-			withdrawInfoDto.setWithdrawId(studentWithdraw.getId());
+			withdrawInfoDto.setWithdrawId(studentWithdraw.getWithdrawNo());
 			withdrawInfoDto.setDateTime(DateUtil.date2ChineseDate(studentWithdraw.getCreateTime()));
 			withdrawInfoDto.setAmount(data.getAmount());
 			withdrawInfoDto.setBalance(data.getBalance());
@@ -112,6 +118,38 @@ public class StudentWithdrawServiceImpl extends BaseServiceImpl<String, StudentW
 		return result;
 	}
 
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public void add(StudentWithdraw withdraw) throws Exception {
+		SysUserCashAccount account = sysUserCashAccountDao.get(withdraw.getUserId());
+		//账户状态正常
+		if(account != null && account.getStatus() == PlatformCashAccountStatusEnum.NORMAL){
+			//提现金额不大于账户可用余额
+			if(withdraw.getAmount().compareTo(account.getBalance()) < 1){
+				//修改账户余额
+				BigDecimal subtract = account.getBalance().subtract(withdraw.getAmount());
+				account.setBalance(subtract);
+				account.setFrozenAmount(account.getFrozenAmount().add(withdraw.getAmount()));
+				Date date = new Date();
+				account.setUpdateTime(date);
+				sysUserCashAccountDao.update(account);
+				SysUserCashAccountDetail cashAccountDetail = new SysUserCashAccountDetail();
+				cashAccountDetail.setUserId(account.getUserId());
+				cashAccountDetail.setType(PlatformCashAccountDetailTypeEnum.WITHDRAW);
+				cashAccountDetail.setAmount(withdraw.getAmount());
+				cashAccountDetail.setBalance(subtract);
+				cashAccountDetail.setCreateTime(date);
+				cashAccountDetailService.insert(cashAccountDetail);
+				withdraw.setWithdrawNo(RandomStringUtils.random(8));
+				studentWithdrawDao.insert(withdraw);
+			}else {
+				throw new Exception("账户余额不足");
+			}
+		}else {
+			throw new Exception("账户状态异常");
+		}
+	}
+
 	/**
 	 * 修改用户账户余额,保存账户明细
 	 *
@@ -141,8 +179,8 @@ public class StudentWithdrawServiceImpl extends BaseServiceImpl<String, StudentW
 	private void saveStudentWithdraw(WithdrawDto withdrawDto) {
 		IdWorker idWorker = new IdWorker(0, 0);
 		StudentWithdraw studentWithdraw = new StudentWithdraw();
-		studentWithdraw.setId(idWorker.nextId());
-		studentWithdraw.setUserId(withdrawDto.getUserId().longValue());
+		studentWithdraw.setWithdrawNo(idWorker.nextId());
+		studentWithdraw.setUserId(withdrawDto.getUserId());
 		studentWithdraw.setBankCardNo(withdrawDto.getBankCardNo());
 		studentWithdraw.setAmount(withdrawDto.getAmount());
 		studentWithdraw.setCreateTime(new Date());

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

@@ -46,7 +46,7 @@ public class SysUserBankCardServiceImpl extends BaseServiceImpl<Long, SysUserBan
 	}
 
 	@Override
-	public List<SysUserBankCard> findByUser(String search, Integer userId) {
-		return sysUserBankCardDao.findByUser(search,userId);
+	public List<SysUserBankCard> findByUser(Integer userId) {
+		return sysUserBankCardDao.findByUser(userId);
 	}
 }

+ 23 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupActivityServiceImpl.java

@@ -0,0 +1,23 @@
+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.VipGroupActivityDao;
+import com.ym.mec.biz.dal.entity.VipGroupActivity;
+import com.ym.mec.biz.service.VipGroupActivityService;
+import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.service.impl.BaseServiceImpl;
+
+@Service
+public class VipGroupActivityServiceImpl extends BaseServiceImpl<Integer, VipGroupActivity>  implements VipGroupActivityService {
+	
+	@Autowired
+	private VipGroupActivityDao vipGroupActivityDao;
+
+	@Override
+	public BaseDAO<Integer, VipGroupActivity> getDAO() {
+		return vipGroupActivityDao;
+	}
+	
+}

+ 23 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupDefaultClassesCycleServiceImpl.java

@@ -0,0 +1,23 @@
+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.VipGroupDefaultClassesCycleDao;
+import com.ym.mec.biz.dal.entity.VipGroupDefaultClassesCycle;
+import com.ym.mec.biz.service.VipGroupDefaultClassesCycleService;
+import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.service.impl.BaseServiceImpl;
+
+@Service
+public class VipGroupDefaultClassesCycleServiceImpl extends BaseServiceImpl<Integer, VipGroupDefaultClassesCycle>  implements VipGroupDefaultClassesCycleService {
+	
+	@Autowired
+	private VipGroupDefaultClassesCycleDao vipGroupDefaultClassesCycleDao;
+
+	@Override
+	public BaseDAO<Integer, VipGroupDefaultClassesCycle> getDAO() {
+		return vipGroupDefaultClassesCycleDao;
+	}
+	
+}

+ 23 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupDefaultClassesUnitPriceServiceImpl.java

@@ -0,0 +1,23 @@
+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.VipGroupDefaultClassesUnitPriceDao;
+import com.ym.mec.biz.dal.entity.VipGroupDefaultClassesUnitPrice;
+import com.ym.mec.biz.service.VipGroupDefaultClassesUnitPriceService;
+import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.service.impl.BaseServiceImpl;
+
+@Service
+public class VipGroupDefaultClassesUnitPriceServiceImpl extends BaseServiceImpl<Integer, VipGroupDefaultClassesUnitPrice>  implements VipGroupDefaultClassesUnitPriceService {
+	
+	@Autowired
+	private VipGroupDefaultClassesUnitPriceDao vipGroupDefaultClassesUnitPriceDao;
+
+	@Override
+	public BaseDAO<Integer, VipGroupDefaultClassesUnitPrice> getDAO() {
+		return vipGroupDefaultClassesUnitPriceDao;
+	}
+	
+}

+ 112 - 0
mec-biz/src/main/resources/config/mybatis/CourseScheduleHistoryMapper.xml

@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<!--
+这个文件是自动生成的。
+不要修改此文件。所有改动将在下次重新自动生成时丢失。
+-->
+<mapper namespace="com.ym.mec.biz.dal.dao.CourseScheduleHistoryDao">
+	
+	<resultMap type="com.ym.mec.biz.dal.entity.CourseScheduleHistory" id="CourseScheduleHistory">
+		<result column="id_" property="id" />
+		<result column="class_group_id_" property="classGroupId" />
+		<result column="status_" property="status" />
+		<result column="subsidy_" property="subsidy" />
+		<result column="class_date_" property="classDate" />
+		<result column="start_class_time_" property="startClassTime" />
+		<result column="end_class_time_" property="endClassTime" />
+		<result column="teacher_id_" property="teacherId" />
+		<result column="actual_teacher_id_" property="actualTeacherId" />
+		<result column="create_time_" property="createTime" />
+		<result column="update_time_" property="updateTime" />
+		<result column="teach_mode_" property="teachMode" />
+		<result column="complaint_status_" property="complaintStatus" />
+		<result column="type_" property="type" />
+		<result column="course_schedule_id_" property="courseScheduleId" />
+	</resultMap>
+	
+	<!-- 根据主键查询一条记录 -->
+	<select id="get" resultMap="CourseScheduleHistory" >
+		SELECT * FROM course_schedule_history WHERE id_ = #{id} 
+	</select>
+	
+	<!-- 全查询 -->
+	<select id="findAll" resultMap="CourseScheduleHistory">
+		SELECT * FROM course_schedule_history ORDER BY id_
+	</select>
+	
+	<!-- 向数据库增加一条记录 -->
+	<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.CourseScheduleHistory" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
+		<!--
+		<selectKey resultClass="int" keyProperty="id" > 
+		SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL 
+		</selectKey>
+		-->
+		INSERT INTO course_schedule_history (id_,class_group_id_,status_,subsidy_,class_date_,start_class_time_,end_class_time_,teacher_id_,actual_teacher_id_,create_time_,update_time_,teach_mode_,complaint_status_,type_,course_schedule_id_) VALUES(#{id},#{classGroupId},#{status},#{subsidy},#{classDate},#{startClassTime},#{endClassTime},#{teacherId},#{actualTeacherId},#{createTime},#{updateTime},#{teachMode},#{complaintStatus},#{type},#{courseScheduleId})
+	</insert>
+	
+	<!-- 根据主键查询一条记录 -->
+	<update id="update" parameterType="com.ym.mec.biz.dal.entity.CourseScheduleHistory">
+		UPDATE course_schedule_history <set>
+<if test="status != null">
+status_ = #{status},
+</if>
+<if test="id != null">
+id_ = #{id},
+</if>
+<if test="classGroupId != null">
+class_group_id_ = #{classGroupId},
+</if>
+<if test="teachMode != null">
+teach_mode_ = #{teachMode},
+</if>
+<if test="complaintStatus != null">
+complaint_status_ = #{complaintStatus},
+</if>
+<if test="createTime != null">
+create_time_ = #{createTime},
+</if>
+<if test="classDate != null">
+class_date_ = #{classDate},
+</if>
+<if test="endClassTime != null">
+end_class_time_ = #{endClassTime},
+</if>
+<if test="actualTeacherId != null">
+actual_teacher_id_ = #{actualTeacherId},
+</if>
+<if test="subsidy != null">
+subsidy_ = #{subsidy},
+</if>
+<if test="startClassTime != null">
+start_class_time_ = #{startClassTime},
+</if>
+<if test="teacherId != null">
+teacher_id_ = #{teacherId},
+</if>
+<if test="updateTime != null">
+update_time_ = #{updateTime},
+</if>
+<if test="courseScheduleId != null">
+course_schedule_id_ = #{courseScheduleId},
+</if>
+<if test="type != null">
+type_ = #{type},
+</if>
+</set> WHERE id_ = #{id} 
+	</update>
+	
+	<!-- 根据主键删除一条记录 -->
+	<delete id="delete" >
+		DELETE FROM course_schedule_history WHERE id_ = #{id} 
+	</delete>
+	
+	<!-- 分页查询 -->
+	<select id="queryPage" resultMap="CourseScheduleHistory" parameterType="map">
+		SELECT * FROM course_schedule_history ORDER BY id_ <include refid="global.limit"/>
+	</select>
+	
+	<!-- 查询当前表的总记录数 -->
+	<select id="queryCount" resultType="int">
+		SELECT COUNT(*) FROM course_schedule_history
+	</select>
+</mapper>

+ 12 - 0
mec-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml

@@ -400,4 +400,16 @@
         GROUP BY
         cs.class_date_
     </select>
+    <select id="findClassSubjects" resultType="string">
+        SELECT
+            CONCAT(cg.id_,'-',IF(GROUP_CONCAT(s.name_) IS NULL,'',GROUP_CONCAT(s.name_)))
+        FROM
+            class_group cg
+            LEFT JOIN `subject` s ON FIND_IN_SET(s.id_,cg.subject_id_list_)
+        WHERE cg.id_ IN
+        <foreach collection="list" item="id" open="(" close=")" separator=",">
+            #{id}
+        </foreach>
+        GROUP BY cg.id_
+    </select>
 </mapper>

+ 80 - 0
mec-biz/src/main/resources/config/mybatis/MusicGroupQuitMapper.xml

@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<!--
+这个文件是自动生成的。
+不要修改此文件。所有改动将在下次重新自动生成时丢失。
+-->
+<mapper namespace="com.ym.mec.biz.dal.dao.MusicGroupQuitDao">
+	
+	<resultMap type="com.ym.mec.biz.dal.entity.MusicGroupQuit" id="MusicGroupQuit">
+		<result column="id_" property="id" />
+		<result column="user_id_" property="userId" />
+		<result column="music_group_id_" property="musicGroupId" />
+		<result column="join_date_" property="joinDate" />
+		<result column="quit_date_" property="quitDate" />
+		<result column="create_time_" property="createTime" />
+		<result column="reason_" property="reason" />
+	</resultMap>
+	
+	<!-- 根据主键查询一条记录 -->
+	<select id="get" resultMap="MusicGroupQuit" >
+		SELECT * FROM music_group_quit WHERE id_ = #{id} 
+	</select>
+	
+	<!-- 全查询 -->
+	<select id="findAll" resultMap="MusicGroupQuit">
+		SELECT * FROM music_group_quit ORDER BY id_
+	</select>
+	
+	<!-- 向数据库增加一条记录 -->
+	<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.MusicGroupQuit" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
+		<!--
+		<selectKey resultClass="int" keyProperty="id" > 
+		SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL 
+		</selectKey>
+		-->
+		INSERT INTO music_group_quit (id_,user_id_,music_group_id_,join_date_,quit_date_,create_time_,reason_) VALUES(#{id},#{userId},#{musicGroupId},#{joinDate},#{quitDate},#{createTime},#{reason})
+	</insert>
+	
+	<!-- 根据主键查询一条记录 -->
+	<update id="update" parameterType="com.ym.mec.biz.dal.entity.MusicGroupQuit">
+		UPDATE music_group_quit <set>
+<if test="userId != null">
+user_id_ = #{userId},
+</if>
+<if test="id != null">
+id_ = #{id},
+</if>
+<if test="joinDate != null">
+join_date_ = #{joinDate},
+</if>
+<if test="reason != null">
+reason_ = #{reason},
+</if>
+<if test="quitDate != null">
+quit_date_ = #{quitDate},
+</if>
+<if test="musicGroupId != null">
+music_group_id_ = #{musicGroupId},
+</if>
+<if test="createTime != null">
+create_time_ = #{createTime},
+</if>
+</set> WHERE id_ = #{id} 
+	</update>
+	
+	<!-- 根据主键删除一条记录 -->
+	<delete id="delete" >
+		DELETE FROM music_group_quit WHERE id_ = #{id} 
+	</delete>
+	
+	<!-- 分页查询 -->
+	<select id="queryPage" resultMap="MusicGroupQuit" parameterType="map">
+		SELECT * FROM music_group_quit ORDER BY id_ <include refid="global.limit"/>
+	</select>
+	
+	<!-- 查询当前表的总记录数 -->
+	<select id="queryCount" resultType="int">
+		SELECT COUNT(*) FROM music_group_quit
+	</select>
+</mapper>

+ 7 - 7
mec-biz/src/main/resources/config/mybatis/StudentWithdrawMapper.xml

@@ -17,6 +17,7 @@
         <result column="fee_platform_" property="feePlatform"/>
         <result column="description_" property="description"/>
         <result column="comment_" property="comment"/>
+        <result column="withdraw_no_" property="withdrawNo"/>
         <result column="create_time_" property="createTime"/>
         <result column="modify_time_" property="modifyTime"/>
     </resultMap>
@@ -34,14 +35,10 @@
     <!-- 向数据库增加一条记录 -->
     <insert id="insert" parameterType="com.ym.mec.biz.dal.entity.StudentWithdraw" useGeneratedKeys="true" keyColumn="id"
             keyProperty="id">
-        <!--
-        <selectKey resultClass="int" keyProperty="id" >
-        SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL
-        </selectKey>
-        -->
         INSERT INTO student_withdraw
-        (id_,user_id_,bank_card_no_,trans_no_,status_,amount_,fee_user_,fee_platform_,description_,comment_,create_time_,modify_time_)
-        VALUES(#{id},#{userId},#{bankCardNo},#{transNo},#{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{amount},#{feeUser},#{feePlatform},#{description},#{comment},now(),now())
+        (id_,user_id_,bank_card_no_,trans_no_,status_,amount_,fee_user_,fee_platform_,description_,comment_,create_time_,modify_time_,withdraw_no_)
+        VALUES(#{id},#{userId},#{bankCardNo},#{transNo},#{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
+        #{amount},#{feeUser},#{feePlatform},#{description},#{comment},now(),now(),#{withdrawNo})
     </insert>
 
     <!-- 根据主键查询一条记录 -->
@@ -78,6 +75,9 @@
             <if test="transNo != null">
                 trans_no_ = #{transNo},
             </if>
+            <if test="withdrawNo != null">
+                withdraw_no_ = #{withdrawNo},
+            </if>
         </set>
         WHERE id_ = #{id}
     </update>

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

@@ -117,10 +117,7 @@
 
     <!-- 分页查询 -->
     <select id="queryPage" resultMap="SysUserBankCard" parameterType="map">
-        SELECT * FROM sys_user_bank_card where status_ != 0 AND user_id_ =
-        <if test="search != null and search != ''">
-           AND create_time_ LIKE CONCAT(#{search},'%')
-        </if>
+        SELECT * FROM sys_user_bank_card where status_ != 0 AND user_id_ = #{userId}
         ORDER BY id_
         <include refid="global.limit"/>
     </select>
@@ -128,15 +125,9 @@
     <!-- 查询当前表的总记录数 -->
     <select id="queryCount" resultType="int">
 		SELECT COUNT(*) FROM sys_user_bank_card where status_ != 0
-        <if test="search != null and search != ''">
-            AND create_time_ LIKE CONCAT(#{search},'%')
-        </if>
 	</select>
 
     <select id="findByUser" resultMap="SysUserBankCard">
         SELECT * FROM sys_user_bank_card where status_ != 0 AND user_id_ = #{userId}
-        <if test="search != null and search != ''">
-            AND create_time_ LIKE CONCAT(#{search},'%')
-        </if>
     </select>
 </mapper>

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

@@ -40,10 +40,9 @@
         </selectKey>
         -->
         INSERT INTO sys_user_cash_account_detail
-        (id_,user_id_,trans_no_,type_,trans_type_, status_,amount_,balance_,description_,comment_,create_time_,update_time_)
+        (id_,user_id_,trans_no_,type_,trans_type_,amount_,balance_,description_,comment_,create_time_,update_time_)
         VALUES(#{id},#{userId},#{transNo},#{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
-        ,#{transType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
-        #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{amount},#{balance},#{description},#{comment},now(),now())
+        ,#{transType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{amount},#{balance},#{description},#{comment},now(),now())
     </insert>
 
     <!-- 根据主键查询一条记录 -->
@@ -93,6 +92,9 @@
     <select id="queryPage" resultMap="SysUserCashAccountDetail" parameterType="map">
         SELECT * FROM sys_user_cash_account_detail
         WHERE user_id_ = #{userId}
+        <if test="search != null and search != ''">
+            AND create_time_ LIKE CONCAT(#{search},'%')
+        </if>
         ORDER BY id_
         <include refid="global.limit"/>
     </select>
@@ -101,9 +103,12 @@
     <select id="queryCount" resultType="int">
 		SELECT COUNT(*) FROM sys_user_cash_account_detail
 		WHERE user_id_ = #{userId}
+        <if test="search != null and search != ''">
+            AND create_time_ LIKE CONCAT(#{search},'%')
+        </if>
 	</select>
 
     <select id="selectDetailByTransNo" resultMap="SysUserCashAccountDetail">
-		SELECT * FROM sys_user_cash_account_detail WHERE    trans_no_ = #{transNo}
+		SELECT * FROM sys_user_cash_account_detail WHERE  trans_no_ = #{transNo}
 	</select>
 </mapper>

+ 94 - 67
mec-biz/src/main/resources/config/mybatis/TeacherLeaveRecordMapper.xml

@@ -1,83 +1,110 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<!--
-这个文件是自动生成的。
-不要修改此文件。所有改动将在下次重新自动生成时丢失。
--->
+<!-- 这个文件是自动生成的。 不要修改此文件。所有改动将在下次重新自动生成时丢失。 -->
 <mapper namespace="com.ym.mec.biz.dal.dao.TeacherLeaveRecordDao">
 
-    <resultMap type="com.ym.mec.biz.dal.entity.TeacherLeaveRecord" id="TeacherLeaveRecord">
-        <result column="id_" property="id"/>
-        <result column="user_id_" property="userId"/>
-        <result column="days_" property="days"/>
-        <result column="type_" property="type"/>
-        <result column="status_" property="status" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
-        <result column="remark_" property="remark"/>
-        <result column="create_time_" property="createTime"/>
-        <result column="update_time_" property="updateTime"/>
-    </resultMap>
+	<resultMap type="com.ym.mec.biz.dal.entity.TeacherLeaveRecord"
+		id="TeacherLeaveRecord">
+		<result column="id_" property="id" />
+		<result column="user_id_" property="userId" />
+		<result column="days_" property="days" />
+		<result column="type_" property="type" />
+		<result column="status_" property="status" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler" />
+		<result column="remark_" property="remark" />
+		<result column="create_time_" property="createTime" />
+		<result column="update_time_" property="updateTime" />
+		<result column="start_time_" property="startTime" />
+		<result column="end_time_" property="endTime" />
+		<result column="courses_schedule_json_" property="coursesScheduleJson" />
+		<result column="wf_process_id_" property="wfProcessId" />
+		<result column="wf_order_id_" property="wfOrderId" />
+	</resultMap>
 
-    <!-- 根据主键查询一条记录 -->
-    <select id="get" resultMap="TeacherLeaveRecord">
-		SELECT * FROM teacher_leave_record WHERE id_ = #{id} 
+	<!-- 根据主键查询一条记录 -->
+	<select id="get" resultMap="TeacherLeaveRecord">
+		SELECT * FROM
+		teacher_leave_record WHERE id_ = #{id}
 	</select>
 
-    <!-- 全查询 -->
-    <select id="findAll" resultMap="TeacherLeaveRecord">
-		SELECT * FROM teacher_leave_record ORDER BY id_
+	<!-- 全查询 -->
+	<select id="findAll" resultMap="TeacherLeaveRecord">
+		SELECT * FROM
+		teacher_leave_record ORDER BY id_
 	</select>
 
-    <!-- 向数据库增加一条记录 -->
-    <insert id="insert" parameterType="com.ym.mec.biz.dal.entity.TeacherLeaveRecord" useGeneratedKeys="true"
-            keyColumn="id" keyProperty="id">
-        <!--
-        <selectKey resultClass="int" keyProperty="id" >
-        SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL
-        </selectKey>
-        -->
-        INSERT INTO teacher_leave_record (id_,user_id_,days_,type_,status_,remark_,create_time_,update_time_)
-        VALUES(#{id},#{userId},#{days},#{type},#{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{remark},now(),now())
-    </insert>
+	<!-- 向数据库增加一条记录 -->
+	<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.TeacherLeaveRecord"
+		useGeneratedKeys="true" keyColumn="id" keyProperty="id">
+		<!-- <selectKey resultClass="int" keyProperty="id" > SELECT SEQ_WSDEFINITION_ID.nextval 
+			AS ID FROM DUAL </selectKey> -->
+		INSERT INTO teacher_leave_record
+		(id_,user_id_,days_,type_,status_,remark_,create_time_,update_time_,start_time_,end_time_,courses_schedule_json_,wf_process_id_,wf_order_id_)
+		VALUES(#{id},#{userId},#{days},#{type},#{status, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{remark},#{createTime},#{updateTime},#{startTime},#{endTime},#{coursesScheduleJson},#{wfProcessId},#{wfOrderId})
+	</insert>
 
-    <!-- 根据主键查询一条记录 -->
-    <update id="update" parameterType="com.ym.mec.biz.dal.entity.TeacherLeaveRecord">
-        UPDATE teacher_leave_record
-        <set>
-            <if test="status != null">
-                status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
-            </if>
-            <if test="userId != null">
-                user_id_ = #{userId},
-            </if>
-            <if test="remark != null">
-                remark_ = #{remark},
-            </if>
-            <if test="days != null">
-                days_ = #{days},
-            </if>
-            <if test="updateTime != null">
-                update_time_ = #{updateTime},
-            </if>
-            <if test="type != null">
-                type_ = #{type},
-            </if>
-        </set>
-        WHERE id_ = #{id}
-    </update>
+	<!-- 根据主键查询一条记录 -->
+	<update id="update" parameterType="com.ym.mec.biz.dal.entity.TeacherLeaveRecord">
+		UPDATE teacher_leave_record
+		<set>
+			<if test="status != null">
+				status_ = #{status, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
+			</if>
+			<if test="wfOrderId != null">
+				wf_order_id_ = #{wfOrderId},
+			</if>
+			<if test="id != null">
+				id_ = #{id},
+			</if>
+			<if test="days != null">
+				days_ = #{days},
+			</if>
+			<if test="endTime != null">
+				end_time_ = #{endTime},
+			</if>
+			<if test="createTime != null">
+				create_time_ = #{createTime},
+			</if>
+			<if test="startTime != null">
+				start_time_ = #{startTime},
+			</if>
+			<if test="coursesScheduleJson != null">
+				courses_schedule_json_ = #{coursesScheduleJson},
+			</if>
+			<if test="userId != null">
+				user_id_ = #{userId},
+			</if>
+			<if test="remark != null">
+				remark_ = #{remark},
+			</if>
+			<if test="wfProcessId != null">
+				wf_process_id_ = #{wfProcessId},
+			</if>
+			<if test="updateTime != null">
+				update_time_ = #{updateTime},
+			</if>
+			<if test="type != null">
+				type_ = #{type},
+			</if>
+		</set>
+		WHERE id_ = #{id}
+	</update>
 
-    <!-- 根据主键删除一条记录 -->
-    <delete id="delete">
-		DELETE FROM teacher_leave_record WHERE id_ = #{id} 
+	<!-- 根据主键删除一条记录 -->
+	<delete id="delete">
+		DELETE FROM teacher_leave_record WHERE id_ =
+		#{id}
 	</delete>
 
-    <!-- 分页查询 -->
-    <select id="queryPage" resultMap="TeacherLeaveRecord" parameterType="map">
-        SELECT * FROM teacher_leave_record ORDER BY id_
-        <include refid="global.limit"/>
-    </select>
+	<!-- 分页查询 -->
+	<select id="queryPage" resultMap="TeacherLeaveRecord"
+		parameterType="map">
+		SELECT * FROM teacher_leave_record ORDER BY id_
+		<include refid="global.limit" />
+	</select>
 
-    <!-- 查询当前表的总记录数 -->
-    <select id="queryCount" resultType="int">
-		SELECT COUNT(*) FROM teacher_leave_record
+	<!-- 查询当前表的总记录数 -->
+	<select id="queryCount" resultType="int">
+		SELECT COUNT(*) FROM
+		teacher_leave_record
 	</select>
 </mapper>

+ 124 - 0
mec-biz/src/main/resources/config/mybatis/VipGroupActivityMapper.xml

@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<!--
+这个文件是自动生成的。
+不要修改此文件。所有改动将在下次重新自动生成时丢失。
+-->
+<mapper namespace="com.ym.mec.biz.dal.dao.VipGroupActivityDao">
+	
+	<resultMap type="com.ym.mec.biz.dal.entity.VipGroupActivity" id="VipGroupActivity">
+		<result column="id_" property="id" />
+		<result column="name_" property="name" />
+		<result column="description_" property="description" />
+		<result column="vip_group_category_id_list_" property="vipGroupCategoryIdList" />
+		<result column="start_time_" property="startTime" />
+		<result column="end_time_" property="endTime" />
+		<result column="organ_id_" property="organId" />
+		<result column="courses_start_time_" property="coursesStartTime" />
+		<result column="courses_end_time_" property="coursesEndTime" />
+		<result column="type_" property="type" />
+		<result column="attribute1_" property="attribute1" />
+		<result column="attribute2_" property="attribute2" />
+		<result column="attribute3_" property="attribute3" />
+		<result column="salary_readonly_flag_" property="salaryReadonlyFlag" />
+		<result column="give_class_pay_salary_flag_" property="giveClassPaySalaryFlag" />
+		<result column="create_time_" property="createTime" />
+		<result column="update_time_" property="updateTime" />
+		<result column="salary_settlement_json_" property="salarySettlementJson" />
+	</resultMap>
+	
+	<!-- 根据主键查询一条记录 -->
+	<select id="get" resultMap="VipGroupActivity" >
+		SELECT * FROM vip_group_activity WHERE id_ = #{id} 
+	</select>
+	
+	<!-- 全查询 -->
+	<select id="findAll" resultMap="VipGroupActivity">
+		SELECT * FROM vip_group_activity ORDER BY id_
+	</select>
+	
+	<!-- 向数据库增加一条记录 -->
+	<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.VipGroupActivity" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
+		<!--
+		<selectKey resultClass="int" keyProperty="id" > 
+		SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL 
+		</selectKey>
+		-->
+		INSERT INTO vip_group_activity (id_,name_,description_,vip_group_category_id_list_,start_time_,end_time_,organ_id_,courses_start_time_,courses_end_time_,type_,attribute1_,attribute2_,attribute3_,salary_readonly_flag_,give_class_pay_salary_flag_,create_time_,update_time_,salary_settlement_json_) VALUES(#{id},#{name},#{description},#{vipGroupCategoryIdList},#{startTime},#{endTime},#{organId},#{coursesStartTime},#{coursesEndTime},#{type},#{attribute1},#{attribute2},#{attribute3},#{salaryReadonlyFlag},#{giveClassPaySalaryFlag},#{createTime},#{updateTime},#{salarySettlementJson})
+	</insert>
+	
+	<!-- 根据主键查询一条记录 -->
+	<update id="update" parameterType="com.ym.mec.biz.dal.entity.VipGroupActivity">
+		UPDATE vip_group_activity <set>
+<if test="salaryReadonlyFlag != null">
+salary_readonly_flag_ = #{salaryReadonlyFlag},
+</if>
+<if test="organId != null">
+organ_id_ = #{organId},
+</if>
+<if test="id != null">
+id_ = #{id},
+</if>
+<if test="giveClassPaySalaryFlag != null">
+give_class_pay_salary_flag_ = #{giveClassPaySalaryFlag},
+</if>
+<if test="coursesEndTime != null">
+courses_end_time_ = #{coursesEndTime},
+</if>
+<if test="attribute1 != null">
+attribute1_ = #{attribute1},
+</if>
+<if test="endTime != null">
+end_time_ = #{endTime},
+</if>
+<if test="attribute2 != null">
+attribute2_ = #{attribute2},
+</if>
+<if test="name != null">
+name_ = #{name},
+</if>
+<if test="startTime != null">
+start_time_ = #{startTime},
+</if>
+<if test="attribute3 != null">
+attribute3_ = #{attribute3},
+</if>
+<if test="createTime != null">
+create_time_ = #{createTime},
+</if>
+<if test="vipGroupCategoryIdList != null">
+vip_group_category_id_list_ = #{vipGroupCategoryIdList},
+</if>
+<if test="updateTime != null">
+update_time_ = #{updateTime},
+</if>
+<if test="description != null">
+description_ = #{description},
+</if>
+<if test="salarySettlementJson != null">
+salary_settlement_json_ = #{salarySettlementJson},
+</if>
+<if test="coursesStartTime != null">
+courses_start_time_ = #{coursesStartTime},
+</if>
+<if test="type != null">
+type_ = #{type},
+</if>
+</set> WHERE id_ = #{id} 
+	</update>
+	
+	<!-- 根据主键删除一条记录 -->
+	<delete id="delete" >
+		DELETE FROM vip_group_activity WHERE id_ = #{id} 
+	</delete>
+	
+	<!-- 分页查询 -->
+	<select id="queryPage" resultMap="VipGroupActivity" parameterType="map">
+		SELECT * FROM vip_group_activity ORDER BY id_ <include refid="global.limit"/>
+	</select>
+	
+	<!-- 查询当前表的总记录数 -->
+	<select id="queryCount" resultType="int">
+		SELECT COUNT(*) FROM vip_group_activity
+	</select>
+</mapper>

+ 59 - 53
mec-biz/src/main/resources/config/mybatis/VipGroupCategoryMapper.xml

@@ -1,80 +1,86 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<!--
-这个文件是自动生成的。
-不要修改此文件。所有改动将在下次重新自动生成时丢失。
--->
+<!-- 这个文件是自动生成的。 不要修改此文件。所有改动将在下次重新自动生成时丢失。 -->
 <mapper namespace="com.ym.mec.biz.dal.dao.VipGroupCategoryDao">
-	
-	<resultMap type="com.ym.mec.biz.dal.entity.VipGroupCategory" id="VipGroupCategory">
+
+	<resultMap type="com.ym.mec.biz.dal.entity.VipGroupCategory"
+		id="VipGroupCategory">
 		<result column="id_" property="id" />
 		<result column="name_" property="name" />
-		<result column="online_classes_salary_" property="onlineClassesSalary" />
-		<result column="offline_classes_salary_" property="offlineClassesSalary" />
 		<result column="del_flag_" property="delFlag" />
 		<result column="create_time_" property="createTime" />
 		<result column="update_time_" property="updateTime" />
+		<result column="single_class_minutes_" property="singleClassMinutes" />
+		<result column="student_num_" property="studentNum" />
 	</resultMap>
-	
+
 	<!-- 根据主键查询一条记录 -->
-	<select id="get" resultMap="VipGroupCategory" >
-		SELECT * FROM vip_group_category WHERE id_ = #{id} 
+	<select id="get" resultMap="VipGroupCategory">
+		SELECT * FROM
+		vip_group_category WHERE id_ = #{id}
 	</select>
-	
+
 	<!-- 全查询 -->
 	<select id="findAll" resultMap="VipGroupCategory">
-		SELECT * FROM vip_group_category ORDER BY id_
+		SELECT * FROM vip_group_category
+		ORDER BY id_
 	</select>
-	
+
 	<!-- 向数据库增加一条记录 -->
-	<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.VipGroupCategory" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
-		<!--
-		<selectKey resultClass="int" keyProperty="id" > 
-		SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL 
-		</selectKey>
-		-->
-		INSERT INTO vip_group_category (id_,name_,online_classes_salary_,offline_classes_salary_,del_flag_,create_time_,update_time_) VALUES(#{id},#{name},#{onlineClassesSalary},#{offlineClassesSalary},#{delFlag},#{createTime},#{updateTime})
+	<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.VipGroupCategory"
+		useGeneratedKeys="true" keyColumn="id" keyProperty="id">
+		<!-- <selectKey resultClass="int" keyProperty="id" > SELECT SEQ_WSDEFINITION_ID.nextval 
+			AS ID FROM DUAL </selectKey> -->
+		INSERT INTO vip_group_category
+		(id_,name_,del_flag_,create_time_,update_time_,single_class_minutes_,student_num_)
+		VALUES(#{id},#{name},#{delFlag},#{createTime},#{updateTime},#{singleClassMinutes},#{studentNum})
 	</insert>
-	
+
 	<!-- 根据主键查询一条记录 -->
 	<update id="update" parameterType="com.ym.mec.biz.dal.entity.VipGroupCategory">
-		UPDATE vip_group_category <set>
-<if test="delFlag != null">
-del_flag_ = #{delFlag},
-</if>
-<if test="id != null">
-id_ = #{id},
-</if>
-<if test="onlineClassesSalary != null">
-online_classes_salary_ = #{onlineClassesSalary},
-</if>
-<if test="updateTime != null">
-update_time_ = #{updateTime},
-</if>
-<if test="offlineClassesSalary != null">
-offline_classes_salary_ = #{offlineClassesSalary},
-</if>
-<if test="name != null">
-name_ = #{name},
-</if>
-<if test="createTime != null">
-create_time_ = #{createTime},
-</if>
-</set> WHERE id_ = #{id} 
+		UPDATE vip_group_category
+		<set>
+			<if test="delFlag != null">
+				del_flag_ = #{delFlag},
+			</if>
+			<if test="studentNum != null">
+				student_num_ = #{studentNum},
+			</if>
+			<if test="id != null">
+				id_ = #{id},
+			</if>
+			<if test="updateTime != null">
+				update_time_ = #{updateTime},
+			</if>
+			<if test="singleClassMinutes != null">
+				single_class_minutes_ = #{singleClassMinutes},
+			</if>
+			<if test="name != null">
+				name_ = #{name},
+			</if>
+			<if test="createTime != null">
+				create_time_ = #{createTime},
+			</if>
+		</set>
+		WHERE id_ = #{id}
 	</update>
-	
+
 	<!-- 根据主键删除一条记录 -->
-	<delete id="delete" >
-		DELETE FROM vip_group_category WHERE id_ = #{id} 
+	<delete id="delete">
+		DELETE FROM vip_group_category WHERE id_ =
+		#{id}
 	</delete>
-	
+
 	<!-- 分页查询 -->
-	<select id="queryPage" resultMap="VipGroupCategory" parameterType="map">
-		SELECT * FROM vip_group_category ORDER BY id_ <include refid="global.limit"/>
+	<select id="queryPage" resultMap="VipGroupCategory"
+		parameterType="map">
+		SELECT * FROM vip_group_category ORDER BY id_
+		<include refid="global.limit" />
 	</select>
-	
+
 	<!-- 查询当前表的总记录数 -->
 	<select id="queryCount" resultType="int">
-		SELECT COUNT(*) FROM vip_group_category
+		SELECT COUNT(*) FROM
+		vip_group_category
 	</select>
 </mapper>

+ 76 - 0
mec-biz/src/main/resources/config/mybatis/VipGroupDefaultClassesCycleMapper.xml

@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<!--
+这个文件是自动生成的。
+不要修改此文件。所有改动将在下次重新自动生成时丢失。
+-->
+<mapper namespace="com.ym.mec.biz.dal.dao.VipGroupDefaultClassesCycleDao">
+	
+	<resultMap type="com.ym.mec.biz.dal.entity.VipGroupDefaultClassesCycle" id="VipGroupDefaultClassesCycle">
+		<result column="id_" property="id" />
+		<result column="min_class_times_" property="minClassTimes" />
+		<result column="max_class_times_" property="maxClassTimes" />
+		<result column="month_" property="month" />
+		<result column="create_time_" property="createTime" />
+		<result column="update_time_" property="updateTime" />
+	</resultMap>
+	
+	<!-- 根据主键查询一条记录 -->
+	<select id="get" resultMap="VipGroupDefaultClassesCycle" >
+		SELECT * FROM vip_group_default_classes_cycle WHERE id_ = #{id} 
+	</select>
+	
+	<!-- 全查询 -->
+	<select id="findAll" resultMap="VipGroupDefaultClassesCycle">
+		SELECT * FROM vip_group_default_classes_cycle ORDER BY id_
+	</select>
+	
+	<!-- 向数据库增加一条记录 -->
+	<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.VipGroupDefaultClassesCycle" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
+		<!--
+		<selectKey resultClass="int" keyProperty="id" > 
+		SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL 
+		</selectKey>
+		-->
+		INSERT INTO vip_group_default_classes_cycle (id_,min_class_times_,max_class_times_,month_,create_time_,update_time_) VALUES(#{id},#{minClassTimes},#{maxClassTimes},#{month},#{createTime},#{updateTime})
+	</insert>
+	
+	<!-- 根据主键查询一条记录 -->
+	<update id="update" parameterType="com.ym.mec.biz.dal.entity.VipGroupDefaultClassesCycle">
+		UPDATE vip_group_default_classes_cycle <set>
+<if test="maxClassTimes != null">
+max_class_times_ = #{maxClassTimes},
+</if>
+<if test="id != null">
+id_ = #{id},
+</if>
+<if test="minClassTimes != null">
+min_class_times_ = #{minClassTimes},
+</if>
+<if test="updateTime != null">
+update_time_ = #{updateTime},
+</if>
+<if test="month != null">
+month_ = #{month},
+</if>
+<if test="createTime != null">
+create_time_ = #{createTime},
+</if>
+</set> WHERE id_ = #{id} 
+	</update>
+	
+	<!-- 根据主键删除一条记录 -->
+	<delete id="delete" >
+		DELETE FROM vip_group_default_classes_cycle WHERE id_ = #{id} 
+	</delete>
+	
+	<!-- 分页查询 -->
+	<select id="queryPage" resultMap="VipGroupDefaultClassesCycle" parameterType="map">
+		SELECT * FROM vip_group_default_classes_cycle ORDER BY id_ <include refid="global.limit"/>
+	</select>
+	
+	<!-- 查询当前表的总记录数 -->
+	<select id="queryCount" resultType="int">
+		SELECT COUNT(*) FROM vip_group_default_classes_cycle
+	</select>
+</mapper>

+ 80 - 0
mec-biz/src/main/resources/config/mybatis/VipGroupDefaultClassesUnitPriceMapper.xml

@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<!--
+这个文件是自动生成的。
+不要修改此文件。所有改动将在下次重新自动生成时丢失。
+-->
+<mapper namespace="com.ym.mec.biz.dal.dao.VipGroupDefaultClassesUnitPriceDao">
+	
+	<resultMap type="com.ym.mec.biz.dal.entity.VipGroupDefaultClassesUnitPrice" id="VipGroupDefaultClassesUnitPrice">
+		<result column="id_" property="id" />
+		<result column="organ_id_" property="organId" />
+		<result column="vip_group_category_id_" property="vipGroupCategoryId" />
+		<result column="online_classes_unit_price_" property="onlineClassesUnitPrice" />
+		<result column="offline_classes_unit_price_" property="offlineClassesUnitPrice" />
+		<result column="create_time_" property="createTime" />
+		<result column="update_time_" property="updateTime" />
+	</resultMap>
+	
+	<!-- 根据主键查询一条记录 -->
+	<select id="get" resultMap="VipGroupDefaultClassesUnitPrice" >
+		SELECT * FROM vip_group_default_classes_unit_price_ WHERE id_ = #{id} 
+	</select>
+	
+	<!-- 全查询 -->
+	<select id="findAll" resultMap="VipGroupDefaultClassesUnitPrice">
+		SELECT * FROM vip_group_default_classes_unit_price_ ORDER BY id_
+	</select>
+	
+	<!-- 向数据库增加一条记录 -->
+	<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.VipGroupDefaultClassesUnitPrice" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
+		<!--
+		<selectKey resultClass="int" keyProperty="id" > 
+		SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL 
+		</selectKey>
+		-->
+		INSERT INTO vip_group_default_classes_unit_price_ (id_,organ_id_,vip_group_category_id_,online_classes_unit_price_,offline_classes_unit_price_,create_time_,update_time_) VALUES(#{id},#{organId},#{vipGroupCategoryId},#{onlineClassesUnitPrice},#{offlineClassesUnitPrice},#{createTime},#{updateTime})
+	</insert>
+	
+	<!-- 根据主键查询一条记录 -->
+	<update id="update" parameterType="com.ym.mec.biz.dal.entity.VipGroupDefaultClassesUnitPrice">
+		UPDATE vip_group_default_classes_unit_price_ <set>
+<if test="organId != null">
+organ_id_ = #{organId},
+</if>
+<if test="id != null">
+id_ = #{id},
+</if>
+<if test="offlineClassesUnitPrice != null">
+offline_classes_unit_price_ = #{offlineClassesUnitPrice},
+</if>
+<if test="onlineClassesUnitPrice != null">
+online_classes_unit_price_ = #{onlineClassesUnitPrice},
+</if>
+<if test="updateTime != null">
+update_time_ = #{updateTime},
+</if>
+<if test="vipGroupCategoryId != null">
+vip_group_category_id_ = #{vipGroupCategoryId},
+</if>
+<if test="createTime != null">
+create_time_ = #{createTime},
+</if>
+</set> WHERE id_ = #{id} 
+	</update>
+	
+	<!-- 根据主键删除一条记录 -->
+	<delete id="delete" >
+		DELETE FROM vip_group_default_classes_unit_price_ WHERE id_ = #{id} 
+	</delete>
+	
+	<!-- 分页查询 -->
+	<select id="queryPage" resultMap="VipGroupDefaultClassesUnitPrice" parameterType="map">
+		SELECT * FROM vip_group_default_classes_unit_price_ ORDER BY id_ <include refid="global.limit"/>
+	</select>
+	
+	<!-- 查询当前表的总记录数 -->
+	<select id="queryCount" resultType="int">
+		SELECT COUNT(*) FROM vip_group_default_classes_unit_price_
+	</select>
+</mapper>

+ 0 - 13
mec-education/src/main/java/com/ym/mec/education/controller/App.java

@@ -1,13 +0,0 @@
-package com.ym.mec.education.controller;
-
-/**
- * Hello world!
- *
- */
-public class App 
-{
-    public static void main( String[] args )
-    {
-        System.out.println( "Hello World!" );
-    }
-}

+ 5 - 8
mec-education/src/main/java/com/ym/mec/education/controller/CourseScheduleController.java

@@ -2,9 +2,7 @@ package com.ym.mec.education.controller;
 
 import com.ym.mec.education.base.BaseResponse;
 import com.ym.mec.education.base.PageResponse;
-import com.ym.mec.education.enums.ReturnCodeEnum;
 import com.ym.mec.education.req.ClassGroupReq;
-import com.ym.mec.education.req.CourseScheduleReq;
 import com.ym.mec.education.resp.CourseScheduleResp;
 import com.ym.mec.education.service.ICourseScheduleService;
 import io.swagger.annotations.Api;
@@ -16,7 +14,6 @@ import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
-import java.util.Objects;
 
 /**
  * @program: mec
@@ -39,15 +36,15 @@ public class CourseScheduleController {
         return courseScheduleService.getPage(classGroupReq);
     }
 
-    @PostMapping("/info")
+    @PostMapping("/infoByGroupId")
     @ApiOperation("点名详情-头信息")
-    public BaseResponse<CourseScheduleResp> getInfo(@RequestBody CourseScheduleReq courseScheduleReq) {
-        return courseScheduleService.getInfo(courseScheduleReq);
+    public BaseResponse<CourseScheduleResp> getInfoByGroupId(@RequestBody ClassGroupReq courseScheduleReq) {
+        return courseScheduleService.getInfoByGroupId(courseScheduleReq);
     }
 
     @PostMapping("/statisticsInfo")
     @ApiOperation("历史考勤统计-头信息")
-    public BaseResponse getStatisticsInfo(@RequestBody CourseScheduleReq courseScheduleReq) {
-        return courseScheduleService.getStatisticsInfo(courseScheduleReq);
+    public BaseResponse getStatisticsInfo(@RequestBody ClassGroupReq classGroupReq) {
+        return courseScheduleService.getStatisticsInfo(classGroupReq);
     }
 }

+ 5 - 6
mec-education/src/main/java/com/ym/mec/education/controller/StudentAttendanceController.java

@@ -2,7 +2,6 @@ package com.ym.mec.education.controller;
 
 import com.ym.mec.education.base.PageResponse;
 import com.ym.mec.education.req.ClassGroupReq;
-import com.ym.mec.education.req.CourseScheduleReq;
 import com.ym.mec.education.service.IStudentAttendanceService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -34,16 +33,16 @@ public class StudentAttendanceController {
         return studentAttendanceService.getPage(classGroupReq);
     }
 
-    @PostMapping("/listByCourse")
+    @PostMapping("/listRollCall")
     @ApiOperation("点名详情-考勤列表")
-    public PageResponse listByCourse(@RequestBody CourseScheduleReq courseScheduleReq) {
-        return studentAttendanceService.getPageByCourse(courseScheduleReq);
+    public PageResponse listRollCall(@RequestBody ClassGroupReq classGroupReq) {
+        return studentAttendanceService.getPageRollCall(classGroupReq);
     }
 
     @PostMapping("/statisticsList")
     @ApiOperation("历史考勤统计-考勤列表")
-    public PageResponse statisticsList(@RequestBody CourseScheduleReq courseScheduleReq) {
-        return studentAttendanceService.statisticsList(courseScheduleReq);
+    public PageResponse statisticsList(@RequestBody ClassGroupReq classGroupReq) {
+        return studentAttendanceService.statisticsList(classGroupReq);
     }
 
 }

+ 2 - 2
mec-education/src/main/java/com/ym/mec/education/resp/StudentAttendanceResp.java

@@ -9,12 +9,12 @@ import java.util.List;
 
 /**
  * @program: mec
- * @description: 考勤出参
+ * @description: 学生考勤出参
  * @author: xw
  * @create: 2019-09-26 15:24
  */
 @Data
-@ApiModel(description = "考勤出参")
+@ApiModel(description = "学生考勤出参")
 @Accessors(chain = true)
 public class StudentAttendanceResp implements Serializable {
 

+ 11 - 4
mec-education/src/main/java/com/ym/mec/education/service/ICourseScheduleService.java

@@ -26,15 +26,22 @@ public interface ICourseScheduleService extends IService<CourseSchedule> {
 
     /**
      * 根据课程计划id获取课程计划详情
-     * @param courseScheduleReq
+     * @param classGroupReq
      * @return
      */
-    BaseResponse getInfo(CourseScheduleReq courseScheduleReq);
+    BaseResponse getInfoByGroupId(ClassGroupReq classGroupReq);
 
     /**
      * 历史考勤统计-头信息
-     * @param courseScheduleReq
+     * @param classGroupReq
+     * @return
+     */
+    BaseResponse getStatisticsInfo(ClassGroupReq classGroupReq);
+
+    /**
+     * 根据班级id获取最新你的课程计划
+     * @param classGroupId
      * @return
      */
-    BaseResponse getStatisticsInfo(CourseScheduleReq courseScheduleReq);
+    CourseSchedule getLastCourseSchedule(Integer classGroupId);
 }

+ 13 - 3
mec-education/src/main/java/com/ym/mec/education/service/IStudentAttendanceService.java

@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
 import com.ym.mec.education.base.PageResponse;
 import com.ym.mec.education.entity.StudentAttendance;
 import com.ym.mec.education.req.ClassGroupReq;
-import com.ym.mec.education.req.CourseScheduleReq;
 
 /**
  * <p>
@@ -18,8 +17,19 @@ public interface IStudentAttendanceService extends IService<StudentAttendance> {
 
     PageResponse getPage(ClassGroupReq classGroupReq);
 
-    PageResponse getPageByCourse(CourseScheduleReq courseScheduleReq);
+    /**
+     * 点名详情-最新学生考勤列表
+     *
+     * @param classGroupReq
+     * @return
+     */
+    PageResponse getPageRollCall(ClassGroupReq classGroupReq);
 
-    PageResponse statisticsList(CourseScheduleReq courseScheduleReq);
+    /**
+     * 历史考勤统计-列表
+     * @param classGroupReq
+     * @return
+     */
+    PageResponse statisticsList(ClassGroupReq classGroupReq);
 
 }

+ 36 - 19
mec-education/src/main/java/com/ym/mec/education/service/impl/CourseScheduleServiceImpl.java

@@ -12,7 +12,6 @@ import com.ym.mec.education.enums.StudentAttendanceStatusEnum;
 import com.ym.mec.education.enums.TeachTypeEnum;
 import com.ym.mec.education.mapper.CourseScheduleMapper;
 import com.ym.mec.education.req.ClassGroupReq;
-import com.ym.mec.education.req.CourseScheduleReq;
 import com.ym.mec.education.resp.CourseScheduleResp;
 import com.ym.mec.education.service.*;
 import com.ym.mec.education.utils.DateUtil;
@@ -21,6 +20,7 @@ import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
+
 import java.util.List;
 import java.util.Objects;
 import java.util.Optional;
@@ -95,12 +95,12 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleMapper,
     }
 
     @Override
-    public BaseResponse<CourseScheduleResp> getInfo(CourseScheduleReq courseScheduleReq) {
-        if (Objects.isNull(courseScheduleReq.getCourseScheduleId())) {
+    public BaseResponse<CourseScheduleResp> getInfoByGroupId(ClassGroupReq classGroupReq) {
+        if (Objects.isNull(classGroupReq.getGroupId())) {
             return BaseResponse.errorParam();
         }
-        CourseSchedule courseSchedule = getById(courseScheduleReq.getCourseScheduleId());
         CourseScheduleResp courseScheduleResp = new CourseScheduleResp();
+        CourseSchedule courseSchedule = getLastCourseSchedule(classGroupReq.getGroupId());
         if (Objects.nonNull(courseSchedule)) {
             if (Objects.nonNull(courseSchedule.getClassDate())) {
                 courseScheduleResp.setClassDate(DateUtil.date2String(courseSchedule.getClassDate()) + "(" +
@@ -116,7 +116,7 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleMapper,
                         ifPresent(sysUser -> courseScheduleResp.setTeacher(sysUser.getRealName()));
             }
             QueryWrapper<StudentAttendance> studentAttendanceQueryWrapper = new QueryWrapper<>();
-            studentAttendanceQueryWrapper.lambda().eq(true, StudentAttendance::getCourseScheduleId, courseScheduleReq.getCourseScheduleId())
+            studentAttendanceQueryWrapper.lambda().eq(true, StudentAttendance::getCourseScheduleId, courseSchedule.getId())
                     .orderByDesc(true, StudentAttendance::getCreateTime);
             List<StudentAttendance> studentAttendanceList = studentAttendanceService.list(studentAttendanceQueryWrapper);
             if (!CollectionUtils.isEmpty(studentAttendanceList)) {
@@ -128,11 +128,11 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleMapper,
             //总人数
             Integer totalCount = count();
             //请假
-            leaveWrapper.lambda().eq(true, StudentAttendance::getCourseScheduleId, courseScheduleReq.getCourseScheduleId())
+            leaveWrapper.lambda().eq(true, StudentAttendance::getCourseScheduleId, courseSchedule.getId())
                     .eq(true, StudentAttendance::getStatus, StudentAttendanceStatusEnum.LEAVE.getCode());
             Integer leaveCount = studentAttendanceService.count(leaveWrapper);
             //正常
-            normalWrapper.lambda().eq(true, StudentAttendance::getCourseScheduleId, courseScheduleReq.getCourseScheduleId())
+            normalWrapper.lambda().eq(true, StudentAttendance::getCourseScheduleId, courseSchedule.getId())
                     .eq(true, StudentAttendance::getStatus, StudentAttendanceStatusEnum.NORMAL.getCode());
             Integer normalCount = studentAttendanceService.count(normalWrapper);
             courseScheduleResp.setLeaveNum(leaveCount);
@@ -144,21 +144,18 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleMapper,
     }
 
     @Override
-    public BaseResponse getStatisticsInfo(CourseScheduleReq courseScheduleReq) {
-        if (Objects.isNull(courseScheduleReq.getCourseScheduleId())) {
+    public BaseResponse getStatisticsInfo(ClassGroupReq classGroupReq) {
+        if (Objects.isNull(classGroupReq.getGroupId())) {
             return BaseResponse.errorParam();
         }
-        CourseSchedule courseSchedule = getById(courseScheduleReq.getCourseScheduleId());
+        ClassGroup classGroup = groupService.getById(classGroupReq.getGroupId());
         CourseScheduleResp courseScheduleResp = new CourseScheduleResp();
-        if (Objects.nonNull(courseSchedule)) {
-            ClassGroup classGroup = groupService.getById(courseSchedule.getClassGroupId());
-            if (Objects.nonNull(classGroup)) {
-                if (Objects.nonNull(classGroup.getCurrentClassTimes()) && Objects.nonNull(classGroup.getTotalClassTimes())) {
-                    courseScheduleResp.setAlreadyInClass(classGroup.getCurrentClassTimes() + "/" + classGroup.getTotalClassTimes());
-                }
-                if (Objects.nonNull(classGroup.getStudentNum())) {
-                    courseScheduleResp.setStudentNum(classGroup.getStudentNum());
-                }
+        if (Objects.nonNull(classGroup)) {
+            if (Objects.nonNull(classGroup.getCurrentClassTimes()) && Objects.nonNull(classGroup.getTotalClassTimes())) {
+                courseScheduleResp.setAlreadyInClass(classGroup.getCurrentClassTimes() + "/" + classGroup.getTotalClassTimes());
+            }
+            if (Objects.nonNull(classGroup.getStudentNum())) {
+                courseScheduleResp.setStudentNum(classGroup.getStudentNum());
             }
             //退团人数
             QueryWrapper<MusicGroupQuit> musicGroupQuitQueryWrapper = new QueryWrapper<>();
@@ -168,4 +165,24 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleMapper,
         }
         return BaseResponse.success(courseScheduleResp);
     }
+
+    /**
+     * 获取最新的课表记录
+     * @param classGroupId
+     * @return
+     */
+    @Override
+    public CourseSchedule getLastCourseSchedule(Integer classGroupId) {
+        QueryWrapper<CourseSchedule> courseScheduleQueryWrapper = new QueryWrapper<>();
+        courseScheduleQueryWrapper.lambda().eq(true, CourseSchedule::getClassGroupId, classGroupId)
+                .orderByDesc(true, CourseSchedule::getCreateTime);
+        List<CourseSchedule> courseScheduleList = list(courseScheduleQueryWrapper);
+        if (!CollectionUtils.isEmpty(courseScheduleList)) {
+            Optional<CourseSchedule> first = courseScheduleList.stream().findFirst();
+            if (first.isPresent()) {
+                return first.get();
+            }
+        }
+        return null;
+    }
 }

+ 98 - 99
mec-education/src/main/java/com/ym/mec/education/service/impl/StudentAttendanceServiceImpl.java

@@ -11,7 +11,6 @@ import com.ym.mec.education.entity.*;
 import com.ym.mec.education.enums.StudentAttendanceStatusEnum;
 import com.ym.mec.education.mapper.StudentAttendanceMapper;
 import com.ym.mec.education.req.ClassGroupReq;
-import com.ym.mec.education.req.CourseScheduleReq;
 import com.ym.mec.education.resp.StudentAttendanceResp;
 import com.ym.mec.education.resp.StudentAttendanceStatisticsResp;
 import com.ym.mec.education.service.*;
@@ -24,7 +23,6 @@ import org.springframework.util.CollectionUtils;
 
 import java.util.List;
 import java.util.Objects;
-import java.util.Optional;
 
 /**
  * <p>
@@ -101,117 +99,118 @@ public class StudentAttendanceServiceImpl extends ServiceImpl<StudentAttendanceM
     }
 
     @Override
-    public PageResponse getPageByCourse(CourseScheduleReq courseScheduleReq) {
-        if (Objects.isNull(courseScheduleReq.getCourseScheduleId())) {
+    public PageResponse getPageRollCall(ClassGroupReq classGroupReq) {
+        if (Objects.isNull(classGroupReq.getGroupId())) {
             return PageResponse.errorParam();
         }
+        CourseSchedule courseSchedule = courseScheduleService.getLastCourseSchedule(classGroupReq.getGroupId());
         Page<StudentAttendanceResp> pageResult = new Page<>();
-        Page<StudentAttendance> studentAttendancePage = new Page<StudentAttendance>(courseScheduleReq.getPageNo(), courseScheduleReq.getPageSize());
-        QueryWrapper<StudentAttendance> queryWrapper = new QueryWrapper<>();
-        queryWrapper.lambda().eq(true, StudentAttendance::getCourseScheduleId, courseScheduleReq.getCourseScheduleId());
-        IPage<StudentAttendance> page = page(studentAttendancePage, queryWrapper);
-        if (!CollectionUtils.isEmpty(page.getRecords())) {
-            List<StudentAttendanceResp> list = Lists.newArrayList();
-            page.getRecords().forEach(item -> {
-                StudentAttendanceResp studentAttendanceResp = new StudentAttendanceResp();
-                if (Objects.nonNull(item.getUserId())) {
-                    SysUser user = userService.getById(item.getUserId());
-                    if (Objects.nonNull(user) && StringUtils.isNotBlank(user.getRealName())) {
-                        studentAttendanceResp.setStudentName(user.getRealName());
+        if (Objects.nonNull(courseSchedule)) {
+            Page<StudentAttendance> studentAttendancePage = new Page<StudentAttendance>(classGroupReq.getPageNo(), classGroupReq.getPageSize());
+            QueryWrapper<StudentAttendance> queryWrapper = new QueryWrapper<>();
+            queryWrapper.lambda().eq(true, StudentAttendance::getClassGroupId, classGroupReq.getGroupId())
+                    .eq(true, StudentAttendance::getCourseScheduleId, courseSchedule.getId());
+            IPage<StudentAttendance> page = page(studentAttendancePage, queryWrapper);
+            if (!CollectionUtils.isEmpty(page.getRecords())) {
+                List<StudentAttendanceResp> list = Lists.newArrayList();
+                page.getRecords().forEach(item -> {
+                    StudentAttendanceResp studentAttendanceResp = new StudentAttendanceResp();
+                    if (Objects.nonNull(item.getUserId())) {
+                        SysUser user = userService.getById(item.getUserId());
+                        if (Objects.nonNull(user) && StringUtils.isNotBlank(user.getRealName())) {
+                            studentAttendanceResp.setStudentName(user.getRealName());
+                        }
                     }
-                }
-                if (StringUtils.isNotBlank(item.getStatus())) {
-                    studentAttendanceResp.setStatus(StudentAttendanceStatusEnum.getMsgByCode(item.getStatus()));
-                }
-                list.add(studentAttendanceResp);
-            });
-            pageResult.setRecords(list);
+                    if (StringUtils.isNotBlank(item.getStatus())) {
+                        studentAttendanceResp.setStatus(StudentAttendanceStatusEnum.getMsgByCode(item.getStatus()));
+                    }
+                    list.add(studentAttendanceResp);
+                });
+                pageResult.setRecords(list);
+            }
         }
         return PageResponse.success(pageResult);
     }
 
     @Override
-    public PageResponse statisticsList(CourseScheduleReq courseScheduleReq) {
-        if (Objects.isNull(courseScheduleReq.getCourseScheduleId())) {
+    public PageResponse statisticsList(ClassGroupReq classGroupReq) {
+        if (Objects.isNull(classGroupReq.getGroupId())) {
             PageResponse.errorParam();
         }
-        Page<ClassGroupStudentMapper> classGroupStudentMapperPage = new Page<ClassGroupStudentMapper>(courseScheduleReq.getPageNo(), courseScheduleReq.getPageSize());
+        Page<ClassGroupStudentMapper> classGroupStudentMapperPage = new Page<ClassGroupStudentMapper>(classGroupReq.getPageNo(), classGroupReq.getPageSize());
         Page<StudentAttendanceStatisticsResp> pageResult = new Page();
-        CourseSchedule courseSchedule = courseScheduleService.getById(courseScheduleReq.getCourseScheduleId());
-        if (Objects.nonNull(courseSchedule)) {
-            ClassGroup classGroup = groupService.getById(courseSchedule.getClassGroupId());
-            if (Objects.nonNull(classGroup)) {
-                List<String> subjectNameList = subjectService.getSubjectNameList(classGroup.getSubjectIdList());
-                QueryWrapper<ClassGroupStudentMapper> classGroupStudentMapperQueryWrapper = new QueryWrapper<>();
-                classGroupStudentMapperQueryWrapper.lambda().eq(true, ClassGroupStudentMapper::getClassGroupId, classGroup.getId())
-                        .in(true, ClassGroupStudentMapper::getStatus,
-                                ClassGroupStudentStatusEnum.NORMAL.getCode(), ClassGroupStudentStatusEnum.LEAVE.getCode());
-                IPage<ClassGroupStudentMapper> studentMapperPage = classGroupStudentMapperService.page(classGroupStudentMapperPage, classGroupStudentMapperQueryWrapper);
-                if (!CollectionUtils.isEmpty(studentMapperPage.getRecords())) {
-                    List<StudentAttendanceStatisticsResp> studentAttendanceStatisticsRespList = Lists.newArrayList();
-                    BeanUtils.copyProperties(studentMapperPage, pageResult);
-                    studentMapperPage.getRecords().forEach(item -> {
-                        StudentAttendanceStatisticsResp resp = new StudentAttendanceStatisticsResp();
-                        SysUser user = userService.getById(item.getUserId());
-                        if (Objects.nonNull(user) && StringUtils.isNotBlank(user.getRealName())) {
-                            resp.setStudentName(user.getRealName());
+        ClassGroup classGroup = groupService.getById(classGroupReq.getGroupId());
+        if (Objects.nonNull(classGroup)) {
+            List<String> subjectNameList = subjectService.getSubjectNameList(classGroup.getSubjectIdList());
+            QueryWrapper<ClassGroupStudentMapper> classGroupStudentMapperQueryWrapper = new QueryWrapper<>();
+            classGroupStudentMapperQueryWrapper.lambda().eq(true, ClassGroupStudentMapper::getClassGroupId, classGroup.getId())
+                    .in(true, ClassGroupStudentMapper::getStatus,
+                            ClassGroupStudentStatusEnum.NORMAL.getCode(), ClassGroupStudentStatusEnum.LEAVE.getCode());
+            IPage<ClassGroupStudentMapper> studentMapperPage = classGroupStudentMapperService.page(classGroupStudentMapperPage, classGroupStudentMapperQueryWrapper);
+            if (!CollectionUtils.isEmpty(studentMapperPage.getRecords())) {
+                List<StudentAttendanceStatisticsResp> studentAttendanceStatisticsRespList = Lists.newArrayList();
+                BeanUtils.copyProperties(studentMapperPage, pageResult);
+                studentMapperPage.getRecords().forEach(item -> {
+                    StudentAttendanceStatisticsResp resp = new StudentAttendanceStatisticsResp();
+                    SysUser user = userService.getById(item.getUserId());
+                    if (Objects.nonNull(user) && StringUtils.isNotBlank(user.getRealName())) {
+                        resp.setStudentName(user.getRealName());
+                    }
+                    resp.setSubjectName(subjectNameList);
+                    //是否连续旷课
+                    QueryWrapper<MusicGroupStudentFee> musicGroupStudentFeeQueryWrapper = new QueryWrapper<MusicGroupStudentFee>();
+                    musicGroupStudentFeeQueryWrapper.lambda().eq(true, MusicGroupStudentFee::getMusicGroupId, classGroup.getMusicGroupId())
+                            .eq(true, MusicGroupStudentFee::getUserId, item.getUserId());
+                    MusicGroupStudentFee musicGroupStudentFee = musicGroupStudentFeeService.getOne(musicGroupStudentFeeQueryWrapper);
+                    if (Objects.nonNull(musicGroupStudentFee) && Objects.nonNull(musicGroupStudentFee.getContinuousAbsenteeismTimes())) {
+                        if (musicGroupStudentFee.getContinuousAbsenteeismTimes() > 1) {
+                            resp.setTruant(true);
                         }
-                        resp.setSubjectName(subjectNameList);
-                        //是否连续旷课
-                        QueryWrapper<MusicGroupStudentFee> musicGroupStudentFeeQueryWrapper = new QueryWrapper<MusicGroupStudentFee>();
-                        musicGroupStudentFeeQueryWrapper.lambda().eq(true, MusicGroupStudentFee::getMusicGroupId, classGroup.getMusicGroupId())
-                                .eq(true, MusicGroupStudentFee::getUserId, item.getUserId());
-                        MusicGroupStudentFee musicGroupStudentFee = musicGroupStudentFeeService.getOne(musicGroupStudentFeeQueryWrapper);
-                        if (Objects.nonNull(musicGroupStudentFee) && Objects.nonNull(musicGroupStudentFee.getContinuousAbsenteeismTimes())) {
-                            if (musicGroupStudentFee.getContinuousAbsenteeismTimes() > 1) {
-                                resp.setTruant(true);
+                    }
+                    //到课天数
+                    QueryWrapper<StudentAttendance> normalWrapper = new QueryWrapper<>();
+                    normalWrapper.lambda().eq(true, StudentAttendance::getClassGroupId, classGroupReq.getGroupId())
+                            .eq(true, StudentAttendance::getUserId, item.getUserId())
+                            .eq(true, StudentAttendance::getStatus, StudentAttendanceStatusEnum.NORMAL.getCode());
+                    int normalDay = count(normalWrapper);
+                    //旷课天数
+                    QueryWrapper<StudentAttendance> truantWrapper = new QueryWrapper<>();
+                    truantWrapper.lambda().eq(true, StudentAttendance::getCourseScheduleId, classGroupReq.getGroupId())
+                            .eq(true, StudentAttendance::getUserId, item.getUserId())
+                            .eq(true, StudentAttendance::getStatus, StudentAttendanceStatusEnum.TRUANT.getCode());
+                    int truantDay = count(truantWrapper);
+                    //请假天数
+                    QueryWrapper<StudentAttendance> leaveWrapper = new QueryWrapper<>();
+                    leaveWrapper.lambda().eq(true, StudentAttendance::getCourseScheduleId, classGroupReq.getGroupId())
+                            .eq(true, StudentAttendance::getUserId, item.getUserId())
+                            .eq(true, StudentAttendance::getStatus, StudentAttendanceStatusEnum.LEAVE.getCode());
+                    int leaveDay = count(leaveWrapper);
+                    resp.setNormalDay(normalDay);
+                    resp.setTruantDay(truantDay);
+                    resp.setLeaveDay(leaveDay);
+                    //每个学生的考勤明细
+                    QueryWrapper<StudentAttendance> studentAttendanceQueryWrapper = new QueryWrapper<>();
+                    studentAttendanceQueryWrapper.lambda().eq(true, StudentAttendance::getClassGroupId, classGroupReq.getGroupId())
+                            .eq(true, StudentAttendance::getUserId, item.getUserId());
+                    List<StudentAttendance> studentAttendanceList = list(studentAttendanceQueryWrapper);
+                    List<StudentAttendanceResp> studentAttendanceRespList = Lists.newArrayList();
+                    if (!CollectionUtils.isEmpty(studentAttendanceList)) {
+                        studentAttendanceList.forEach(studentAttendance -> {
+                            StudentAttendanceResp studentAttendanceResp = new StudentAttendanceResp();
+                            if (Objects.nonNull(studentAttendance.getCreateTime())) {
+                                studentAttendanceResp.setClassDate(DateUtil.date2String(studentAttendance.getCreateTime(),
+                                        DateUtil.DATE_FORMAT)).setClassWeek(DateUtil.date2Week(studentAttendance.getCreateTime()));
                             }
-                        }
-                        //到课天数
-                        QueryWrapper<StudentAttendance> normalWrapper = new QueryWrapper<>();
-                        normalWrapper.lambda().eq(true, StudentAttendance::getCourseScheduleId, courseScheduleReq.getCourseScheduleId())
-                                .eq(true, StudentAttendance::getUserId, item.getUserId())
-                                .eq(true, StudentAttendance::getStatus, StudentAttendanceStatusEnum.NORMAL.getCode());
-                        int normalDay = count(normalWrapper);
-                        //旷课天数
-                        QueryWrapper<StudentAttendance> truantWrapper = new QueryWrapper<>();
-                        truantWrapper.lambda().eq(true, StudentAttendance::getCourseScheduleId, courseScheduleReq.getCourseScheduleId())
-                                .eq(true, StudentAttendance::getUserId, item.getUserId())
-                                .eq(true, StudentAttendance::getStatus, StudentAttendanceStatusEnum.TRUANT.getCode());
-                        int truantDay = count(truantWrapper);
-                        //请假天数
-                        QueryWrapper<StudentAttendance> leaveWrapper = new QueryWrapper<>();
-                        leaveWrapper.lambda().eq(true, StudentAttendance::getCourseScheduleId, courseScheduleReq.getCourseScheduleId())
-                                .eq(true, StudentAttendance::getUserId, item.getUserId())
-                                .eq(true, StudentAttendance::getStatus, StudentAttendanceStatusEnum.LEAVE.getCode());
-                        int leaveDay = count(leaveWrapper);
-                        resp.setNormalDay(normalDay);
-                        resp.setTruantDay(truantDay);
-                        resp.setLeaveDay(leaveDay);
-                        //每个学生的考勤明细
-                        QueryWrapper<StudentAttendance> studentAttendanceQueryWrapper = new QueryWrapper<>();
-                        studentAttendanceQueryWrapper.lambda().eq(true, StudentAttendance::getCourseScheduleId, courseScheduleReq.getCourseScheduleId())
-                                .eq(true, StudentAttendance::getUserId, item.getUserId());
-                        List<StudentAttendance> studentAttendanceList = list(studentAttendanceQueryWrapper);
-                        List<StudentAttendanceResp> studentAttendanceRespList = Lists.newArrayList();
-                        if (!CollectionUtils.isEmpty(studentAttendanceList)) {
-                            studentAttendanceList.forEach(studentAttendance -> {
-                                StudentAttendanceResp studentAttendanceResp = new StudentAttendanceResp();
-                                if (Objects.nonNull(studentAttendance.getCreateTime())) {
-                                    studentAttendanceResp.setClassDate(DateUtil.date2String(studentAttendance.getCreateTime(),
-                                            DateUtil.DATE_FORMAT)).setClassWeek(DateUtil.date2Week(studentAttendance.getCreateTime()));
-                                }
-                                if (StringUtils.isNotBlank(studentAttendance.getStatus())) {
-                                    studentAttendanceResp.setStatus(StudentAttendanceStatusEnum.getMsgByCode(studentAttendance.getStatus()));
-                                }
-                                studentAttendanceRespList.add(studentAttendanceResp);
-                            });
-                        }
-                        resp.setList(studentAttendanceRespList);
-                        studentAttendanceStatisticsRespList.add(resp);
-                    });
-                    pageResult.setRecords(studentAttendanceStatisticsRespList);
-                }
+                            if (StringUtils.isNotBlank(studentAttendance.getStatus())) {
+                                studentAttendanceResp.setStatus(StudentAttendanceStatusEnum.getMsgByCode(studentAttendance.getStatus()));
+                            }
+                            studentAttendanceRespList.add(studentAttendanceResp);
+                        });
+                    }
+                    resp.setList(studentAttendanceRespList);
+                    studentAttendanceStatisticsRespList.add(resp);
+                });
+                pageResult.setRecords(studentAttendanceStatisticsRespList);
             }
         }
         return PageResponse.success(pageResult);

+ 3 - 2
mec-student/src/main/java/com/ym/mec/student/controller/RegisterController.java

@@ -3,6 +3,7 @@ package com.ym.mec.student.controller;
 import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.dto.MusicGroupSubjectGoodsAndInfoDto;
+import com.ym.mec.biz.dal.dto.RegisterPayDto;
 import com.ym.mec.biz.dal.entity.*;
 import com.ym.mec.biz.service.MusicGroupService;
 import com.ym.mec.biz.service.MusicGroupSubjectPlanService;
@@ -66,8 +67,8 @@ public class RegisterController extends BaseController {
 
     @ApiOperation(value = "乐团报名支付")
     @GetMapping("/pay")
-    @ApiImplicitParams({@ApiImplicitParam(name = "musicGroupId", value = "乐团编号", required = true, dataType = "Integer")})
-    public HttpResponseResult Pay(StudentPaymentOrder studentPaymentOrder) {
+    @ApiImplicitParams({@ApiImplicitParam(name = "registerPayDto", value = "支付信息", required = true, dataType = "Integer")})
+    public HttpResponseResult pay(RegisterPayDto registerPayDto) {
         Map<String, Object> rqMap = new LinkedHashMap<String, Object>();
         rqMap.put("merNo", "07654478");
         rqMap.put("version", "v1");

+ 25 - 13
mec-student/src/main/java/com/ym/mec/student/controller/SysMessageController.java

@@ -1,18 +1,5 @@
 package com.ym.mec.student.controller;
 
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-
-import java.io.IOException;
-
-import org.apache.commons.lang.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpStatus;
-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.entity.SysMessage;
@@ -25,6 +12,17 @@ import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.thirdparty.message.MessageSenderPluginContext.MessageSender;
 import com.ym.mec.util.validator.CommonValidator;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+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 java.io.IOException;
 
 @RestController
 @Api(tags = "消息服务")
@@ -111,6 +109,20 @@ public class SysMessageController extends BaseController {
 		return succeed();
 	}
 
+	@ApiOperation(value = "发送短信验证码")
+	@PostMapping("/noAuth/sendSmsCode")
+	public Object noAuthSendSmsCode(String sendCodeType, String mobileNo) {
+		MessageType messageType = MessageType.getMessageType(sendCodeType);
+		if (messageType == null) {
+			throw new BizException("消息类型参数错误");
+		}
+		if (StringUtils.isBlank(mobileNo) || !CommonValidator.isMobileNo(mobileNo)) {
+			throw new BizException("请输入正确的手机号");
+		}
+//		sysMessageService.sendSecurityCode(MessageSender.YIMEI, userId, MessageSendMode.SMS, messageType, mobileNo);
+		return succeed();
+	}
+
 	@ApiOperation(value = "发送消息")
 	@PostMapping("/sendMessage")
 	public Object sendMessage(MessageSender messageSender, MessageSendMode sendMode, String content, String receiver, int readStatus, String url) {

BIN
mec-thirdparty/libs/SADK-3.2.5.2.jar


+ 7 - 0
mec-thirdparty/pom.xml

@@ -58,6 +58,13 @@
 			<scope>system</scope>
 			<systemPath>${project.basedir}/libs/utils-3.0.6.jar</systemPath>
 		</dependency>
+		<dependency>
+			<groupId>cfca.sadk</groupId>
+			<artifactId>cfca.sadk</artifactId>
+			<version>1.0.0</version>
+			<scope>system</scope>
+			<systemPath>${project.basedir}/libs/SADK-3.2.5.2.jar</systemPath>
+		</dependency>
 
 	</dependencies>
 

+ 288 - 0
mec-thirdparty/src/main/java/com/ym/mec/thirdparty/yqpay/CFCARAUtil.java

@@ -0,0 +1,288 @@
+package com.ym.mec.thirdparty.yqpay;
+
+import cfca.sadk.algorithm.common.Mechanism;
+import cfca.sadk.algorithm.common.PKIException;
+import cfca.sadk.lib.crypto.JCrypto;
+import cfca.sadk.system.FileHelper;
+import cfca.sadk.util.*;
+import cfca.sadk.x509.certificate.X509Cert;
+import org.springframework.core.io.ClassPathResource;
+
+import javax.crypto.spec.SecretKeySpec;
+import java.io.File;
+import java.io.FileInputStream;
+import java.security.Key;
+import java.security.KeyFactory;
+import java.security.PrivateKey;
+import java.security.PublicKey;
+import java.security.cert.CertificateFactory;
+import java.security.cert.X509Certificate;
+import java.security.spec.X509EncodedKeySpec;
+import java.util.Map;
+
+
+public class CFCARAUtil {
+    private static final String deviceName = JCrypto.JSOFT_LIB;
+    private static cfca.sadk.lib.crypto.Session session = null;
+
+
+    static {
+        try {
+            JCrypto jCrypto = JCrypto.getInstance();
+            jCrypto.initialize(deviceName, null);
+            session = jCrypto.openSession(deviceName);
+        } catch (PKIException e) {
+            e.printStackTrace();
+        }
+    }
+
+
+    /******* p1 *********/
+    /**
+     *
+     * p1消息签名
+     * @param :message
+     * @return
+     * @throws Exception
+     *
+     */
+    public static String signMessageByP1(String message, String pfxPath, String passWord) throws Exception{
+       // File file = new ClassPathResource(pfxPath).getFile();
+
+        PrivateKey userPriKey = KeyUtil.getPrivateKeyFromPFX(new ClassPathResource(pfxPath).getInputStream(), passWord);
+        Signature signature = new Signature();
+        byte[] base64P7SignedData = signature.p1SignMessage(Mechanism.SHA256_RSA, message.getBytes("UTF-8"), userPriKey, session);
+        return new String(base64P7SignedData);
+    }
+
+    /**
+     * p1消息校验(公钥证书验签)
+     * @param :beforeSignedData
+     * @param :afterSignedData
+     * @param :certPath
+     * @return
+     * @throws Exception
+     */
+    public static boolean verifyMessageByP1(String beforeSignedData, String afterSignedData, String certPath) throws Exception{
+        //File file = new ClassPathResource(certPath).getFile();
+        X509Cert cert = new X509Cert(new ClassPathResource(certPath).getInputStream());
+        PublicKey publicKey = cert.getPublicKey();
+        Signature signature = new Signature();
+        return signature.p1VerifyMessage(Mechanism.SHA256_RSA, beforeSignedData.getBytes("UTF-8"), afterSignedData.getBytes("UTF-8"), publicKey, session);
+    }
+    /**
+     * p1消息校验(公钥证书验签)
+     * @return
+     * @throws Exception
+     */
+    public static boolean verifyMessageByP1Location(String beforeSignedData, String afterSignedData, String certPath) throws Exception{
+        X509Cert cert = new X509Cert(new FileInputStream(certPath));
+        PublicKey publicKey = cert.getPublicKey();
+        Signature signature = new Signature();
+        return signature.p1VerifyMessage(Mechanism.SHA256_RSA, beforeSignedData.getBytes("UTF-8"), afterSignedData.getBytes("UTF-8"), publicKey, session);
+    }
+
+    /**
+     *
+     * p1消息校验(公钥字符串验签)
+     * @param :beforeSignedData
+     * @param :afterSignedData
+     * @param :publicKeyStr
+     * @return
+     * @throws Exception
+     *
+     */
+    public static boolean verifyMessageByP1AndPubKey(String beforeSignedData, String afterSignedData, String publicKeyStr) throws Exception{
+        KeyFactory keyFactory = KeyFactory.getInstance("RSA");
+        X509EncodedKeySpec keySpec = new X509EncodedKeySpec(Base64.decode(publicKeyStr));
+        PublicKey publicKey = keyFactory.generatePublic(keySpec);
+        Signature signature = new Signature();
+        return signature.p1VerifyMessage(Mechanism.SHA256_RSA, beforeSignedData.getBytes("UTF-8"), afterSignedData.getBytes("UTF-8"), publicKey, session);
+    }
+
+    /********* RSA_PKCS ***********/
+    /**
+     *  RSA证书加密消息
+     *  RSA_PKCS公钥加密
+     * @param :message
+     * @throws Exception
+     */
+    public static String encryptMessageByRSA_PKCS(String message, String certPath) throws Exception{
+        File file = new ClassPathResource(certPath).getFile();
+        X509Cert cert = new X509Cert(new FileInputStream(file));
+        PublicKey userPubKey = cert.getPublicKey();
+        Mechanism mechanism = new Mechanism(Mechanism.RSA_PKCS);
+        byte[] encryptedData = EncryptUtil.encrypt(mechanism, userPubKey, message.getBytes("UTF-8"), session);
+        return new String(encryptedData);
+    }
+
+    /**
+     *  RSA证书加密消息
+     *  RSA_PKCS公钥字符串加密
+     * @param :message
+     * @throws Exception
+     */
+    public static String encryptMessageByRSA_PKCS_String(String message, String publicKeyStr) throws Exception{
+        KeyFactory keyFactory = KeyFactory.getInstance("RSA");
+        X509EncodedKeySpec keySpec = new X509EncodedKeySpec(Base64.decode(publicKeyStr));
+        PublicKey userPubKey = keyFactory.generatePublic(keySpec);
+
+//        File file = new ClassPathResource(certPath).getFile();
+//        X509Cert cert = new X509Cert(new FileInputStream(file));
+//        PublicKey userPubKey = cert.getPublicKey();
+        Mechanism mechanism = new Mechanism(Mechanism.RSA_PKCS);
+        byte[] encryptedData = EncryptUtil.encrypt(mechanism, userPubKey, message.getBytes("UTF-8"), session);
+        return new String(encryptedData);
+    }
+
+    /**
+     * RSA证书解密消息
+     * RSA_PKCS私钥解密
+     * @param :key
+     * @param :message
+     * @throws Exception
+     */
+    public static String decryptMessageByRSA_PKCS(String message, String pfxPath, String passWord) throws Exception{
+        File file = new ClassPathResource(pfxPath).getFile();
+        PrivateKey userPriKey = KeyUtil.getPrivateKeyFromPFX(new FileInputStream(file), passWord);
+        Mechanism mechanism = new Mechanism(Mechanism.RSA_PKCS);
+        byte[] dataBytes = message.getBytes("UTF-8");
+        byte[] encryptedData = EncryptUtil.decrypt(mechanism, userPriKey, dataBytes, session);
+        return new String(encryptedData);
+    }
+
+    /********* RC4 **********/
+    /**
+     * RSA证书加密消息
+     * RC4对称加密
+     * @param :message
+     * @return
+     * @throws Exception
+     */
+    public static String encryptMessageByRC4(String message, String pfxPath, String passWord) throws Exception{
+        byte[] data = FileHelper.read(pfxPath);
+        Key key = new SecretKeySpec(Base64.decode(Base64.encode(data)), "RC4");
+        Mechanism mechanism = new Mechanism(Mechanism.RC4);
+        byte[] dataBytes = message.getBytes("UTF-8");
+        byte[] encryptedData = EncryptUtil.encrypt(mechanism, key, dataBytes, session);
+        return new String(encryptedData);
+
+    }
+
+    /**
+     * RSA证书解密消息
+     * RC4对称解密
+     * @param :message
+     * @return
+     * @throws Exception
+     */
+    public static String decryptMessageByRC4(String message, String pfxPath, String passWord) throws Exception{
+        byte[] data = FileHelper.read(pfxPath);
+        Key key = new SecretKeySpec(Base64.decode(Base64.encode(data)), "RC4");
+        Mechanism mechanism = new Mechanism(Mechanism.RC4);
+        byte[] encryptedData = EncryptUtil.decrypt(mechanism, key, message.getBytes("UTF-8"), session);
+        return new String(encryptedData);
+    }
+
+    /****** p7 ******/
+    /**
+     * P7 分离式文件签名(签名)
+     */
+    public static String signData(String toBeSigned, String certPath, String certPass) throws Exception {
+        X509Cert cert = CertUtil.getCertFromPFX(certPath, certPass);
+        PrivateKey priKey = KeyUtil.getPrivateKeyFromPFX(certPath, certPass);
+        Signature signature = new Signature();
+        return new String(signature.p7SignMessageDetach(Mechanism.SHA256_RSA, toBeSigned.getBytes("UTF8"), priKey, cert, session), "UTF8");
+    }
+
+    /**
+     * P7 分离式消息校验(验签)
+     */
+    public static boolean verifySignature(String data, String signdata) throws Exception {
+        Signature signature = new Signature();
+        return signature.p7VerifyMessageDetach(data.getBytes("UTF8"), signdata.getBytes("UTF8"), session);
+    }
+
+    /**
+     * 消息数字信封(公钥加密)
+     */
+    public static String encryptData(String data, String certPath) throws Exception {
+        // X509Cert cert = CertUtil.getCertFromPFX(certPath, certPass);
+        X509Cert cert = new X509Cert(new FileInputStream(certPath));
+        X509Cert[] recvcerts = new X509Cert[]{ cert };
+        return new String(EnvelopeUtil.envelopeMessage(data.getBytes("UTF8"), Mechanism.RC4, recvcerts, session), "UTF8");
+    }
+
+    /**
+     * 数据解密
+     */
+    public static String decryptData(String encryptedData, String certPath, String certPass) throws Exception {
+        PrivateKey priKey = KeyUtil.getPrivateKeyFromPFX(certPath, certPass);
+        X509Cert cert = CertUtil.getCertFromPFX(certPath, certPass);
+        return new String(EnvelopeUtil.openEvelopedMessage(encryptedData.getBytes("UTF8"), priKey, cert, session), "UTF8");
+    }
+
+
+
+    /**
+     * 拼接字符串方法
+     * @param map
+     * @param connector
+     * @return
+     */
+    public static String joinMapValue(Map<String, Object> map, char connector)	{
+        StringBuffer b = new StringBuffer();
+        for (Map.Entry<String, Object> entry : map.entrySet()){
+            b.append(entry.getKey());
+            b.append('=');
+            if (entry.getValue() != null){
+                b.append(entry.getValue());
+            }
+            b.append(connector);
+        }
+        return b.toString().substring(0, b.length()-1);
+    }
+
+
+    public static void main(String[] args) throws Exception {
+        // 实际地址,请改为项目路径
+        String pfxPath = "D:\\certificate\\168885_test.pfx";
+        // 实际地址,请改为项目路径
+        String certPath = "D:\\certificate\\168885_test.cer";
+        String password = "123123";
+        String plaintext = "幸福是你有食物吃,睡觉的地方,有所爱的人。";
+        String plaintext1 = "幸福是你有食物吃,睡觉的地方,有所爱的人";
+
+        /******* p1 ******/
+        //签名
+        String base64P7SignedData = signMessageByP1(plaintext, pfxPath, password);
+        //验签
+        boolean verifyByp1 = verifyMessageByP1(plaintext, base64P7SignedData, certPath);
+        System.out.println("p1-cert:"+verifyByp1);
+
+        //验签
+        String publicKeyStr = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApSC4H4PvPuS9GJq9chCHq"
+                + "PHb+MK2dYRwVlU+9LJHhEA0mbmkhbSyvcakHuvrXtrBCBt5GMSU2BQeZy2IqQoZDJ"
+                + "Cn5CHufgMUpyMD7qvRo+GOg3GRC3k506ebb/Od/LL0eMAcCiOcCC7HHiPGP44VtBs"
+                + "OgqX22/BSAxyK93bnQbb4+8sc4id0io403rLjBle7vIzrNJtqftuTSQJMm/OmRDvf"
+                + "hg0asdUZYCsb3TdhRqO5hblDl/s/5b6gFTYcgPAw9qKdknqAWGqHP/J6i3GDAqedq"
+                + "7lFuDvkqSnYnWgVzpv9luWzrvXYOl2K4fvDSl9JIXHUMMz9cELEJjmq7yM+fQIDAQ"
+                + "AB";
+        boolean verifyByp1PublicKeyStr = verifyMessageByP1AndPubKey(plaintext, base64P7SignedData, publicKeyStr);
+        System.out.println("p1-PublicKeyStr:"+verifyByp1PublicKeyStr);
+
+        File file = new File("D:\\certificate\\168885_test.cer");
+        CertificateFactory cf = CertificateFactory.getInstance("X.509");
+        X509Certificate cert = (X509Certificate)cf.generateCertificate(new FileInputStream(file));
+        PublicKey publicKey = cert.getPublicKey();
+        String publicKeyString = Base64.toBase64String(publicKey.getEncoded());
+        System.out.println("-----------------公钥--------------------");
+        System.out.println(publicKeyString);
+        System.out.println("-----------------公钥--------------------");
+    }
+
+
+
+
+
+}

+ 384 - 0
mec-thirdparty/src/main/java/com/ym/mec/thirdparty/yqpay/DateUtils.java

@@ -0,0 +1,384 @@
+package com.ym.mec.thirdparty.yqpay;
+
+import org.apache.commons.lang3.time.DateFormatUtils;
+
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+
+public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
+	
+	private static String[] parsePatterns = {
+		"yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM", 
+		"yyyy/MM/dd", "yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd HH:mm", "yyyy/MM",
+		"yyyy.MM.dd", "yyyy.MM.dd HH:mm:ss", "yyyy.MM.dd HH:mm", "yyyy.MM"};
+
+	public static final String YYYY_MM_DD = "yyyyMMdd";
+	public static final String HH_SS_MM = "HHssmm";
+	public static final String YYYY_MM_DD_DEF = "yyyy-MM-dd";
+	public static final String YYYY_MM_DD_HH_MM_SS = "yyyyMMddHHmmss";
+	public static final String DATE_WEB_FORMAT = "yyyy-MM-dd HH:mm:ss";
+	public static final String DATE_WEB_FORMAT_NO_SS = "yyyy-MM-dd HH:mm";
+	public static final String E_MMM_DD_HH_MM_SS_Z_YYYY = "E MMM dd hh:mm:ss z yyyy";//日期格式 "Tue Sep 26 13:56:19 CST 2017"
+	public static final String YYYY_MM_DD_HH_MM_SS_SSS = "yyyyMMddHHmmssSSS";
+
+	public static void main(String[] args) {
+		getTimeOfY0(new Date());
+		int i=0;
+	}
+
+	public static String getDate() {
+		return getDate("yyyy-MM-dd");
+	}
+
+	public static String getDate(String pattern) {
+		return DateFormatUtils.format(new Date(), pattern);
+	}
+
+
+
+	public static String formatDate(Date date, Object... pattern) {
+		if (date == null)
+			return null;
+
+		String formatDate;
+		if (pattern != null && pattern.length > 0) {
+			formatDate = DateFormatUtils.format(date, pattern[0].toString());
+		} else {
+			formatDate = DateFormatUtils.format(date, "yyyy-MM-dd");
+		}
+		return formatDate;
+	}
+
+	public static String formatDateTime(Date date) {
+		return formatDate(date, "yyyy-MM-dd HH:mm:ss");
+	}
+
+	public static Date getTimeOfY0(Date date) {
+		Calendar cal = Calendar.getInstance();
+		cal.setTime(date);
+		cal.set(Calendar.MONTH, 0);
+		cal.set(Calendar.DATE, 1);
+		cal.set(Calendar.HOUR_OF_DAY, 0);
+		cal.set(Calendar.MINUTE, 0);
+		cal.set(Calendar.SECOND, 0);
+		cal.set(Calendar.MILLISECOND, 0);
+		return  cal.getTime();
+	}
+
+	public static Date getTimeOfM0(Date date) {
+		Calendar cal = Calendar.getInstance();
+		cal.setTime(date);
+		cal.set(Calendar.DATE, 1);
+		cal.set(Calendar.HOUR_OF_DAY, 0);
+		cal.set(Calendar.MINUTE, 0);
+		cal.set(Calendar.SECOND, 0);
+		cal.set(Calendar.MILLISECOND, 0);
+		return  cal.getTime();
+	}
+
+	public static Date getTimeOfD0(Date date){
+		Calendar cal = Calendar.getInstance();
+		cal.setTime(date);
+		cal.set(Calendar.HOUR_OF_DAY, 0);
+		cal.set(Calendar.MINUTE, 0);
+		cal.set(Calendar.SECOND, 0);
+		cal.set(Calendar.MILLISECOND, 0);
+		return  cal.getTime();
+	}
+
+	public static Date getTimeOfH0(Date date){
+		Calendar cal = Calendar.getInstance();
+		cal.setTime(date);
+		cal.set(Calendar.MINUTE, 0);
+		cal.set(Calendar.SECOND, 0);
+		cal.set(Calendar.MILLISECOND, 0);
+		return  cal.getTime();
+	}
+
+	public static Date getFirstTimeOfMonth(Date date){
+		Calendar cal = Calendar.getInstance();
+		cal.setTime(date);
+		cal.set(Calendar.DAY_OF_MONTH,
+				cal.getActualMinimum(Calendar.DAY_OF_MONTH));
+		cal.set(Calendar.HOUR_OF_DAY, 0);
+		cal.set(Calendar.MINUTE, 0);
+		cal.set(Calendar.SECOND, 0);
+		cal.set(Calendar.MILLISECOND, 0);
+		return  cal.getTime();
+	}
+
+	public static Date getLastTimeOfMonth(Date date){
+		Calendar cal = Calendar.getInstance();
+		cal.setTime(date);
+		cal.add(Calendar.MONTH, 1);
+		cal.set(Calendar.DAY_OF_MONTH,
+				cal.getActualMinimum(Calendar.DAY_OF_MONTH));
+		cal.set(Calendar.HOUR_OF_DAY, 0);
+		cal.set(Calendar.MINUTE, 0);
+		cal.set(Calendar.SECOND, 0);
+		cal.set(Calendar.MILLISECOND, 0);
+		return  cal.getTime();
+	}
+
+	/*是否为指定月份的最后一天*/
+	public static boolean isLastDayOfMonth(Date date) {
+		Calendar calendar = Calendar.getInstance();
+		calendar.setTime(date);
+		calendar.set(Calendar.DATE, (calendar.get(Calendar.DATE) + 1));
+		if (calendar.get(Calendar.DAY_OF_MONTH) == 1) {
+			return true;
+		}
+		return false;
+	}
+
+	/*是否为本月第一天*/
+	public static boolean isFirstDayOfThisMonth(Date date) {
+		if(date==null){
+			return false;
+		}
+		String now = formatDate(date,"yyyy-MM-dd");
+		Calendar calendar = Calendar.getInstance();
+		calendar.setTime(new Date());
+		calendar.set(Calendar.DAY_OF_MONTH,1);
+		Date firstDate = calendar.getTime();
+		String first = formatDate(firstDate,"yyyy-MM-dd");
+
+		if(now.equals(first)){
+			return true;
+		}else {
+			return false;
+		}
+	}
+
+	public static String getYearAndMonth(Date date){
+		String ym = formatDate(date,"yyyy-MM");
+		return ym;
+	}
+
+	public static String getTime() {
+		return formatDate(new Date(), "HH:mm:ss");
+	}
+
+	public static String getDateTime() {
+		return formatDate(new Date(), "yyyy-MM-dd HH:mm:ss");
+	}
+
+	public static String getYear() {
+		return formatDate(new Date(), "yyyy");
+	}
+
+	public static String getMonth() {
+		return formatDate(new Date(), "MM");
+	}
+
+	public static String getDay() {
+		return formatDate(new Date(), "dd");
+	}
+
+	public static String getHour(Date date) {
+		return formatDate(date, "HH");
+	}
+
+	public static String getWeek() {
+		return formatDate(new Date(), "E");
+	}
+	public static String getWeekByParam(Date date) {
+		return formatDate(date, "E");
+	}
+
+	public static Date parseDate(Object str) {
+		if (str == null){
+			return null;
+		}
+		try {
+			return parseDate(str.toString(), parsePatterns);
+		} catch (ParseException e) {
+			return null;
+		}
+	}
+
+	public static long pastDays(Date date) {
+		long t = new Date().getTime()-date.getTime();
+		return t/(24*60*60*1000);
+	}
+
+	public static long pastHour(Date date) {
+		long t = new Date().getTime()-date.getTime();
+		return t/(60*60*1000);
+	}
+
+	public static long pastMinutes(Date date) {
+		long t = new Date().getTime()-date.getTime();
+		return t/(60*1000);
+	}
+
+    public static String formatDateTime(long timeMillis){
+		long day = timeMillis/(24*60*60*1000);
+		long hour = (timeMillis/(60*60*1000)-day*24);
+		long min = ((timeMillis/(60*1000))-day*24*60-hour*60);
+		long s = (timeMillis/1000-day*24*60*60-hour*60*60-min*60);
+		long sss = (timeMillis-day*24*60*60*1000-hour*60*60*1000-min*60*1000-s*1000);
+		return (day>0?day+",":"")+hour+":"+min+":"+s+"."+sss;
+    }
+
+	public static double getDistanceOfTwoDate(Date before, Date after) {
+		long beforeTime = before.getTime();
+		long afterTime = after.getTime();
+		return (afterTime - beforeTime) / (1000 * 60 * 60 * 24);
+	}
+
+	/**
+	 *  日期大小比较
+	 * @param date1
+	 * @param date2
+	 * @return date2 == date1-->0
+	 * @return date2 > date1-->1
+	 * @return date2 < date1-->-1
+	 * @return -2 异常
+	 */
+	public static int dateStringCompare(Date date1,String date2) {
+		DateFormat df = new SimpleDateFormat("yyyy-MM");
+		try {
+			Date dt1 = df.parse(date2);
+			Date dt2 = df.parse(df.format(date1));;
+			if (dt1.getTime()>dt2.getTime()){
+				return  1;
+			}else if (dt1.getTime()== dt2.getTime()){
+				return  0;
+			}else {
+				return  -1;
+			}
+		} catch (ParseException e) {
+			e.printStackTrace();
+		}
+		return  2;
+	}
+
+	/**
+	 * 取得当月天数
+	 * */
+	public static int getCurrentMonthLastDay()
+	{
+		Calendar a = Calendar.getInstance();
+		a.set(Calendar.DATE, 1);
+		a.roll(Calendar.DATE, -1);
+		int maxDate = a.get(Calendar.DATE);
+		return maxDate;
+	}
+
+
+	/**
+	 * 字符串转换成日期
+	 * @param str
+	 * @param formatType
+	 * @return
+	 */
+	public static Date StrToDate(String str,String formatType) {
+
+		SimpleDateFormat format = new SimpleDateFormat(formatType);
+		Date date = null;
+		try {
+			//date = format.parse(new SimpleDateFormat(formatType).format(str));
+			date = format.parse(str);
+		} catch (ParseException e) {
+			e.printStackTrace();
+		}
+		return date;
+	}
+
+	public static List<String> getWeekend(Integer year){
+		List<String> list = new ArrayList<String>();
+		try{
+			SimpleDateFormat df=new SimpleDateFormat("yyyy-mm-dd");
+			Date date=null;
+			Calendar calendar=Calendar.getInstance();
+			int totalDay;
+			if(year % 4 == 0 && year % 100 != 0 || year % 400 == 0){//闰年的判断规则
+				totalDay=366;
+			}else{
+				totalDay=365;
+			}
+			date=df.parse(year+"-01-01");
+			Calendar cal = Calendar.getInstance();
+			cal.setTime(date);
+			for(int i=0;i<totalDay;i++){
+				if(cal.get(Calendar.DAY_OF_WEEK)==Calendar.SATURDAY||cal.get(Calendar.DAY_OF_WEEK)==Calendar.SUNDAY) {
+					list.add(DateUtils.formatDate(cal.getTime(),"yyyy-MM-dd"));
+				}
+				cal.add(Calendar.DAY_OF_MONTH,1);
+			}
+		}catch(ParseException e){
+			e.printStackTrace();
+		}
+
+		return list;
+	}
+
+	/**
+	 * 使用SimpleDateFormat类对时间字符串的合法性进行校验
+	 *
+	 * @param dateStr
+	 *            将要被校验合法性的时间字符串,格式:yyyyMMddHHmmss
+	 */
+	public static Boolean checkLegalityInClassSimpleDateFormat(String dateStr,String format) {
+		SimpleDateFormat sdf = new SimpleDateFormat(format);
+		try {
+			Date realDate = sdf.parse(dateStr);
+			if (dateStr.equals(sdf.format(realDate))) {
+				return true;
+			} else {
+				return false;
+			}
+			// System.out.println(realDate.toString());
+		} catch (ParseException e) {
+			e.printStackTrace();
+			return false;
+		}
+	}// end method - checkLegalityInClassSimpleDateFormat
+
+    /**
+     * 判断日期是否为周末
+     *
+     * @param date 入参日期
+     * @return true:为周末
+     */
+    public static boolean isWeekend(Date date) {
+        if (date == null)
+            return false;
+
+        Calendar cal = Calendar.getInstance();
+        cal.setTime(date);
+        return cal.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY || cal.get(Calendar.DAY_OF_WEEK) == Calendar.SATURDAY;
+    }
+
+    /*
+ * 计算时间差
+ */
+    public static int getTwoDayTimes(String fromDate ,String toDate) {
+        SimpleDateFormat simpleFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
+        try {
+            long from = simpleFormat.parse(fromDate).getTime();
+            long to = simpleFormat.parse(toDate).getTime();
+            int seconds = (int) ((to - from)/(1000));
+            return seconds;
+        } catch (ParseException e) {
+            e.printStackTrace();
+            return -1;
+        }
+    }
+    
+    public static String getDayForAfter(Date d, int day){
+    	Calendar now =Calendar.getInstance();
+	    now.setTime(d);
+	    now.set(Calendar.DATE,now.get(Calendar.DATE)+day);
+	    SimpleDateFormat simpleFormat = new SimpleDateFormat("yyyy-MM-dd");
+	    return simpleFormat.format(now.getTime());
+
+    }
+
+}

+ 72 - 0
mec-thirdparty/src/main/java/com/ym/mec/thirdparty/yqpay/Intfc.java

@@ -0,0 +1,72 @@
+package com.ym.mec.thirdparty.yqpay;
+
+/**
+ * 提现信息
+ */
+
+public class Intfc {
+
+    private String wdMerNo; //提现商户号
+    private String amount; //提现金额
+    private String cardNo; //提现银行卡号
+    private String phone; //预留手机号(选填)
+    private String cardType; //卡类型 0-个人银行卡,1-企业银行卡。(选填)
+    private String seqNo; //流水号(选填)
+    private String smsCode; //验证码(选填)
+
+    public String getWdMerNo() {
+        return wdMerNo;
+    }
+
+    public void setWdMerNo(String wdMerNo) {
+        this.wdMerNo = wdMerNo;
+    }
+
+    public String getAmount() {
+        return amount;
+    }
+
+    public void setAmount(String amount) {
+        this.amount = amount;
+    }
+
+    public String getCardNo() {
+        return cardNo;
+    }
+
+    public void setCardNo(String cardNo) {
+        this.cardNo = cardNo;
+    }
+
+    public String getPhone() {
+        return phone;
+    }
+
+    public void setPhone(String phone) {
+        this.phone = phone;
+    }
+
+    public String getCardType() {
+        return cardType;
+    }
+
+    public void setCardType(String cardType) {
+        this.cardType = cardType;
+    }
+
+    public String getSeqNo() {
+        return seqNo;
+    }
+
+    public void setSeqNo(String seqNo) {
+        this.seqNo = seqNo;
+    }
+
+    public String getSmsCode() {
+        return smsCode;
+    }
+
+    public void setSmsCode(String smsCode) {
+        this.smsCode = smsCode;
+    }
+}

+ 50 - 0
mec-thirdparty/src/main/java/com/ym/mec/thirdparty/yqpay/Msg.java

@@ -0,0 +1,50 @@
+package com.ym.mec.thirdparty.yqpay;
+
+public class Msg {
+
+    private String code;
+    private String msg;
+    private String responseType;
+    private String responseParameters;
+    private String sign;
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    public String getMsg() {
+        return msg;
+    }
+
+    public void setMsg(String msg) {
+        this.msg = msg;
+    }
+
+    public String getResponseType() {
+        return responseType;
+    }
+
+    public void setResponseType(String responseType) {
+        this.responseType = responseType;
+    }
+
+    public String getResponseParameters() {
+        return responseParameters;
+    }
+
+    public void setResponseParameters(String responseParameters) {
+        this.responseParameters = responseParameters;
+    }
+
+    public String getSign() {
+        return sign;
+    }
+
+    public void setSign(String sign) {
+        this.sign = sign;
+    }
+}

+ 81 - 0
mec-thirdparty/src/main/java/com/ym/mec/thirdparty/yqpay/NotifyMsg.java

@@ -0,0 +1,81 @@
+package com.ym.mec.thirdparty.yqpay;
+
+import java.math.BigDecimal;
+
+/**
+ * 异步通知具体信息
+ */
+public class NotifyMsg {
+    private String merMerOrderNo;
+    private BigDecimal payAmount;
+    private String orderNo;
+    private String sellerNo;
+    private String buyerNo;
+    private String qyfcustUniqueNo;
+    private String tradeFee;
+    private String channelType;
+
+    public String getMerMerOrderNo() {
+        return merMerOrderNo;
+    }
+
+    public void setMerMerOrderNo(String merMerOrderNo) {
+        this.merMerOrderNo = merMerOrderNo;
+    }
+
+    public BigDecimal getPayAmount() {
+        return payAmount;
+    }
+
+    public void setPayAmount(BigDecimal payAmount) {
+        this.payAmount = payAmount;
+    }
+
+    public String getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(String orderNo) {
+        this.orderNo = orderNo;
+    }
+
+    public String getSellerNo() {
+        return sellerNo;
+    }
+
+    public void setSellerNo(String sellerNo) {
+        this.sellerNo = sellerNo;
+    }
+
+    public String getBuyerNo() {
+        return buyerNo;
+    }
+
+    public void setBuyerNo(String buyerNo) {
+        this.buyerNo = buyerNo;
+    }
+
+    public String getQyfcustUniqueNo() {
+        return qyfcustUniqueNo;
+    }
+
+    public void setQyfcustUniqueNo(String qyfcustUniqueNo) {
+        this.qyfcustUniqueNo = qyfcustUniqueNo;
+    }
+
+    public String getTradeFee() {
+        return tradeFee;
+    }
+
+    public void setTradeFee(String tradeFee) {
+        this.tradeFee = tradeFee;
+    }
+
+    public String getChannelType() {
+        return channelType;
+    }
+
+    public void setChannelType(String channelType) {
+        this.channelType = channelType;
+    }
+}

+ 68 - 0
mec-thirdparty/src/main/java/com/ym/mec/thirdparty/yqpay/RspMsg.java

@@ -0,0 +1,68 @@
+package com.ym.mec.thirdparty.yqpay;
+
+public class RspMsg {
+
+    private String merOrderNo;
+    private String merMerOrderNo;
+    private String payUrlSAO;
+    private String qrCode;
+    private String apiStr;
+    private String tradeNo;
+    private String payHtml;
+
+    public String getMerOrderNo() {
+        return merOrderNo;
+    }
+
+    public void setMerOrderNo(String merOrderNo) {
+        this.merOrderNo = merOrderNo;
+    }
+
+    public String getMerMerOrderNo() {
+        return merMerOrderNo;
+    }
+
+    public void setMerMerOrderNo(String merMerOrderNo) {
+        this.merMerOrderNo = merMerOrderNo;
+    }
+
+    public String getPayUrlSAO() {
+        return payUrlSAO;
+    }
+
+    public void setPayUrlSAO(String payUrlSAO) {
+        this.payUrlSAO = payUrlSAO;
+    }
+
+    public String getQrCode() {
+        return qrCode;
+    }
+
+    public void setQrCode(String qrCode) {
+        this.qrCode = qrCode;
+    }
+
+    public String getApiStr() {
+        return apiStr;
+    }
+
+    public void setApiStr(String apiStr) {
+        this.apiStr = apiStr;
+    }
+
+    public String getTradeNo() {
+        return tradeNo;
+    }
+
+    public void setTradeNo(String tradeNo) {
+        this.tradeNo = tradeNo;
+    }
+
+    public String getPayHtml() {
+        return payHtml;
+    }
+
+    public void setPayHtml(String payHtml) {
+        this.payHtml = payHtml;
+    }
+}

+ 50 - 0
mec-thirdparty/src/main/java/com/ym/mec/thirdparty/yqpay/YqPayUtil.java

@@ -0,0 +1,50 @@
+package com.ym.mec.thirdparty.yqpay;
+
+import com.alibaba.fastjson.JSON;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+public class YqPayUtil {
+
+    private String merNo = "0021677";
+    private static final String version = "1.1";
+    private String notifyUrl;
+    private String timestamp;
+    private String apiContent;
+    private static final String signType = "CFCA";
+    private String sign;
+    private Map<String, Object> resultMap;
+    private Map<String, Object> requestMap;
+
+    public YqPayUtil(String notifyUrl, Map<String, Object> resultMap) throws Exception {
+        Map<String, Object> rqMap = new LinkedHashMap<String, Object>();
+        rqMap.put("merNo", this.merNo);
+        rqMap.put("version", this.version);
+        rqMap.put("notifyUrl", notifyUrl);
+        rqMap.put("timestamp", DateUtils.getDateTime());
+        rqMap.put("apiContent", JSON.toJSONString(resultMap));
+        rqMap.put("signType", signType);
+        String beforeSignedData = CFCARAUtil.joinMapValue(rqMap, '&');
+        this.sign = CFCARAUtil.signMessageByP1(beforeSignedData, "certificate/yqpay.pfx", "aaa123123");
+        rqMap.put("sign", this.sign);
+        this.requestMap = rqMap;
+    }
+
+    public Map<String, Object> getRequestMap() {
+        return this.requestMap;
+    }
+
+    //验签
+    public static boolean verify(Map<String, Object> rsMap) {
+        String sign = (String) rsMap.get("sign");
+        rsMap.remove("sign");
+        String beforeSignedData = CFCARAUtil.joinMapValue(rsMap, '&');
+        try {
+            return CFCARAUtil.verifyMessageByP1(beforeSignedData, sign, "certificate/sq_formal_sign.cer");
+        } catch (Exception e) {
+            return false;
+        }
+    }
+
+}

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

@@ -1,5 +1,7 @@
 package com.ym.mec.web.controller;
 
+import com.ym.mec.auth.api.client.SysUserFeignService;
+import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.dto.WithdrawDto;
 import com.ym.mec.biz.dal.entity.CooperationOrgan;
 import com.ym.mec.biz.dal.entity.StudentWithdraw;
@@ -22,11 +24,18 @@ public class StudentWithdrawController extends BaseController {
 
     @Autowired
     private StudentWithdrawService studentWithdrawService;
+    @Autowired
+    private SysUserFeignService sysUserFeignService;
 
-    @ApiOperation(value = "新增")
+    @ApiOperation(value = "新增提现申请")
     @PostMapping("/add")
-    public Object add(StudentWithdraw studentWithdraw) {
-        studentWithdrawService.insert(studentWithdraw);
+    public Object add(StudentWithdraw studentWithdraw) throws Exception {
+        SysUser sysUser = sysUserFeignService.queryUserInfo();
+        if(sysUser == null && sysUser.getId() == null){
+            return failed("获取用户信息失败");
+        }
+        studentWithdraw.setUserId(sysUser.getId());
+        studentWithdrawService.add(studentWithdraw);
         return succeed();
     }
 

+ 2 - 10
mec-web/src/main/java/com/ym/mec/web/controller/SysUserBankCardController.java

@@ -45,21 +45,13 @@ public class SysUserBankCardController extends BaseController {
         return succeed();
     }
 
-    /*@ApiOperation(value = "修改银行卡信息")
-    @PostMapping("/update")
-    public Object update(SysUserBankCard sysUserBankCard) {
-        sysUserBankCard.setModifyOn(new Date());
-        sysUserBankCardService.update(sysUserBankCard);
-        return succeed();
-    }*/
-
     @ApiOperation(value = "分页查询银行卡信息列表")
     @GetMapping("/queryPage")
-    public Object queryPage(String search) {
+    public Object queryPage() {
         SysUser sysUser = sysUserFeignService.queryUserInfo();
         if(sysUser == null || sysUser.getId() == null){
             return failed("获取用户失败");
         }
-        return succeed(sysUserBankCardService.findByUser(search,sysUser.getId()));
+        return succeed(sysUserBankCardService.findByUser(sysUser.getId()));
     }
 }

+ 10 - 20
mec-web/src/main/java/com/ym/mec/web/controller/SysUserCashAccountDetailController.java

@@ -1,22 +1,18 @@
 package com.ym.mec.web.controller;
 
+import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.dto.CashAccountDetail;
-import com.ym.mec.biz.dal.entity.SysUserCashAccount;
 import com.ym.mec.biz.dal.entity.SysUserCashAccountDetail;
 import com.ym.mec.biz.service.SysUserCashAccountDetailService;
-import com.ym.mec.biz.service.SysUserCashAccountService;
 import com.ym.mec.common.controller.BaseController;
-import com.ym.mec.common.page.QueryInfo;
-import com.ym.mec.common.security.AuthUser;
-import com.ym.mec.common.security.SecurityUtils;
 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.web.bind.annotation.*;
-
-import java.util.Date;
+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;
 
 @RequestMapping("userCashAccountDetail")
 @Api(tags = "用户交易明细服务")
@@ -25,6 +21,8 @@ public class SysUserCashAccountDetailController extends BaseController {
 
     @Autowired
     private SysUserCashAccountDetailService sysUserCashAccountDetailService;
+    @Autowired
+    private SysUserFeignService sysUserFeignService;
 
     @ApiOperation(value = "新增用户交易明细")
     @PostMapping("/add")
@@ -33,22 +31,14 @@ public class SysUserCashAccountDetailController extends BaseController {
         return succeed();
     }
 
-//    @ApiOperation(value = "修改用户交易明细")
-//    @PostMapping("/update")
-//    public Object update(SysUserCashAccountDetail sysUserCashAccountDetail) {
-//        sysUserCashAccountDetail.setUpdateTime(new Date());
-//        sysUserCashAccountDetailService.update(sysUserCashAccountDetail);
-//        return succeed();
-//    }
-
     @ApiOperation(value = "分页查询用户交易明细")
     @GetMapping("/queryPage")
     public Object queryPage(CashAccountDetail queryInfo) {
-        AuthUser user = SecurityUtils.getUser();
-        if(user == null){
+        SysUser user = sysUserFeignService.queryUserInfo();
+        if(user == null && user.getId() != null){
             return failed("请重新登录");
         }
-        queryInfo.setUserId(user.getUserId());
+        queryInfo.setUserId(user.getId());
         return succeed(sysUserCashAccountDetailService.queryPage(queryInfo));
     }