|
@@ -141,6 +141,9 @@ public class ProductCategoryServiceImpl implements IProductCategoryService {
|
|
public void update(ProductCategoryUpdateDTO productCategoryUpdateDTO, List<MultipartFile> files) {
|
|
public void update(ProductCategoryUpdateDTO productCategoryUpdateDTO, List<MultipartFile> files) {
|
|
log.info("开始处理【修改产品类别】的业务,参数为:{}, {}", productCategoryUpdateDTO, files);
|
|
log.info("开始处理【修改产品类别】的业务,参数为:{}, {}", productCategoryUpdateDTO, files);
|
|
|
|
|
|
|
|
+ PersonnelVO personnelVO = cacheUtils.getLoginUser(loginUtils.getId());
|
|
|
|
+ Integer tenantId = personnelVO.getTenantId();
|
|
|
|
+
|
|
//检查尝试修改的数据是否存在
|
|
//检查尝试修改的数据是否存在
|
|
Integer productCategoryId = productCategoryUpdateDTO.getId();
|
|
Integer productCategoryId = productCategoryUpdateDTO.getId();
|
|
String productCategoryName = productCategoryUpdateDTO.getProductCategoryName();
|
|
String productCategoryName = productCategoryUpdateDTO.getProductCategoryName();
|
|
@@ -154,7 +157,7 @@ public class ProductCategoryServiceImpl implements IProductCategoryService {
|
|
|
|
|
|
//检查尝试修改的产品类别名称是否被占用
|
|
//检查尝试修改的产品类别名称是否被占用
|
|
log.info("检查尝试修改的产品类别名称是否被占用");
|
|
log.info("检查尝试修改的产品类别名称是否被占用");
|
|
- count = productCategoryMapper.countByIdAndName(productCategoryId, productCategoryName);
|
|
|
|
|
|
+ count = productCategoryMapper.countByIdAndName(productCategoryId, productCategoryName, tenantId);
|
|
if (count > 0) {
|
|
if (count > 0) {
|
|
String message = "修改产品类别失败,类别名称【" + productCategoryName + "】已存在,请尝试更换名称";
|
|
String message = "修改产品类别失败,类别名称【" + productCategoryName + "】已存在,请尝试更换名称";
|
|
log.info("{}", message);
|
|
log.info("{}", message);
|
|
@@ -307,7 +310,7 @@ public class ProductCategoryServiceImpl implements IProductCategoryService {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public List<String> getAreaList(GetAreaListDTO dto) {
|
|
public List<String> getAreaList(GetAreaListDTO dto) {
|
|
- PersonnelVO personnelVO =cacheUtils.getLoginUser(loginUtils.getId());
|
|
|
|
|
|
+ PersonnelVO personnelVO = cacheUtils.getLoginUser(loginUtils.getId());
|
|
dto.setTenantId(personnelVO.getTenantId());
|
|
dto.setTenantId(personnelVO.getTenantId());
|
|
List<String> areaList = productCategoryMapper.getAreaList(dto);
|
|
List<String> areaList = productCategoryMapper.getAreaList(dto);
|
|
return areaList;
|
|
return areaList;
|