Jelajahi Sumber

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

周箭河 5 tahun lalu
induk
melakukan
98c45003d9
52 mengubah file dengan 774 tambahan dan 367 penghapusan
  1. 0 1
      mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/web/controller/UserController.java
  2. 9 2
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/ClassGroupDao.java
  3. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/GoodsDao.java
  4. 8 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/MusicGroupBuildLogDao.java
  5. 7 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/SysUserBankCardDao.java
  6. 15 4
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/CourseListDto.java
  7. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/StudentApplyDetailDto.java
  8. 12 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/ClassGroup.java
  9. 11 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/MusicGroup.java
  10. 14 4
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/MusicGroupBuildLog.java
  11. 7 7
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/TeacherLeaveRecord.java
  12. 5 3
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/VipGroupCategory.java
  13. 5 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/VipGroupDefaultClassesCycle.java
  14. 14 10
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/VipGroupDefaultClassesUnitPrice.java
  15. 5 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/enums/ClassGroupTypeEnum.java
  16. 11 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/StudentPayLogQueryInfo.java
  17. 3 1
      mec-biz/src/main/java/com/ym/mec/biz/service/ClassGroupService.java
  18. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/GoodsService.java
  19. 9 0
      mec-biz/src/main/java/com/ym/mec/biz/service/MusicGroupBuildLogService.java
  20. 1 8
      mec-biz/src/main/java/com/ym/mec/biz/service/MusicGroupService.java
  21. 7 0
      mec-biz/src/main/java/com/ym/mec/biz/service/SysUserBankCardService.java
  22. 35 15
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ClassGroupServiceImpl.java
  23. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/GoodsServiceImpl.java
  24. 7 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupBuildLogServiceImpl.java
  25. 17 16
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java
  26. 0 4
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentWithdrawServiceImpl.java
  27. 5 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/SysUserBankCardServiceImpl.java
  28. 32 5
      mec-biz/src/main/resources/config/mybatis/ClassGroupMapper.xml
  29. 178 172
      mec-biz/src/main/resources/config/mybatis/DemoGroupMapper.xml
  30. 56 59
      mec-biz/src/main/resources/config/mybatis/MusicGroupBuildLogMapper.xml
  31. 6 2
      mec-biz/src/main/resources/config/mybatis/MusicGroupMapper.xml
  32. 1 1
      mec-biz/src/main/resources/config/mybatis/StudentRegistrationMapper.xml
  33. 3 0
      mec-biz/src/main/resources/config/mybatis/SysUserBankCardMapper.xml
  34. 2 3
      mec-biz/src/main/resources/config/mybatis/SysUserCashAccountDetailMapper.xml
  35. 5 5
      mec-biz/src/main/resources/config/mybatis/TeacherLeaveRecordMapper.xml
  36. 6 0
      mec-common/common-core/src/main/java/com/ym/mec/common/entity/ImGroupMember.java
  37. 14 0
      mec-common/common-core/src/main/java/com/ym/mec/common/entity/ImGroupModel.java
  38. 1 1
      mec-common/common-core/src/main/java/com/ym/mec/common/validcode/impl/SmsCodeServiceImpl.java
  39. 4 2
      mec-education/src/main/java/com/ym/mec/education/service/impl/ClassGroupStudentMapperServiceImpl.java
  40. 6 4
      mec-student/src/main/java/com/ym/mec/student/controller/CourseController.java
  41. 1 1
      mec-student/src/main/java/com/ym/mec/student/controller/StudentDemoGroupController.java
  42. 2 14
      mec-thirdparty/src/main/java/com/ym/mec/thirdparty/message/provider/YimeiSmsPlugin.java
  43. 3 3
      mec-web/src/main/java/com/ym/mec/web/controller/GoodsController.java
  44. 1 1
      mec-web/src/main/java/com/ym/mec/web/controller/HotWordLabelManageController.java
  45. 25 0
      mec-web/src/main/java/com/ym/mec/web/controller/MusicGroupBuildLogController.java
  46. 9 8
      mec-web/src/main/java/com/ym/mec/web/controller/MusicGroupController.java
  47. 1 1
      mec-web/src/main/java/com/ym/mec/web/controller/StudentManageController.java
  48. 5 1
      mec-web/src/main/java/com/ym/mec/web/controller/SysUserBankCardController.java
  49. 70 0
      mec-web/src/main/java/com/ym/mec/web/controller/VipGroupCategoryController.java
  50. 65 0
      mec-web/src/main/java/com/ym/mec/web/controller/VipGroupDefaultClassesCycleController.java
  51. 65 0
      mec-web/src/main/java/com/ym/mec/web/controller/VipGroupDefaultClassesUnitPriceController.java
  52. 1 1
      mec-web/src/main/java/com/ym/mec/web/controller/VipGroupManageController.java

+ 0 - 1
mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/web/controller/UserController.java

@@ -69,7 +69,6 @@ public class UserController extends BaseController {
 	@ApiOperation(value = "新增用户")
 	@PostMapping(value = "/add", consumes = MediaType.APPLICATION_JSON_VALUE)
 	public Object add(@RequestBody SysUser sysUser) {
-//		sysUser.setPassword(new BCryptPasswordEncoder().encode(sysUser.getPassword()));
 		return succeed(sysUserService.add(sysUser));
 	}
 

+ 9 - 2
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/ClassGroupDao.java

@@ -94,10 +94,10 @@ public interface ClassGroupDao extends BaseDAO<Integer, ClassGroup> {
 
     /**
      * 获取学生所购买课程列表
-     * @param userId
+     * @param params
      * @return
      */
-    List<CourseListDto> queryCoursePage(Integer userId);
+    List<CourseListDto> queryCoursePage(Map<String, Object> params);
 
     /**
      * 获取学员所在群组信息
@@ -134,4 +134,11 @@ public interface ClassGroupDao extends BaseDAO<Integer, ClassGroup> {
      * @return
      */
     List<StudentPayInfoDto> queryStudentPayLog(Map<String, Object> params);
+
+    /**
+     * COUNT学员购买列表
+     * @param params
+     * @return
+     */
+    int countCoursePage(Map<String, Object> params);
 }

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

@@ -15,7 +15,7 @@ public interface GoodsDao extends BaseDAO<Integer, Goods> {
      * @param subjectId
      * @return
      */
-    List<Goods> findGoodsBySubId(@Param("subjectId") Integer subjectId, @Param("goodsCategoryId") Integer goodsCategoryId);
+    List<Goods> findGoodsBySubId(@Param("subjectId") Integer subjectId, @Param("type") String type);
 
     /**
      * 根据商品分类查找商品数量

+ 8 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/MusicGroupBuildLogDao.java

@@ -3,7 +3,14 @@ package com.ym.mec.biz.dal.dao;
 import com.ym.mec.biz.dal.entity.MusicGroupBuildLog;
 import com.ym.mec.common.dal.BaseDAO;
 
+import java.util.List;
+
 public interface MusicGroupBuildLogDao extends BaseDAO<Integer, MusicGroupBuildLog> {
 
-	
+    /**
+     * 获取所有日志记录
+     * @param musicGroupId
+     * @return
+     */
+    List<MusicGroupBuildLog> findById(String musicGroupId);
 }

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

@@ -18,4 +18,11 @@ public interface SysUserBankCardDao extends BaseDAO<Long, SysUserBankCard> {
      * @return
      */
     List<SysUserBankCard> findByUser(@Param("userId") Integer userId);
+
+    /**
+     * 删除银行卡
+     * @param id
+     * @param userId
+     */
+    void del(@Param("id") Long id, @Param("userId")Integer userId);
 }

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

@@ -1,17 +1,20 @@
 package com.ym.mec.biz.dal.dto;
 
-import com.ym.mec.biz.dal.entity.StudentPaymentOrder;
+import com.ym.mec.biz.dal.enums.ClassGroupTypeEnum;
 import io.swagger.annotations.ApiModelProperty;
 
 import java.util.List;
 
 public class CourseListDto {
 
+    @ApiModelProperty(value = "班级类型", required = true)
+    private ClassGroupTypeEnum type;
+
     @ApiModelProperty(value = "乐团、vip课编号",required = true)
     private String musicGroupId;
 
     @ApiModelProperty(value = "学生姓名",required = true)
-    private List<String> studentNames;
+    private String studentNames;
 
     @ApiModelProperty(value = "乐团、vip课名称",required = true)
     private String musicGroupName;
@@ -37,6 +40,14 @@ public class CourseListDto {
     @ApiModelProperty(value = "0待续费,1已续费",required = true)
     private Integer renewStatus = 0;
 
+    public ClassGroupTypeEnum getType() {
+        return type;
+    }
+
+    public void setType(ClassGroupTypeEnum type) {
+        this.type = type;
+    }
+
     public Integer getRenewStatus() {
         return renewStatus;
     }
@@ -61,11 +72,11 @@ public class CourseListDto {
         this.musicGroupId = musicGroupId;
     }
 
-    public List<String> getStudentNames() {
+    public String getStudentNames() {
         return studentNames;
     }
 
-    public void setStudentNames(List<String> studentNames) {
+    public void setStudentNames(String studentNames) {
         this.studentNames = studentNames;
     }
 

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

@@ -6,7 +6,7 @@ import com.ym.mec.biz.dal.enums.YesOrNoEnum;
 import com.ym.mec.common.enums.UserGenderEnum;
 import com.ym.mec.common.page.QueryInfo;
 
-public class StudentApplyDetailDto extends QueryInfo {
+public class StudentApplyDetailDto{
 
     @ApiModelProperty(value = "学生姓名",required = false)
     private String studentName;

+ 12 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/ClassGroup.java

@@ -21,6 +21,10 @@ public class ClassGroup {
 	private Integer musicGroupId;
 
 	/**  */
+	@ApiModelProperty(value = "上课模式", required = true)
+	private String teachMode;
+
+	/**  */
 	@ApiModelProperty(value = "科目编号(多个,号分割)", required = true)
 	private String subjectIdList;
 
@@ -66,6 +70,14 @@ public class ClassGroup {
 	@ApiModelProperty(value = "当前课次",required = false)
 	private Integer currentClassTimes;
 
+	public String getTeachMode() {
+		return teachMode;
+	}
+
+	public void setTeachMode(String teachMode) {
+		this.teachMode = teachMode;
+	}
+
 	public Integer getCurrentClassTimes() {
 		return currentClassTimes;
 	}

+ 11 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/MusicGroup.java

@@ -89,6 +89,9 @@ public class MusicGroup {
 
 	@ApiModelProperty(value = "乐团图片",required = false)
 	private String img;
+	
+	@ApiModelProperty(value = "教学主任",required = false)
+	private String directorUserId;
 
 	public String getImg() {
 		return img;
@@ -266,6 +269,14 @@ public class MusicGroup {
 		this.isExtraClass = isExtraClass;
 	}
 
+	public String getDirectorUserId() {
+		return directorUserId;
+	}
+
+	public void setDirectorUserId(String directorUserId) {
+		this.directorUserId = directorUserId;
+	}
+
 	@Override
 	public String toString() {
 		return ToStringBuilder.reflectionToString(this);

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

@@ -11,7 +11,7 @@ public class MusicGroupBuildLog {
 	private Integer id;
 	
 	/**  */
-	private Integer musicGroupId;
+	private String musicGroupId;
 	
 	/** 事件 */
 	private String event;
@@ -24,7 +24,17 @@ public class MusicGroupBuildLog {
 	
 	/**  */
 	private java.util.Date createTime;
-	
+
+	public MusicGroupBuildLog(String musicGroupId, String event, Integer operator, String memo) {
+		this.musicGroupId = musicGroupId;
+		this.event = event;
+		this.operator = operator;
+		this.memo = memo;
+	}
+
+	public MusicGroupBuildLog() {
+	}
+
 	public void setId(Integer id){
 		this.id = id;
 	}
@@ -33,11 +43,11 @@ public class MusicGroupBuildLog {
 		return this.id;
 	}
 			
-	public void setMusicGroupId(Integer musicGroupId){
+	public void setMusicGroupId(String musicGroupId){
 		this.musicGroupId = musicGroupId;
 	}
 	
-	public Integer getMusicGroupId(){
+	public String getMusicGroupId(){
 		return this.musicGroupId;
 	}
 			

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

@@ -19,7 +19,7 @@ public class TeacherLeaveRecord {
 	private double days;
 	
 	/** 请假类型 */
-	private String type;
+	private Integer leaveCategoryId;
 	
 	/** 请假状态(审批中、拒绝、通过) */
 	private AuditStatusEnum status;
@@ -72,14 +72,14 @@ public class TeacherLeaveRecord {
 		return this.days;
 	}
 			
-	public void setType(String type){
-		this.type = type;
+	public Integer getLeaveCategoryId() {
+		return leaveCategoryId;
 	}
-	
-	public String getType(){
-		return this.type;
+
+	public void setLeaveCategoryId(Integer leaveCategoryId) {
+		this.leaveCategoryId = leaveCategoryId;
 	}
-			
+
 	public void setStatus(AuditStatusEnum status){
 		this.status = status;
 	}

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

@@ -1,5 +1,7 @@
 package com.ym.mec.biz.dal.entity;
 
+import io.swagger.annotations.ApiModelProperty;
+
 import org.apache.commons.lang3.builder.ToStringBuilder;
 
 /**
@@ -10,7 +12,7 @@ public class VipGroupCategory {
 	/**  */
 	private Integer id;
 	
-	/** 名称 */
+	@ApiModelProperty(value = "名称",required = false)
 	private String name;
 	
 	/**  */
@@ -22,10 +24,10 @@ public class VipGroupCategory {
 	/**  */
 	private java.util.Date updateTime;
 	
-	/** 单节课时 */
+	@ApiModelProperty(value = "单节课时",required = false)
 	private Integer singleClassMinutes;
 	
-	/** 学生数 */
+	@ApiModelProperty(value = "学生数",required = false)
 	private Integer studentNum;
 	
 	public void setId(Integer id){

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

@@ -1,5 +1,7 @@
 package com.ym.mec.biz.dal.entity;
 
+import io.swagger.annotations.ApiModelProperty;
+
 import org.apache.commons.lang3.builder.ToStringBuilder;
 
 /**
@@ -11,12 +13,15 @@ public class VipGroupDefaultClassesCycle {
 	private Integer id;
 	
 	/** 最小课次 */
+	@ApiModelProperty(value = "最小课次",required = false)
 	private Integer minClassTimes;
 	
 	/** 最大课次 */
+	@ApiModelProperty(value = "最大课次",required = false)
 	private Integer maxClassTimes;
 	
 	/** 最大排课范围(月份) */
+	@ApiModelProperty(value = "最大排课范围(月份)",required = false)
 	private Integer month;
 	
 	/**  */

+ 14 - 10
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/VipGroupDefaultClassesUnitPrice.java

@@ -1,5 +1,9 @@
 package com.ym.mec.biz.dal.entity;
 
+import io.swagger.annotations.ApiModelProperty;
+
+import java.math.BigDecimal;
+
 import org.apache.commons.lang3.builder.ToStringBuilder;
 
 /**
@@ -10,17 +14,17 @@ public class VipGroupDefaultClassesUnitPrice {
 	/**  */
 	private Integer id;
 	
-	/**  */
+	@ApiModelProperty(value = "所属分部",required = false)
 	private Integer organId;
 	
-	/**  */
+	@ApiModelProperty(value = "类别",required = false)
 	private Integer vipGroupCategoryId;
 	
-	/**  */
-	private long onlineClassesUnitPrice;
+	@ApiModelProperty(value = "线上课单价",required = false)
+	private BigDecimal onlineClassesUnitPrice;
 	
-	/**  */
-	private long offlineClassesUnitPrice;
+	@ApiModelProperty(value = "线下课单价",required = false)
+	private BigDecimal offlineClassesUnitPrice;
 	
 	/**  */
 	private java.util.Date createTime;
@@ -52,19 +56,19 @@ public class VipGroupDefaultClassesUnitPrice {
 		return this.vipGroupCategoryId;
 	}
 			
-	public void setOnlineClassesUnitPrice(long onlineClassesUnitPrice){
+	public void setOnlineClassesUnitPrice(BigDecimal onlineClassesUnitPrice){
 		this.onlineClassesUnitPrice = onlineClassesUnitPrice;
 	}
 	
-	public long getOnlineClassesUnitPrice(){
+	public BigDecimal getOnlineClassesUnitPrice(){
 		return this.onlineClassesUnitPrice;
 	}
 			
-	public void setOfflineClassesUnitPrice(long offlineClassesUnitPrice){
+	public void setOfflineClassesUnitPrice(BigDecimal offlineClassesUnitPrice){
 		this.offlineClassesUnitPrice = offlineClassesUnitPrice;
 	}
 	
-	public long getOfflineClassesUnitPrice(){
+	public BigDecimal getOfflineClassesUnitPrice(){
 		return this.offlineClassesUnitPrice;
 	}
 			

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

@@ -6,7 +6,11 @@ import com.ym.mec.common.enums.BaseEnum;
  * 班级类型
  */
 public enum ClassGroupTypeEnum implements BaseEnum<String, ClassGroupTypeEnum> {
-	NORMAL("NORMAL", "普通班级"), MIX("MIX", "合奏班级"), HIGH("HIGH", "提高班"), VIP("VIP", "vip课"), DEMO("demo", "试听课");
+	NORMAL("NORMAL", "普通班级"),
+	MIX("MIX", "合奏班级"),
+	HIGH("HIGH", "提高班"),
+	VIP("VIP", "vip课"),
+	DEMO("demo", "试听课");
 
 	private String code;
 

+ 11 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/page/StudentPayLogQueryInfo.java

@@ -11,6 +11,17 @@ public class StudentPayLogQueryInfo extends QueryInfo {
 
     private Integer userId;
 
+    @ApiModelProperty(value = "当前年月(2019-08)",required = true)
+    private String date;
+
+    public String getDate() {
+        return date;
+    }
+
+    public void setDate(String date) {
+        this.date = date;
+    }
+
     public Integer getUserId() {
         return userId;
     }

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

@@ -9,6 +9,7 @@ import com.ym.mec.biz.dal.page.VipClassQueryInfo;
 import com.ym.mec.common.entity.ImGroupModel;
 import com.ym.mec.common.entity.ImUserModel;
 import com.ym.mec.common.page.PageInfo;
+import com.ym.mec.common.page.QueryInfo;
 import com.ym.mec.common.service.BaseService;
 
 public interface ClassGroupService extends BaseService<Integer, ClassGroup> {
@@ -119,9 +120,10 @@ public interface ClassGroupService extends BaseService<Integer, ClassGroup> {
      * 获取学生所购买课程列表
      *
      * @param userId
+     * @param queryInfo
      * @return
      */
-    List<CourseListDto> queryCoursePage(Integer userId);
+    PageInfo<CourseListDto> queryCoursePage(QueryInfo queryInfo,Integer userId);
 
     /**
      * 获取学员所在群组信息

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

@@ -15,7 +15,7 @@ public interface GoodsService extends BaseService<Integer, Goods> {
      * @param subjectId
      * @return
      */
-    List<Goods> findGoodsBySubId(Integer subjectId, Integer goodsCategoryId);
+    List<Goods> findGoodsBySubId(Integer subjectId,String type);
 
     /**
      * 根据商品分类id查找商品数量

+ 9 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/MusicGroupBuildLogService.java

@@ -2,7 +2,16 @@ package com.ym.mec.biz.service;
 
 import com.ym.mec.biz.dal.entity.MusicGroupBuildLog;
 import com.ym.mec.common.service.BaseService;
+import org.w3c.dom.stylesheets.LinkStyle;
+
+import java.util.List;
 
 public interface MusicGroupBuildLogService extends BaseService<Integer, MusicGroupBuildLog> {
 
+    /**
+     * 根据乐团编号获取乐团流程记录
+     * @param musicGroupId
+     * @return
+     */
+    List<MusicGroupBuildLog> findById(String musicGroupId);
 }

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

@@ -10,19 +10,12 @@ import com.ym.mec.common.service.BaseService;
 import java.util.List;
 
 public interface MusicGroupService extends BaseService<String, MusicGroup> {
-
-    /**
-     * 建团申请,基本信息提交
-     * @param musicGroup
-     */
-    void add(MusicGroup musicGroup);
-
     /**
      * 建团申请数据提交
      * @param subFeeSettingDto
      * @Author superzou
      */
-    void createGroup(SubFeeSettingDto subFeeSettingDto);
+    void createGroup(SubFeeSettingDto subFeeSettingDto,Integer userId);
 
     /**
      * 获取学生所在乐团详情

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

@@ -20,4 +20,11 @@ public interface SysUserBankCardService extends BaseService<Long, SysUserBankCar
      * @return
      */
     List<SysUserBankCard> findByUser(Integer id);
+
+    /**
+     * 删除银行卡
+     * @param id
+     * @param userId
+     */
+    void del(Long id, Integer userId);
 }

+ 35 - 15
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ClassGroupServiceImpl.java

@@ -14,9 +14,11 @@ import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.entity.ImGroupModel;
 import com.ym.mec.common.entity.ImUserModel;
 import com.ym.mec.common.page.PageInfo;
+import com.ym.mec.common.page.QueryInfo;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
 import com.ym.mec.util.collection.MapUtil;
 import com.ym.mec.util.date.DateUtil;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -331,22 +333,40 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
         return classGroupAndTeachers;
     }
 
-    public List<CourseListDto> queryCoursePage(Integer userId) {
-        List<CourseListDto> courseListDtos = classGroupDao.queryCoursePage(userId);
-        courseListDtos.forEach(e->{
-            if("VIP".equals(e.getTeachMode())){
-                //获取vip课的学生名称列表
-                e.setStudentNames(classGroupDao.findVipStuNames(e.getMusicGroupId()));
-            }else {
-                //获取学员乐团课的续费状态
-                MusicGroupStudentFee musicGroupStudentFee = musicGroupStudentFeeDao.findByUser(userId,e.getMusicGroupId());
-                if(musicGroupStudentFee != null){
-                    int i = DateUtil.daysBetween(new Date(),musicGroupStudentFee.getNextPaymentDate());
-                    e.setRenewStatus(i < 8?0:1);
+    public PageInfo<CourseListDto> queryCoursePage(QueryInfo queryInfo, Integer userId) {
+        queryInfo.setSearch(userId.toString());
+        PageInfo<CourseListDto> pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
+        Map<String, Object> params = new HashMap<>();
+        MapUtil.populateMap(params, queryInfo);
+        List<CourseListDto> courseListDtos = null;
+        int count = classGroupDao.countCoursePage(params);
+        if (count > 0) {
+            pageInfo.setTotal(count);
+            params.put("offset", pageInfo.getOffset());
+            courseListDtos = classGroupDao.queryCoursePage(params);
+            courseListDtos.forEach(e->{
+                if("VIP".equals(e.getTeachMode())){
+                    //获取vip课的学生名称列表
+                    List<String> vipStuNames = classGroupDao.findVipStuNames(e.getMusicGroupId());
+                    if(vipStuNames != null && vipStuNames.size() > 0){
+                        StringUtils.join(vipStuNames,",");
+                        e.setStudentNames(StringUtils.join());
+                    }
+                }else {
+                    //获取学员乐团课的续费状态
+                    MusicGroupStudentFee musicGroupStudentFee = musicGroupStudentFeeDao.findByUser(userId,e.getMusicGroupId());
+                    if(musicGroupStudentFee != null){
+                        int i = DateUtil.daysBetween(new Date(),musicGroupStudentFee.getNextPaymentDate());
+                        e.setRenewStatus(i < 8?0:1);
+                    }
                 }
-            }
-        });
-        return classGroupDao.queryCoursePage(userId);
+            });
+        }
+        if (count == 0) {
+            courseListDtos = new ArrayList<>();
+        }
+        pageInfo.setRows(courseListDtos);
+        return pageInfo;
     }
 
 

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

@@ -23,8 +23,8 @@ public class GoodsServiceImpl extends BaseServiceImpl<Integer, Goods>  implement
 	}
 
 	@Override
-	public List<Goods> findGoodsBySubId(Integer subjectId,Integer goodsCategoryId) {
-		return goodsDao.findGoodsBySubId(subjectId,goodsCategoryId);
+	public List<Goods> findGoodsBySubId(Integer subjectId,String type) {
+		return goodsDao.findGoodsBySubId(subjectId,type);
 	}
 
 	public int findGoodsNumByCategoryId(Integer goodsCategoryId){

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

@@ -9,6 +9,8 @@ import com.ym.mec.biz.service.MusicGroupBuildLogService;
 import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
 
+import java.util.List;
+
 @Service
 public class MusicGroupBuildLogServiceImpl extends BaseServiceImpl<Integer, MusicGroupBuildLog>  implements MusicGroupBuildLogService {
 	
@@ -19,5 +21,9 @@ public class MusicGroupBuildLogServiceImpl extends BaseServiceImpl<Integer, Musi
 	public BaseDAO<Integer, MusicGroupBuildLog> getDAO() {
 		return musicGroupBuildLogDao;
 	}
-	
+
+	@Override
+	public List<MusicGroupBuildLog> findById(String musicGroupId) {
+		return musicGroupBuildLogDao.findById(musicGroupId);
+	}
 }

+ 17 - 16
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java

@@ -1,6 +1,5 @@
 package com.ym.mec.biz.service.impl;
 
-import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.dao.*;
 import com.ym.mec.biz.dal.dto.BasicUserDto;
 import com.ym.mec.biz.dal.dto.MusicCardDto;
@@ -9,7 +8,10 @@ import com.ym.mec.biz.dal.entity.*;
 import com.ym.mec.biz.dal.enums.ClassGroupTypeEnum;
 import com.ym.mec.biz.service.MusicGroupService;
 import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.entity.ImGroupMember;
+import com.ym.mec.common.entity.ImGroupModel;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
+import com.ym.mec.im.ImFeignService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -30,6 +32,10 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup>
 	private MusicGroupSubjectGoodsGroupDao musicGroupSubjectGoodsGroupDao;
 	@Autowired
 	private MusicGroupSubjectPlanDao musicGroupSubjectPlanDao;
+	@Autowired
+	private ImFeignService imFeignService;
+	@Autowired
+	private MusicGroupBuildLogDao musicGroupBuildLogDao;
 
 	@Override
 	public BaseDAO<String, MusicGroup> getDAO() {
@@ -38,21 +44,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup>
 
 	@Override
 	@Transactional(rollbackFor = Exception.class)
-	public void add(MusicGroup musicGroup) {
-		musicGroupDao.insert(musicGroup);
-		String[] split = musicGroup.getPaymentMonths().split(",");
-		MusicGroupPaymentCalender mg;
-		for (String month:split) {
-			mg = new MusicGroupPaymentCalender();
-			mg.setMusicGroupId(musicGroup.getId());
-			mg.setPaymentMonth(Integer.parseInt(month));
-			musicGroupPaymentCalenderDao.insert(mg);
-		}
-	}
-
-	@Override
-	@Transactional(rollbackFor = Exception.class)
-	public void createGroup(SubFeeSettingDto subFeeSettingDto) {
+	public void createGroup(SubFeeSettingDto subFeeSettingDto,Integer userId) {
 		MusicGroup musicGroup = subFeeSettingDto.getMusicGroup();
 		List<MusicGroupPaymentEntities> musicGroupPaymentEntities = subFeeSettingDto.getMusicGroupPaymentEntities();
 		List<MusicGroupSubjectGoodsGroup> musicGroupSubjectGoodsGroups = subFeeSettingDto.getMusicGroupSubjectGoodsGroups();
@@ -88,6 +80,15 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup>
 				e.setMusicGroupId(musicGroupId);
 				musicGroupSubjectGoodsGroupDao.insert(e);
 			});
+			//新增聊天群
+			ImGroupModel imGroupModel = new ImGroupModel(musicGroupId, musicGroup.getName());
+			//教务老师和运营主管加入群组
+			ImGroupMember[] imGroupMembers = {new ImGroupMember(musicGroup.getTeamTeacherId().toString()),
+					new ImGroupMember(musicGroup.getEducationalTeacherId().toString())};
+			//创建群组
+			imFeignService.groupCreate(new ImGroupModel(musicGroupId,imGroupMembers,musicGroup.getName()));
+			//记录创建日志
+			musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroupId,"提交建团申请",userId,""));
 		}
 	}
 

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

@@ -67,10 +67,6 @@ public class StudentWithdrawServiceImpl extends BaseServiceImpl<String, StudentW
 	@Transactional(rollbackFor = Exception.class)
 	public boolean confirmWithdraw(WithdrawDto withdrawDto) {
 		try {
-//			SysUser sysUser = sysUserFeignService.queryUserInfo();
-//			if (Objects.isNull(sysUser)) {
-//				throw new BizException("请重新登录");
-//			}
 			lock.lock();
 			SysUserCashAccount sysUserCashAccount = cashAccountService.get(withdrawDto.getUserId().intValue());
 			if (Objects.isNull(sysUserCashAccount)){

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

@@ -49,4 +49,9 @@ public class SysUserBankCardServiceImpl extends BaseServiceImpl<Long, SysUserBan
 	public List<SysUserBankCard> findByUser(Integer userId) {
 		return sysUserBankCardDao.findByUser(userId);
 	}
+
+	@Override
+	public void del(Long id, Integer userId) {
+		sysUserBankCardDao.del(id,userId);
+	}
 }

+ 32 - 5
mec-biz/src/main/resources/config/mybatis/ClassGroupMapper.xml

@@ -259,8 +259,9 @@
     <resultMap type="com.ym.mec.biz.dal.dto.CourseListDto" id="CourseListDto">
         <result column="music_group_name_" property="musicGroupName"/>
         <result column="music_group_id_" property="musicGroupId"/>
-        <result column="type_" property="teachMode"/>
+        <result column="type_" property="type" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
         <result column="total_class_times_" property="totalClassTimes"/>
+        <result column="teach_mode_" property="teachMode"/>
         <result column="current_class_times_" property="currentClassTimes"/>
         <result column="address_" property="address"/>
         <result column="single_class_minutes_" property="singleClassMinutes"/>
@@ -268,22 +269,23 @@
     <select id="queryCoursePage" resultMap="CourseListDto">
         SELECT * FROM (
             SELECT cg.type_,s.address_,mg.name_ music_group_name_,
-            cg.total_class_times_,cg.current_class_times_,'' single_class_minutes_,mg.id_ music_group_id_,cg.create_time_
+            cg.total_class_times_,cg.current_class_times_,'' single_class_minutes_,mg.id_ music_group_id_,cg.create_time_,cg.teach_mode_
             FROM student_registration sr
             LEFT JOIN class_group cg ON cg.id_ = sr.class_group_id_
             LEFT JOIN music_group mg ON cg.music_group_id_ = mg.id_
             LEFT JOIN school s ON mg.school_id_ = s.id_
-            WHERE sr.user_id_ = #{userId} AND cg.type_ != 'VIP'
+            WHERE sr.user_id_ = #{search} AND cg.type_ != 'VIP'
             UNION ALL
             SELECT cg.type_,ts.address_,vg.name_ music_group_name_,
-            cg.total_class_times_,cg.current_class_times_,vg.single_class_minutes_,vg.id_ music_group_id_,cg.create_time_
+            cg.total_class_times_,cg.current_class_times_,vg.single_class_minutes_,vg.id_ music_group_id_,cg.create_time_,cg.teach_mode_
             FROM class_group_student_mapper cgsm
             LEFT JOIN class_group cg ON cgsm.class_group_id_ = cg.id_
             LEFT JOIN vip_group_class_group_mapper vgcgm ON vgcgm.class_group_id_ = cgsm.class_group_id_
             LEFT JOIN vip_group vg ON vg.id_ = vgcgm.vip_group_id_
             LEFT JOIN teacher_school ts ON vg.teacher_school_id_ = ts.id_
-            WHERE cgsm.user_id_ = #{userId} AND cg.type_ = 'VIP') a
+            WHERE cgsm.user_id_ = #{search} AND cg.type_ = 'VIP') a
             ORDER BY a.create_time_ DESC
+            <include refid="global.limit"/>
     </select>
 
     <resultMap id="imGroupModel" type="com.ym.mec.common.entity.ImGroupModel">
@@ -323,6 +325,9 @@
             <if test="search != null and search != ''">
                 AND cg.name_ LIKE CONCAT('%',#{search},'%')
             </if>
+            <if test="date != null and date != ''">
+                AND spo.create_time_ LIKE CONCAT(#{date},'%')
+            </if>
             <if test="userId != null">
                 AND spo.user_id_ = #{userId}
             </if>
@@ -345,6 +350,9 @@
             <if test="search != null and search != ''">
                 AND cg.name_ LIKE CONCAT('%',#{search},'%')
             </if>
+            <if test="date != null and date != ''">
+                AND spo.create_time_ LIKE CONCAT(#{date},'%')
+            </if>
             <if test="userId != null">
                 AND spo.user_id_ = #{userId}
             </if>
@@ -354,4 +362,23 @@
         </where>
         <include refid="global.limit"/>
     </select>
+    <select id="countCoursePage" resultType="java.lang.Integer">
+        SELECT COUNT(id_) FROM (
+            SELECT cg.type_,s.address_,mg.name_ music_group_name_,
+            cg.total_class_times_,cg.current_class_times_,'' single_class_minutes_,mg.id_ music_group_id_,cg.create_time_,cg.id_
+            FROM student_registration sr
+            LEFT JOIN class_group cg ON cg.id_ = sr.class_group_id_
+            LEFT JOIN music_group mg ON cg.music_group_id_ = mg.id_
+            LEFT JOIN school s ON mg.school_id_ = s.id_
+            WHERE sr.user_id_ = #{search} AND cg.type_ != 'VIP'
+            UNION ALL
+            SELECT cg.type_,ts.address_,vg.name_ music_group_name_,
+            cg.total_class_times_,cg.current_class_times_,vg.single_class_minutes_,vg.id_ music_group_id_,cg.create_time_,cg.id_
+            FROM class_group_student_mapper cgsm
+            LEFT JOIN class_group cg ON cgsm.class_group_id_ = cg.id_
+            LEFT JOIN vip_group_class_group_mapper vgcgm ON vgcgm.class_group_id_ = cgsm.class_group_id_
+            LEFT JOIN vip_group vg ON vg.id_ = vgcgm.vip_group_id_
+            LEFT JOIN teacher_school ts ON vg.teacher_school_id_ = ts.id_
+            WHERE cgsm.user_id_ = #{search} AND cg.type_ = 'VIP') a
+    </select>
 </mapper>

+ 178 - 172
mec-biz/src/main/resources/config/mybatis/DemoGroupMapper.xml

@@ -5,99 +5,103 @@
 不要修改此文件。所有改动将在下次重新自动生成时丢失。
 -->
 <mapper namespace="com.ym.mec.biz.dal.dao.DemoGroupDao">
-	
-	<resultMap type="com.ym.mec.biz.dal.entity.DemoGroup" id="DemoGroup">
-		<result column="id_" property="id" />
-		<result column="name_" property="name" />
-		<result column="single_class_minutes_" property="singleClassMinutes" />
-		<result column="organ_id_list_" property="organIdList" />
-		<result column="create_time_" property="createTime" />
-		<result column="update_time_" property="updateTime" />
-		<result column="user_id_" property="userId" />
-		<result column="price_" property="price"/>
-		<result column="subject_id_" property="subjectId"/>
-	</resultMap>
-
-	<resultMap id="studentDemoGroupListDto" type="com.ym.mec.biz.dal.dto.StudentDemoGroupListDto">
-		<result property="demoGroupId" column="demo_group_id_"/>
-		<result property="userId" column="user_id_"/>
-		<result property="userName" column="username_"/>
-		<result property="avatar" column="avatar_"/>
-		<result property="introduction" column="introduction_"/>
-		<result property="numberOfClasses" column="number_of_classes_"/>
-		<result property="subjectName" column="subject_name_"/>
-		<collection property="coursesPlans" resultMap="com.ym.mec.biz.dal.dao.DemoGroupCoursesPlanDao.DemoGroupCoursesPlan" column="dgcp.id_"/>
-	</resultMap>
-	
-	<!-- 根据主键查询一条记录 -->
-	<select id="get" resultMap="DemoGroup" >
+
+    <resultMap type="com.ym.mec.biz.dal.entity.DemoGroup" id="DemoGroup">
+        <result column="id_" property="id"/>
+        <result column="name_" property="name"/>
+        <result column="single_class_minutes_" property="singleClassMinutes"/>
+        <result column="organ_id_list_" property="organIdList"/>
+        <result column="create_time_" property="createTime"/>
+        <result column="update_time_" property="updateTime"/>
+        <result column="user_id_" property="userId"/>
+        <result column="price_" property="price"/>
+        <result column="subject_id_" property="subjectId"/>
+    </resultMap>
+
+    <resultMap id="studentDemoGroupListDto" type="com.ym.mec.biz.dal.dto.StudentDemoGroupListDto">
+        <result property="demoGroupId" column="demo_group_id_"/>
+        <result property="userId" column="user_id_"/>
+        <result property="userName" column="username_"/>
+        <result property="avatar" column="avatar_"/>
+        <result property="introduction" column="introduction_"/>
+        <result property="numberOfClasses" column="number_of_classes_"/>
+        <result property="subjectName" column="subject_name_"/>
+        <collection property="coursesPlans"
+                    resultMap="com.ym.mec.biz.dal.dao.DemoGroupCoursesPlanDao.DemoGroupCoursesPlan" column="dgcp.id_"/>
+    </resultMap>
+
+    <!-- 根据主键查询一条记录 -->
+    <select id="get" resultMap="DemoGroup">
 		SELECT * FROM demo_group WHERE id_ = #{id} 
 	</select>
-	
-	<!-- 全查询 -->
-	<select id="findAll" resultMap="DemoGroup">
+
+    <!-- 全查询 -->
+    <select id="findAll" resultMap="DemoGroup">
 		SELECT * FROM demo_group ORDER BY id_
 	</select>
-	
-	<!-- 向数据库增加一条记录 -->
-	<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.DemoGroup" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
-		<!--
-		<selectKey resultClass="int" keyProperty="id" > 
-		SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL 
-		</selectKey>
-		-->
-		INSERT INTO demo_group (id_,name_,single_class_minutes_,organ_id_list_,create_time_,update_time_,user_id_,price_,subject_id_) VALUES(#{id},#{name},#{singleClassMinutes},#{organIdList},#{createTime},#{updateTime},#{userId},#{price},#{subjectId})
-	</insert>
-	
-	<!-- 根据主键查询一条记录 -->
-	<update id="update" parameterType="com.ym.mec.biz.dal.entity.DemoGroup">
-		UPDATE demo_group <set>
-<if test="userId != null">
-user_id_ = #{userId},
-</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="organIdList != null">
-organ_id_list_ = #{organIdList},
-</if>
-<if test="name != null">
-name_ = #{name},
-</if>
-<if test="createTime != null">
-create_time_ = #{createTime},
-</if>
-		<if test="price != null">
-			price_ = #{price},
-		</if>
-		<if test="subjectId != null">
-			subject_id_ = #{subjectId},
-		</if>
-</set> WHERE id_ = #{id} 
-	</update>
-	
-	<!-- 根据主键删除一条记录 -->
-	<delete id="delete" >
+
+    <!-- 向数据库增加一条记录 -->
+    <insert id="insert" parameterType="com.ym.mec.biz.dal.entity.DemoGroup" useGeneratedKeys="true" keyColumn="id"
+            keyProperty="id">
+        <!--
+        <selectKey resultClass="int" keyProperty="id" >
+        SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL
+        </selectKey>
+        -->
+        INSERT INTO demo_group
+        (id_,name_,single_class_minutes_,organ_id_list_,create_time_,update_time_,user_id_,price_,subject_id_)
+        VALUES(#{id},#{name},#{singleClassMinutes},#{organIdList},#{createTime},#{updateTime},#{userId},#{price},#{subjectId})
+    </insert>
+
+    <!-- 根据主键查询一条记录 -->
+    <update id="update" parameterType="com.ym.mec.biz.dal.entity.DemoGroup">
+        UPDATE demo_group
+        <set>
+            <if test="userId != null">
+                user_id_ = #{userId},
+            </if>
+            <if test="updateTime != null">
+                update_time_ = #{updateTime},
+            </if>
+            <if test="singleClassMinutes != null">
+                single_class_minutes_ = #{singleClassMinutes},
+            </if>
+            <if test="organIdList != null">
+                organ_id_list_ = #{organIdList},
+            </if>
+            <if test="name != null">
+                name_ = #{name},
+            </if>
+            <if test="createTime != null">
+                create_time_ = #{createTime},
+            </if>
+            <if test="price != null">
+                price_ = #{price},
+            </if>
+            <if test="subjectId != null">
+                subject_id_ = #{subjectId},
+            </if>
+        </set>
+        WHERE id_ = #{id}
+    </update>
+
+    <!-- 根据主键删除一条记录 -->
+    <delete id="delete">
 		DELETE FROM demo_group WHERE id_ = #{id} 
 	</delete>
-	
-	<!-- 分页查询 -->
-	<select id="queryPage" resultMap="DemoGroup" parameterType="map">
-		SELECT * FROM demo_group ORDER BY id_ <include refid="global.limit"/>
-	</select>
-	
-	<!-- 查询当前表的总记录数 -->
-	<select id="queryCount" resultType="int">
+
+    <!-- 分页查询 -->
+    <select id="queryPage" resultMap="DemoGroup" parameterType="map">
+        SELECT * FROM demo_group ORDER BY id_
+        <include refid="global.limit"/>
+    </select>
+
+    <!-- 查询当前表的总记录数 -->
+    <select id="queryCount" resultType="int">
 		SELECT COUNT(*) FROM demo_group
 	</select>
 
-	<select id="organIdListByDemoGroupId" resultType="int">
+    <select id="organIdListByDemoGroupId" resultType="int">
 		SELECT
 			su.organ_id_
 		FROM
@@ -106,24 +110,25 @@ create_time_ = #{createTime},
 			LEFT JOIN sys_user su ON cgsm.user_id_=su.id_
 		WHERE dgcgm.demo_group_id_=#{demoGroupId}
 	</select>
-	<select id="getOrganIdByUserId" resultType="java.lang.Integer">
+    <select id="getOrganIdByUserId" resultType="java.lang.Integer">
 		select organ_id_ from sys_user where id_=#{userId}
 	</select>
-	<select id="createCourseScheduleByDemoGroup" parameterType="com.ym.mec.biz.dal.entity.DemoGroup" resultMap="com.ym.mec.biz.dal.dao.CourseScheduleDao.CourseSchedule">
+    <select id="createCourseScheduleByDemoGroup" parameterType="com.ym.mec.biz.dal.entity.DemoGroup"
+            resultMap="com.ym.mec.biz.dal.dao.CourseScheduleDao.CourseSchedule">
 		SELECT
 			#{classGroupId} class_group_id_,
 			'NOT_START' status_,
-			DATE_FORMAT(dgcp.courses_start_time_,'%Y-%m-%d') class_date_,
-			dgcp.courses_start_time_ start_class_time_,
-			DATE_ADD(dgcp.courses_start_time_,INTERVAL #{demoGroup.singleClassMinutes} MINUTE) end_class_time_,
+			DATE_FORMAT(dgcp.start_time_,'%Y-%m-%d') class_date_,
+			dgcp.start_time_ start_class_time_,
+			DATE_ADD(dgcp.start_time_,INTERVAL #{demoGroup.singleClassMinutes} MINUTE) end_class_time_,
 			#{demoGroup.userId} teacher_id_,
 			'ONLINE' teach_mode_,
 			'demo' type_
 		FROM
 			demo_group_courses_plan dgcp
-			WHERE dgcp.demo_group_id_=#{demoGroup.id} AND dgcp.courses_start_time_ = #{startTime}
+			WHERE dgcp.demo_group_id_=#{demoGroup.id} AND dgcp.start_time_ = #{startTime}
 	</select>
-	<select id="countDemoGroupStudents" resultType="java.lang.Integer">
+    <select id="countDemoGroupStudents" resultType="java.lang.Integer">
 		SELECT
 			count(cgsm.user_id_)
 		FROM
@@ -132,55 +137,55 @@ create_time_ = #{createTime},
 		WHERE dgcgm.demo_group_id_=#{demoGroupId}
 	</select>
 
-	<sql id="demoGroupQueryCondition">
-		<where>
-			dgcp.status_=0
-			<if test="search!=null">
-				AND su.username_ like concat('%',#{search},'%')
-			</if>
-			<if test="subjectIds!=null and subjectIds!=''">
-				AND FIND_IN_SET(dg.subject_id_,#{subjectIds})
-			</if>
-			<if test="startTime!=null and endTime==null">
-				AND dgcp.courses_start_time_=#{startTime}
-			</if>
-			<if test="startTime!=null and endTime!=null">
-				AND dgcp.courses_start_time_&gt;=#{startTime} AND dgcp.courses_start_time_ &lt;= #{endTime}
-			</if>
-		</where>
-	</sql>
-
-	<select id="findDemoGroupList" resultMap="studentDemoGroupListDto">
-		SELECT
-		dg.id_ demo_group_id_,
-		su.username_,
-		su.avatar_,
-		t.introduction_,
-		s.name_ subject_name_,
-		COUNT(dgcgm.class_group_id_) number_of_classes_,
-		dgcp.*
-		FROM
-		demo_group dg
-		LEFT JOIN demo_group_courses_plan dgcp ON dg.id_=dgcp.demo_group_id_
-		LEFT JOIN teacher t ON dg.user_id_=t.id_
-		LEFT JOIN sys_user su ON dg.user_id_=su.id_
-		LEFT JOIN `subject` s ON dg.subject_id_=s.id_
-		LEFT JOIN demo_group_class_group_mapper dgcgm ON dg.id_=dgcgm.demo_group_id_
-		<include refid="demoGroupQueryCondition"/>
-		GROUP BY dgcp.id_,dg.id_
-		ORDER BY dgcp.courses_start_time_
-		<include refid="global.limit"/>
-	</select>
-	<select id="countDemoGroupList" resultType="java.lang.Integer">
-		SELECT
-			count(*)
-		FROM
-			demo_group dg
-			LEFT JOIN demo_group_courses_plan dgcp ON dg.id_=dgcp.demo_group_id_
-			LEFT JOIN sys_user su ON dg.user_id_=su.id_
-		<include refid="demoGroupQueryCondition"/>
-	</select>
-	<select id="findClassGroupIDByDemoGroupId" resultType="java.lang.Integer">
+    <sql id="demoGroupQueryCondition">
+        <where>
+            dgcp.status_=0
+            <if test="search!=null">
+                AND su.username_ like concat('%',#{search},'%')
+            </if>
+            <if test="subjectIds!=null and subjectIds!=''">
+                AND FIND_IN_SET(dg.subject_id_,#{subjectIds})
+            </if>
+            <if test="startTime!=null and endTime==null">
+                AND dgcp.start_time_=#{startTime}
+            </if>
+            <if test="startTime!=null and endTime!=null">
+                AND dgcp.start_time_&gt;=#{startTime} AND dgcp.start_time_ &lt;= #{endTime}
+            </if>
+        </where>
+    </sql>
+
+    <select id="findDemoGroupList" resultMap="studentDemoGroupListDto">
+        SELECT
+        dg.id_ demo_group_id_,
+        su.username_,
+        su.avatar_,
+        t.introduction_,
+        s.name_ subject_name_,
+        COUNT(dgcgm.class_group_id_) number_of_classes_,
+        dgcp.*
+        FROM
+        demo_group dg
+        LEFT JOIN demo_group_courses_plan dgcp ON dg.id_=dgcp.demo_group_id_
+        LEFT JOIN teacher t ON dg.user_id_=t.id_
+        LEFT JOIN sys_user su ON dg.user_id_=su.id_
+        LEFT JOIN `subject` s ON dg.subject_id_=s.id_
+        LEFT JOIN demo_group_class_group_mapper dgcgm ON dg.id_=dgcgm.demo_group_id_
+        <include refid="demoGroupQueryCondition"/>
+        GROUP BY dgcp.id_,dg.id_
+        ORDER BY dgcp.start_time_
+        <include refid="global.limit"/>
+    </select>
+    <select id="countDemoGroupList" resultType="java.lang.Integer">
+        SELECT
+        count(*)
+        FROM
+        demo_group dg
+        LEFT JOIN demo_group_courses_plan dgcp ON dg.id_=dgcp.demo_group_id_
+        LEFT JOIN sys_user su ON dg.user_id_=su.id_
+        <include refid="demoGroupQueryCondition"/>
+    </select>
+    <select id="findClassGroupIDByDemoGroupId" resultType="java.lang.Integer">
 		SELECT
 			class_group_id_
 		FROM
@@ -191,40 +196,41 @@ create_time_ = #{createTime},
 		SELECT * FROM demo_group WHERE user_id_=#{teacherId}
 	</select>
 
-	<sql id="teacherDemoGroupsQueryCondition">
-		<where>
-			dg.user_id_=#{teacherId}
-		</where>
-	</sql>
+    <sql id="teacherDemoGroupsQueryCondition">
+        <where>
+            dg.user_id_=#{teacherId}
+        </where>
+    </sql>
 
-	<select id="findTeacherDemoGroups" resultType="com.ym.mec.biz.dal.dto.TeacherManageDemoGroupListDto">
-		SELECT
-			cs.class_date_ classDate,
-			GROUP_CONCAT(DISTINCT CONCAT(cs.start_class_time_,cs.end_class_time_)) startTimes,
-			GROUP_CONCAT(s.name_) subjectNames
-		FROM
-			demo_group dg
-		LEFT JOIN demo_group_class_group_mapper dgcgm ON dg.id_=dgcgm.demo_group_id_
-		LEFT JOIN class_group cg ON dgcgm.class_group_id_=cg.id_
-		LEFT JOIN course_schedule cs ON cg.id_=cs.class_group_id_
-		LEFT JOIN `subject` s ON FIND_IN_SET(s.id_,cg.subject_id_list_)
-		<include refid="teacherDemoGroupsQueryCondition"/>
-		GROUP BY cs.class_date_
-		<include refid="global.limit"/>
-	</select>
-	<select id="countTeacherDemoGroups" resultType="int">
-		SELECT
-			count(*)
-		FROM
-			demo_group dg
-		LEFT JOIN demo_group_class_group_mapper dgcgm ON dg.id_=dgcgm.demo_group_id_
-		LEFT JOIN class_group cg ON dgcgm.class_group_id_=cg.id_
-		LEFT JOIN course_schedule cs ON cg.id_=cs.class_group_id_
-		<include refid="teacherDemoGroupsQueryCondition"/>
-		GROUP BY cs.class_date_
-	</select>
+    <select id="findTeacherDemoGroups" resultType="com.ym.mec.biz.dal.dto.TeacherManageDemoGroupListDto">
+        SELECT
+        cs.class_date_ classDate,
+        GROUP_CONCAT(DISTINCT CONCAT(cs.start_class_time_,cs.end_class_time_)) startTimes,
+        GROUP_CONCAT(s.name_) subjectNames
+        FROM
+        demo_group dg
+        LEFT JOIN demo_group_class_group_mapper dgcgm ON dg.id_=dgcgm.demo_group_id_
+        LEFT JOIN class_group cg ON dgcgm.class_group_id_=cg.id_
+        LEFT JOIN course_schedule cs ON cg.id_=cs.class_group_id_
+        LEFT JOIN `subject` s ON FIND_IN_SET(s.id_,cg.subject_id_list_)
+        <include refid="teacherDemoGroupsQueryCondition"/>
+        GROUP BY cs.class_date_
+        <include refid="global.limit"/>
+    </select>
+    <select id="countTeacherDemoGroups" resultType="int">
+        SELECT
+        count(*)
+        FROM
+        demo_group dg
+        LEFT JOIN demo_group_class_group_mapper dgcgm ON dg.id_=dgcgm.demo_group_id_
+        LEFT JOIN class_group cg ON dgcgm.class_group_id_=cg.id_
+        LEFT JOIN course_schedule cs ON cg.id_=cs.class_group_id_
+        <include refid="teacherDemoGroupsQueryCondition"/>
+        GROUP BY cs.class_date_
+    </select>
 
-	<select id="findDemoGroupStartClassTimesWithWeekByTeacherId" resultType="com.ym.mec.biz.dal.dto.EducationDemoGroupListDto">
+    <select id="findDemoGroupStartClassTimesWithWeekByTeacherId"
+            resultType="com.ym.mec.biz.dal.dto.EducationDemoGroupListDto">
 		SELECT
 			class_date_ classDate,
 			GROUP_CONCAT(start_class_time_) startClassTimes

+ 56 - 59
mec-biz/src/main/resources/config/mybatis/MusicGroupBuildLogMapper.xml

@@ -5,72 +5,69 @@
 不要修改此文件。所有改动将在下次重新自动生成时丢失。
 -->
 <mapper namespace="com.ym.mec.biz.dal.dao.MusicGroupBuildLogDao">
-	
-	<resultMap type="com.ym.mec.biz.dal.entity.MusicGroupBuildLog" id="MusicGroupBuildLog">
-		<result column="id_" property="id" />
-		<result column="music_group_id_" property="musicGroupId" />
-		<result column="event_" property="event" />
-		<result column="operator_" property="operator" />
-		<result column="memo_" property="memo" />
-		<result column="create_time_" property="createTime" />
-	</resultMap>
-	
-	<!-- 根据主键查询一条记录 -->
-	<select id="get" resultMap="MusicGroupBuildLog" >
+
+    <resultMap type="com.ym.mec.biz.dal.entity.MusicGroupBuildLog" id="MusicGroupBuildLog">
+        <result column="id_" property="id"/>
+        <result column="music_group_id_" property="musicGroupId"/>
+        <result column="event_" property="event"/>
+        <result column="operator_" property="operator"/>
+        <result column="memo_" property="memo"/>
+        <result column="create_time_" property="createTime"/>
+    </resultMap>
+
+    <!-- 根据主键查询一条记录 -->
+    <select id="get" resultMap="MusicGroupBuildLog">
 		SELECT * FROM music_group_build_log WHERE id_ = #{id} 
 	</select>
-	
-	<!-- 全查询 -->
-	<select id="findAll" resultMap="MusicGroupBuildLog">
+
+    <!-- 全查询 -->
+    <select id="findAll" resultMap="MusicGroupBuildLog">
 		SELECT * FROM music_group_build_log ORDER BY id_
 	</select>
-	
-	<!-- 向数据库增加一条记录 -->
-	<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.MusicGroupBuildLog" 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_build_log (id_,music_group_id_,event_,operator_,memo_,create_time_) VALUES(#{id},#{musicGroupId},#{event},#{operator},#{memo},#{createTime})
+
+    <!-- 向数据库增加一条记录 -->
+    <insert id="insert" parameterType="com.ym.mec.biz.dal.entity.MusicGroupBuildLog" useGeneratedKeys="true"
+            keyColumn="id" keyProperty="id">
+		INSERT INTO music_group_build_log (music_group_id_,event_,operator_,memo_,create_time_)
+		VALUES(#{musicGroupId},#{event},#{operator},#{memo},now())
 	</insert>
-	
-	<!-- 根据主键查询一条记录 -->
-	<update id="update" parameterType="com.ym.mec.biz.dal.entity.MusicGroupBuildLog">
-		UPDATE music_group_build_log <set>
-<if test="operator != null">
-operator_ = #{operator},
-</if>
-<if test="event != null">
-event_ = #{event},
-</if>
-<if test="id != null">
-id_ = #{id},
-</if>
-<if test="memo != null">
-memo_ = #{memo},
-</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" >
+
+    <!-- 根据主键查询一条记录 -->
+    <update id="update" parameterType="com.ym.mec.biz.dal.entity.MusicGroupBuildLog">
+        UPDATE music_group_build_log
+        <set>
+            <if test="operator != null">
+                operator_ = #{operator},
+            </if>
+            <if test="event != null">
+                event_ = #{event},
+            </if>
+            <if test="memo != null">
+                memo_ = #{memo},
+            </if>
+            <if test="musicGroupId != null">
+                music_group_id_ = #{musicGroupId},
+            </if>
+        </set>
+        WHERE id_ = #{id}
+    </update>
+
+    <!-- 根据主键删除一条记录 -->
+    <delete id="delete">
 		DELETE FROM music_group_build_log WHERE id_ = #{id} 
 	</delete>
-	
-	<!-- 分页查询 -->
-	<select id="queryPage" resultMap="MusicGroupBuildLog" parameterType="map">
-		SELECT * FROM music_group_build_log ORDER BY id_ <include refid="global.limit"/>
-	</select>
-	
-	<!-- 查询当前表的总记录数 -->
-	<select id="queryCount" resultType="int">
+
+    <!-- 分页查询 -->
+    <select id="queryPage" resultMap="MusicGroupBuildLog" parameterType="map">
+        SELECT * FROM music_group_build_log ORDER BY id_
+        <include refid="global.limit"/>
+    </select>
+
+    <!-- 查询当前表的总记录数 -->
+    <select id="queryCount" resultType="int">
 		SELECT COUNT(*) FROM music_group_build_log
 	</select>
+    <select id="findById" resultMap="MusicGroupBuildLog">
+		SELECT * FROM music_group_build_log WHERE music_group_id_ = #{musicGroupId}
+	</select>
 </mapper>

+ 6 - 2
mec-biz/src/main/resources/config/mybatis/MusicGroupMapper.xml

@@ -25,6 +25,7 @@
 		<result column="enlightenment_course_time_" property="enlightenmentCourseTime" />
 		<result column="parent_meeting_time_" property="parentMeetingTime" />
 		<result column="img_" property="img" />
+		<result column="director_user_id_" property="directorUserId" />
 	</resultMap>
 
 	<!-- 根据主键查询一条记录 -->
@@ -44,10 +45,10 @@
 		useGeneratedKeys="true" keyColumn="id" keyProperty="id">
 		INSERT INTO music_group
 		(id_,name_,organ_id_,school_id_,apply_expire_date_,team_teacher_id_,educational_teacher_id_,charge_type_id_,course_form_,create_time_,update_time_,status_,
-		bill_start_date_,improvent_classes_num_,enroll_classes_,payment_expire_date_,is_extra_class_,cooperation_organ_id_,enlightenment_course_time_,parent_meeting_time_,img_)
+		bill_start_date_,improvent_classes_num_,enroll_classes_,payment_expire_date_,is_extra_class_,cooperation_organ_id_,enlightenment_course_time_,parent_meeting_time_,img_,director_user_id_)
 		VALUES(#{id},#{name},#{organId},#{schoolId},#{applyExpireDate},#{teamTeacherId},#{educationalTeacherId},#{chargeTypeId},#{courseForm},now(),now(),
 		#{status, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{billStartDate},#{improventClassesNum},#{enrollClasses},#{paymentExpireDate},
-		#{isExtraClass, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{cooperationOrganId},#{enlightenmentCourseTime},#{parentMeetingTime},#{img})
+		#{isExtraClass, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{cooperationOrganId},#{enlightenmentCourseTime},#{parentMeetingTime},#{img},#{directorUserId})
 	</insert>
 
 	<!-- 根据主键查询一条记录 -->
@@ -111,6 +112,9 @@
 			<if test="img != null">
 				img_ = #{img},
 			</if>
+			<if test="directorUserId != null">
+				director_user_id_ = #{directorUserId},
+			</if>
 		</set>
 		WHERE id_ = #{id}
 	</update>

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

@@ -169,7 +169,7 @@
         FROM student_registration sr
         LEFT JOIN sys_user su ON sr.subject_id_ = su.id_
         LEFT JOIN `subject` s ON sr.subject_id_ = s.id_
-        LEFT JOIN `subject` ss ON sr.actual_subject_id_ = s.id_
+        LEFT JOIN `subject` ss ON sr.actual_subject_id_ = ss.id_
         <include refid="queryStudentDetailPageSql"/>
         <include refid="global.limit"/>
     </select>

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

@@ -25,6 +25,9 @@
         <result column="id_card_no_" property="idCardNo"/>
         <result column="real_name_" property="realName"/>
     </resultMap>
+    <delete id="del">
+        UPDATE sys_user_bank_card SET status_ = 0 WHERE id_ = #{id} AND user_id_ = #{userId}
+    </delete>
 
     <!-- 根据主键查询一条记录 -->
     <select id="get" resultMap="SysUserBankCard">

+ 2 - 3
mec-biz/src/main/resources/config/mybatis/SysUserCashAccountDetailMapper.xml

@@ -40,9 +40,8 @@
         </selectKey>
         -->
         INSERT INTO sys_user_cash_account_detail
-        (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},#{amount},#{balance},#{description},#{comment},now(),now())
+        (user_id_,trans_no_,type_,amount_,balance_,description_,comment_,create_time_,update_time_)
+        VALUES(#{userId},#{transNo},#{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{amount},#{balance},#{description},#{comment},now(),now())
     </insert>
 
     <!-- 根据主键查询一条记录 -->

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

@@ -8,7 +8,7 @@
 		<result column="id_" property="id" />
 		<result column="user_id_" property="userId" />
 		<result column="days_" property="days" />
-		<result column="type_" property="type" />
+		<result column="leave_category_id_" property="leaveCategoryId" />
 		<result column="status_" property="status" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler" />
 		<result column="remark_" property="remark" />
 		<result column="create_time_" property="createTime" />
@@ -38,8 +38,8 @@
 		<!-- <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})
+		(id_,user_id_,days_,leave_category_id_,status_,remark_,create_time_,update_time_,start_time_,end_time_,courses_schedule_json_,wf_process_id_,wf_order_id_)
+		VALUES(#{id},#{userId},#{days},#{leaveCategoryId},#{status, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{remark},#{createTime},#{updateTime},#{startTime},#{endTime},#{coursesScheduleJson},#{wfProcessId},#{wfOrderId})
 	</insert>
 
 	<!-- 根据主键查询一条记录 -->
@@ -82,8 +82,8 @@
 			<if test="updateTime != null">
 				update_time_ = #{updateTime},
 			</if>
-			<if test="type != null">
-				type_ = #{type},
+			<if test="leaveCategoryId != null">
+				leave_category_id_ = #{leaveCategoryId},
 			</if>
 		</set>
 		WHERE id_ = #{id}

+ 6 - 0
mec-common/common-core/src/main/java/com/ym/mec/common/entity/ImGroupMember.java

@@ -8,6 +8,12 @@ public class ImGroupMember {
     public ImGroupMember() {
     }
 
+    public ImGroupMember(String id) {
+        this.id = id;
+    }
+
+
+
     public ImGroupMember(String id, String groupId, Integer munite) {
         this.id = id;
         this.groupId = groupId;

+ 14 - 0
mec-common/common-core/src/main/java/com/ym/mec/common/entity/ImGroupModel.java

@@ -1,8 +1,11 @@
 package com.ym.mec.common.entity;
 
 public class ImGroupModel {
+    //群组编号
     private String id;
+    //用户列表
     private ImGroupMember[] members;
+    //群名称
     private String name;
     private String img;
     private Integer minute;
@@ -12,6 +15,17 @@ public class ImGroupModel {
     public ImGroupModel() {
     }
 
+    public ImGroupModel(String id, String name) {
+        this.id = id;
+        this.name = name;
+    }
+
+    public ImGroupModel(String id, ImGroupMember[] members, String name) {
+        this.id = id;
+        this.members = members;
+        this.name = name;
+    }
+
     public Integer getCount() {
         return count;
     }

+ 1 - 1
mec-common/common-core/src/main/java/com/ym/mec/common/validcode/impl/SmsCodeServiceImpl.java

@@ -39,7 +39,7 @@ public class SmsCodeServiceImpl implements SmsCodeService {
 	public boolean sendValidCode(String mobile) throws Exception {
 		String code = RandomStringUtils.randomNumeric(6);
 		// 发送验证码
-		messageSenderPluginContext.send(MessageSenderPluginContext.MessageSender.YIMEI,"","",mobile,"");
+//		messageSenderPluginContext.send(MessageSenderPluginContext.MessageSender.YIMEI,"","",mobile,"");
 		redisTemplate.opsForValue().set(loginVerifyCodeKey + mobile, code, expireTime);
 		return true;
 	}

+ 4 - 2
mec-education/src/main/java/com/ym/mec/education/service/impl/ClassGroupStudentMapperServiceImpl.java

@@ -21,6 +21,7 @@ import com.ym.mec.education.service.ISysUserService;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+
 import java.util.List;
 import java.util.Objects;
 import java.util.Optional;
@@ -66,8 +67,9 @@ public class ClassGroupStudentMapperServiceImpl extends ServiceImpl<ClassGroupSt
                 musicGroupStudentFeeQueryWrapper.lambda().eq(true, MusicGroupStudentFee::getMusicGroupId, classGroup.getMusicGroupId())
                         .eq(true, MusicGroupStudentFee::getUserId, item.getUserId());
                 MusicGroupStudentFee musicGroupStudentFee = musicGroupStudentFeeService.getOne(musicGroupStudentFeeQueryWrapper);
-                Optional.of(musicGroupStudentFee).ifPresent(groupStudentFee -> studentRegistrationResp.
-                        setStudentAttendance("连续缺到" + groupStudentFee.getContinuousAbsenteeismTimes() + "次"));
+                if (Objects.nonNull(musicGroupStudentFee) && Objects.nonNull(musicGroupStudentFee.getContinuousAbsenteeismTimes())) {
+                    studentRegistrationResp.setStudentAttendance("连续缺到" + musicGroupStudentFee.getContinuousAbsenteeismTimes() + "次");
+                }
             }
             list.add(studentRegistrationResp);
         });

+ 6 - 4
mec-student/src/main/java/com/ym/mec/student/controller/CourseController.java

@@ -6,7 +6,7 @@ import com.ym.mec.biz.dal.page.StudentPayLogQueryInfo;
 import com.ym.mec.biz.service.ClassGroupService;
 import com.ym.mec.biz.service.MusicGroupService;
 import com.ym.mec.common.controller.BaseController;
-import com.ym.mec.common.security.SecurityUtils;
+import com.ym.mec.common.page.QueryInfo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.apache.commons.lang3.StringUtils;
@@ -30,12 +30,12 @@ public class CourseController extends BaseController {
 
     @ApiOperation("获取学生所购买课程列表")
     @GetMapping(value = "/queryUserMusicGroups")
-    public Object queryCoursePage(){
+    public Object queryCoursePage(QueryInfo queryInfo){
         SysUser sysUser = sysUserFeignService.queryUserInfo();
         if(sysUser == null){
             return failed("获取用户信息失败");
         }
-        return succeed(classGroupService.queryCoursePage(sysUser.getId()));
+        return succeed(classGroupService.queryCoursePage(queryInfo,sysUser.getId()));
     }
 
     @ApiOperation("获取学员所有聊天群组")
@@ -56,8 +56,10 @@ public class CourseController extends BaseController {
         }
         if(groupId.startsWith("mg")){
             return succeed(musicGroupService.get(groupId.substring(2)));
+        }else if(groupId.startsWith("cg")){
+            return succeed(classGroupService.get(Integer.parseInt(groupId.substring(2))));
         }
-        return succeed(classGroupService.get(Integer.parseInt(groupId.substring(2))));
+        return failed("群编号不存在");
     }
 
     @ApiOperation(value = "分页获取学员购买记录")

+ 1 - 1
mec-student/src/main/java/com/ym/mec/student/controller/StudentDemoGroupController.java

@@ -37,7 +37,7 @@ public class StudentDemoGroupController extends BaseController {
 
     @ApiOperation(value = "试听课列表获取")
     @PostMapping("/queryStudentDemoGroups")
-    public Object queryStudentDemoGroups(@RequestBody StudentDemoGroupQueryInfo queryInfo){
+    public Object queryStudentDemoGroups(StudentDemoGroupQueryInfo queryInfo){
         return succeed(demoGroupService.queryStudentDemoGroups(queryInfo));
     }
 

+ 2 - 14
mec-thirdparty/src/main/java/com/ym/mec/thirdparty/message/provider/YimeiSmsPlugin.java

@@ -1,29 +1,21 @@
 package com.ym.mec.thirdparty.message.provider;
 
-import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
-import com.alibaba.nacos.common.util.Md5Utils;
 import com.ym.mec.thirdparty.message.MessageSenderPlugin;
 import com.ym.mec.util.date.DateUtil;
-import com.ym.mec.util.encode.AES;
 import com.ym.mec.util.http.HttpUtil;
 import org.apache.commons.codec.digest.DigestUtils;
-import org.apache.commons.codec.digest.Md5Crypt;
 import org.apache.commons.lang3.StringUtils;
-import org.apache.tomcat.util.security.MD5Encoder;
-import org.bouncycastle.crypto.digests.MD5Digest;
 import org.springframework.beans.factory.InitializingBean;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
-import sun.security.provider.MD5;
 
-import java.io.IOException;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.HashMap;
 
 /**
- * 极光推送
+ * 亿美短信
  */
 @Service
 public class YimeiSmsPlugin implements MessageSenderPlugin, InitializingBean {
@@ -33,10 +25,6 @@ public class YimeiSmsPlugin implements MessageSenderPlugin, InitializingBean {
 	private String secretKey;
 	@Value("${com.properties.sms-host-dev:http://bjksmtn.b2m.cn}")
 	private String host;
-	// 加密算法
-	private static String algorithm = "AES/ECB/PKCS5Padding";
-	// 是否压缩
-	static boolean isGizp = false;
 
 	public static String getName() {
 		return "yimei";
@@ -45,7 +33,7 @@ public class YimeiSmsPlugin implements MessageSenderPlugin, InitializingBean {
 	private String getParam(String subject, String content, String receiver,String host){
 		try {
 			HashMap<String,Object> param = new HashMap();
-			param.put("appId","");
+			param.put("appId",appId);
 			String timestamp = DateUtil.format(new Date(),new SimpleDateFormat("yyyyMMddHHmmss"));
 			param.put("timestamp", timestamp);
 			param.put("sign", DigestUtils.md5Hex(appId + secretKey + timestamp));

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

@@ -66,8 +66,8 @@ public class GoodsController extends BaseController {
     @ApiOperation(value = "通过科目编号、商品分类 查询商品(教材、辅件)列表")
     @GetMapping("/queryGoodsBySubId")
     @ApiImplicitParams({ @ApiImplicitParam(name = "subjectId", value = "科目编号", required = true, dataType = "Integer"),
-            @ApiImplicitParam(name = "goodsCategoryId", value = "商品分类", required = true, dataType = "Integer")})
-    public Object findGoodsBySubId(@RequestAttribute Integer subjectId,@RequestAttribute Integer goodsCategoryId){
-        return succeed(goodsService.findGoodsBySubId(subjectId,goodsCategoryId));
+            @ApiImplicitParam(name = "type", value = "INSTRUMENT 乐器, ACCESSORIES 教辅", required = true, dataType = "String")})
+    public Object findGoodsBySubId(Integer subjectId,String type){
+        return succeed(goodsService.findGoodsBySubId(subjectId,type));
     }
 }

+ 1 - 1
mec-web/src/main/java/com/ym/mec/web/controller/system/HotWordLabelManageController.java → mec-web/src/main/java/com/ym/mec/web/controller/HotWordLabelManageController.java

@@ -1,4 +1,4 @@
-package com.ym.mec.web.controller.system;
+package com.ym.mec.web.controller;
 
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;

+ 25 - 0
mec-web/src/main/java/com/ym/mec/web/controller/MusicGroupBuildLogController.java

@@ -0,0 +1,25 @@
+package com.ym.mec.web.controller;
+
+import com.ym.mec.biz.service.MusicGroupBuildLogService;
+import com.ym.mec.common.controller.BaseController;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RequestMapping("recharge")
+@Api(tags = "乐团流程日志记录")
+@RestController
+public class MusicGroupBuildLogController extends BaseController {
+
+    @Autowired
+    private MusicGroupBuildLogService musicGroupBuildLogService;
+
+    @ApiOperation("根据乐团编号获取乐团流程记录")
+    @GetMapping(value = "/findAll")
+    public Object findAll(String musicGroupId){
+        return succeed(musicGroupBuildLogService.findById(musicGroupId));
+    }
+}

+ 9 - 8
mec-web/src/main/java/com/ym/mec/web/controller/MusicGroupController.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 io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
@@ -27,13 +29,8 @@ public class MusicGroupController extends BaseController {
 
     @Autowired
     private MusicGroupService musicGroupService;
-
-    @ApiOperation(value = "删除乐团")
-    @PostMapping("/del/{id}")
-    public Object del(@ApiParam(value = "乐团编号", required = true) @PathVariable("id") String id){
-        musicGroupService.delete(id);
-        return succeed();
-    }
+    @Autowired
+    private SysUserFeignService sysUserFeignService;
 
     @ApiOperation(value = "修改乐团")
     @PostMapping("/update")
@@ -58,7 +55,11 @@ public class MusicGroupController extends BaseController {
     @ApiOperation(value = "新增乐团  建团申请数据提交")
     @PostMapping("/createGroup")
     public Object createGroup(@RequestBody SubFeeSettingDto subFeeSettingDto){
-        musicGroupService.createGroup(subFeeSettingDto);
+        SysUser sysUser = sysUserFeignService.queryUserInfo();
+        if(sysUser == null || sysUser.getId() == null){
+            return failed("获取用户信息失败");
+        }
+        musicGroupService.createGroup(subFeeSettingDto,sysUser.getId());
         return succeed();
     }
 }

+ 1 - 1
mec-web/src/main/java/com/ym/mec/web/controller/system/StudentManageController.java → mec-web/src/main/java/com/ym/mec/web/controller/StudentManageController.java

@@ -1,4 +1,4 @@
-package com.ym.mec.web.controller.system;
+package com.ym.mec.web.controller;
 
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;

+ 5 - 1
mec-web/src/main/java/com/ym/mec/web/controller/SysUserBankCardController.java

@@ -41,7 +41,11 @@ public class SysUserBankCardController extends BaseController {
     @ApiOperation(value = "删除银行卡信息")
     @PostMapping("/del")
     public Object del(Long id) {
-        sysUserBankCardService.delete(id);
+        SysUser sysUser = sysUserFeignService.queryUserInfo();
+        if(sysUser != null && sysUser.getId() != null){
+            return failed("获取用户信息失败");
+        }
+        sysUserBankCardService.del(id,sysUser.getId());
         return succeed();
     }
 

+ 70 - 0
mec-web/src/main/java/com/ym/mec/web/controller/VipGroupCategoryController.java

@@ -0,0 +1,70 @@
+package com.ym.mec.web.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+import java.util.Date;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
+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.biz.dal.entity.VipGroupCategory;
+import com.ym.mec.biz.service.VipGroupCategoryService;
+import com.ym.mec.common.controller.BaseController;
+
+@Api(tags = "vip课类别")
+@RequestMapping("vipGroupCategory")
+@RestController
+public class VipGroupCategoryController extends BaseController {
+
+	@Autowired
+	private VipGroupCategoryService vipGroupCategoryService;
+
+	@ApiOperation("单查询")
+	@GetMapping(value = "/query", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
+	public Object query(int id) {
+		return succeed(vipGroupCategoryService.get(id));
+	}
+
+	@ApiOperation("全查询")
+	@GetMapping(value = "/queryAll", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
+	public Object queryAll() {
+		return succeed(vipGroupCategoryService.findAll(null));
+	}
+
+	@ApiOperation("新增")
+	@PostMapping(value = "/add", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
+	public Object add(VipGroupCategory vipGroupCategory) {
+		Date date = new Date();
+		vipGroupCategory.setCreateTime(date);
+		vipGroupCategory.setUpdateTime(date);
+		vipGroupCategory.setDelFlag("0");
+		vipGroupCategoryService.insert(vipGroupCategory);
+		return succeed();
+	}
+
+	@ApiOperation("修改")
+	@PostMapping(value = "/update", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
+	public Object update(VipGroupCategory vipGroupCategory) {
+		Date date = new Date();
+		vipGroupCategory.setUpdateTime(date);
+		vipGroupCategoryService.update(vipGroupCategory);
+		return succeed();
+	}
+
+	@ApiOperation("删除")
+	@PostMapping(value = "/delete", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
+	public Object delete(int id) {
+		VipGroupCategory vipGroupCategory = vipGroupCategoryService.get(id);
+		Date date = new Date();
+		vipGroupCategory.setUpdateTime(date);
+		vipGroupCategory.setDelFlag("1");
+		vipGroupCategoryService.update(vipGroupCategory);
+		return succeed();
+	}
+
+}

+ 65 - 0
mec-web/src/main/java/com/ym/mec/web/controller/VipGroupDefaultClassesCycleController.java

@@ -0,0 +1,65 @@
+package com.ym.mec.web.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+import java.util.Date;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
+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.biz.dal.entity.VipGroupDefaultClassesCycle;
+import com.ym.mec.biz.service.VipGroupDefaultClassesCycleService;
+import com.ym.mec.common.controller.BaseController;
+
+@Api(tags = "vip课默认排课周期")
+@RequestMapping("vipGroupDefaultClassesCycle")
+@RestController
+public class VipGroupDefaultClassesCycleController extends BaseController {
+
+	@Autowired
+	private VipGroupDefaultClassesCycleService vipGroupDefaultClassesCycleService;
+
+	@ApiOperation("单查询")
+	@GetMapping(value = "/query", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
+	public Object query(int id) {
+		return succeed(vipGroupDefaultClassesCycleService.get(id));
+	}
+
+	@ApiOperation("全查询")
+	@GetMapping(value = "/queryAll", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
+	public Object queryAll() {
+		return succeed(vipGroupDefaultClassesCycleService.findAll(null));
+	}
+
+	@ApiOperation("新增")
+	@PostMapping(value = "/add", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
+	public Object add(VipGroupDefaultClassesCycle vipGroupDefaultClassesCycle) {
+		Date date = new Date();
+		vipGroupDefaultClassesCycle.setCreateTime(date);
+		vipGroupDefaultClassesCycle.setUpdateTime(date);
+		vipGroupDefaultClassesCycleService.insert(vipGroupDefaultClassesCycle);
+		return succeed();
+	}
+
+	@ApiOperation("修改")
+	@PostMapping(value = "/update", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
+	public Object update(VipGroupDefaultClassesCycle vipGroupDefaultClassesCycle) {
+		Date date = new Date();
+		vipGroupDefaultClassesCycle.setUpdateTime(date);
+		vipGroupDefaultClassesCycleService.update(vipGroupDefaultClassesCycle);
+		return succeed();
+	}
+
+	@ApiOperation("删除")
+	@PostMapping(value = "/delete", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
+	public Object delete(int id) {
+		vipGroupDefaultClassesCycleService.delete(id);
+		return succeed();
+	}
+
+}

+ 65 - 0
mec-web/src/main/java/com/ym/mec/web/controller/VipGroupDefaultClassesUnitPriceController.java

@@ -0,0 +1,65 @@
+package com.ym.mec.web.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+import java.util.Date;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
+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.biz.dal.entity.VipGroupDefaultClassesUnitPrice;
+import com.ym.mec.biz.service.VipGroupDefaultClassesUnitPriceService;
+import com.ym.mec.common.controller.BaseController;
+
+@Api(tags = "vip课默认单价")
+@RequestMapping("vipGroupDefaultClassesUnitPrice")
+@RestController
+public class VipGroupDefaultClassesUnitPriceController extends BaseController {
+
+	@Autowired
+	private VipGroupDefaultClassesUnitPriceService vipGroupDefaultClassesUnitPriceService;
+
+	@ApiOperation("单查询")
+	@GetMapping(value = "/query", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
+	public Object query(int id) {
+		return succeed(vipGroupDefaultClassesUnitPriceService.get(id));
+	}
+
+	@ApiOperation("全查询")
+	@GetMapping(value = "/queryAll", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
+	public Object queryAll() {
+		return succeed(vipGroupDefaultClassesUnitPriceService.findAll(null));
+	}
+
+	@ApiOperation("新增")
+	@PostMapping(value = "/add", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
+	public Object add(VipGroupDefaultClassesUnitPrice vipGroupDefaultClassesUnitPrice) {
+		Date date = new Date();
+		vipGroupDefaultClassesUnitPrice.setCreateTime(date);
+		vipGroupDefaultClassesUnitPrice.setUpdateTime(date);
+		vipGroupDefaultClassesUnitPriceService.insert(vipGroupDefaultClassesUnitPrice);
+		return succeed();
+	}
+
+	@ApiOperation("修改")
+	@PostMapping(value = "/update", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
+	public Object update(VipGroupDefaultClassesUnitPrice vipGroupDefaultClassesUnitPrice) {
+		Date date = new Date();
+		vipGroupDefaultClassesUnitPrice.setUpdateTime(date);
+		vipGroupDefaultClassesUnitPriceService.update(vipGroupDefaultClassesUnitPrice);
+		return succeed();
+	}
+
+	@ApiOperation("删除")
+	@PostMapping(value = "/delete", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
+	public Object delete(int id) {
+		vipGroupDefaultClassesUnitPriceService.delete(id);
+		return succeed();
+	}
+
+}

+ 1 - 1
mec-web/src/main/java/com/ym/mec/web/controller/system/VipGroupManageController.java → mec-web/src/main/java/com/ym/mec/web/controller/VipGroupManageController.java

@@ -1,4 +1,4 @@
-package com.ym.mec.web.controller.system;
+package com.ym.mec.web.controller;
 
 import com.ym.mec.biz.dal.page.VipGroupAttendanceQueryInfo;
 import io.swagger.annotations.Api;