‘linchangsheng’ 2 weeks ago
parent
commit
66e103ecef

+ 6 - 1
mall-server-api/src/main/java/com/gree/mall/manager/logic/websit/SettlementOrderLogic.java

@@ -212,7 +212,7 @@ public class SettlementOrderLogic {
     public void settlement(List<String> id) throws WxPayException {
         if (settlementOrderService.lambdaQuery()
                 .in(SettlementOrder::getSettlementOrderId, id)
-                .notIn(SettlementOrder::getStatus, SettlementStatusEnum.WAIT.getKey())
+                .notIn(SettlementOrder::getStatus, SettlementStatusEnum.WAIT.getKey(),"YC")
                 .count() > 0) {
             throw new RemoteServiceException("存在非待结算得结算");
         }
@@ -222,6 +222,11 @@ public class SettlementOrderLogic {
 
         for (SettlementOrder settlementOrder : settlementOrders) {
             wechatLogic.shareSettlementAmount(settlementOrder);
+
+            settlementOrderService.lambdaUpdate()
+                    .set(SettlementOrder::getIsQuery,null)
+                    .eq(SettlementOrder::getSettlementOrderId,settlementOrder.getSettlementOrderId())
+                    .update();
         }