浏览代码

Merge remote-tracking branch 'origin/master'

Joburgess 5 年之前
父节点
当前提交
7727ab7bdb
共有 18 个文件被更改,包括 478 次插入62 次删除
  1. 13 2
      mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/service/impl/SysUserServiceImpl.java
  2. 7 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/SysPaymentConfigDao.java
  3. 163 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/SysPaymentConfig.java
  4. 11 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/StudentVipGroupQueryInfo.java
  5. 9 0
      mec-biz/src/main/java/com/ym/mec/biz/service/SysPaymentConfigService.java
  6. 3 6
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ClassGroupServiceImpl.java
  7. 3 3
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java
  8. 20 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/SysPaymentConfigServiceImpl.java
  9. 6 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupServiceImpl.java
  10. 1 1
      mec-biz/src/main/resources/config/mybatis/CourseScheduleStudentPaymentMapper.xml
  11. 1 1
      mec-biz/src/main/resources/config/mybatis/CourseScheduleTeacherSalaryMapper.xml
  12. 2 2
      mec-biz/src/main/resources/config/mybatis/SchoolMapper.xml
  13. 150 0
      mec-biz/src/main/resources/config/mybatis/SysPaymentConfigMapper.xml
  14. 1 1
      mec-biz/src/main/resources/config/mybatis/TeacherAttendanceMapper.xml
  15. 3 0
      mec-biz/src/main/resources/config/mybatis/VipGroupMapper.xml
  16. 18 46
      mec-student/src/main/java/com/ym/mec/student/controller/MusicGroupController.java
  17. 4 0
      mec-student/src/main/java/com/ym/mec/student/controller/StudentVipGroupController.java
  18. 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);

+ 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> {
+
+
+}

+ 3 - 6
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;
             }
@@ -1332,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;
             }
@@ -1564,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;
             }

+ 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 - 1
mec-biz/src/main/resources/config/mybatis/CourseScheduleStudentPaymentMapper.xml

@@ -206,6 +206,6 @@
 	</delete>
 	
 	<delete id="deleteByMusicGroupId" parameterType="map">
-		DELETE FROM course_schedule_student_payment WHERE music_group_id_=#{musicGroupId} AND group_type_=#{groupType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
+		DELETE cssp FROM course_schedule_student_payment cssp left join course_schedule cs on cssp.course_schedule_id_ = cs.id_ WHERE cssp.music_group_id_=#{musicGroupId} AND cssp.group_type_=#{groupType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler} and cs.status_ = 'NOT_START'
 	</delete>
 </mapper>

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

@@ -384,6 +384,6 @@
 	</select>
 	
 	<delete id="deleteByMusicGroupId" parameterType="map" >
-		DELETE FROM course_schedule_teacher_salary WHERE music_group_id_=#{musicGroupId} AND group_type_=#{groupType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
+		DELETE cssp FROM course_schedule_teacher_salary cssp left join course_schedule cs on cssp.course_schedule_id_ = cs.id_ WHERE cssp.music_group_id_=#{musicGroupId} AND cssp.group_type_=#{groupType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler} and cs.status_ = 'NOT_START'
 	</delete>
 </mapper>

+ 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>

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

@@ -325,6 +325,6 @@
     </update>
 	
 	<delete id="deleteByMusicGroupId" parameterType="map" >
-		DELETE FROM teacher_attendance WHERE music_group_id_=#{musicGroupId} AND group_type_=#{groupType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
+		DELETE ta FROM teacher_attendance ta left join course_schedule cs on ta.course_schedule_id_ = cs.id_ WHERE ta.music_group_id_=#{musicGroupId} AND ta.group_type_=#{groupType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler} and cs.status_ = 'NOT_START'
 	</delete>
 </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>

+ 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));
+    }
+}