修改常量出现错误

This commit is contained in:
YY
2025-07-03 19:33:45 +08:00
parent 37b0515894
commit d6a55a0730
6 changed files with 16 additions and 9 deletions

View File

@ -1,6 +1,7 @@
package com.chinaunicom.zyhy.ebtp.supplier.base.controller; package com.chinaunicom.zyhy.ebtp.supplier.base.controller;
import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse; import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse;
import com.chinaunicom.zyhy.ebtp.supplier.base.constant.ErrorMessageConstant;
import com.chinaunicom.zyhy.ebtp.supplier.coscoBlack.entity.CoscoBlacklist; import com.chinaunicom.zyhy.ebtp.supplier.coscoBlack.entity.CoscoBlacklist;
import com.chinaunicom.zyhy.ebtp.supplier.coscoBlack.service.ICoscoBlacklistService; import com.chinaunicom.zyhy.ebtp.supplier.coscoBlack.service.ICoscoBlacklistService;
import com.chinaunicom.zyhy.ebtp.supplier.coscoCategory.entity.CoscoCategoryLibrary; import com.chinaunicom.zyhy.ebtp.supplier.coscoCategory.entity.CoscoCategoryLibrary;
@ -57,8 +58,12 @@ public class SynchronousController {
*/ */
@PostMapping("/categroyLibraryApproval") @PostMapping("/categroyLibraryApproval")
public BaseResponse categroyLibraryApproval(@RequestBody CoscoCategoryLibrary coscoCategoryLibrary) { public BaseResponse categroyLibraryApproval(@RequestBody CoscoCategoryLibrary coscoCategoryLibrary) {
return BaseResponse.success(coscoCategoryLibraryService int i = coscoCategoryLibraryService
.synchronousCategroyLibraryApproval(coscoCategoryLibrary)); .synchronousCategroyLibraryApproval(coscoCategoryLibrary);
if(i<=0){
return BaseResponse.fail(ErrorMessageConstant.NO_APPROVAL_ORDER_FOUND);
}
return BaseResponse.success();
} }
/** /**

View File

@ -74,7 +74,11 @@ public class CoscoCategoryController extends BaseController {
if(coscoCategory.getParentId()==null){ if(coscoCategory.getParentId()==null){
return BaseResponse.fail(ErrorMessageConstant.PLEASE_SELECT_SUPERIOR_CATEGORY); return BaseResponse.fail(ErrorMessageConstant.PLEASE_SELECT_SUPERIOR_CATEGORY);
} }
return BaseResponse.success(coscoCategoryService.insertCoscoCategory(coscoCategory)); int i = coscoCategoryService.insertCoscoCategory(coscoCategory);
if (i<=0) {
return BaseResponse.fail(ErrorMessageConstant.ENABLE_DISABLE_TEMPLATE_NOT_MODIFY);
}
return BaseResponse.success();
} }
/** /**

View File

@ -118,7 +118,7 @@ public class CoscoCategoryLibraryController extends BaseController {
public BaseResponse approval(@RequestBody CoscoCategoryVO coscoCategoryVO) { public BaseResponse approval(@RequestBody CoscoCategoryVO coscoCategoryVO) {
CoscoCategoryLibrary coscoCategoryLibrary = coscoCategoryLibraryService.selectCoscoCategoryLibraryById(coscoCategoryVO.getId()); CoscoCategoryLibrary coscoCategoryLibrary = coscoCategoryLibraryService.selectCoscoCategoryLibraryById(coscoCategoryVO.getId());
if(coscoCategoryLibrary.getDeptId()==null){ if(coscoCategoryLibrary.getDeptId()==null){
throw new RuntimeException("请选择负责部门"); return BaseResponse.fail("请选择负责部门");
} }
return BaseResponse.success(coscoCategoryLibraryService.approval(coscoCategoryVO)); return BaseResponse.success(coscoCategoryLibraryService.approval(coscoCategoryVO));
} }

View File

@ -148,9 +148,7 @@ public class CoscoCategoryLibraryContainServiceImpl extends BaseServiceImpl<Cosc
@Override @Override
public int updateList(List<CoscoCategoryLibraryContain> coscoCategoryLibraryContain) { public int updateList(List<CoscoCategoryLibraryContain> coscoCategoryLibraryContain) {
coscoCategoryLibraryContain.forEach(co->{ coscoCategoryLibraryContain.forEach(co-> coscoCategoryLibraryContainMapper.updateLockType(co));
coscoCategoryLibraryContainMapper.updateLockType(co);
});
return 1; return 1;
} }

View File

@ -247,7 +247,7 @@ public class CoscoCategoryLibraryServiceImpl extends BaseServiceImpl<CoscoCatego
public int synchronousCategroyLibraryApproval(CoscoCategoryLibrary coscoCategoryLibrary) { public int synchronousCategroyLibraryApproval(CoscoCategoryLibrary coscoCategoryLibrary) {
CoscoCategoryLibrary coscoCategoryLibrary1 = coscoCategoryLibraryMapper.selectByWorkFlowId(coscoCategoryLibrary.getWorkFlowId()); CoscoCategoryLibrary coscoCategoryLibrary1 = coscoCategoryLibraryMapper.selectByWorkFlowId(coscoCategoryLibrary.getWorkFlowId());
if (coscoCategoryLibrary1 == null) { if (coscoCategoryLibrary1 == null) {
throw new RuntimeException(ErrorMessageConstant.NO_APPROVAL_ORDER_FOUND); return 0;
} }
coscoCategoryLibrary1.setApproveStatus(coscoCategoryLibrary.getApproveStatus()); coscoCategoryLibrary1.setApproveStatus(coscoCategoryLibrary.getApproveStatus());
coscoCategoryLibrary1.setRemark(coscoCategoryLibrary.getRemark()); coscoCategoryLibrary1.setRemark(coscoCategoryLibrary.getRemark());

View File

@ -68,7 +68,7 @@ public class CoscoCategoryServiceImpl extends BaseServiceImpl<CoscoCategoryMappe
if (!coscoCategory.getParentId().equals(CoscoCategoryConstant.LEVEL_TOP)) { if (!coscoCategory.getParentId().equals(CoscoCategoryConstant.LEVEL_TOP)) {
CoscoCategory coscoCategory1 = coscoCategoryMapper.selectCoscoCategoryById(coscoCategory.getParentId()); CoscoCategory coscoCategory1 = coscoCategoryMapper.selectCoscoCategoryById(coscoCategory.getParentId());
if (coscoCategory1.getType().equals(CoscoCategoryConstant.CATEGORY_TYPE_CATEGORY_TYPE)) { if (coscoCategory1.getType().equals(CoscoCategoryConstant.CATEGORY_TYPE_CATEGORY_TYPE)) {
throw new RuntimeException(ErrorMessageConstant.ENABLE_DISABLE_TEMPLATE_NOT_MODIFY); return 0;
} }
coscoCategory.setAncestors(coscoCategory1.getAncestors() + "," + coscoCategory.getId()); coscoCategory.setAncestors(coscoCategory1.getAncestors() + "," + coscoCategory.getId());
} }