Преглед на файлове

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

zouxuan преди 5 години
родител
ревизия
ec74f6ff08

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

@@ -11,6 +11,12 @@ public class SysPaymentConfig {
     private Integer id;
 
     /**
+     * type
+     */
+    @ApiModelProperty(value = "type(1-比例 2-类型)")
+    private Integer type;
+
+    /**
      * 分部id
      */
     @ApiModelProperty(value = "分部id")
@@ -159,5 +165,13 @@ public class SysPaymentConfig {
     public void setUpdateTime(Date updateTime) {
         this.updateTime = updateTime;
     }
+
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
 }
 

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

@@ -55,10 +55,8 @@ public class PayServiceImpl implements PayService {
         String company = "daya";
         if (userId != null) {
             MusicGroup musicGroup = musicGroupDao.findUserMusicGroup(userId);
-            if(musicGroup != null){
-                if (musicGroup.getOwnershipType().equals(CooperationOrgan.OwnershipType.COOPERATION)) {
-                    company = "yadie";
-                }
+            if (musicGroup != null && musicGroup.getOwnershipType().equals(CooperationOrgan.OwnershipType.COOPERATION)) {
+                company = "yadie";
             }
         }
 
@@ -66,7 +64,7 @@ public class PayServiceImpl implements PayService {
         Map unionPay = new HashMap();
         SysAccount routingAccount = getRoutingAccount(company, amount);
         PaymentChannelTypeEnum paymentChannelType = PaymentChannelTypeEnum.COM;
-        if(routingAccount.getType().equals("PER")){
+        if (routingAccount.getType().equals("PER")) {
             paymentChannelType = PaymentChannelTypeEnum.PER;
         }
         Map payMap = null;

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

@@ -5,6 +5,7 @@
         <!--@Table sys_payment_config-->
         <id column="id_" jdbcType="INTEGER" property="id"/>
         <result column="organ_id_" jdbcType="INTEGER" property="organId"/>
+        <result column="type_" jdbcType="INTEGER" property="type"/>
         <result column="organ_name" jdbcType="VARCHAR" property="organName"/>
         <result column="per_scale_" jdbcType="INTEGER" property="perScale"/>
         <result column="com_scale_" jdbcType="INTEGER" property="comScale"/>
@@ -17,7 +18,7 @@
     </resultMap>
     <sql id="Base_Column_List">
         <!--@mbg.generated-->
-        id_, organ_id_, per_scale_, com_scale_, course_fee_, instrument_fee_, accessories_fee_,
+        id_, organ_id_,type_, 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">
@@ -36,6 +37,9 @@
         <!--@mbg.generated-->
         insert into sys_payment_config
         <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="type != null">
+                type_,
+            </if>
             <if test="organId != null">
                 organ_id_,
             </if>
@@ -65,6 +69,9 @@
             </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="type != null">
+                #{type,jdbcType=INTEGER},
+            </if>
             <if test="organId != null">
                 #{organId,jdbcType=INTEGER},
             </if>
@@ -98,6 +105,9 @@
         <!--@mbg.generated-->
         update sys_payment_config
         <set>
+            <if test="type != null">
+                type_ = #{organId,jdbcType=INTEGER},
+            </if>
             <if test="organId != null">
                 organ_id_ = #{organId,jdbcType=INTEGER},
             </if>