فهرست منبع

解决海博添加商品问题

fubojin 1 هفته پیش
والد
کامیت
6c6412c5ce

+ 2 - 2
yami-shop-service/src/main/java/com/yami/shop/service/hb/impl/HBFrontCategoryService.java

@@ -174,7 +174,7 @@ public class HBFrontCategoryService implements IHBFrontCategoryService {
 
         shopCategoryMapper.insert(shopCategory);
         try {
-            String syncUrl = smqjhUtil.getSmqjhPmsUrl() + "/syncShopCategoryData/";
+            String syncUrl = smqjhUtil.getSmqjhPmsUrl() + "/syncShopCategoryData";
             String response = com.yami.shop.common.util.HttpUtil.post(syncUrl, shopCategory);
             log.info("推送门店分类到同步服务器结果: {}", response);
         } catch (Exception e) {
@@ -227,7 +227,7 @@ public class HBFrontCategoryService implements IHBFrontCategoryService {
             try {
                 List<ShopCategory> shopCategories = shopCategoryMapper.selectList(new LambdaQueryWrapper<ShopCategory>().eq(ShopCategory::getCode, code));
                 for (ShopCategory shopCategory : shopCategories) {
-                    String syncUrl = smqjhUtil.getSmqjhPmsUrl() + "/syncShopCategoryData/";
+                    String syncUrl = smqjhUtil.getSmqjhPmsUrl() + "/syncShopCategoryData";
                     String response = com.yami.shop.common.util.HttpUtil.post(syncUrl, shopCategory);
                     log.info("推送门店分类到同步服务器结果: {}", response);
                 }

+ 4 - 2
yami-shop-service/src/main/java/com/yami/shop/service/impl/OrderServiceImpl.java

@@ -888,8 +888,10 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
                 List<OrderItem> orderItems = orderItemMapper.getListByOrderNumber(c.getOrderNumber());
                 c.setOrderItems(orderItems);
                 c.setGoodsTotalCount(orderItems.stream().map(OrderItem::getProdCount).reduce(0, Integer::sum));
-                c.setReceiver(c.getConsigneeName());
-                c.setUserMobile(c.getConsigneeMobile());
+                if(c.getAddrOrderId() != null) {
+                    c.setReceiver(c.getConsigneeName());
+                    c.setUserMobile(c.getConsigneeMobile());
+                }
             });
         }
         return page;