浏览代码

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

yonge 5 年之前
父节点
当前提交
5bcf87a48c
共有 20 个文件被更改,包括 496 次插入86 次删除
  1. 13 2
      mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/service/impl/SysUserServiceImpl.java
  2. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleTeacherSalaryDao.java
  3. 7 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/SysPaymentConfigDao.java
  4. 163 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/SysPaymentConfig.java
  5. 11 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/StudentVipGroupQueryInfo.java
  6. 9 0
      mec-biz/src/main/java/com/ym/mec/biz/service/SysPaymentConfigService.java
  7. 13 13
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ClassGroupServiceImpl.java
  8. 5 9
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleTeacherSalaryServiceImpl.java
  9. 3 3
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java
  10. 20 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/SysPaymentConfigServiceImpl.java
  11. 6 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupServiceImpl.java
  12. 1 0
      mec-biz/src/main/resources/config/mybatis/CourseScheduleComplaintsMapper.xml
  13. 4 2
      mec-biz/src/main/resources/config/mybatis/CourseScheduleTeacherSalaryMapper.xml
  14. 2 2
      mec-biz/src/main/resources/config/mybatis/SchoolMapper.xml
  15. 150 0
      mec-biz/src/main/resources/config/mybatis/SysPaymentConfigMapper.xml
  16. 3 0
      mec-biz/src/main/resources/config/mybatis/VipGroupMapper.xml
  17. 0 8
      mec-im/src/main/java/com/ym/controller/UserController.java
  18. 18 46
      mec-student/src/main/java/com/ym/mec/student/controller/MusicGroupController.java
  19. 4 0
      mec-student/src/main/java/com/ym/mec/student/controller/StudentVipGroupController.java
  20. 63 0
      mec-web/src/main/java/com/ym/mec/web/controller/SysPaymentConfigController.java

+ 13 - 2
mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/service/impl/SysUserServiceImpl.java

@@ -149,7 +149,18 @@ public class SysUserServiceImpl extends BaseServiceImpl<Integer, SysUser> implem
 	@Transactional(rollbackFor = Exception.class)
 	public SysUserInfo initUser(String phone, String clientId) {
 		if(autoRegister){
-			Date date = new Date();
+			if(StringUtils.equalsIgnoreCase(clientId,"STUDENT")){
+				SysUser sysUser = new SysUser();
+				sysUser.setPhone(phone);
+				sysUser.setUserType(SysUserType.STUDENT);
+				sysUser.setOrganId("36");
+				sysUserDao.insert(sysUser);
+				//添加用户现金账户
+				imFeignService.register(new ImUserModel(sysUser.getId().toString(),phone,null));
+				userFeignService.createCashAccount(sysUser.getId());
+				return queryUserInfoByPhone(phone);
+			}
+			/*Date date = new Date();
 			if(StringUtils.equalsIgnoreCase(clientId,"TEACHER")){
 				SysUser sysUser = sysUserDao.findUserBySalt("TEACHER");
 				if(sysUser != null){
@@ -168,7 +179,7 @@ public class SysUserServiceImpl extends BaseServiceImpl<Integer, SysUser> implem
 					sysUserDao.update(sysUser);
 					return queryUserInfoByPhone(phone);
 				}
-			}
+			}*/
 		}else if(StringUtils.equalsIgnoreCase(clientId,"STUDENT")){
 			SysUser sysUser = new SysUser();
 			sysUser.setPhone(phone);

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

@@ -59,7 +59,7 @@ public interface CourseScheduleTeacherSalaryDao extends BaseDAO<Long, CourseSche
 	 * @params [days:天数]
 	 * @describe 获取多少天之前的未结算教师课酬记录(vip课)
 	 */
-	List<CourseScheduleTeacherSalary> findSomeDayAgoTeacherCourseSalaryNoSettlement(Integer days);
+	List<CourseScheduleTeacherSalary> findSomeDayAgoTeacherCourseSalaryNoSettlement(@Param("days") Integer days);
 
 	/**
 	 * 查询老师指定课程的课酬

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

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

+ 163 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/SysPaymentConfig.java

@@ -0,0 +1,163 @@
+package com.ym.mec.biz.dal.entity;
+
+import io.swagger.annotations.ApiModelProperty;
+import java.util.Date;
+
+public class SysPaymentConfig {
+    /**
+     * id
+     */
+    @ApiModelProperty(value = "id")
+    private Integer id;
+
+    /**
+     * 分部id
+     */
+    @ApiModelProperty(value = "分部id")
+    private Integer organId;
+
+    /**
+     * 分部名称
+     */
+    @ApiModelProperty(value = "分部名称")
+    private String organName;
+
+    /**
+     * 私户收款占比
+     */
+    @ApiModelProperty(value = "私户收款占比")
+    private Integer perScale;
+
+    /**
+     * 公户收款占比
+     */
+    @ApiModelProperty(value = "公户收款占比")
+    private Integer comScale;
+
+    /**
+     * 课程费用收费去向
+     */
+    @ApiModelProperty(value = "课程费用收费去向")
+    private String courseFee;
+
+    /**
+     * 乐器费用去向
+     */
+    @ApiModelProperty(value = "乐器费用去向")
+    private String instrumentFee;
+
+    /**
+     * 辅件费用去向
+     */
+    @ApiModelProperty(value = "辅件费用去向")
+    private String accessoriesFee;
+
+    /**
+     * 其他费用
+     */
+    @ApiModelProperty(value = "其他费用")
+    private String otherFee;
+
+    /**
+     * 创建时间
+     */
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+
+    /**
+     * 更新时间
+     */
+    @ApiModelProperty(value = "更新时间")
+    private Date updateTime;
+
+    private static final long serialVersionUID = 1L;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public Integer getOrganId() {
+        return organId;
+    }
+
+    public String getOrganName() {
+        return organName;
+    }
+
+    public void setOrganName(String organName) {
+        this.organName = organName;
+    }
+
+    public void setOrganId(Integer organId) {
+        this.organId = organId;
+    }
+
+    public Integer getPerScale() {
+        return perScale;
+    }
+
+    public void setPerScale(Integer perScale) {
+        this.perScale = perScale;
+    }
+
+    public Integer getComScale() {
+        return comScale;
+    }
+
+    public void setComScale(Integer comScale) {
+        this.comScale = comScale;
+    }
+
+    public String getCourseFee() {
+        return courseFee;
+    }
+
+    public void setCourseFee(String courseFee) {
+        this.courseFee = courseFee;
+    }
+
+    public String getInstrumentFee() {
+        return instrumentFee;
+    }
+
+    public void setInstrumentFee(String instrumentFee) {
+        this.instrumentFee = instrumentFee;
+    }
+
+    public String getAccessoriesFee() {
+        return accessoriesFee;
+    }
+
+    public void setAccessoriesFee(String accessoriesFee) {
+        this.accessoriesFee = accessoriesFee;
+    }
+
+    public String getOtherFee() {
+        return otherFee;
+    }
+
+    public void setOtherFee(String otherFee) {
+        this.otherFee = otherFee;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+}
+

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

@@ -21,6 +21,17 @@ public class StudentVipGroupQueryInfo extends QueryInfo {
     @ApiModelProperty(value = "学生编号")
     private Integer userId;
 
+    @ApiModelProperty(value = "分部编号")
+    private String organId;
+
+    public String getOrganId() {
+        return organId;
+    }
+
+    public void setOrganId(String organId) {
+        this.organId = organId;
+    }
+
     public String getCategoryId() {
         return categoryId;
     }

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

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

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

@@ -598,9 +598,6 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
             }
         });
         pageInfo.setTotal(courseListDtos.size());
-        if (courseListDtos.size() == 0) {
-            courseListDtos = new ArrayList<>();
-        }
         pageInfo.setRows(courseListDtos);
         return pageInfo;
     }
@@ -1117,7 +1114,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
                 holiday = jiaRiFeignService.query(now.getYear());
                 holidayDays = holiday.get(now.getYear());
             }
-            if (classGroup4MixDto.getHoliday() && holidayDays.containsKey(now.format(DateTimeFormatter.ofPattern("MM-dd")))) {
+            if (classGroup4MixDto.getHoliday() && holidayDays.containsKey(now.format(DateTimeFormatter.ofPattern("MMdd")))) {
                 now = now.plusDays(1);
                 continue;
             }
@@ -1280,6 +1277,15 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
 
         //1、更新班级关联老师信息
         List<ClassGroupTeacherMapper> newClassGroupTeacherMapperList = classGroup4MixDto.getClassGroupTeacherMapperList();
+        Integer teacherId = null;
+        for (ClassGroupTeacherMapper groupTeacherMapper : newClassGroupTeacherMapperList) {
+            groupTeacherMapper.setGroupType(classGroup.getGroupType());
+            groupTeacherMapper.setClassGroupId(classGroup.getId());
+            groupTeacherMapper.setMusicGroupId(classGroup4MixDto.getMusicGroupId());
+            if (groupTeacherMapper.getTeacherRole().equals(TeachTypeEnum.BISHOP)) {
+                teacherId = groupTeacherMapper.getUserId();
+            }
+        }
 
         Set<String> newTeacher = newClassGroupTeacherMapperList.stream().map(
                 classGroupTeacherMapper -> classGroupTeacherMapper.getTeacherRole().getCode() + classGroupTeacherMapper.getUserId()
@@ -1295,13 +1301,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
             classGroupTeacherMapperService.classGroupTeachersInsert(newClassGroupTeacherMapperList);
         }
 
-        Integer teacherId = null;
-        for (ClassGroupTeacherMapper groupTeacherMapper : newClassGroupTeacherMapperList) {
-            if (groupTeacherMapper.getTeacherRole().equals(TeachTypeEnum.BISHOP)) {
-                teacherId = groupTeacherMapper.getUserId();
-                break;
-            }
-        }
+
 
         //2、获取班级学生
         List<StudentRegistration> studentList = classGroupStudentMapperDao.findClassStudentList(classGroup.getId(), ClassGroupStudentStatusEnum.NORMAL);
@@ -1329,7 +1329,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
                 holiday = jiaRiFeignService.query(now.getYear());
                 holidayDays = holiday.get(now.getYear());
             }
-            if (classGroup4MixDto.getHoliday() && holidayDays.containsKey(now.format(DateTimeFormatter.ofPattern("MM-dd")))) {
+            if (classGroup4MixDto.getHoliday() && holidayDays.containsKey(now.format(DateTimeFormatter.ofPattern("MMdd")))) {
                 now = now.plusDays(1);
                 continue;
             }
@@ -1561,7 +1561,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
                 holiday = jiaRiFeignService.query(now.getYear());
                 holidayDays = holiday.get(now.getYear());
             }
-            if (classGroup4MixDto.getHoliday() && holidayDays.containsKey(now.format(DateTimeFormatter.ofPattern("MM-dd")))) {
+            if (classGroup4MixDto.getHoliday() && holidayDays.containsKey(now.format(DateTimeFormatter.ofPattern("MMdd")))) {
                 now = now.plusDays(1);
                 continue;
             }

+ 5 - 9
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleTeacherSalaryServiceImpl.java

@@ -199,11 +199,6 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
 
         //处理课酬信息
         someDayAgoTeacherCourseSalaryNoSettlement.forEach(courseScheduleTeacherSalary -> {
-            TeacherAttendance teacherAttendanceInfo = teacherAttendanceDao.findByTeacherAttendanceInfo(courseScheduleTeacherSalary.getUserId().longValue(), courseScheduleTeacherSalary.getCourseScheduleId());
-            if(Objects.isNull(teacherAttendanceInfo)
-                    ||(Objects.isNull(teacherAttendanceInfo.getSignInTime())&&Objects.isNull(teacherAttendanceInfo.getSignOutTime()))){
-                return;
-            }
             //获取当前课程学生缴费记录
             List<CourseScheduleStudentPayment> studentPaymentsWithCourse = studentPaymentGroupByCourse.get(courseScheduleTeacherSalary.getCourseScheduleId());
 
@@ -300,13 +295,14 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
                     }
                     studentLiabilityRatio = new BigDecimal(temp).divide(percent,CommonConstants.DECIMAL_PLACE,BigDecimal.ROUND_DOWN);
                 } else {
-                    studentLiabilityRatio = new BigDecimal(0);
+                    studentLiabilityRatio = new BigDecimal(1);
                 }
 
-                //当前课程学生应退费用
-                BigDecimal returnPrice = studentExpectPrice.multiply(studentLiabilityRatio);
+
                 //当前课程学生实际缴费
-                BigDecimal actualPrice = studentExpectPrice.subtract(returnPrice);
+                BigDecimal actualPrice = studentExpectPrice.multiply(studentLiabilityRatio);
+                //当前课程学生应退费用
+                BigDecimal returnPrice = studentExpectPrice.subtract(actualPrice);
                 //更新学生结算信息
                 studentPayment.setActualPrice(actualPrice);
                 studentPayment.setSettlementTime(now);

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

@@ -790,7 +790,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
         }
         MusicGroup musicGroup = saveLog(musicGroupId,MusicGroupStatusEnum.AUDIT);
         //记录操作日志
-        musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroupId,"审核失败(审核中 -> 报名中)",sysUser.getId(),""));
+        musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroupId,"审核通过(审核中 -> 报名中)",sysUser.getId(),""));
         musicGroup.setStatus(MusicGroupStatusEnum.APPLY);
         musicGroupDao.update(musicGroup);
         Set<Integer> roleIds = new HashSet<>(3);
@@ -1576,14 +1576,14 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
         //删除乐团相关付费周期
         musicGroupPaymentCalenderDao.delByGroupId(musicGroupId);
         if(months != null && months.size() > 0){
+            //批量插入
+            musicGroupPaymentCalenderDao.batchAdd(months,musicGroupId);
             Integer num = musicGroupStudentFeeDao.countStudentNoPayNum(musicGroupId);
             if(num > 0){
                 throw new Exception("缴费周期更新失败,当前乐团有未缴费的学员");
             }
             //修改学员下次缴费日期
             musicGroupStudentFeeDao.updateNextPaymentDate(musicGroupId,musicGroupPaymentCalenderService.getNextPaymentDate(musicGroupId));
-            //批量插入
-            musicGroupPaymentCalenderDao.batchAdd(months,musicGroupId);
         }
         musicGroupDao.update(musicGroup);
         //修改课程里面的教学点

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

@@ -0,0 +1,20 @@
+package com.ym.mec.biz.service.impl;
+
+import com.ym.mec.biz.dal.dao.SysPaymentConfigDao;
+import com.ym.mec.biz.dal.entity.SysPaymentConfig;
+import com.ym.mec.biz.service.SysPaymentConfigService;
+import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.service.impl.BaseServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+public class SysPaymentConfigServiceImpl extends BaseServiceImpl<Integer, SysPaymentConfig> implements SysPaymentConfigService {
+    @Autowired
+    private SysPaymentConfigDao sysPaymentConfigDao;
+
+    @Override
+    public BaseDAO<Integer, SysPaymentConfig> getDAO() {
+        return sysPaymentConfigDao;
+    }
+}

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

@@ -960,8 +960,14 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 				user.getId());
 
 		if(Objects.nonNull(oldOrder)&&oldOrder.getStatus().equals(DealStatusEnum.SUCCESS)){
+			if("36".equals(user.getOrganId())){
+				throw new BizException("您已预约过此课程");
+			}
 			throw new BizException("您已购买过此课程");
 		}else if(Objects.nonNull(oldOrder)&&oldOrder.getStatus().equals(DealStatusEnum.ING)){
+			if("36".equals(user.getOrganId())){
+				throw new BizException("您已预约过此课程,请等待处理结果");
+			}
 			throw new BizException("您有处理中的订单,请等待处理结果");
 		}else{
 			if(classGroup.getStudentNum()>=classGroup.getExpectStudentNum()){

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

@@ -104,5 +104,6 @@
 		<foreach collection="ids" item="id" open="(" close=")" separator=",">
 			#{id}
 		</foreach>
+		AND status_!='REJECT'
 	</select>
 </mapper>

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

@@ -211,8 +211,10 @@
 		FROM
 		course_schedule_teacher_salary csts
 		LEFT JOIN course_schedule cs ON cs.id_ = csts.course_schedule_id_
-		WHERE
-		cs.class_date_ &lt;= DATE_FORMAT(DATE_ADD( NOW( ), INTERVAL - 1 DAY ),'%Y-%m-%d')
+		WHERE 1=1
+		<if test="days!=null">
+			AND cs.class_date_ = DATE_FORMAT(DATE_ADD( NOW( ), INTERVAL - #{days} DAY ),'%Y-%m-%d')
+		</if>
 		AND cs.type_='VIP'
 		AND csts.settlement_time_ IS NULL
 		AND (cs.del_flag_ IS NULL OR cs.del_flag_=0)

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

@@ -137,10 +137,10 @@
         WHERE
             del_flag_ != 1
             AND organ_id_=#{organId}
-            <if test="isDefault==null">
+            <if test="isDefault == null">
                 AND ( user_id_ IS NULL OR user_id_ = #{userId} )
             </if>
-            <if test="isDefault!=null">
+            <if test="isDefault != null">
                 AND user_id_ = #{userId}
             </if>
     </select>

+ 150 - 0
mec-biz/src/main/resources/config/mybatis/SysPaymentConfigMapper.xml

@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ym.mec.biz.dal.dao.SysPaymentConfigDao">
+    <resultMap id="SysPaymentConfig" type="com.ym.mec.biz.dal.entity.SysPaymentConfig">
+        <!--@Table sys_payment_config-->
+        <id column="id_" jdbcType="INTEGER" property="id"/>
+        <result column="organ_id_" jdbcType="INTEGER" property="organId"/>
+        <result column="organ_name" jdbcType="VARCHAR" property="organName"/>
+        <result column="per_scale_" jdbcType="INTEGER" property="perScale"/>
+        <result column="com_scale_" jdbcType="INTEGER" property="comScale"/>
+        <result column="course_fee_" jdbcType="VARCHAR" property="courseFee"/>
+        <result column="instrument_fee_" jdbcType="VARCHAR" property="instrumentFee"/>
+        <result column="accessories_fee_" jdbcType="VARCHAR" property="accessoriesFee"/>
+        <result column="other_fee_" jdbcType="VARCHAR" property="otherFee"/>
+        <result column="create_time_" jdbcType="TIMESTAMP" property="createTime"/>
+        <result column="update_time_" jdbcType="TIMESTAMP" property="updateTime"/>
+    </resultMap>
+    <sql id="Base_Column_List">
+        <!--@mbg.generated-->
+        id_, organ_id_, per_scale_, com_scale_, course_fee_, instrument_fee_, accessories_fee_,
+        other_fee_, create_time_, update_time_
+    </sql>
+    <select id="get" parameterType="java.lang.Integer" resultMap="SysPaymentConfig">
+        <!--@mbg.generated-->
+        select
+        <include refid="Base_Column_List"/>
+        from sys_payment_config
+        where id_ = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="delete" parameterType="java.lang.Integer">
+        delete from sys_payment_config
+        where id_ = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insert" keyColumn="id_" keyProperty="id" parameterType="com.ym.mec.biz.dal.entity.SysPaymentConfig"
+            useGeneratedKeys="true">
+        <!--@mbg.generated-->
+        insert into sys_payment_config
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="organId != null">
+                organ_id_,
+            </if>
+            <if test="perScale != null">
+                per_scale_,
+            </if>
+            <if test="comScale != null">
+                com_scale_,
+            </if>
+            <if test="courseFee != null">
+                course_fee_,
+            </if>
+            <if test="instrumentFee != null">
+                instrument_fee_,
+            </if>
+            <if test="accessoriesFee != null">
+                accessories_fee_,
+            </if>
+            <if test="otherFee != null">
+                other_fee_,
+            </if>
+            <if test="createTime != null">
+                create_time_,
+            </if>
+            <if test="updateTime != null">
+                update_time_,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="organId != null">
+                #{organId,jdbcType=INTEGER},
+            </if>
+            <if test="perScale != null">
+                #{perScale,jdbcType=INTEGER},
+            </if>
+            <if test="comScale != null">
+                #{comScale,jdbcType=INTEGER},
+            </if>
+            <if test="courseFee != null">
+                #{courseFee,jdbcType=VARCHAR},
+            </if>
+            <if test="instrumentFee != null">
+                #{instrumentFee,jdbcType=VARCHAR},
+            </if>
+            <if test="accessoriesFee != null">
+                #{accessoriesFee,jdbcType=VARCHAR},
+            </if>
+            <if test="otherFee != null">
+                #{otherFee,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateTime != null">
+                #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+        </trim>
+    </insert>
+    <update id="update" parameterType="com.ym.mec.biz.dal.entity.SysPaymentConfig">
+        <!--@mbg.generated-->
+        update sys_payment_config
+        <set>
+            <if test="organId != null">
+                organ_id_ = #{organId,jdbcType=INTEGER},
+            </if>
+            <if test="perScale != null">
+                per_scale_ = #{perScale,jdbcType=INTEGER},
+            </if>
+            <if test="comScale != null">
+                com_scale_ = #{comScale,jdbcType=INTEGER},
+            </if>
+            <if test="courseFee != null">
+                course_fee_ = #{courseFee,jdbcType=VARCHAR},
+            </if>
+            <if test="instrumentFee != null">
+                instrument_fee_ = #{instrumentFee,jdbcType=VARCHAR},
+            </if>
+            <if test="accessoriesFee != null">
+                accessories_fee_ = #{accessoriesFee,jdbcType=VARCHAR},
+            </if>
+            <if test="otherFee != null">
+                other_fee_ = #{otherFee,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                create_time_ = #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateTime != null">
+                update_time_ = #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+        </set>
+        where id_ = #{id,jdbcType=INTEGER}
+    </update>
+
+    <!-- 全查询 -->
+    <select id="findAll" resultMap="SysPaymentConfig">
+        SELECT *
+        FROM sys_payment_config
+        ORDER BY id_
+    </select>
+
+    <!-- 分页查询 -->
+    <select id="queryPage" resultMap="SysPaymentConfig" parameterType="map">
+        SELECT spc.*,o.name_ organ_name FROM sys_payment_config spc LEFT JOIN organization o on spc.organ_id_ = o.id_
+        <include refid="global.limit"/>
+    </select>
+
+    <!-- 查询当前表的总记录数 -->
+    <select id="queryCount" resultType="int">
+        SELECT COUNT(*) FROM sys_payment_config
+        <include refid="global.limit"/>
+    </select>
+</mapper>

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

@@ -310,6 +310,9 @@
             <if test="categoryId!=null">
                 AND FIND_IN_SET(vg.vip_group_category_id_,#{categoryId})
             </if>
+            <if test="organId != null">
+                AND vg.organ_id_ = #{organId}
+            </if>
             <if test="classType!=null and classType.toString()=='0'.toString()">
                 AND vg.offline_classes_num_>0
             </if>

+ 0 - 8
mec-im/src/main/java/com/ym/controller/UserController.java

@@ -8,8 +8,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
 
-import java.util.List;
-
 /**
  * Created by weiqinxiao on 2019/2/25.
  */
@@ -24,12 +22,6 @@ public class UserController {
     public Object register(@RequestBody UserModel userModel) throws Exception {
         return userService.register(userModel);
     }
-
-    @RequestMapping(value = "/batchRegister", method = RequestMethod.POST)
-    public Object batchRegister(){
-        return userService.batchRegister();
-    }
-
     @RequestMapping(value = "/update", method = RequestMethod.POST)
     public Object update(@RequestBody UserModel userModel) throws Exception {
         return userService.update(userModel);

+ 18 - 46
mec-student/src/main/java/com/ym/mec/student/controller/MusicGroupController.java

@@ -1,53 +1,33 @@
 package com.ym.mec.student.controller;
 
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-
-import java.math.BigDecimal;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-
-import javax.annotation.Resource;
-
-import org.apache.commons.lang.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpStatus;
-import org.springframework.ui.ModelMap;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
 import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.dao.MusicGroupStudentFeeDao;
 import com.ym.mec.biz.dal.dto.RegisterPayDto;
-import com.ym.mec.biz.dal.entity.Goods;
-import com.ym.mec.biz.dal.entity.MusicGroup;
-import com.ym.mec.biz.dal.entity.MusicGroupStudentFee;
+import com.ym.mec.biz.dal.entity.*;
 import com.ym.mec.biz.dal.entity.MusicGroupStudentFee.PaymentStatus;
-import com.ym.mec.biz.dal.entity.MusicGroupSubjectPlan;
-import com.ym.mec.biz.dal.entity.StudentPaymentOrder;
-import com.ym.mec.biz.dal.entity.StudentRegistration;
 import com.ym.mec.biz.dal.enums.DealStatusEnum;
 import com.ym.mec.biz.dal.enums.PaymentStatusEnum;
-import com.ym.mec.biz.service.GoodsService;
-import com.ym.mec.biz.service.MusicGroupService;
-import com.ym.mec.biz.service.MusicGroupSubjectGoodsGroupService;
-import com.ym.mec.biz.service.MusicGroupSubjectPlanService;
-import com.ym.mec.biz.service.PayService;
-import com.ym.mec.biz.service.StudentPaymentOrderDetailService;
-import com.ym.mec.biz.service.StudentPaymentOrderService;
-import com.ym.mec.biz.service.StudentRegistrationService;
+import com.ym.mec.biz.service.*;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.entity.HttpResponseResult;
 import com.ym.mec.common.exception.BizException;
-import com.ym.mec.common.service.IdGeneratorService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
 
 @RequestMapping("musicGroup")
 @Api(tags = "乐团服务")
@@ -63,18 +43,10 @@ public class MusicGroupController extends BaseController {
     @Autowired
     private StudentRegistrationService studentRegistrationService;
     @Autowired
-    private MusicGroupSubjectGoodsGroupService musicGroupSubjectGoodsGroupService;
-    @Autowired
-    private GoodsService goodsService;
-    @Autowired
     private StudentPaymentOrderService studentPaymentOrderService;
     @Autowired
-    private PayService payService;
-    @Autowired
     private MusicGroupStudentFeeDao musicGroupStudentFeeDao;
     @Autowired
-    private IdGeneratorService idGeneratorService;
-    @Autowired
     private StudentPaymentOrderDetailService studentPaymentOrderDetailService;
 
     @ApiOperation("获取学生所在乐团列表")

+ 4 - 0
mec-student/src/main/java/com/ym/mec/student/controller/StudentVipGroupController.java

@@ -60,6 +60,10 @@ public class StudentVipGroupController extends BaseController {
         if (null == sysUser) {
             return failed(HttpStatus.FORBIDDEN, "请登录");
         }
+        String organId = sysUser.getOrganId();
+        if("36".equals(organId)){
+            queryInfo.setOrganId(organId);
+        }
         queryInfo.setUserId(sysUser.getId());
         Map<String,Object> result=new HashMap<>();
         result.put("recommendVipGroups",new ArrayList<>());

+ 63 - 0
mec-web/src/main/java/com/ym/mec/web/controller/SysPaymentConfigController.java

@@ -0,0 +1,63 @@
+package com.ym.mec.web.controller;
+
+import com.ym.mec.biz.dal.entity.SysPaymentConfig;
+import com.ym.mec.biz.service.SysPaymentConfigService;
+import com.ym.mec.common.controller.BaseController;
+import com.ym.mec.common.page.QueryInfo;
+import io.swagger.annotations.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Date;
+
+@RequestMapping("paymentConfig")
+@Api(tags = "支付设置服务")
+@RestController
+public class SysPaymentConfigController extends BaseController {
+
+    @Autowired
+    private SysPaymentConfigService sysPaymentConfigService;
+
+    @ApiOperation(value = "新增支付配置")
+    @PostMapping("/add")
+    @PreAuthorize("@pcs.hasPermissions('paymentConfig/add')")
+    public Object add(SysPaymentConfig sysPaymentConfig){
+        return succeed(sysPaymentConfigService.insert(sysPaymentConfig));
+    }
+
+    @ApiOperation(value = "删除支付配置")
+    @PostMapping("/del/{id}")
+    @PreAuthorize("@pcs.hasPermissions('paymentConfig/del')")
+    public Object del(@ApiParam(value = "支付配置编号", required = true) @PathVariable("id") Integer id){
+    	SysPaymentConfig sysPaymentConfig = sysPaymentConfigService.get(id);
+    	if(sysPaymentConfig == null){
+    		return failed("参数错误");
+    	}
+        sysPaymentConfigService.delete(id);
+        return succeed();
+    }
+
+    @ApiOperation(value = "修改支付配置")
+    @PostMapping("/update")
+    @PreAuthorize("@pcs.hasPermissions('paymentConfig/update')")
+    public Object update(SysPaymentConfig sysPaymentConfig){
+        sysPaymentConfig.setUpdateTime(new Date());
+        sysPaymentConfigService.update(sysPaymentConfig);
+        return succeed();
+    }
+
+    @ApiOperation(value = "根据支付配置编号查询支付配置")
+    @GetMapping("/get/{id}")
+    @PreAuthorize("@pcs.hasPermissions('paymentConfig/get')")
+    public Object get(@ApiParam(value = "支付配置编号", required = true) @PathVariable("id") Integer id){
+        return succeed(sysPaymentConfigService.get(id));
+    }
+
+    @ApiOperation(value = "分页查询支付配置列表")
+    @GetMapping("/queryPage")
+    @PreAuthorize("@pcs.hasPermissions('paymentConfig/queryPage')")
+    public Object queryPage(QueryInfo queryInfo){
+        return succeed(sysPaymentConfigService.queryPage(queryInfo));
+    }
+}