Browse Source

fix:支付分学生端和老师端,不同app 需要配置不同参数

liujunchi 3 years ago
parent
commit
0af96d31e2

+ 11 - 0
cooleshow-mall/mall-mbg/src/main/java/com/yonge/cooleshow/mbg/model/UserOrderPayment.java

@@ -26,6 +26,9 @@ public class UserOrderPayment implements Serializable {
     @ApiModelProperty("交易流水号 ")
     private String transNo;
 
+    @ApiModelProperty("付款应用 STUDENT 学生端 TEACHER 老师端 (对应微信,支付宝平台的应用)")
+    private String paymentClient;
+
     @ApiModelProperty("服务提供方: ORIGINAL 微信支付宝 ADAPAY 汇付")
     private String openType;
 
@@ -67,6 +70,14 @@ public class UserOrderPayment implements Serializable {
     private Date updateTime;
 
 
+    public String getPaymentClient() {
+        return paymentClient;
+    }
+
+    public void setPaymentClient(String paymentClient) {
+        this.paymentClient = paymentClient;
+    }
+
     public String getOpenType() {
         return openType;
     }

+ 16 - 5
cooleshow-mall/mall-mbg/src/main/resources/config/mybatis/UserOrderPaymentMapper.xml

@@ -6,6 +6,7 @@
         <!--@Table user_order_payment-->
         <id column="id_" jdbcType="BIGINT" property="id" />
         <result column="order_no_" jdbcType="VARCHAR" property="orderNo" />
+        <result column="payment_client_" jdbcType="VARCHAR" property="paymentClient" />
         <result column="trans_no_" jdbcType="VARCHAR" property="transNo" />
         <result column="open_type_" jdbcType="VARCHAR" property="openType" />
         <result column="pay_channel_" jdbcType="VARCHAR" property="payChannel" />
@@ -25,7 +26,7 @@
     <sql id="Base_Column_List">
         <!--@mbg.generated-->
         id_, order_no_, trans_no_, pay_channel_, pay_amt_, fee_amt_, pay_info_, status_,
-        pay_fail_msg_, arrival_time_,close_status_,close_fail_msg_,close_time_,create_time_, update_time_,adapay_no_,open_type_
+        pay_fail_msg_, arrival_time_,close_status_,close_fail_msg_,close_time_,create_time_, update_time_,adapay_no_,open_type_,payment_client_
     </sql>
     <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
         <!--@mbg.generated-->
@@ -44,12 +45,12 @@
         insert into user_order_payment (order_no_, trans_no_, pay_channel_,
         pay_amt_, fee_amt_, pay_info_,
         status_, pay_fail_msg_, arrival_time_,
-        create_time_, update_time_,close_status_,close_fail_msg_,close_time_,adapay_no_,open_type_)
+        create_time_, update_time_,close_status_,close_fail_msg_,close_time_,adapay_no_,open_type_,payment_client_)
         values (#{orderNo,jdbcType=VARCHAR}, #{transNo,jdbcType=VARCHAR}, #{payChannel,jdbcType=VARCHAR},
         #{payAmt,jdbcType=DECIMAL}, #{feeAmt,jdbcType=DECIMAL}, #{payInfo,jdbcType=VARCHAR},
         #{status,jdbcType=VARCHAR}, #{payFailMsg,jdbcType=VARCHAR}, #{arrivalTime,jdbcType=TIMESTAMP},
         #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},#{closeStatus},#{closeFailMsg}
-        ,#{closeTime},#{adapayNo},#{openType})
+        ,#{closeTime},#{adapayNo},#{openType},#{paymentClient})
     </insert>
     <insert id="insertSelective" keyColumn="id_" keyProperty="id" parameterType="com.yonge.cooleshow.mbg.model.UserOrderPayment" useGeneratedKeys="true">
         <!--@mbg.generated-->
@@ -103,6 +104,9 @@
             <if test="openType != null">
                 open_type_,
             </if>
+            <if test="paymentClient != null">
+                payment_client_,
+            </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="orderNo != null">
@@ -153,6 +157,9 @@
             <if test="openType != null">
                 #{openType},
             </if>
+            <if test="paymentClient != null">
+                #{paymentClient},
+            </if>
         </trim>
     </insert>
     <update id="updateByPrimaryKeySelective" parameterType="com.yonge.cooleshow.mbg.model.UserOrderPayment">
@@ -205,7 +212,10 @@
                 adapay_no_ = #{adapayNo,jdbcType=TIMESTAMP},
             </if>
             <if test="openType != null">
-                open_type_ = #{openType,jdbcType=TIMESTAMP},
+                open_type_ = #{openType},
+            </if>
+            <if test="paymentClient != null">
+                payment_client_ = #{paymentClient},
             </if>
         </set>
         where id_ = #{id,jdbcType=BIGINT}
@@ -228,7 +238,8 @@
         close_fail_msg_ = #{closeFailMsg},
         close_time_ = #{closeTime,jdbcType=TIMESTAMP},
         adapay_no_ = #{adapayNo,jdbcType=TIMESTAMP},
-        open_type_ = #{openType,jdbcType=TIMESTAMP}
+        open_type_ = #{openType},
+         payment_client_= #{paymentClient}
         where id_ = #{id,jdbcType=BIGINT}
     </update>
 

+ 13 - 2
cooleshow-mall/mall-portal/src/main/java/com/yonge/cooleshow/portal/dto/OrderPayReq.java

@@ -21,13 +21,16 @@ public class OrderPayReq {
     @NotNull(message = "支付渠道不能为空")
     @ApiModelProperty(value = "支付渠道:  alipay 支付宝扫码 ali_app 支付宝APP  wx_app 微信APP wx_lite 微信小程序支付", required = true)
     private PayChannelEnum payChannel;
-    @ApiModelProperty(value = "微信用户openId(微信支付必传)",hidden = true)
+    @ApiModelProperty(value = "微信用户openId(微信支付必传)")
     private String openId;
-    @ApiModelProperty(value = "买家的支付宝用户 id(支付宝小程序支付必传)",hidden = true)
+    @ApiModelProperty(value = "买家的支付宝用户 id(支付宝小程序支付必传)")
     private String buyerId;
     @ApiModelProperty(value = "用户说明 ")
     private String reason;
 
+    @ApiModelProperty(value = "付款应用 STUDENT 学生端 TEACHER 老师端 (对应微信,支付宝平台的应用)",required = true)
+    private String paymentClient;
+
     private Long userId;
     private String ipAddress;
 
@@ -86,4 +89,12 @@ public class OrderPayReq {
     public void setBuyerId(String buyerId) {
         this.buyerId = buyerId;
     }
+
+    public String getPaymentClient() {
+        return paymentClient;
+    }
+
+    public void setPaymentClient(String paymentClient) {
+        this.paymentClient = paymentClient;
+    }
 }