‘linchangsheng’ 2 weeks ago
parent
commit
27f7735161
1 changed files with 8 additions and 4 deletions
  1. 8 4
      src/main/java/com/gree/mall/manager/logic/goods/GoodsLogic.java

+ 8 - 4
src/main/java/com/gree/mall/manager/logic/goods/GoodsLogic.java

@@ -442,8 +442,10 @@ public class GoodsLogic {
                 AdminCompanyWechat adminCompanyWechat = adminCompanyWechatService.getById(s);
                 name = name+adminCompanyWechat.getCompanyName()+",";
             }
-
-            goodsBean.setPutCompanyName(name);
+            String result = name.substring(0, name.length() - 1);
+            goodsBean.setPutCompanyName(result);
+            goodsBean.setCompanyName(result);
+            goodsBean.setCompanyWechatId(goodsBean.getPutCompanyId());
         }
 
         GoodsCategory goodsCategory = goodsCategoryService.getById(goodsBean.getCategoryId());
@@ -596,8 +598,10 @@ public class GoodsLogic {
                 AdminCompanyWechat adminCompanyWechat = adminCompanyWechatService.getById(s);
                 name = name+adminCompanyWechat.getCompanyName()+",";
             }
-
-            goodsBean.setPutCompanyName(name);
+            String result = name.substring(0, name.length() - 1);
+            goodsBean.setPutCompanyName(result);
+            goodsBean.setCompanyName(result);
+            goodsBean.setCompanyWechatId(goodsBean.getPutCompanyId());
         }
 
         final AdminCompanyWechat companyWechat = adminCompanyWechatService.getById(adminUser.getLoginCompanyWechatId());