Procházet zdrojové kódy

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

zouxuan před 5 roky
rodič
revize
c8bab2fe95
20 změnil soubory, kde provedl 561 přidání a 137 odebrání
  1. 1 1
      cms/src/main/resources/bootstrap-dev.properties
  2. 11 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentPaymentOrderDao.java
  3. 15 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/DegreeRegistration.java
  4. 258 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/DegreeQueryInfo.java
  5. 3 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/DegreeRegistrationServiceImpl.java
  6. 16 8
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupServiceImpl.java
  7. 178 116
      mec-biz/src/main/resources/config/mybatis/DegreeRegistrationMapper.xml
  8. 7 0
      mec-biz/src/main/resources/config/mybatis/StudentPaymentOrderMapper.xml
  9. 1 1
      mec-education/src/main/resources/bootstrap-dev.properties
  10. 1 1
      mec-eureka/src/main/resources/bootstrap-dev.properties
  11. 1 1
      mec-gateway/mec-gateway-web/src/main/resources/bootstrap-dev.properties
  12. 1 1
      mec-im/src/main/resources/bootstrap-dev.properties
  13. 1 1
      mec-monitor/src/main/resources/bootstrap-dev.properties
  14. 1 1
      mec-student/src/main/resources/bootstrap-dev.properties
  15. 1 1
      mec-task/src/main/resources/bootstrap-dev.properties
  16. 1 1
      mec-teacher/src/main/resources/bootstrap-dev.properties
  17. 60 0
      mec-web/src/main/java/com/ym/mec/web/controller/education/DegreeController.java
  18. 2 2
      mec-web/src/main/resources/application.yml
  19. 1 1
      mec-web/src/main/resources/bootstrap-dev.properties
  20. 1 1
      mec-zipkin/src/main/resources/bootstrap-dev.properties

+ 1 - 1
cms/src/main/resources/bootstrap-dev.properties

@@ -3,7 +3,7 @@
 #\u670d\u52a1\u5668\u5730\u5740
 spring.cloud.nacos.config.server-addr=47.99.212.176:8848
 #\u9ed8\u8ba4\u4e3aPublic\u547d\u540d\u7a7a\u95f4,\u53ef\u4ee5\u7701\u7565\u4e0d\u5199
-spring.cloud.nacos.config.namespace=e246d169-227d-4012-8c34-e90e057d95d2
+spring.cloud.nacos.config.namespace=23b30a79-e16f-4583-a787-c7223a91252b
 #\u6307\u5b9a\u914d\u7f6e\u7fa4\u7ec4 --\u5982\u679c\u662fPublic\u547d\u540d\u7a7a\u95f4 \u5219\u53ef\u4ee5\u7701\u7565\u7fa4\u7ec4\u914d\u7f6e
 spring.cloud.nacos.config.group=DEFAULT_GROUP
 #\u6587\u4ef6\u540d -- \u5982\u679c\u6ca1\u6709\u914d\u7f6e\u5219\u9ed8\u8ba4\u4e3a ${spring.appliction.name}

+ 11 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentPaymentOrderDao.java

@@ -271,4 +271,15 @@ public interface StudentPaymentOrderDao extends BaseDAO<Long, StudentPaymentOrde
      * @return
      */
     BigDecimal getChargeAmount(Map<String, Object> params);
+
+    /**
+     * @describe 统计课程组非失败订单数量
+     * @author Joburgess
+     * @date 2020.06.22
+     * @param groupId:
+     * @param groupType:
+     * @return int
+     */
+    int countGroupOrderWithoutFailed(@Param("groupId") String groupId,
+                                       @Param("groupType") GroupType groupType);
 }

+ 15 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/DegreeRegistration.java

@@ -62,6 +62,13 @@ public class DegreeRegistration {
     @ApiModelProperty(value = "乐理级别",required = true)
     private String theoryLevel;
 
+
+    /**
+     * 乐理级别证书
+     */
+    @ApiModelProperty(value = "乐理级别证书",required = true)
+    private String theoryCert;
+
     /**
      * 家长联系电话
      */
@@ -250,4 +257,12 @@ public class DegreeRegistration {
     public void setTheoryMoney(BigDecimal theoryMoney) {
         this.theoryMoney = theoryMoney;
     }
+
+    public String getTheoryCert() {
+        return theoryCert;
+    }
+
+    public void setTheoryCert(String theoryCert) {
+        this.theoryCert = theoryCert;
+    }
 }

+ 258 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/page/DegreeQueryInfo.java

@@ -0,0 +1,258 @@
+package com.ym.mec.biz.dal.page;
+
+import com.ym.mec.biz.dal.enums.SporadicChargeTypeEnum;
+import com.ym.mec.common.page.QueryInfo;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+public class DegreeQueryInfo extends QueryInfo {
+
+    private Integer id;
+
+    /**
+     * 零星支付id
+     */
+    @ApiModelProperty(value = "零星支付id", required = true)
+    private Integer sporadicId;
+
+    /**
+     * 姓名
+     */
+    @ApiModelProperty(value = "名字", required = true)
+    private String name;
+
+    /**
+     * 性别
+     */
+    @ApiModelProperty(value = "性别", required = true)
+    private String gender;
+
+    /**
+     * 身份证号
+     */
+    @ApiModelProperty(value = "身份证号", required = true)
+    private String idcard;
+
+    /**
+     * 城市
+     */
+    @ApiModelProperty(value = "城市", required = true)
+    private String city;
+
+    /**
+     * 学校
+     */
+    @ApiModelProperty(value = "学校", required = true)
+    private String school;
+
+    /**
+     * 乐器
+     */
+    @ApiModelProperty(value = "乐器", required = true)
+    private String subject;
+
+    /**
+     * 考试级别
+     */
+    @ApiModelProperty(value = "考试级别", required = true)
+    private String level;
+
+    /**
+     * 乐理级别
+     */
+    @ApiModelProperty(value = "乐理级别", required = true)
+    private String theoryLevel;
+
+
+    /**
+     * 乐理级别证书
+     */
+    @ApiModelProperty(value = "乐理级别证书", required = true)
+    private String theoryCert;
+
+    /**
+     * 家长联系电话
+     */
+    @ApiModelProperty(value = "家长联系电话", required = true)
+    private String mobile;
+
+    /**
+     * 考级费用
+     */
+    @ApiModelProperty(value = "收费标准", required = false)
+    private BigDecimal money;
+
+    /**
+     * 备注
+     */
+    @ApiModelProperty(value = "备注", required = false)
+    private String memo;
+
+    /**
+     * 乐理费用
+     */
+    @ApiModelProperty(value = "乐理费用", required = true)
+    private BigDecimal theoryMoney;
+
+    /**
+     * 报名时间
+     */
+    private Date createTime;
+
+    /**
+     * 更新时间
+     */
+    private Date updateTime;
+
+    /**
+     * 0-未支付 1-支付中 2-支付中
+     */
+    private Integer status;
+
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public Integer getSporadicId() {
+        return sporadicId;
+    }
+
+    public void setSporadicId(Integer sporadicId) {
+        this.sporadicId = sporadicId;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getGender() {
+        return gender;
+    }
+
+    public void setGender(String gender) {
+        this.gender = gender;
+    }
+
+    public String getIdcard() {
+        return idcard;
+    }
+
+    public void setIdcard(String idcard) {
+        this.idcard = idcard;
+    }
+
+    public String getCity() {
+        return city;
+    }
+
+    public void setCity(String city) {
+        this.city = city;
+    }
+
+    public String getSchool() {
+        return school;
+    }
+
+    public void setSchool(String school) {
+        this.school = school;
+    }
+
+    public String getSubject() {
+        return subject;
+    }
+
+    public void setSubject(String subject) {
+        this.subject = subject;
+    }
+
+    public String getTheoryLevel() {
+        return theoryLevel;
+    }
+
+    public void setTheoryLevel(String theoryLevel) {
+        this.theoryLevel = theoryLevel;
+    }
+
+    public String getMobile() {
+        return mobile;
+    }
+
+    public void setMobile(String mobile) {
+        this.mobile = mobile;
+    }
+
+    public BigDecimal getMoney() {
+        return money;
+    }
+
+    public void setMoney(BigDecimal money) {
+        this.money = money;
+    }
+
+    public String getMemo() {
+        return memo;
+    }
+
+    public void setMemo(String memo) {
+        this.memo = memo;
+    }
+
+    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;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public String getLevel() {
+        return level;
+    }
+
+    public void setLevel(String level) {
+        this.level = level;
+    }
+
+    public BigDecimal getTheoryMoney() {
+        return theoryMoney;
+    }
+
+    public void setTheoryMoney(BigDecimal theoryMoney) {
+        this.theoryMoney = theoryMoney;
+    }
+
+    public String getTheoryCert() {
+        return theoryCert;
+    }
+
+    public void setTheoryCert(String theoryCert) {
+        this.theoryCert = theoryCert;
+    }
+}

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

@@ -58,6 +58,9 @@ public class DegreeRegistrationServiceImpl extends BaseServiceImpl<Integer, Degr
         if (chargeInfo == null) {
             throw new BizException("你选的考试级别不存在");
         }
+        if(chargeInfo.getTitle().equals("二级") && StringUtils.isBlank(degreeRegistration.getTheoryCert())){
+            throw new BizException(chargeInfo.getTitle()+"考试必须上传证书");
+        }
         degreeRegistration.setLevel(chargeInfo.getTitle());
         BigDecimal theoryMoney = BigDecimal.ZERO;
         if(degreeRegistration.getTheoryLevel().equals("一级")){

+ 16 - 8
mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupServiceImpl.java

@@ -1170,6 +1170,14 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 
         VipGroup vipGroup = vipGroupDao.get(vipGroupBuyParams.getVipGroupId());
 
+
+		if(classGroup.getStudentNum()>1&&(VipGroupStatusEnum.APPLYING.equals(vipGroup.getStatus()))){
+			int i = studentPaymentOrderDao.countGroupOrderWithoutFailed(vipGroupBuyParams.getVipGroupId().toString(), GroupType.VIP);
+			if(i<=0){
+				throw new BizException("VIP课程存在手动添加用户,无法进行购买!");
+			}
+		}
+
 		if(vipGroup.getPaymentExpireDate().before(date)){
 			throw new BizException("该课程已结束报名!");
 		}
@@ -2476,16 +2484,16 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 
 		ClassGroup classGroup = classGroupDao.findByVipGroup(vipGroupId, null);
 
-		if(classGroup.getExpectStudentNum()>1
-				&&(VipGroupStatusEnum.APPLYING.equals(vipGroup.getStatus())
-				||VipGroupStatusEnum.APPLYING_END.equals(vipGroup.getStatus())
-				||VipGroupStatusEnum.NOT_START.equals(vipGroup.getStatus())
-				||VipGroupStatusEnum.FINISHED.equals(vipGroup.getStatus())
-				||VipGroupStatusEnum.CANCEL.equals(vipGroup.getStatus()))){
-			throw new BizException("VIP课程组尚未成立,无法添加学员,请走学员购买流程!");
+		if(classGroup.getStudentNum()>1&&(VipGroupStatusEnum.APPLYING.equals(vipGroup.getStatus()))){
+			int i = studentPaymentOrderDao.countGroupOrderWithoutFailed(vipGroupId.toString(), GroupType.VIP);
+			if(i>0){
+				throw new BizException("VIP课程存在购买用户,无法进行添加学员操作!");
+			}
 		}
 
-		if(VipGroupStatusEnum.PAUSE.equals(vipGroup.getStatus())){
+		if(VipGroupStatusEnum.PAUSE.equals(vipGroup.getStatus())
+				||VipGroupStatusEnum.FINISHED.equals(vipGroup.getStatus())
+				||VipGroupStatusEnum.CANCEL.equals(vipGroup.getStatus())){
 			throw new BizException("当前课程组已经停止,无法进行添加学员操作。");
 		}
 

+ 178 - 116
mec-biz/src/main/resources/config/mybatis/DegreeRegistrationMapper.xml

@@ -1,126 +1,188 @@
 <?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.DegreeRegistrationDao">
-  <resultMap id="DegreeRegistration" type="com.ym.mec.biz.dal.entity.DegreeRegistration">
-    <!--@mbg.generated-->
-    <!--@Table degree_registration-->
-    <id column="id_" jdbcType="INTEGER" property="id" />
-    <result column="sporadic_id_" jdbcType="INTEGER" property="sporadicId" />
-    <result column="name_" jdbcType="VARCHAR" property="name" />
-    <result column="gender_" jdbcType="VARCHAR" property="gender" />
-    <result column="idcard_" jdbcType="VARCHAR" property="idcard" />
-    <result column="city_" jdbcType="VARCHAR" property="city" />
-    <result column="school_" jdbcType="VARCHAR" property="school" />
-    <result column="subject_" jdbcType="VARCHAR" property="subject" />
-    <result column="level_" jdbcType="VARCHAR" property="level" />
-    <result column="theory_level_" jdbcType="VARCHAR" property="theoryLevel" />
-    <result column="theory_money_" jdbcType="DECIMAL" property="theoryMoney" />
-    <result column="mobile_" jdbcType="VARCHAR" property="mobile" />
-    <result column="money_" jdbcType="DECIMAL" property="money" />
-    <result column="memo_" jdbcType="VARCHAR" property="memo" />
-    <result column="create_time_" jdbcType="TIMESTAMP" property="createTime" />
-    <result column="update_time_" jdbcType="TIMESTAMP" property="updateTime" />
-    <result column="status_" jdbcType="TINYINT" property="status" />
-  </resultMap>
+    <resultMap id="DegreeRegistration" type="com.ym.mec.biz.dal.entity.DegreeRegistration">
+        <!--@mbg.generated-->
+        <!--@Table degree_registration-->
+        <id column="id_" jdbcType="INTEGER" property="id"/>
+        <result column="sporadic_id_" jdbcType="INTEGER" property="sporadicId"/>
+        <result column="name_" jdbcType="VARCHAR" property="name"/>
+        <result column="gender_" jdbcType="VARCHAR" property="gender"/>
+        <result column="idcard_" jdbcType="VARCHAR" property="idcard"/>
+        <result column="city_" jdbcType="VARCHAR" property="city"/>
+        <result column="school_" jdbcType="VARCHAR" property="school"/>
+        <result column="subject_" jdbcType="VARCHAR" property="subject"/>
+        <result column="level_" jdbcType="VARCHAR" property="level"/>
+        <result column="theory_level_" jdbcType="VARCHAR" property="theoryLevel"/>
+        <result column="theory_money_" jdbcType="DECIMAL" property="theoryMoney"/>
+        <result column="theory_cert_" jdbcType="VARCHAR" property="theoryCert"/>
+        <result column="mobile_" jdbcType="VARCHAR" property="mobile"/>
+        <result column="money_" jdbcType="DECIMAL" property="money"/>
+        <result column="memo_" jdbcType="VARCHAR" property="memo"/>
+        <result column="create_time_" jdbcType="TIMESTAMP" property="createTime"/>
+        <result column="update_time_" jdbcType="TIMESTAMP" property="updateTime"/>
+        <result column="status_" jdbcType="TINYINT" property="status"/>
+    </resultMap>
 
-  <select id="get" parameterType="java.lang.Integer" resultMap="DegreeRegistration">
-    select * from degree_registration where id_ = #{id,jdbcType=INTEGER}
-  </select>
+    <select id="get" parameterType="java.lang.Integer" resultMap="DegreeRegistration">
+        select *
+        from degree_registration
+        where id_ = #{id,jdbcType=INTEGER}
+    </select>
 
-  <!-- 全查询 -->
-  <select id="findAll" resultMap="DegreeRegistration">
-    SELECT *
-    FROM degree_registration
-    ORDER BY id_
-  </select>
+    <!-- 全查询 -->
+    <select id="findAll" resultMap="DegreeRegistration">
+        SELECT *
+        FROM degree_registration
+        ORDER BY id_
+    </select>
 
-  <!-- 分页查询 -->
-  <select id="queryPage" resultMap="DegreeRegistration" parameterType="map">
-    SELECT * FROM degree_registration ORDER BY id_ <include refid="global.limit"/>
-  </select>
+    <sql id="queryPageSql">
+        <where>
+            <if test="status != null">
+                AND status_= #{status}
+            </if>
+            <if test="id != null">
+                AND id_ = #{id}
+            </if>
+            <if test="search != null and search != ''">
+                AND (id_ = #{search} OR name_ LIKE CONCAT('%',#{search},'%') )
+            </if>
+            <if test="name != null">
+                AND name_ = #{name}
+            </if>
+            <if test="idcard != null">
+                AND idcard_ = #{idcard}
+            </if>
+            <if test="school != null">
+                AND school_ LIKE CONCAT('%', #{school},'%')
+            </if>
+            <if test="city != null">
+                AND city_ LIKE CONCAT('%', #{city},'%')
+            </if>
+            <if test="subject != null">
+                AND subject_= #{subject}
+            </if>
+            <if test="subject != null">
+                AND subject_= #{subject}
+            </if>
+            <if test="mobile != null">
+                AND mobile_= #{mobile}
+            </if>
+            <if test="level != null">
+                AND level_= #{level}
+            </if>
+            <if test="level != null">
+                AND level_= #{level}
+            </if>
+        </where>
+    </sql>
 
-  <!-- 查询当前表的总记录数 -->
-  <select id="queryCount" resultType="int">
-    SELECT COUNT(*) FROM degree_registration
-  </select>
+    <!-- 分页查询 -->
+    <select id="queryPage" resultMap="DegreeRegistration" parameterType="map">
+        SELECT * FROM degree_registration
+        <include refid="queryPageSql"/>
+        <include refid="global.limit"/>
+    </select>
 
-  <delete id="delete" parameterType="java.lang.Integer">
-    delete from degree_registration
-    where id_ = #{id,jdbcType=INTEGER}
-  </delete>
-  <insert id="insert" keyColumn="id_" keyProperty="id" parameterType="com.ym.mec.biz.dal.entity.DegreeRegistration" useGeneratedKeys="true">
-    <!--@mbg.generated-->
-    insert into degree_registration (sporadic_id_, name_, gender_, 
-      idcard_, city_, school_, 
-      subject_,level_, theory_level_,theory_money_, mobile_,
-      money_, memo_, create_time_, 
-      update_time_, status_)
-    values (#{sporadicId,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{gender,jdbcType=VARCHAR}, 
-      #{idcard,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR}, #{school,jdbcType=VARCHAR}, 
-      #{subject,jdbcType=VARCHAR},#{level,jdbcType=VARCHAR}, #{theoryLevel,jdbcType=VARCHAR},#{theoryMoney,jdbcType=DECIMAL}, #{mobile,jdbcType=VARCHAR},
-      #{money,jdbcType=DECIMAL}, #{memo,jdbcType=VARCHAR}, #{createTime},
-      #{updateTime}, #{status,jdbcType=TINYINT})
-  </insert>
-  <update id="update" parameterType="com.ym.mec.biz.dal.entity.DegreeRegistration">
-    <!--@mbg.generated-->
-    update degree_registration
-    <set>
-      <if test="sporadicId != null">
-        sporadic_id_ = #{sporadicId,jdbcType=INTEGER},
-      </if>
-      <if test="name != null">
-        name_ = #{name,jdbcType=VARCHAR},
-      </if>
-      <if test="gender != null">
-        gender_ = #{gender,jdbcType=VARCHAR},
-      </if>
-      <if test="idcard != null">
-        idcard_ = #{idcard,jdbcType=VARCHAR},
-      </if>
-      <if test="city != null">
-        city_ = #{city,jdbcType=VARCHAR},
-      </if>
-      <if test="school != null">
-        school_ = #{school,jdbcType=VARCHAR},
-      </if>
-      <if test="subject != null">
-        subject_ = #{subject,jdbcType=VARCHAR},
-      </if>
-      <if test="level != null">
-        level_ = #{level,jdbcType=VARCHAR},
-      </if>
-      <if test="theoryLevel != null">
-        theory_level_ = #{theoryLevel,jdbcType=VARCHAR},
-      </if>
-      <if test="theoryLevel != null">
-        theory_money_ = #{theoryMoney,jdbcType=DECIMAL},
-      </if>
-      <if test="mobile != null">
-        mobile_ = #{mobile,jdbcType=VARCHAR},
-      </if>
-      <if test="money != null">
-        money_ = #{money,jdbcType=DECIMAL},
-      </if>
-      <if test="memo != null">
-        memo_ = #{memo,jdbcType=VARCHAR},
-      </if>
-      <if test="createTime != null">
-        create_time_ = #{createTime},
-      </if>
-      <if test="updateTime != null">
-        update_time_ = #{updateTime},
-      </if>
-      <if test="status != null">
-        status_ = #{status,jdbcType=INTEGER},
-      </if>
-    </set>
-    where id_ = #{id,jdbcType=INTEGER}
-  </update>
+    <!-- 查询当前表的总记录数 -->
+    <select id="queryCount" resultType="int">
+        SELECT COUNT(*)
+        FROM degree_registration
+        <include refid="queryPageSql"/>
+    </select>
 
-  <select id="findByMobileAndSporadicId" resultMap="DegreeRegistration">
-    SELECT * FROM degree_registration WHERE mobile_ = #{mobile} AND sporadic_id_ = #{sporadicId} FOR UPDATE
-  </select>
-  <select id="getLock" resultMap="DegreeRegistration">
-    SELECT * FROM degree_registration WHERE id_ = #{id} FOR UPDATE
-  </select>
+    <delete id="delete" parameterType="java.lang.Integer">
+        delete
+        from degree_registration
+        where id_ = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insert" keyColumn="id_" keyProperty="id" parameterType="com.ym.mec.biz.dal.entity.DegreeRegistration"
+            useGeneratedKeys="true">
+        <!--@mbg.generated-->
+        insert into degree_registration (sporadic_id_, name_, gender_,
+        idcard_, city_, school_,
+        subject_,level_, theory_level_,theory_money_, theory_cert_,mobile_,
+        money_, memo_, create_time_,
+        update_time_, status_)
+        values (#{sporadicId,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{gender,jdbcType=VARCHAR},
+        #{idcard,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR}, #{school,jdbcType=VARCHAR},
+        #{subject,jdbcType=VARCHAR},#{level,jdbcType=VARCHAR},
+        #{theoryLevel,jdbcType=VARCHAR},#{theoryMoney,jdbcType=DECIMAL},
+        #{theoryLevel,jdbcType=VARCHAR}#{mobile,jdbcType=VARCHAR},#{money,jdbcType=DECIMAL}, #{memo,jdbcType=VARCHAR},
+        #{createTime},
+        #{updateTime}, #{status,jdbcType=TINYINT})
+    </insert>
+    <update id="update" parameterType="com.ym.mec.biz.dal.entity.DegreeRegistration">
+        <!--@mbg.generated-->
+        update degree_registration
+        <set>
+            <if test="sporadicId != null">
+                sporadic_id_ = #{sporadicId,jdbcType=INTEGER},
+            </if>
+            <if test="name != null">
+                name_ = #{name,jdbcType=VARCHAR},
+            </if>
+            <if test="gender != null">
+                gender_ = #{gender,jdbcType=VARCHAR},
+            </if>
+            <if test="idcard != null">
+                idcard_ = #{idcard,jdbcType=VARCHAR},
+            </if>
+            <if test="city != null">
+                city_ = #{city,jdbcType=VARCHAR},
+            </if>
+            <if test="school != null">
+                school_ = #{school,jdbcType=VARCHAR},
+            </if>
+            <if test="subject != null">
+                subject_ = #{subject,jdbcType=VARCHAR},
+            </if>
+            <if test="level != null">
+                level_ = #{level,jdbcType=VARCHAR},
+            </if>
+            <if test="theoryLevel != null">
+                theory_level_ = #{theoryLevel,jdbcType=VARCHAR},
+            </if>
+            <if test="theoryLevel != null">
+                theory_money_ = #{theoryMoney,jdbcType=DECIMAL},
+            </if>
+            <if test="theoryLevel != null">
+                theory_cert_ = #{theoryCert,jdbcType=VARCHAR},
+            </if>
+            <if test="mobile != null">
+                mobile_ = #{mobile,jdbcType=VARCHAR},
+            </if>
+            <if test="money != null">
+                money_ = #{money,jdbcType=DECIMAL},
+            </if>
+            <if test="memo != null">
+                memo_ = #{memo,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                create_time_ = #{createTime},
+            </if>
+            <if test="updateTime != null">
+                update_time_ = #{updateTime},
+            </if>
+            <if test="status != null">
+                status_ = #{status,jdbcType=INTEGER},
+            </if>
+        </set>
+        where id_ = #{id,jdbcType=INTEGER}
+    </update>
+
+    <select id="findByMobileAndSporadicId" resultMap="DegreeRegistration">
+        SELECT *
+        FROM degree_registration
+        WHERE mobile_ = #{mobile}
+          AND sporadic_id_ = #{sporadicId} FOR
+        UPDATE
+    </select>
+    <select id="getLock" resultMap="DegreeRegistration">
+        SELECT *
+        FROM degree_registration
+        WHERE id_ = #{id} FOR
+        UPDATE
+    </select>
 </mapper>

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

@@ -612,4 +612,11 @@
         LEFT JOIN sporadic_charge_info sci ON spo.music_group_id_ = sci.id_
         <include refid="queryPaymentOrder"/>
     </select>
+    <select id="countGroupOrderWithoutFailed" resultType="int">
+        SELECT COUNT(*)
+        FROM student_payment_order spo
+        WHERE spo.music_group_id_ = #{groupId}
+        AND spo.status_ != 'FAILED'
+        AND spo.group_type_ = #{groupType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler }
+    </select>
 </mapper>

+ 1 - 1
mec-education/src/main/resources/bootstrap-dev.properties

@@ -3,7 +3,7 @@
 #\u670d\u52a1\u5668\u5730\u5740
 spring.cloud.nacos.config.server-addr=47.99.212.176:8848
 #\u9ed8\u8ba4\u4e3aPublic\u547d\u540d\u7a7a\u95f4,\u53ef\u4ee5\u7701\u7565\u4e0d\u5199
-spring.cloud.nacos.config.namespace=e246d169-227d-4012-8c34-e90e057d95d2
+spring.cloud.nacos.config.namespace=23b30a79-e16f-4583-a787-c7223a91252b
 #\u6307\u5b9a\u914d\u7f6e\u7fa4\u7ec4 --\u5982\u679c\u662fPublic\u547d\u540d\u7a7a\u95f4 \u5219\u53ef\u4ee5\u7701\u7565\u7fa4\u7ec4\u914d\u7f6e
 spring.cloud.nacos.config.group=DEFAULT_GROUP
 #\u6587\u4ef6\u540d -- \u5982\u679c\u6ca1\u6709\u914d\u7f6e\u5219\u9ed8\u8ba4\u4e3a ${spring.appliction.name}

+ 1 - 1
mec-eureka/src/main/resources/bootstrap-dev.properties

@@ -3,7 +3,7 @@
 #\u670d\u52a1\u5668\u5730\u5740
 spring.cloud.nacos.config.server-addr=47.99.212.176:8848
 #\u9ed8\u8ba4\u4e3aPublic\u547d\u540d\u7a7a\u95f4,\u53ef\u4ee5\u7701\u7565\u4e0d\u5199
-spring.cloud.nacos.config.namespace=40ebb2ed-23ac-4afb-b48f-8d727f332edc
+spring.cloud.nacos.config.namespace=23b30a79-e16f-4583-a787-c7223a91252b
 #\u6307\u5b9a\u914d\u7f6e\u7fa4\u7ec4 --\u5982\u679c\u662fPublic\u547d\u540d\u7a7a\u95f4 \u5219\u53ef\u4ee5\u7701\u7565\u7fa4\u7ec4\u914d\u7f6e
 spring.cloud.nacos.config.group=DEFAULT_GROUP
 #\u6587\u4ef6\u540d -- \u5982\u679c\u6ca1\u6709\u914d\u7f6e\u5219\u9ed8\u8ba4\u4e3a ${spring.appliction.name}

+ 1 - 1
mec-gateway/mec-gateway-web/src/main/resources/bootstrap-dev.properties

@@ -3,7 +3,7 @@
 #\u670d\u52a1\u5668\u5730\u5740
 spring.cloud.nacos.config.server-addr=47.99.212.176:8848
 #\u9ed8\u8ba4\u4e3aPublic\u547d\u540d\u7a7a\u95f4,\u53ef\u4ee5\u7701\u7565\u4e0d\u5199
-spring.cloud.nacos.config.namespace=e246d169-227d-4012-8c34-e90e057d95d2
+spring.cloud.nacos.config.namespace=23b30a79-e16f-4583-a787-c7223a91252b
 #\u6307\u5b9a\u914d\u7f6e\u7fa4\u7ec4 --\u5982\u679c\u662fPublic\u547d\u540d\u7a7a\u95f4 \u5219\u53ef\u4ee5\u7701\u7565\u7fa4\u7ec4\u914d\u7f6e
 spring.cloud.nacos.config.group=DEFAULT_GROUP
 #\u6587\u4ef6\u540d -- \u5982\u679c\u6ca1\u6709\u914d\u7f6e\u5219\u9ed8\u8ba4\u4e3a ${spring.appliction.name}

+ 1 - 1
mec-im/src/main/resources/bootstrap-dev.properties

@@ -3,7 +3,7 @@
 #\u670d\u52a1\u5668\u5730\u5740
 spring.cloud.nacos.config.server-addr=47.99.212.176:8848
 #\u9ed8\u8ba4\u4e3aPublic\u547d\u540d\u7a7a\u95f4,\u53ef\u4ee5\u7701\u7565\u4e0d\u5199
-spring.cloud.nacos.config.namespace=e246d169-227d-4012-8c34-e90e057d95d2
+spring.cloud.nacos.config.namespace=23b30a79-e16f-4583-a787-c7223a91252b
 #\u6307\u5b9a\u914d\u7f6e\u7fa4\u7ec4 --\u5982\u679c\u662fPublic\u547d\u540d\u7a7a\u95f4 \u5219\u53ef\u4ee5\u7701\u7565\u7fa4\u7ec4\u914d\u7f6e
 spring.cloud.nacos.config.group=DEFAULT_GROUP
 #\u6587\u4ef6\u540d -- \u5982\u679c\u6ca1\u6709\u914d\u7f6e\u5219\u9ed8\u8ba4\u4e3a ${spring.appliction.name}

+ 1 - 1
mec-monitor/src/main/resources/bootstrap-dev.properties

@@ -3,7 +3,7 @@
 #\u670d\u52a1\u5668\u5730\u5740
 spring.cloud.nacos.config.server-addr=localhost:8848
 #\u9ed8\u8ba4\u4e3aPublic\u547d\u540d\u7a7a\u95f4,\u53ef\u4ee5\u7701\u7565\u4e0d\u5199
-spring.cloud.nacos.config.namespace=40ebb2ed-23ac-4afb-b48f-8d727f332edc
+spring.cloud.nacos.config.namespace=23b30a79-e16f-4583-a787-c7223a91252b
 #\u6307\u5b9a\u914d\u7f6e\u7fa4\u7ec4 --\u5982\u679c\u662fPublic\u547d\u540d\u7a7a\u95f4 \u5219\u53ef\u4ee5\u7701\u7565\u7fa4\u7ec4\u914d\u7f6e
 spring.cloud.nacos.config.group=DEFAULT_GROUP
 #\u6587\u4ef6\u540d -- \u5982\u679c\u6ca1\u6709\u914d\u7f6e\u5219\u9ed8\u8ba4\u4e3a ${spring.appliction.name}

+ 1 - 1
mec-student/src/main/resources/bootstrap-dev.properties

@@ -3,7 +3,7 @@
 #\u670d\u52a1\u5668\u5730\u5740
 spring.cloud.nacos.config.server-addr=47.99.212.176:8848
 #\u9ed8\u8ba4\u4e3aPublic\u547d\u540d\u7a7a\u95f4,\u53ef\u4ee5\u7701\u7565\u4e0d\u5199
-spring.cloud.nacos.config.namespace=e246d169-227d-4012-8c34-e90e057d95d2
+spring.cloud.nacos.config.namespace=23b30a79-e16f-4583-a787-c7223a91252b
 #\u6307\u5b9a\u914d\u7f6e\u7fa4\u7ec4 --\u5982\u679c\u662fPublic\u547d\u540d\u7a7a\u95f4 \u5219\u53ef\u4ee5\u7701\u7565\u7fa4\u7ec4\u914d\u7f6e
 spring.cloud.nacos.config.group=DEFAULT_GROUP
 #\u6587\u4ef6\u540d -- \u5982\u679c\u6ca1\u6709\u914d\u7f6e\u5219\u9ed8\u8ba4\u4e3a ${spring.appliction.name}

+ 1 - 1
mec-task/src/main/resources/bootstrap-dev.properties

@@ -3,7 +3,7 @@
 #\u670d\u52a1\u5668\u5730\u5740
 spring.cloud.nacos.config.server-addr=47.99.212.176:8848
 #\u9ed8\u8ba4\u4e3aPublic\u547d\u540d\u7a7a\u95f4,\u53ef\u4ee5\u7701\u7565\u4e0d\u5199
-spring.cloud.nacos.config.namespace=e246d169-227d-4012-8c34-e90e057d95d2
+spring.cloud.nacos.config.namespace=23b30a79-e16f-4583-a787-c7223a91252b
 #\u6307\u5b9a\u914d\u7f6e\u7fa4\u7ec4 --\u5982\u679c\u662fPublic\u547d\u540d\u7a7a\u95f4 \u5219\u53ef\u4ee5\u7701\u7565\u7fa4\u7ec4\u914d\u7f6e
 spring.cloud.nacos.config.group=DEFAULT_GROUP
 #\u6587\u4ef6\u540d -- \u5982\u679c\u6ca1\u6709\u914d\u7f6e\u5219\u9ed8\u8ba4\u4e3a ${spring.appliction.name}

+ 1 - 1
mec-teacher/src/main/resources/bootstrap-dev.properties

@@ -3,7 +3,7 @@
 #\u670d\u52a1\u5668\u5730\u5740
 spring.cloud.nacos.config.server-addr=47.99.212.176:8848
 #\u9ed8\u8ba4\u4e3aPublic\u547d\u540d\u7a7a\u95f4,\u53ef\u4ee5\u7701\u7565\u4e0d\u5199
-spring.cloud.nacos.config.namespace=e246d169-227d-4012-8c34-e90e057d95d2
+spring.cloud.nacos.config.namespace=23b30a79-e16f-4583-a787-c7223a91252b
 #\u6307\u5b9a\u914d\u7f6e\u7fa4\u7ec4 --\u5982\u679c\u662fPublic\u547d\u540d\u7a7a\u95f4 \u5219\u53ef\u4ee5\u7701\u7565\u7fa4\u7ec4\u914d\u7f6e
 spring.cloud.nacos.config.group=DEFAULT_GROUP
 #\u6587\u4ef6\u540d -- \u5982\u679c\u6ca1\u6709\u914d\u7f6e\u5219\u9ed8\u8ba4\u4e3a ${spring.appliction.name}

+ 60 - 0
mec-web/src/main/java/com/ym/mec/web/controller/education/DegreeController.java

@@ -0,0 +1,60 @@
+package com.ym.mec.web.controller.education;
+
+
+import com.ym.mec.biz.dal.dao.DegreeRegistrationDao;
+import com.ym.mec.biz.dal.dao.SporadicChargeInfoDao;
+import com.ym.mec.biz.dal.entity.DegreeRegistration;
+import com.ym.mec.biz.dal.entity.SporadicChargeInfo;
+import com.ym.mec.biz.dal.enums.DealStatusEnum;
+import com.ym.mec.biz.dal.enums.SporadicChargeTypeEnum;
+import com.ym.mec.biz.dal.page.DegreeQueryInfo;
+import com.ym.mec.biz.dal.page.SporadicChargeInfoQueryInfo;
+import com.ym.mec.biz.service.DegreeRegistrationService;
+import com.ym.mec.biz.service.SporadicChargeInfoService;
+import com.ym.mec.biz.service.StudentPaymentOrderService;
+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.util.idcard.IdcardValidator;
+import com.ym.mec.util.validator.CommonValidator;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Map;
+
+@RequestMapping("degree")
+@Api(tags = "级报名服务")
+@RestController
+public class DegreeController extends BaseController {
+
+    @Autowired
+    private StudentPaymentOrderService studentPaymentOrderService;
+
+    @Autowired
+    private DegreeRegistrationDao degreeRegistrationDao;
+
+    @Autowired
+    private DegreeRegistrationService degreeRegistrationService;
+
+    @Autowired
+    private SporadicChargeInfoDao sporadicChargeInfoDao;
+
+    @Autowired
+    private SporadicChargeInfoService sporadicChargeInfoService;
+
+
+    @ApiOperation(value = "查询收费列表")
+    @GetMapping("/queryPage")
+    public HttpResponseResult queryPage(DegreeQueryInfo queryInfo) {
+        queryInfo.setStatus(2);
+        return succeed(degreeRegistrationService.queryPage(queryInfo));
+    }
+
+}

+ 2 - 2
mec-web/src/main/resources/application.yml

@@ -34,8 +34,8 @@ spring:
     #    username: dayaData
     #    password: dayaDataOnline2019
     url: jdbc:mysql://47.99.212.176:3306/mec_dev?useUnicode=true&characterEncoding=UTF8&serverTimezone=Asia/Shanghai&allowMultiQueries=true
-    username: mec_dev
-    password: mec_dev
+    username: dayaData
+    password: dayaDataOnline@2019
     # 使用druid数据源
     type: com.alibaba.druid.pool.DruidDataSource
     driver-class-name: com.mysql.cj.jdbc.Driver

+ 1 - 1
mec-web/src/main/resources/bootstrap-dev.properties

@@ -3,7 +3,7 @@
 #\u670d\u52a1\u5668\u5730\u5740
 spring.cloud.nacos.config.server-addr=47.99.212.176:8848
 #\u9ed8\u8ba4\u4e3aPublic\u547d\u540d\u7a7a\u95f4,\u53ef\u4ee5\u7701\u7565\u4e0d\u5199
-spring.cloud.nacos.config.namespace=e246d169-227d-4012-8c34-e90e057d95d2
+spring.cloud.nacos.config.namespace=23b30a79-e16f-4583-a787-c7223a91252b
 #\u6307\u5b9a\u914d\u7f6e\u7fa4\u7ec4 --\u5982\u679c\u662fPublic\u547d\u540d\u7a7a\u95f4 \u5219\u53ef\u4ee5\u7701\u7565\u7fa4\u7ec4\u914d\u7f6e
 spring.cloud.nacos.config.group=DEFAULT_GROUP
 #\u6587\u4ef6\u540d -- \u5982\u679c\u6ca1\u6709\u914d\u7f6e\u5219\u9ed8\u8ba4\u4e3a ${spring.appliction.name}

+ 1 - 1
mec-zipkin/src/main/resources/bootstrap-dev.properties

@@ -3,7 +3,7 @@
 #\u670d\u52a1\u5668\u5730\u5740
 spring.cloud.nacos.config.server-addr=localhost:8848
 #\u9ed8\u8ba4\u4e3aPublic\u547d\u540d\u7a7a\u95f4,\u53ef\u4ee5\u7701\u7565\u4e0d\u5199
-spring.cloud.nacos.config.namespace=e246d169-227d-4012-8c34-e90e057d95d2
+spring.cloud.nacos.config.namespace=23b30a79-e16f-4583-a787-c7223a91252b
 #\u6307\u5b9a\u914d\u7f6e\u7fa4\u7ec4 --\u5982\u679c\u662fPublic\u547d\u540d\u7a7a\u95f4 \u5219\u53ef\u4ee5\u7701\u7565\u7fa4\u7ec4\u914d\u7f6e
 spring.cloud.nacos.config.group=DEFAULT_GROUP
 #\u6587\u4ef6\u540d -- \u5982\u679c\u6ca1\u6709\u914d\u7f6e\u5219\u9ed8\u8ba4\u4e3a ${spring.appliction.name}