Browse Source

Merge remote-tracking branch 'origin/master'

周箭河 5 years ago
parent
commit
3749f45587
36 changed files with 458 additions and 116 deletions
  1. 26 0
      data_migration/pom.xml
  2. 13 0
      data_migration/src/main/java/com/ym/App.java
  3. 38 0
      data_migration/src/test/java/com/ym/AppTest.java
  4. 7 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/ClassGroupDao.java
  5. 7 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleDao.java
  6. 7 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/DemoGroupDao.java
  7. 1 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/SubjectDao.java
  8. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/TeacherSchoolDao.java
  9. 11 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/StudentManageCourseListDto.java
  10. 23 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/TeacherMusicClassInfoDto.java
  11. 7 5
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/CourseScheduleRewardsRules.java
  12. 11 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/SysConfig.java
  13. 33 4
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/Teacher.java
  14. 3 3
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/StudentManageAttendanceQueryInfo.java
  15. 9 9
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/TeacherAttendanceQueryInfo.java
  16. 6 0
      mec-biz/src/main/java/com/ym/mec/biz/service/CourseScheduleService.java
  17. 12 2
      mec-biz/src/main/java/com/ym/mec/biz/service/SysConfigService.java
  18. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/TeacherSchoolService.java
  19. 13 15
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ClassGroupServiceImpl.java
  20. 20 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java
  21. 4 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java
  22. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherSchoolServiceImpl.java
  23. 32 4
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherServiceImpl.java
  24. 15 10
      mec-biz/src/main/resources/config/mybatis/ClassGroupMapper.xml
  25. 47 0
      mec-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml
  26. 4 0
      mec-biz/src/main/resources/config/mybatis/DemoGroupMapper.xml
  27. 1 1
      mec-biz/src/main/resources/config/mybatis/OrganizationMapper.xml
  28. 6 4
      mec-biz/src/main/resources/config/mybatis/StudentManageDao.xml
  29. 19 12
      mec-biz/src/main/resources/config/mybatis/SysConfigMapper.xml
  30. 2 2
      mec-biz/src/main/resources/config/mybatis/TeacherAttendanceMapper.xml
  31. 23 32
      mec-biz/src/main/resources/config/mybatis/TeacherMapper.xml
  32. 1 1
      mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherVipSchoolController.java
  33. 42 0
      mec-web/src/main/java/com/ym/mec/web/controller/CourseScheduleRewardsRulesController.java
  34. 6 2
      mec-web/src/main/java/com/ym/mec/web/controller/SysConfigController.java
  35. 1 1
      mec-web/src/main/java/com/ym/mec/web/controller/TeacherVipSchoolController.java
  36. 5 4
      pom.xml

+ 26 - 0
data_migration/pom.xml

@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>com.ym</groupId>
+    <artifactId>mec</artifactId>
+    <version>1.0</version>
+  </parent>
+  <groupId>com.ym</groupId>
+  <artifactId>data_migration</artifactId>
+  <version>1.0</version>
+  <name>data_migration</name>
+  <url>http://maven.apache.org</url>
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>

+ 13 - 0
data_migration/src/main/java/com/ym/App.java

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

+ 38 - 0
data_migration/src/test/java/com/ym/AppTest.java

@@ -0,0 +1,38 @@
+package com.ym;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * Unit test for simple App.
+ */
+public class AppTest 
+    extends TestCase
+{
+    /**
+     * Create the test case
+     *
+     * @param testName name of the test case
+     */
+    public AppTest( String testName )
+    {
+        super( testName );
+    }
+
+    /**
+     * @return the suite of tests being tested
+     */
+    public static Test suite()
+    {
+        return new TestSuite( AppTest.class );
+    }
+
+    /**
+     * Rigourous Test :-)
+     */
+    public void testApp()
+    {
+        assertTrue( true );
+    }
+}

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

@@ -244,4 +244,11 @@ public interface ClassGroupDao extends BaseDAO<Integer, ClassGroup> {
      */
     List<TeacherClassGroupDto> findTeacherMusicClassGroup(@Param("teacherId") Long teacherId);
 
+    /**
+     * 根据老师编号列表获取小课数量
+     * @param teacherIds
+     * @return
+     */
+    List<Map<Integer, Long>> countTeacherVipNum(String teacherIds);
+
 }

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

@@ -242,4 +242,11 @@ public interface CourseScheduleDao extends BaseDAO<Long, CourseSchedule> {
      */
     List<Map<Integer, Integer>> queryVipGroupTeachereClassTimesByMonth(@Param("monthDate") Date monthDate,@Param("status") CourseStatusEnum status);
 
+    /**
+     * 查询已完成未更新状态的课程列表
+     * @return
+     */
+    List<CourseSchedule> queryFinishedWithNoUpdateStatus();
+    
+    int batchUpdate(List<CourseSchedule> courseScheduleList);
 }

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

@@ -101,5 +101,11 @@ public interface DemoGroupDao extends BaseDAO<Long, DemoGroup> {
      * 根据老师获取本周内的试听课安排
      */
     List<EducationDemoGroupListDto> findDemoGroupStartClassTimesWithWeekByTeacherId(Long teacherId);
-	
+
+    /**
+     * 根据教师编号列表获取试听课数量map
+     * @param teacherIds
+     * @return
+     */
+    List<Map<Integer, Long>> countTeacherDemoGroupNum(String teacherIds);
 }

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

@@ -3,6 +3,7 @@ package com.ym.mec.biz.dal.dao;
 import com.ym.mec.biz.dal.dto.ConditionDto;
 import com.ym.mec.biz.dal.dto.QueryConditionDto;
 import com.ym.mec.biz.dal.dto.SubjectApplyDetailDto;
+import com.ym.mec.biz.dal.dto.UserGoodsDto;
 import com.ym.mec.biz.dal.entity.Subject;
 import com.ym.mec.biz.dal.enums.YesOrNoEnum;
 import com.ym.mec.common.dal.BaseDAO;

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

@@ -14,6 +14,6 @@ public interface TeacherSchoolDao extends BaseDAO<Long, TeacherSchool> {
      * @return java.util.List<com.ym.mec.biz.dal.entity.TeacherSchool>
      * @describe 根据教师编号获取教学点信息
      */
-    List<TeacherSchool> findByTeacherId(Long teacherId);
+    List<TeacherSchool> findByTeacherId(Integer teacherId);
 
 }

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

@@ -35,6 +35,17 @@ public class StudentManageCourseListDto {
     @ApiModelProperty(value = "状态(正常、旷课、请假、休学)",required = false)
     private StudentAttendanceStatusEnum attendanceStatus;
 
+    @ApiModelProperty(value = "当前课时",required = false)
+    private Integer currentCLassTimes;
+
+    public Integer getCurrentCLassTimes() {
+        return currentCLassTimes;
+    }
+
+    public void setCurrentCLassTimes(Integer currentCLassTimes) {
+        this.currentCLassTimes = currentCLassTimes;
+    }
+
     public StudentAttendanceStatusEnum getAttendanceStatus() {
         return attendanceStatus;
     }

+ 23 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/TeacherMusicClassInfoDto.java

@@ -1,5 +1,6 @@
 package com.ym.mec.biz.dal.dto;
 
+import com.ym.mec.biz.dal.enums.JobTypeEnum;
 import io.swagger.annotations.ApiModelProperty;
 
 import java.util.List;
@@ -29,9 +30,31 @@ public class TeacherMusicClassInfoDto {
     @ApiModelProperty(value = "执教班级名称", required = false)
     private List<String> classGroupNames;
 
+    @ApiModelProperty(value = "教师乐团职务类型", required = false)
+    private JobTypeEnum jobType;
+
     @ApiModelProperty(value = "乐团状态",required = false)
     private MusicGroupStatusEnum status;
 
+    @ApiModelProperty(value = "出勤次数",required = false)
+    private Integer attendanceNum;
+
+    public Integer getAttendanceNum() {
+        return attendanceNum;
+    }
+
+    public void setAttendanceNum(Integer attendanceNum) {
+        this.attendanceNum = attendanceNum;
+    }
+
+    public JobTypeEnum getJobType() {
+        return jobType;
+    }
+
+    public void setJobType(JobTypeEnum jobType) {
+        this.jobType = jobType;
+    }
+
     public String getMusicGroupId() {
         return musicGroupId;
     }

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

@@ -1,5 +1,7 @@
 package com.ym.mec.biz.dal.entity;
 
+import io.swagger.annotations.ApiModelProperty;
+
 import org.apache.commons.lang3.builder.ToStringBuilder;
 
 import com.ym.mec.biz.dal.entity.CourseSchedule.CourseScheduleType;
@@ -23,19 +25,19 @@ public class CourseScheduleRewardsRules {
 	/**  */
 	private Integer id;
 
-	/** 名称 */
+	@ApiModelProperty(value = "名称", required = true)
 	private String name;
 
-	/** 课程类型 */
+	@ApiModelProperty(value = "课程类型", required = true)
 	private CourseScheduleType courseScheduleType;
 
-	/** 奖励方式(每节课奖励、一次性奖励) */
+	@ApiModelProperty(value = "奖励方式(PER, TOTAL)", required = true)
 	private RewardMode rewardMode;
 
-	/** 分部列表(用逗号分开) */
+	@ApiModelProperty(value = "分部列表(用逗号分开)", required = true)
 	private String organIdList;
 
-	/** 梯度奖励规则 */
+	@ApiModelProperty(value = "梯度奖励规则", required = true)
 	private String rewardsRulesJson;
 
 	/**  */

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

@@ -30,6 +30,9 @@ public class SysConfig {
 	/** 修改时间 */
 	private java.util.Date modifyOn;
 	
+	@ApiModelProperty(value = "消息组", required = true)
+	private String group;
+	
 	public void setId(Long id){
 		this.id = id;
 	}
@@ -78,6 +81,14 @@ public class SysConfig {
 		return this.modifyOn;
 	}
 			
+	public String getGroup() {
+		return group;
+	}
+
+	public void setGroup(String group) {
+		this.group = group;
+	}
+
 	@Override
 	public String toString() {
 		return ToStringBuilder.reflectionToString(this);

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

@@ -73,16 +73,45 @@ public class Teacher extends SysUser {
 	@ApiModelProperty(value = "流动范围(多个用逗号分开)", required = false)
 	private String flowOrganRange;
 
-	/** 流动范围(多个用|分开) */
-	@ApiModelProperty(value = "流动范围(多个用逗号分开)", required = false)
-	private List<String> flowOrganRangeName;
-
 	@ApiModelProperty(value = "老师介绍", required = false)
 	private String introduction;
+
+	@ApiModelProperty(value = "VIP课数量", required = false)
+	private Integer vipNum;
+
+	@ApiModelProperty(value = "试听课数量", required = false)
+	private Integer demoNum;
 	
 	@ApiModelProperty(value = "离职时间", required = false)
 	private Date demissionDate;
 
+	@ApiModelProperty(value = "老师教学点列表", required = false)
+	private List<TeacherSchool> teacherSchools;
+
+	public List<TeacherSchool> getTeacherSchools() {
+		return teacherSchools;
+	}
+
+	public void setTeacherSchools(List<TeacherSchool> teacherSchools) {
+		this.teacherSchools = teacherSchools;
+	}
+
+	public Integer getDemoNum() {
+		return demoNum;
+	}
+
+	public void setDemoNum(Integer demoNum) {
+		this.demoNum = demoNum;
+	}
+
+	public Integer getVipNum() {
+		return vipNum;
+	}
+
+	public void setVipNum(Integer vipNum) {
+		this.vipNum = vipNum;
+	}
+
 	public List<String> getSubjectName() {
 		return subjectName;
 	}

+ 3 - 3
mec-biz/src/main/java/com/ym/mec/biz/dal/page/StudentManageAttendanceQueryInfo.java

@@ -13,7 +13,7 @@ import com.ym.mec.common.page.QueryInfo;
 public class StudentManageAttendanceQueryInfo extends QueryInfo {
 
     @ApiModelProperty(value = "学生ID",required = false)
-    private Long studentId;
+    private Integer studentId;
 
     @ApiModelProperty(value = "班级类型(普通班级、合奏班级、提高课班级、VIP班级)",required = true)
     private ClassGroupTypeEnum classGroupType;
@@ -27,11 +27,11 @@ public class StudentManageAttendanceQueryInfo extends QueryInfo {
     @ApiModelProperty(value = "状态(正常、旷课、请假、休学)",required = false)
     private StudentAttendanceStatusEnum attendanceStatus;
 
-    public Long getStudentId() {
+    public Integer getStudentId() {
         return studentId;
     }
 
-    public void setStudentId(Long studentId) {
+    public void setStudentId(Integer studentId) {
         this.studentId = studentId;
     }
 

+ 9 - 9
mec-biz/src/main/java/com/ym/mec/biz/dal/page/TeacherAttendanceQueryInfo.java

@@ -9,13 +9,13 @@ import com.ym.mec.common.page.QueryInfo;
 public class TeacherAttendanceQueryInfo extends QueryInfo {
 
     @ApiModelProperty(value = "教师ID")
-    private Long teacherId;
+    private Integer teacherId;
 
     @ApiModelProperty(value = "乐团ID")
-    private Long musicGroupId;
+    private String musicGroupId;
 
     @ApiModelProperty(value = "班级ID")
-    private Long classGroupId;
+    private Integer classGroupId;
 
     @ApiModelProperty(value = "签到状态")
     private YesOrNoEnum attendanceStatus;
@@ -42,27 +42,27 @@ public class TeacherAttendanceQueryInfo extends QueryInfo {
         this.classGroupName = classGroupName;
     }
 
-    public Long getTeacherId() {
+    public Integer getTeacherId() {
         return teacherId;
     }
 
-    public void setTeacherId(Long teacherId) {
+    public void setTeacherId(Integer teacherId) {
         this.teacherId = teacherId;
     }
 
-    public Long getMusicGroupId() {
+    public String getMusicGroupId() {
         return musicGroupId;
     }
 
-    public void setMusicGroupId(Long musicGroupId) {
+    public void setMusicGroupId(String musicGroupId) {
         this.musicGroupId = musicGroupId;
     }
 
-    public Long getClassGroupId() {
+    public Integer getClassGroupId() {
         return classGroupId;
     }
 
-    public void setClassGroupId(Long classGroupId) {
+    public void setClassGroupId(Integer classGroupId) {
         this.classGroupId = classGroupId;
     }
 

+ 6 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/CourseScheduleService.java

@@ -162,4 +162,10 @@ public interface CourseScheduleService extends BaseService<Long, CourseSchedule>
      * @describe 课程投诉审核
      */
     void courseScheduleCommplaintAudit(CourseScheduleComplaints courseScheduleComplaints);
+    
+    /**
+     * 更新课程至结束状态
+     * @return
+     */
+    boolean updateCourseScheduleToOverStatus();
 }

+ 12 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/SysConfigService.java

@@ -56,9 +56,19 @@ public interface SysConfigService extends BaseService<Long, SysConfig> {
 	public static final String DEFAULT_PASSWORD = "default_password";
 
 	/**
-	 * 梯度结算规则设置
+	 * 单技课梯度结算规则设置
 	 */
-	public static final String MUSIC_GRADIENT_SETTLEMENT_RULE = "music_gradient_settlement_rule";
+	public static final String SIGLE_GRADIENT_SETTLEMENT_RULE = "sigle_gradient_settlement_rule";
+
+	/**
+	 * 合奏课梯度结算规则设置
+	 */
+	public static final String MAX_GRADIENT_SETTLEMENT_RULE = "max_gradient_settlement_rule";
+
+	/**
+	 * 小班课梯度结算规则设置
+	 */
+	public static final String HIGH_GRADIENT_SETTLEMENT_RULE = "high_gradient_settlement_rule";
 
 	/**
 	 * @params paramName

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

@@ -14,7 +14,7 @@ public interface TeacherSchoolService extends BaseService<Long, TeacherSchool> {
      * @return java.util.List<com.ym.mec.biz.dal.entity.TeacherSchool>
      * @describe 根据教师编号获取教学点
      */
-    List<TeacherSchool> findByTeacherId(Long teacherId);
+    List<TeacherSchool> findByTeacherId(Integer teacherId);
 
 
 

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

@@ -36,17 +36,16 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
     @Autowired
     private ClassGroupDao classGroupDao;
     @Autowired
-    private TeacherDao teacherDao;
+    private TeacherAttendanceDao teacherAttendanceDao;
     @Autowired
     private MusicGroupDao musicGroupDao;
     @Autowired
     private ClassGroupRelationService classGroupRelationService;
+    @Autowired
     private ClassGroupStudentMapperDao classGroupStudentMapperDao;
     @Autowired
     private ClassGroupRelationDao classGroupRelationDao;
     @Autowired
-    private ClassGroupStudentMapperService classGroupStudentMapperService;
-    @Autowired
     private ClassGroupTeacherMapperService classGroupTeacherMapperService;
     @Autowired
     private TeacherDefaultMusicGroupSalaryService teacherDefaultMusicGroupSalaryService;
@@ -55,10 +54,6 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
     @Autowired
     private StudentRegistrationDao studentRegistrationDao;
     @Autowired
-    private StudentRegistrationService studentRegistrationService;
-    @Autowired
-    private ClassGroupTeacherSalaryService classGroupTeacherSalaryService;
-    @Autowired
     private MusicGroupStudentFeeDao musicGroupStudentFeeDao;
     @Autowired
     private SysUserFeignService sysUserFeignService;
@@ -237,15 +232,18 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
 
     @Override
     public List<TeacherMusicClassInfoDto> getTeacherMusicClass(Integer teacherId) {
-        List<TeacherMusicClassInfoDto> teacherMusicClassInfoDtos = classGroupDao.queryGroupCourses(teacherId);
-        Teacher teacher = teacherDao.get(teacherId);
-        if (teacher == null) {
-            return null;
+        List<TeacherMusicClassInfoDto> teacherMusics = classGroupDao.queryGroupCourses(teacherId);
+        //获取老师在当前乐团出勤次数
+        if(teacherMusics != null && teacherMusics.size() > 0){
+            HashMap<String,Object> param = new HashMap<>();
+            param.put("teacherId",teacherId);
+            param.put("attendanceStatus",YesOrNoEnum.YES);
+            teacherMusics.forEach(e->{
+                param.put("musicGroupId",e.getMusicGroupId());
+                e.setAttendanceNum(teacherAttendanceDao.getTeacherPersonalAttendancesCount(param));
+            });
         }
-        teacherMusicClassInfoDtos.forEach(e -> {
-            e.setJobNature(teacher.getJobNature());
-        });
-        return teacherMusicClassInfoDtos;
+        return teacherMusics;
     }
 
     @Override

+ 20 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java

@@ -14,6 +14,7 @@ import com.ym.mec.biz.dal.entity.CourseSchedule;
 import com.ym.mec.biz.dal.entity.CourseScheduleComplaints;
 import com.ym.mec.biz.dal.entity.SysConfig;
 import com.ym.mec.biz.dal.enums.AuditStatusEnum;
+import com.ym.mec.biz.dal.enums.CourseStatusEnum;
 import com.ym.mec.biz.dal.enums.ParamEnum;
 import com.ym.mec.biz.dal.enums.YesOrNoEnum;
 import com.ym.mec.biz.dal.page.CourseScheduleQueryInfo;
@@ -25,6 +26,7 @@ import com.ym.mec.common.page.PageInfo;
 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.lang.StringUtils;
 import org.apache.commons.lang.time.DateUtils;
 import org.springframework.beans.BeanUtils;
@@ -508,4 +510,22 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 		newCourseScheduleComplaints.setStatus(courseScheduleComplaints.getStatus());
 		courseScheduleComplaintsDao.update(newCourseScheduleComplaints);
 	}
+
+	@Override
+	public boolean updateCourseScheduleToOverStatus() {
+		List<CourseSchedule> list = courseScheduleDao.queryFinishedWithNoUpdateStatus();
+		
+		List<CourseSchedule> updateList = new ArrayList<CourseSchedule>();
+		Date date = new Date();
+		for(CourseSchedule courseSchedule : list){
+			courseSchedule.setStatus(CourseStatusEnum.OVER);
+			courseSchedule.setUpdateTime(date);
+			updateList.add(courseSchedule);
+		}
+		
+		if(updateList.size()>0){
+			
+		}
+		return true;
+	}
 }

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

@@ -181,7 +181,10 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
 		List<MusicCardDto> musicCardDtos = musicGroupDao.queryUserMusicGroups(userId);
 		// 获取学员在该乐团续费状态
 		musicCardDtos.forEach(e -> {
-			e.setPaymentStatus(musicGroupStudentFeeDao.findByUser(userId, e.getMusicGroupId()).getPaymentStatus());
+			MusicGroupStudentFee groupStudentFee = musicGroupStudentFeeDao.findByUser(userId, e.getMusicGroupId());
+			if(groupStudentFee != null){
+				e.setPaymentStatus(musicGroupStudentFeeDao.findByUser(userId, e.getMusicGroupId()).getPaymentStatus());
+			}
 		});
 		return musicCardDtos;
 	}

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

@@ -25,7 +25,7 @@ public class TeacherSchoolServiceImpl extends BaseServiceImpl<Long, TeacherSchoo
 	}
 
 	@Override
-	public List<TeacherSchool> findByTeacherId(Long teacherId) {
+	public List<TeacherSchool> findByTeacherId(Integer teacherId) {
 		if(Objects.isNull(teacherId)){
 			throw new BizException("请指定教师");
 		}

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

@@ -8,8 +8,10 @@ import com.ym.mec.auth.api.enums.YesOrNoEnum;
 import com.ym.mec.biz.dal.dao.*;
 import com.ym.mec.biz.dal.dto.BasicUserDto;
 import com.ym.mec.biz.dal.dto.NamesDto;
+import com.ym.mec.biz.dal.dto.UserGoodsDto;
 import com.ym.mec.biz.dal.entity.MusicGroup;
 import com.ym.mec.biz.dal.entity.Teacher;
+import com.ym.mec.biz.dal.entity.TeacherSchool;
 import com.ym.mec.biz.dal.page.TeacherQueryInfo;
 import com.ym.mec.biz.service.TeacherService;
 import com.ym.mec.common.dal.BaseDAO;
@@ -43,8 +45,12 @@ public class TeacherServiceImpl extends BaseServiceImpl<Integer, Teacher>  imple
 	@Autowired
 	private ClassGroupDao classGroupDao;
 	@Autowired
+	private DemoGroupDao demoGroupDao;
+	@Autowired
 	private OrganizationDao organizationDao;
 	@Autowired
+	private TeacherSchoolDao teacherSchoolDao;
+	@Autowired
 	private SysUserFeignService sysUserFeignService;
 	@Autowired
 	private ImFeignService imFeignService;
@@ -136,8 +142,6 @@ public class TeacherServiceImpl extends BaseServiceImpl<Integer, Teacher>  imple
 			Map<Integer, Integer> numsMap = MapUtil.convertMybatisMap(nums);
 			imGroupModels1.forEach(e -> {
 				//获取当前班级老师总数
-//				Set<Integer> teachers = classGroupDao.queryTeacherIds(e.getId());
-//				teachers.removeAll(Collections.singleton(null));
 				Integer num = numsMap.get(e.getId());
 				e.setCount(num == null?0:num + e.getCount());
 				e.setId("cg" + e.getId());
@@ -160,19 +164,43 @@ public class TeacherServiceImpl extends BaseServiceImpl<Integer, Teacher>  imple
 
     @Override
 	public PageInfo<Teacher> queryPageDetail(TeacherQueryInfo queryInfo) {
-		return queryPage(queryInfo);
+		PageInfo<Teacher> pageInfo = queryPage(queryInfo);
+		List<Teacher> rows = pageInfo.getRows();
+		if(rows != null && rows.size() > 0){
+			Set<Integer> teachers = rows.stream().map(e -> e.getId()).collect(Collectors.toSet());
+			String teacherIds = StringUtils.join(teachers, ",");
+			//获取小课数量
+			List<Map<Integer,Long>> numList =  classGroupDao.countTeacherVipNum(teacherIds);
+			Map<Integer,Long> vipNumMap = MapUtil.convertMybatisMap(numList);
+			//获取试听课数量
+			List<Map<Integer,Long>> demoNumList =  demoGroupDao.countTeacherDemoGroupNum(teacherIds);
+			Map<Integer,Long> demoNumMap = MapUtil.convertMybatisMap(demoNumList);
+			rows.forEach(e->{
+				e.setSubjectName(subjectDao.findBySubIds(e.getSubjectId()));
+				Long num = vipNumMap.get(e.getId());
+				e.setVipNum(num == null?0:num.intValue());
+				Long demoNum = demoNumMap.get(e.getId());
+				e.setDemoNum(demoNum == null?0:demoNum.intValue());
+			});
+		}
+		return pageInfo;
 	}
 
 	@Override
 	public Teacher getDetail(Integer id) {
 		Teacher teacher = teacherDao.get(id);
 		if(teacher != null){
+			//获取老师教学点列表
+			List<TeacherSchool> teacherSchools = teacherSchoolDao.findByTeacherId(id);
+			teacher.setTeacherSchools(teacherSchools);
+			//获取流动范围
 			if(StringUtils.isNotEmpty(teacher.getFlowOrganRange())){
 				List<String> organNames = organizationDao.findByOrganIds(teacher.getFlowOrganRange());
 				teacher.setFlowOrganRange(StringUtils.join(organNames,","));
 			}
+			//专业技能
 			if(StringUtils.isNotEmpty(teacher.getSubjectId())){
-				teacher.setSubjectId(StringUtils.join(subjectDao.findBySubIds(teacher.getSubjectId()),","));
+				teacher.setSubjectName(subjectDao.findBySubIds(teacher.getSubjectId()));
 			}
 		}
 		return teacher;

+ 15 - 10
mec-biz/src/main/resources/config/mybatis/ClassGroupMapper.xml

@@ -153,12 +153,9 @@
         WHERE cg.type_="MIX" AND cg.music_group_id_=#{musicGroupId} AND del_flag_='0'
     </select>
     <select id="findMixClassChildClassGroup" resultMap="ClassGroup">
-        SELECT
-        cg.*
-        FROM
-        class_group_relation cgr
-        LEFT JOIN class_group cg ON cgr.class_group_id_=cg.id_
-        WHERE cgr.sub_class_group_id_=#{mixClassGroupId} AND del_flag_='0'
+        SELECT * FROM class_group WHERE id_ IN
+        (SELECT sub_class_group_id_ FROM class_group_relation
+        WHERE class_group_id_ = #{mixClassGroupId}) AND del_flag_ = 0
     </select>
 
     <!-- 根据乐团id获取单技班信息 -->
@@ -189,19 +186,23 @@
     <resultMap type="com.ym.mec.biz.dal.dto.TeacherMusicClassInfoDto" id="getTeaCourseInfosMap">
         <result column="music_group_id_" property="musicGroupId"/>
         <result column="music_group_name_" property="musicGroupName"/>
-        <!--<result column="job_nature_" property="jobNature" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>-->
         <result column="educational_teacher_id_" property="educationalTeacherId"/>
         <result column="team_teacher_id_" property="teamTeacherId"/>
         <result column="status_" property="status" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
-        <collection property="classGroupNames" javaType="java.lang.String" column="class_group_name_"/>
+        <result column="job_type_" property="jobType" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
+        <result column="job_nature_" property="jobNature" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
+        <collection property="classGroupNames" ofType="string">
+            <result column="class_group_name_"/>
+        </collection>
     </resultMap>
     <select id="queryGroupCourses" resultMap="getTeaCourseInfosMap">
         SELECT mg.id_ music_group_id_,mg.name_ music_group_name_,
-        mg.team_teacher_id_,mg.educational_teacher_id_,cg.name_ class_group_name_,mg.status_
+        mg.team_teacher_id_,mg.educational_teacher_id_,cg.name_ class_group_name_,mg.status_,t.job_type_,t.job_nature_
         FROM class_group_teacher_mapper cgtm
         LEFT JOIN music_group mg ON cgtm.music_group_id_ = mg.id_
         LEFT JOIN class_group cg ON cg.id_ = cgtm.class_group_id_
-        WHERE cgtm.user_id_ = #{userId} AND cg.del_flag_ = 0
+		LEFT JOIN teacher t ON t.id_ = cgtm.user_id_
+        WHERE cgtm.user_id_ = #{userId} AND cg.del_flag_ = 0 AND (cg.type_ = 'NORMAL' OR cg.type_ = 'MIX')
     </select>
 
 
@@ -448,6 +449,10 @@
             class_group cg
             WHERE cg.id_=#{classGroupId} FOR UPDATE
     </select>
+    <select id="countTeacherVipNum" resultType="java.util.Map">
+        SELECT vg.user_id_ `key`,COUNT(vg.id_) `value` FROM vip_group vg
+        WHERE FIND_IN_SET(vg.user_id_,#{teacherIds}) GROUP BY user_id_
+    </select>
 
     <resultMap id="TeacherClassGroupDto" type="com.ym.mec.biz.dal.dto.TeacherClassGroupDto">
         <result property="classGroupId" column="class_group_id_"/>

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

@@ -686,4 +686,51 @@
     <select id="queryVipGroupTeachereClassTimesByMonth" resultType="map" parameterType="map">
         SELECT vp.organ_id_ organ_id_,cs.actual_teacher_id_ teacher_id_,count(cs.id_) times FROM course_schedule cs left join vip_group_class_group_mapper vgm on cs.class_group_id_ = vgm.class_group_id_ left join vip_group vp on vgm.vip_group_id_ = vp.id_ where cs.status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler} and date_format(#{monthDate} , '%Y%m' ) = date_format(cs.class_date_, '%Y%m' ) group by vp.organ_id_,cs.actual_teacher_id_
     </select>
+    
+    <select id="queryFinishedWithNoUpdateStatus" resultMap="CourseSchedule">
+    	select * from course_schedule where CONCAT(class_date_,' ',end_class_time_) &lt;= now() and status_ != 'OVER'
+    </select>
+    
+    <update id="batchUpdate" parameterType="com.ym.mec.biz.dal.entity.CourseSchedule">
+        UPDATE course_schedule
+        <set>
+            <if test="classDate != null">
+                class_date_ = #{classDate},
+            </if>
+            <if test="endClassTime != null">
+                end_class_time_ = #{endClassTime},
+            </if>
+            <if test="status != null">
+                status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
+            </if>
+            <if test="type != null">
+                type_ = #{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
+            </if>
+            <if test="actualTeacherId != null">
+                actual_teacher_id_ = #{actualTeacherId},
+            </if>
+            <if test="subsidy != null">
+                subsidy_ = #{subsidy},
+            </if>
+            <if test="classGroupId != null">
+                class_group_id_ = #{classGroupId},
+            </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="studentNum != null">
+                student_num_ = #{studentNum},
+            </if>
+            <if test="leaveStudentNum != null">
+                leave_student_num_ = #{leaveStudentNum},
+            </if>
+        </set>
+        WHERE id_ = #{id}
+    </update>
 </mapper>

+ 4 - 0
mec-biz/src/main/resources/config/mybatis/DemoGroupMapper.xml

@@ -254,5 +254,9 @@ create_time_ = #{createTime},
 			YEARWEEK(class_date_) = YEARWEEK( now( ) )
 		GROUP BY class_date_
 	</select>
+	<select id="countTeacherDemoGroupNum" resultType="java.util.Map">
+		SELECT dg.user_id_ `key`,COUNT(dg.id_) `value` FROM demo_group dg
+        WHERE FIND_IN_SET(dg.user_id_,#{teacherIds}) GROUP BY user_id_
+	</select>
 
 </mapper>

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

@@ -102,6 +102,6 @@
     </select>
 
     <select id="findByOrganIds" resultType="java.lang.String">
-        SELECT name_ FROM organization WHERE del_flag_ = 0 AND id_ IN (#{organIds})
+        SELECT name_ FROM organization WHERE del_flag_ = 0 AND FIND_IN_SET(id_,#{organIds})
     </select>
 </mapper>

+ 6 - 4
mec-biz/src/main/resources/config/mybatis/StudentManageDao.xml

@@ -21,6 +21,7 @@
         <result property="courseDate" column="course_date_" />
         <result property="courseStatus" column="course_status_" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
         <result property="teacherName" column="teacher_name_" />
+        <result property="currentCLassTimes" column="current_class_times_" />
         <result property="attendanceStatus" column="status_" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
     </resultMap>
 
@@ -187,13 +188,13 @@
                 and cg.type_=#{classGroupType}
             </if>
             <if test="attendanceStatus!=null">
-                and cs.status_=#{attendanceStatus}
+                and sa.status_=#{attendanceStatus, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
             </if>
             <if test="classGroupName!=null">
                 and cg.name_ like CONCAT("%",#{classGroupName},"%")
             </if>
             <if test="teacherName!=null">
-                and sa.status_ like CONCAT("%",#{teacherName},"%")
+                and su.real_name_ like CONCAT("%",#{teacherName},"%")
             </if>
         </where>
     </sql>
@@ -204,8 +205,9 @@
             cg.name_ class_group_name_,
             cg.type_ class_group_type_,
             CONCAT(cs.class_date_," ",cs.start_class_time_) course_date_,
-            su.username_ teacher_name_,
-            sa.status_
+            su.real_name_ teacher_name_,
+            sa.status_,
+            sa.current_class_times_
         FROM
             student_attendance sa
             LEFT JOIN class_group cg ON sa.class_group_id_=cg.id_

+ 19 - 12
mec-biz/src/main/resources/config/mybatis/SysConfigMapper.xml

@@ -4,23 +4,27 @@
 <mapper namespace="com.ym.mec.biz.dal.dao.SysConfigDao">
 
 	<resultMap type="com.ym.mec.biz.dal.entity.SysConfig" id="SysConfig">
-		<result column="id" property="id" />
+		<result column="id_" property="id" />
 		<result column="param_name_" property="paramName" />
 		<result column="paran_value_" property="paranValue" />
 		<result column="description_" property="description" />
 		<result column="create_on_" property="createOn" />
 		<result column="modify_on_" property="modifyOn" />
+		<result column="group_" property="group" />
 	</resultMap>
 
 	<!-- 根据主键查询一条记录 -->
 	<select id="get" resultMap="SysConfig">
-		SELECT * FROM sys_config WHERE id = #{id}
+		SELECT * FROM sys_config WHERE id_ = #{id}
 	</select>
 
 	<!-- 全查询 -->
 	<select id="findAll" resultMap="SysConfig">
-		SELECT * FROM sys_config ORDER BY
-		id
+		SELECT * FROM sys_config where 1=1
+		<if test="group != null">
+			and group_ = #{group}
+		</if>
+		ORDER BY id_
 	</select>
 
 	<!-- 向数据库增加一条记录 -->
@@ -29,8 +33,8 @@
 		<!-- <selectKey resultClass="int" keyProperty="id" > SELECT SEQ_WSDEFINITION_ID.nextval 
 			AS ID FROM DUAL </selectKey> -->
 		INSERT INTO sys_config
-		(id,param_name_,paran_value_,description_,create_on_,modify_on_)
-		VALUES(#{id},#{paramName},#{paranValue},#{description},#{createOn},#{modifyOn})
+		(id_,param_name_,paran_value_,description_,create_on_,modify_on_,group_)
+		VALUES(#{id},#{paramName},#{paranValue},#{description},#{createOn},#{modifyOn},#{group})
 	</insert>
 
 	<!-- 根据主键查询一条记录 -->
@@ -47,7 +51,7 @@
 				description_ = #{description},
 			</if>
 			<if test="id != null">
-				id = #{id},
+				id_ = #{id},
 			</if>
 			<if test="createOn != null">
 				create_on_ = #{createOn},
@@ -55,26 +59,29 @@
 			<if test="paramName != null">
 				param_name_ = #{paramName},
 			</if>
+			<if test="group != null">
+				group_ = #{group},
+			</if>
 		</set>
-		WHERE id = #{id}
+		WHERE id_ = #{id}
 	</update>
 
 	<!-- 根据主键删除一条记录 -->
 	<delete id="delete">
-		DELETE FROM sys_config WHERE id = #{id}
+		DELETE FROM sys_config WHERE id_ = #{id}
 	</delete>
 
 	<!-- 分页查询 -->
 	<select id="queryPage" resultMap="SysConfig" parameterType="map">
-		SELECT * FROM sys_config ORDER BY id
+		SELECT * FROM sys_config ORDER BY id_
 		<include refid="global.limit" />
 	</select>
 
 	<!-- 查询当前表的总记录数 -->
 	<select id="queryCount" resultType="int">
-		SELECT COUNT(*) FROM
-		sys_config
+		SELECT COUNT(*) FROM sys_config
 	</select>
+	
 	<select id="findByParamName" resultMap="SysConfig">
 		SELECT * FROM sys_config WHERE param_name_=#{paramName}
 	</select>

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

@@ -115,7 +115,7 @@
                 and ta.class_group_id_ = #{classGroupId}
             </if>
             <if test="attendanceStatus != null">
-                and ta.status_ = #{attendanceStatus, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
+                and ta.sign_in_status_ = #{attendanceStatus, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
             </if>
             <if test="classGroupType != null">
                 and cg.type_ = #{classGroupType, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
@@ -145,7 +145,7 @@
 
     <select id="getTeacherPersonalAttendancesCount" resultType="int">
         SELECT
-            count(*)
+            count(ta.id_)
         FROM
           teacher_attendance ta
         LEFT JOIN course_schedule cs ON ta.course_schedule_id_=cs.id_

+ 23 - 32
mec-biz/src/main/resources/config/mybatis/TeacherMapper.xml

@@ -51,11 +51,10 @@
     <select id="get" resultMap="Teacher">
         SELECT t.*,su.username_,su.password_,su.salt_,su.phone_,su.avatar_,
         su.lock_flag_,su.del_flag_,su.wx_openid_,su.qq_openid_,su.user_type_,
-        su.gender_,su.nation_,su.birthdate_,su.email_,su.im_token_,t.subject_id_,t.organ_id_,o.name_ organ_name_
+        su.gender_,su.nation_,su.birthdate_,su.email_,su.im_token_
         FROM teacher t
         LEFT JOIN sys_user su ON t.id_ = su.id_
-        LEFT JOIN organization o ON t.organ_id_ = o.id_
-        WHERE t.id_ = #{userId} AND o.del_flag_ = 0
+        WHERE t.id_ = #{userId} AND su.del_flag_ = 0
     </select>
 
     <!-- 全查询 -->
@@ -199,44 +198,36 @@
 
     <!-- 分页查询 -->
     <select id="queryPage" resultMap="Teacher" parameterType="map">
-        SELECT t.*,su.username_,su.password_,su.salt_,su.phone_,su.avatar_,
-        su.lock_flag_,su.del_flag_,su.wx_openid_,su.qq_openid_,su.user_type_,
-        su.gender_,su.nation_,su.birthdate_,su.email_,su.im_token_,t.subject_id_,t.organ_id_,o.name_ organ_name_,s.name_
-        subject_name_
-        FROM teacher t
-        LEFT JOIN sys_user su ON t.id_ = su.id_
-        LEFT JOIN organization o ON t.organ_id_ = o.id_
-        LEFT JOIN `subject` s ON FIND_IN_SET(s.id_,t.subject_id_)
+        SELECT t.id_,su.real_name_,su.lock_flag_,t.subject_id_,su.phone_,su.organ_id_,t.job_nature_,t.is_probation_period_
+        FROM teacher t LEFT JOIN sys_user su ON t.id_ = su.id_
+        WHERE su.user_type_ LIKE '%TEACHER%' AND su.del_flag_ = 0
         <include refid="queryPageMap"/>
         <include refid="global.limit"/>
     </select>
 
     <sql id="queryPageMap">
-        <where>
-            <if test="lockFlag != null">
-                AND su.lock_flag_ = #{lockFlag}
-            </if>
-            <if test="subjectId != null">
-                AND t.subject_id_ LIKE CONCAT('%',#{subjectId},'%')
-            </if>
-            <if test="organId != null">
-                AND o.organ_id_ = #{organId}
-            </if>
-            <if test="jobNature != null">
-                AND t.job_nature_ = #{jobNature}
-            </if>
-            <if test="isProbationPeriod != null">
-                AND t.is_probation_period_ = #{isProbationPeriod}
-            </if>
-        </where>
+        <if test="lockFlag != null">
+            AND su.lock_flag_ = #{lockFlag}
+        </if>
+        <if test="subjectId != null">
+            AND t.subject_id_ LIKE CONCAT('%',#{subjectId},'%')
+        </if>
+        <if test="organId != null">
+            AND su.organ_id_ = #{organId}
+        </if>
+        <if test="jobNature != null">
+            AND t.job_nature_ = #{jobNature}
+        </if>
+        <if test="isProbationPeriod != null">
+            AND t.is_probation_period_ = #{isProbationPeriod}
+        </if>
     </sql>
 
     <!-- 查询当前表的总记录数 -->
     <select id="queryCount" resultType="int">
-        SELECT COUNT(t.id_) FROM teacher t
-        LEFT JOIN sys_user su ON t.id_ = su.id_
-        LEFT JOIN `subject` s ON t.subject_id_ = s.id_
-        LEFT JOIN organization o ON t.organ_id_ = o.id_
+        SELECT COUNT(t.id_)
+        FROM teacher t LEFT JOIN sys_user su ON t.id_ = su.id_
+        WHERE su.user_type_ LIKE '%TEACHER%' AND su.del_flag_ = 0
         <include refid="queryPageMap"/>
     </select>
 

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

@@ -33,7 +33,7 @@ public class TeacherVipSchoolController extends BaseController {
 
     @ApiOperation("根据教师编号获取教学点")
     @GetMapping(value = "/queryAll")
-    public Object queryAll(Long teacherId) {
+    public Object queryAll(Integer teacherId) {
         return succeed(teacherSchoolService.findByTeacherId(teacherId));
     }
 

+ 42 - 0
mec-web/src/main/java/com/ym/mec/web/controller/CourseScheduleRewardsRulesController.java

@@ -0,0 +1,42 @@
+package com.ym.mec.web.controller;
+
+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.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.ym.mec.biz.dal.entity.CourseScheduleRewardsRules;
+import com.ym.mec.biz.service.CourseScheduleRewardsRulesService;
+import com.ym.mec.common.controller.BaseController;
+import com.ym.mec.common.page.QueryInfo;
+
+@RequestMapping("courseSchedule")
+@Api(tags = "课程奖励规则")
+@RestController
+public class CourseScheduleRewardsRulesController extends BaseController {
+
+	@Autowired
+	private CourseScheduleRewardsRulesService courseScheduleRewardsRulesService;
+
+	@ApiOperation(value = "查询规则列表")
+	@GetMapping("/queryPage")
+	public Object queryPage(QueryInfo queryInfo) {
+		return succeed(courseScheduleRewardsRulesService.queryPage(queryInfo));
+	}
+
+	@ApiOperation(value = "单查询")
+	@GetMapping("/query")
+	public Object query(Integer id) {
+		return succeed(courseScheduleRewardsRulesService.get(id));
+	}
+
+	@ApiOperation(value = "新增")
+	@PostMapping("/add")
+	public Object add(CourseScheduleRewardsRules courseScheduleRewardsRules) {
+		return succeed(courseScheduleRewardsRulesService.insert(courseScheduleRewardsRules));
+	}
+}

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

@@ -4,7 +4,9 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 
 import java.util.Date;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 import org.apache.commons.lang.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -30,8 +32,10 @@ public class SysConfigController extends BaseController {
 
 	@ApiOperation(value = "参数列表")
 	@GetMapping(value = "list")
-	public Object configList() {
-		List<SysConfig> configs = sysConfigService.findAll(null);
+	public Object configList(String group) {
+		Map<String,Object> params = new HashMap<String, Object>();
+		params.put("group", group);
+		List<SysConfig> configs = sysConfigService.findAll(params);
 		return succeed(configs);
 	}
 

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

@@ -33,7 +33,7 @@ public class TeacherVipSchoolController extends BaseController {
 
     @ApiOperation("根据教师编号获取教学点")
     @GetMapping(value = "/queryAll")
-    public Object queryAll(Long teacherId) {
+    public Object queryAll(Integer teacherId) {
         return succeed(teacherSchoolService.findByTeacherId(teacherId));
     }
 

+ 5 - 4
pom.xml

@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 	<modelVersion>4.0.0</modelVersion>
 
 	<groupId>com.ym</groupId>
@@ -298,7 +297,8 @@
 			<plugin>
 				<groupId>org.apache.maven.plugins</groupId>
 				<artifactId>maven-resources-plugin</artifactId>
-				<configuration><encoding>UTF-8</encoding>
+				<configuration>
+          <encoding>UTF-8</encoding>
 					<!-- 过滤后缀为pem、pfx的证书文件 -->
 					<nonFilteredFileExtensions>
 						<nonFilteredFileExtension>cer</nonFilteredFileExtension>
@@ -331,5 +331,6 @@
 		<module>mec-teacher</module>
 		<module>mec-education</module>
 		<module>mec-biz</module>
-	</modules>
+	  <module>data_migration</module>
+  </modules>
 </project>