‘linchangsheng’ 11 miesięcy temu
rodzic
commit
3e5b5682cf

+ 9 - 1
mall-server-api/src/main/java/com/gree/mall/manager/logic/common/WechatLogic.java

@@ -17,6 +17,7 @@ import com.github.binarywang.wxpay.exception.WxPayException;
 import com.github.binarywang.wxpay.service.ProfitSharingService;
 import com.github.binarywang.wxpay.service.WxPayService;
 import com.gree.mall.manager.bean.PayDetail;
+import com.gree.mall.manager.bean.admin.AdminUserCom;
 import com.gree.mall.manager.bean.common.WechatOpenBean;
 import com.gree.mall.manager.bean.common.WxJsApiSignBean;
 import com.gree.mall.manager.config.wx.WxConfiguration;
@@ -95,6 +96,9 @@ public class WechatLogic {
     @Autowired
     AdminCompanyWechatPayConfigService adminCompanyWechatPayConfigService;
 
+    @Autowired
+    CommonLogic commonLogic;
+
     /**
      * 微信支付服务
      * @param companyWechatId
@@ -596,6 +600,8 @@ public class WechatLogic {
      * @throws WxPayException
      */
     public void shareSettlementAmount(SettlementOrder settlementOrder) throws WxPayException {
+
+        AdminUserCom adminUser = commonLogic.getAdminUser();
         if(settlementOrder == null){
             return;
         }
@@ -616,6 +622,8 @@ public class WechatLogic {
                     settlementOrder.getCompanyWechatId(), "B",settlementOrder.getConfigId());
 
             settlementOrder.setStatus(SettlementStatusNewEnum.OK.toString());
+            settlementOrder.setSettlementTime(new Date());
+            settlementOrder.setSettlementName(adminUser.getNickName());
             settlementOrder.updateById();
 
         } catch (WxPayException e) {
@@ -623,7 +631,7 @@ public class WechatLogic {
 
             settlementOrder.setStatus(SettlementStatusNewEnum.YC.toString());
             settlementOrder.setYcRemark(e.getMessage());
-           // settlementOrder.updateById();
+            settlementOrder.updateById();
         }
     }