Browse Source

添加adapay

周箭河 5 years ago
parent
commit
d60eadfb38

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

+ 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("一级")){

+ 7 - 3
mec-biz/src/main/resources/config/mybatis/DegreeRegistrationMapper.xml

@@ -15,6 +15,7 @@
     <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" />
@@ -52,13 +53,13 @@
     <!--@mbg.generated-->
     insert into degree_registration (sporadic_id_, name_, gender_, 
       idcard_, city_, school_, 
-      subject_,level_, theory_level_,theory_money_, mobile_,
+      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}, #{mobile,jdbcType=VARCHAR},
-      #{money,jdbcType=DECIMAL}, #{memo,jdbcType=VARCHAR}, #{createTime},
+      #{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">
@@ -95,6 +96,9 @@
       <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>