plf 4 роки тому
батько
коміт
091453a91d

+ 8 - 1
base-module/src/main/java/com/caimei/module/base/entity/po/CmOrderPayLink.java

@@ -3,11 +3,13 @@ package com.caimei.module.base.entity.po;
 import java.io.Serializable;
 import java.math.BigDecimal;
 import java.util.Date;
+
 import lombok.Data;
 
 /**
  * cm_order_pay_link
- * @author 
+ *
+ * @author
  */
 @Data
 public class CmOrderPayLink implements Serializable {
@@ -43,6 +45,11 @@ public class CmOrderPayLink implements Serializable {
      */
     private String payStatus;
 
+    /**
+     * 支付类型,1企业网银,2个人网银
+     */
+    private String payType;
+
     /**
      * 删除标记 0 否,其余是
      */

+ 8 - 0
pay/src/main/java/com/caimei/module/pay/service/PayService.java

@@ -54,6 +54,14 @@ public interface PayService {
      */
     void jumpPage(String linkLogo, String linkPage, HttpServletResponse response) throws IOException;
 
+    /**
+     * 链接数据
+     *
+     * @param linkLogo
+     * @return
+     */
+    JsonModel linkData(String linkLogo);
+
     /**
      * 判断此次支付是否完成
      *

+ 10 - 2
pay/src/main/java/com/caimei/module/pay/service/impl/PayServiceImpl.java

@@ -649,11 +649,19 @@ public class PayServiceImpl implements PayService {
             }
             SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
             String time = dateFormat.format(orderPayLink.getEffectiveTime());
-            response.sendRedirect(linkPage + "?code=" + code + "&orderId=" + orderPayLink.getOrderId()
-                    + "&unpaidAmount=" + orderPayLink.getUnpaidAmount() + "&time=" + time);
+            response.sendRedirect(linkPage + "?code=" + code + "&linkLogo=" + linkLogo);
         }
     }
 
+    @Override
+    public JsonModel linkData(String linkLogo) {
+        OrderPayLinkVo orderPayLink = payDao.getOrderPayLink(linkLogo);
+        if (orderPayLink == null) {
+            return JsonModel.newInstance().error("请不要随意修改链接");
+        }
+        return JsonModel.newInstance().success(orderPayLink);
+    }
+
     @Override
     public JsonModel payWhetherSuccess(Integer orderId, Integer paySuccessCounter) {
         OrderVo order = payDao.findOrder(orderId);

+ 9 - 0
pay/src/main/resources/com-caimei-module-pay/PayMapper.xml

@@ -286,6 +286,9 @@
             <if test="payStatus != null">
                 payStatus,
             </if>
+            <if test="payType != null">
+                payType,
+            </if>
             <if test="delFlag != null">
                 delFlag,
             </if>
@@ -309,6 +312,9 @@
             <if test="payStatus != null">
                 #{payStatus,jdbcType=CHAR},
             </if>
+            <if test="payType != null">
+                #{payType},
+            </if>
             <if test="delFlag != null">
                 #{delFlag,jdbcType=CHAR},
             </if>
@@ -336,6 +342,9 @@
             <if test="payStatus != null">
                 payStatus = #{payStatus,jdbcType=CHAR},
             </if>
+            <if test="payType != null">
+                payType = #{payType},
+            </if>
             <if test="delFlag != null">
                 delFlag = #{delFlag,jdbcType=CHAR},
             </if>