소스 검색

(主账号)转变成企业用户后之前的订单统计的角标还是会统计。
(子账号)绑定企业用户后,之前自己订单会带入企业订单当中,包括待评价的订单

liangpeile 1 년 전
부모
커밋
e0262eab3d

+ 1 - 0
crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/NewPlatformApi.java

@@ -267,6 +267,7 @@ public class NewPlatformApi {
             orderLambdaQueryWrapper.eq(Order::getIsDel, 0);
             orderLambdaQueryWrapper.and(i -> i.eq(Order::getIsRemit, 2).or().isNull(Order::getIsRemit));
             orderLambdaQueryWrapper.eq(Order::getUid,byId.getUserId());
+            orderLambdaQueryWrapper.eq(Order::getIsLineOfCredit,1);
             List<Order> list = orderService.list(orderLambdaQueryWrapper);
             if (null != list && list.size() > 0) {
                 return CommonResult.failed("删除子账号失败,存在未收款订单无法进行解除");

+ 5 - 0
crmeb-front/src/main/java/com/zbkj/front/service/impl/FrontOrderServiceImpl.java

@@ -120,6 +120,8 @@ public class FrontOrderServiceImpl implements FrontOrderService {
     private UserBypassAccountService userBypassAccountService;
     @Autowired
     private AsyncService asyncService;
+    @Autowired
+    private FrontOrderService frontOrderService;
 
     /**
      * 订单预下单
@@ -1726,6 +1728,9 @@ public class FrontOrderServiceImpl implements FrontOrderService {
     public OrderCenterNumResponse userCenterNum() {
         Integer userId = userService.getUserIdException();
         OrderCenterNumResponse response = new OrderCenterNumResponse();
+
+//        frontOrderService.list2(0, status, new PageParamRequest(), ids, Integer.valueOf(id), department, name)
+
         response.setAwaitPayCount(orderService.getCountByStatusAndUid(OrderConstants.ORDER_STATUS_WAIT_PAY, userId));
         response.setAwaitShippedCount(orderService.getCountByStatusAndUid(OrderConstants.ORDER_STATUS_WAIT_SHIPPING, userId));
         response.setReceiptCount(orderService.getCountByStatusAndUid(OrderConstants.ORDER_STATUS_WAIT_RECEIPT, userId));