Explorar o código

创建门店运力不存在修复

wangtao %!s(int64=3) %!d(string=hai) anos
pai
achega
46bc2d2b2d

+ 3 - 0
lb-app/src/main/java/com/ydd/app/service/impl/ApiDeliveryBindServiceImpl.java

@@ -82,6 +82,9 @@ public class ApiDeliveryBindServiceImpl implements ApiDeliveryBindService {
             delivery.setType(bindDto.getDeliveryType());
             DspDelivery dspDelivery = iDspDeliveryService.getById(bindDto.getDeliveryId());
             QueryAmount queryAmount = QueryAmountEntityUtils.queryAmount(delivery, member.getMerchantId(),1);
+            if(StringUtils.isBlank(queryAmount.getLbClient())){
+                continue;
+            }
             ResObject<AmountResultVo> amountRes = client.queryAmount(queryAmount);
             if (amountRes.getCode() == 0) {
                 // 更新余额

+ 9 - 1
lb-app/src/main/java/com/ydd/app/service/impl/ApiShopServiceImpl.java

@@ -193,7 +193,9 @@ public class ApiShopServiceImpl implements ApiShopService {
 
             ShopVo shopVo = ShopEntityUtils.createShopVo(shop, d, merchant);
             log.info("门店信息:" + JsonMapper.nonEmptyMapper().toJson(shopVo));
-
+            if(StringUtils.isBlank(shopVo.getLbClient())){
+                continue;
+            }
             ResObject<ShopResultVo> res = deliveryClient.createShop(shopVo);
             ShopDelivery delivery = new ShopDelivery();
             delivery.setDeliveryId(d.getId());
@@ -404,6 +406,9 @@ public class ApiShopServiceImpl implements ApiShopService {
                         "kuanfu".equals(shopVo.getLbClient()) || "huolala".equals(shopVo.getLbClient()) || "meituanzb".equals(shopVo.getLbClient())) {
                     delivery.setBindStatus(BindStatusEnum.BIND.getStatus());
                 }
+                if(StringUtils.isBlank(shopVo.getLbClient())){
+                    continue;
+                }
                 ResObject<ShopResultVo> res = deliveryClient.updateShop(shopVo);
                 if (res.getCode() == 0) {//操作成功
                     ShopResultVo shopResultVo = res.getData();
@@ -431,6 +436,9 @@ public class ApiShopServiceImpl implements ApiShopService {
                 Shop shop1 = new Shop();
                 BeanUtils.copyProperties(shopReq, shop1);
                 ShopVo shopVo = ShopEntityUtils.createShopVo(shop1, dspDelivery, merchant);
+                if(StringUtils.isBlank(shopVo.getLbClient())){
+                    continue;
+                }
                 ResObject<ShopResultVo> res = deliveryClient.createShop(shopVo);
                 delivery.setBindStatus(BindStatusEnum.UNBIND.getStatus());
                 if ("shunfeng".equals(shopVo.getLbClient()) || "uupt".equals(shopVo.getLbClient()) ||