‘linchangsheng’ 3 weeks ago
parent
commit
b6402c4976

+ 4 - 10
src/main/java/com/gree/mall/manager/logic/goods/GoodsCategoryLogic.java

@@ -38,10 +38,10 @@ public class GoodsCategoryLogic {
     public List<GoodsCategoryBean> list(Integer level, String name, Boolean status, HttpServletRequest request) {
         //获取当前登录企业微信id
         AdminUserCom adminUser = commonLogic.getAdminUser(request);
-        List<String> companyWechatIds = adminUser.getAdminCompanyIds();
+      //  List<String> companyWechatIds = adminUser.getAdminCompanyIds();
 
 
-        return customGoodsCategoryMapper.list(level, status, name, companyWechatIds);
+        return customGoodsCategoryMapper.list(level, status, name, null);
     }
 
     /**
@@ -52,9 +52,6 @@ public class GoodsCategoryLogic {
     @Transactional(rollbackFor = Exception.class)
     public void add(GoodsCategoryBean goodsCategoryBean, HttpServletRequest request) {
         AdminUserCom adminUser = commonLogic.getAdminUser(request);
-        if (StringUtils.isEmpty(adminUser.getLoginCompanyWechatId())) {
-            throw new RemoteServiceException("无效微信企业id");
-        }
 
         Date createDate = new Date();
         if (goodsCategoryBean.getChildren() != null) {
@@ -65,14 +62,11 @@ public class GoodsCategoryLogic {
             for (GoodsCategory goodsCategory : goodsCategoryList) {
                 goodsCategory.setLevel(2);
                 goodsCategory.setCreateTime(new Date());
-                goodsCategory.setCompanyWechatId(adminUser.getLoginCompanyWechatId());
-                goodsCategory.setCompanyName(adminUser.getLoginCompanyName());
+
             }
             goodsCategoryService.saveBatch(goodsCategoryList);
         } else {
-            goodsCategoryBean.setCreateTime(createDate);
-            goodsCategoryBean.setCompanyWechatId(adminUser.getLoginCompanyWechatId());
-            goodsCategoryBean.setCompanyName(adminUser.getLoginCompanyName());
+            goodsCategoryBean.setCreateTime(createDate)
             goodsCategoryService.save(goodsCategoryBean);
         }
     }