فهرست منبع

1.益寿缘商城订单支付明细新增APPID 2.益寿缘商城订单多汇付退款

wjj 4 هفته پیش
والد
کامیت
b81515ef20

+ 2 - 0
fs-service/src/main/java/com/fs/hisStore/domain/FsStorePaymentScrm.java

@@ -101,5 +101,7 @@ public class FsStorePaymentScrm extends BaseEntity
     private BigDecimal shareMoney;
     private Integer isShare;
 
+    //小程序appId(用于多汇付支付/退款)
+    private String appId;
 
 }

+ 13 - 6
fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreOrderScrmServiceImpl.java

@@ -2106,14 +2106,21 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
                         }
                     } else if (payment.getPayMode() != null && payment.getPayMode().equals("hf")) {
                         String huifuId="";
-                        if ("益善缘".equals(cloudHostProper.getCompanyName())) {
-                            FsHfpayConfigMapper fsHfpayConfigMapper = SpringUtils.getBean(FsHfpayConfigMapper.class);
-                            FsHfpayConfig fsPayConfig2 = fsHfpayConfigMapper.selectByAppId("wx0d1a3dd485268521");
-                            huifuId = fsPayConfig2.getHuifuId();
-                        }else {
-                            huifuId=fsPayConfig.getHuifuId();
+                        FsHfpayConfigMapper fsHfpayConfigMapper = SpringUtils.getBean(FsHfpayConfigMapper.class);
+                        if (payment.getAppId() != null) {
+                            FsHfpayConfig fsHfpayConfig = fsHfpayConfigMapper.selectByAppId(payment.getAppId());
+                            huifuId = fsHfpayConfig.getHuifuId();
+                        } else {
+                            if (("益善缘".equals(cloudHostProper.getCompanyName()))) {
+
+                                FsHfpayConfig fsPayConfig2 = fsHfpayConfigMapper.selectByAppId("wx0d1a3dd485268521");
+                                huifuId = fsPayConfig2.getHuifuId();
+                            }else {
+                                huifuId=fsPayConfig.getHuifuId();
+                            }
                         }
 
+
                         V2TradePaymentScanpayRefundRequest request = new V2TradePaymentScanpayRefundRequest();
                         request.setOrgHfSeqId(payment.getTradeNo());
                         request.setHuifuId(huifuId);

+ 3 - 0
fs-service/src/main/resources/mapper/hisStore/FsStorePaymentScrmMapper.xml

@@ -88,6 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="orderId != null">order_id,</if>
             <if test="isPayRemain != null">is_pay_remain,</if>
             <if test="payMode != null">pay_mode,</if>
+            <if test="appId != null">app_id,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="payCode != null">#{payCode},</if>
@@ -112,6 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="orderId != null">#{orderId},</if>
             <if test="isPayRemain != null">#{isPayRemain},</if>
             <if test="payMode != null">#{payMode},</if>
+            <if test="appId != null">#{appId},</if>
         </trim>
     </insert>
 
@@ -140,6 +142,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="orderId != null">order_id = #{orderId},</if>
             <if test="isPayRemain != null">is_pay_remain = #{isPayRemain},</if>
             <if test="payMode != null">pay_mode = #{payMode},</if>
+            <if test="appId != null">app_id = #{appId},</if>
         </trim>
         where payment_id = #{paymentId}
     </update>

+ 2 - 3
fs-user-app/src/main/java/com/fs/app/controller/store/StoreOrderScrmController.java

@@ -360,14 +360,13 @@ public class StoreOrderScrmController extends AppBaseController {
                     o.setReqSeqId("store-"+storePayment.getPayCode());
                     o.setTransAmt(storePayment.getPayMoney().toString());
                     o.setGoodsDesc("商城订单支付");
-                    if (param != null && StringUtils.isNotBlank(param.getAppId())) {
-                        o.setAppId(param.getAppId());
-                    }
+                    o.setAppId(param.getAppId());
                     HuifuCreateOrderResult result = huiFuService.createOrder(o);
                     if(result.getResp_code()!=null&&(result.getResp_code().equals("00000000")||result.getResp_code().equals("00000100"))){
                         FsStorePaymentScrm mt=new FsStorePaymentScrm();
                         mt.setPaymentId(storePayment.getPaymentId());
                         mt.setTradeNo(result.getHf_seq_id());
+                        mt.setAppId(param.getAppId());
                         fsStorePaymentMapper.updateFsStorePayment(mt);
                         redisCache.setCacheObject("isPaying:"+order.getId(),order.getId().toString(),1, TimeUnit.MINUTES);
                         Map<String, Object> resultMap = JSON.parseObject(result.getPay_info(), new TypeReference<Map<String, Object>>() {});