Bladeren bron

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	fs-company/src/main/java/com/fs/company/controller/qw/QwExternalContactController.java
yfh 1 dag geleden
bovenliggende
commit
528d36e05f

+ 1 - 1
fs-company/src/main/java/com/fs/company/controller/qw/QwExternalContactController.java

@@ -369,7 +369,7 @@ public class QwExternalContactController extends BaseController
     @PutMapping("/resignedTransfer")
     public R resignedTransfer(@RequestBody ResignedTransferParam param)
     {
-        if (ObjectUtil.isNotEmpty(param.getQwUserName())){
+        if (ObjectUtil.isNotEmpty(param.getQwUserName())&&ObjectUtil.isNotEmpty(param.getType())&&param.getType().equals("1")){
             QwExternalContactParam qwExternalContact =new QwExternalContactParam();
             qwExternalContact.setQwUserName(param.getQwUserName());
 

+ 1 - 1
fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreOrderScrmServiceImpl.java

@@ -526,7 +526,7 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService
             //绑定销售
             FsUserScrm fsuser= userService.selectFsUserById(userId);
             if(param.getCompanyUserId()!=null){
-                if (ObjectUtil.isNotEmpty(fsuser.getCompanyUserId())&&fsuser.getCompanyUserId()!=param.getCompanyUserId()){
+                if (ObjectUtil.isNotEmpty(fsuser.getCompanyUserId())&& !Objects.equals(fsuser.getCompanyUserId(), param.getCompanyUserId())){
                     CompanyUser companyUser=companyUserService.selectCompanyUserById(fsuser.getCompanyUserId());
                     return R.error(String.format("请联系%s销售进行购买商品!",companyUser.getNickName()));
                 }else {

+ 17 - 8
fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreProductCategoryScrmServiceImpl.java

@@ -7,22 +7,23 @@ import org.springframework.stereotype.Service;
 import com.fs.hisStore.mapper.FsStoreProductCategoryScrmMapper;
 import com.fs.hisStore.domain.FsStoreProductCategoryScrm;
 import com.fs.hisStore.service.IFsStoreProductCategoryScrmService;
+import org.springframework.transaction.annotation.Transactional;
 
 /**
  * 商品分类Service业务层处理
- * 
+ *
  * @author fs
  * @date 2022-03-15
  */
 @Service
-public class FsStoreProductCategoryScrmServiceImpl implements IFsStoreProductCategoryScrmService 
+public class FsStoreProductCategoryScrmServiceImpl implements IFsStoreProductCategoryScrmService
 {
     @Autowired
     private FsStoreProductCategoryScrmMapper fsStoreProductCategoryMapper;
 
     /**
      * 查询商品分类
-     * 
+     *
      * @param cateId 商品分类ID
      * @return 商品分类
      */
@@ -34,7 +35,7 @@ public class FsStoreProductCategoryScrmServiceImpl implements IFsStoreProductCat
 
     /**
      * 查询商品分类列表
-     * 
+     *
      * @param fsStoreProductCategory 商品分类
      * @return 商品分类
      */
@@ -46,7 +47,7 @@ public class FsStoreProductCategoryScrmServiceImpl implements IFsStoreProductCat
 
     /**
      * 新增商品分类
-     * 
+     *
      * @param fsStoreProductCategory 商品分类
      * @return 结果
      */
@@ -59,20 +60,28 @@ public class FsStoreProductCategoryScrmServiceImpl implements IFsStoreProductCat
 
     /**
      * 修改商品分类
-     * 
+     *
      * @param fsStoreProductCategory 商品分类
      * @return 结果
      */
     @Override
+    @Transactional
     public int updateFsStoreProductCategory(FsStoreProductCategoryScrm fsStoreProductCategory)
     {
         fsStoreProductCategory.setUpdateTime(DateUtils.getNowDate());
+        if(fsStoreProductCategory.getPid() == 0){
+            FsStoreProductCategoryScrm child = new FsStoreProductCategoryScrm();
+            child.setPid(fsStoreProductCategory.getCateId());
+            child.setIsShow(fsStoreProductCategory.getIsShow());
+            fsStoreProductCategoryMapper.updateFsStoreProductCategory(child);
+        }
         return fsStoreProductCategoryMapper.updateFsStoreProductCategory(fsStoreProductCategory);
+
     }
 
     /**
      * 批量删除商品分类
-     * 
+     *
      * @param cateIds 需要删除的商品分类ID
      * @return 结果
      */
@@ -84,7 +93,7 @@ public class FsStoreProductCategoryScrmServiceImpl implements IFsStoreProductCat
 
     /**
      * 删除商品分类信息
-     * 
+     *
      * @param cateId 商品分类ID
      * @return 结果
      */