修改常量出现错误
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
package com.chinaunicom.zyhy.ebtp.supplier.base.controller;
|
||||
|
||||
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.service.ICoscoBlacklistService;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscoCategory.entity.CoscoCategoryLibrary;
|
||||
@ -57,8 +58,12 @@ public class SynchronousController {
|
||||
*/
|
||||
@PostMapping("/categroyLibraryApproval")
|
||||
public BaseResponse categroyLibraryApproval(@RequestBody CoscoCategoryLibrary coscoCategoryLibrary) {
|
||||
return BaseResponse.success(coscoCategoryLibraryService
|
||||
.synchronousCategroyLibraryApproval(coscoCategoryLibrary));
|
||||
int i = coscoCategoryLibraryService
|
||||
.synchronousCategroyLibraryApproval(coscoCategoryLibrary);
|
||||
if(i<=0){
|
||||
return BaseResponse.fail(ErrorMessageConstant.NO_APPROVAL_ORDER_FOUND);
|
||||
}
|
||||
return BaseResponse.success();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -74,7 +74,11 @@ public class CoscoCategoryController extends BaseController {
|
||||
if(coscoCategory.getParentId()==null){
|
||||
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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -118,7 +118,7 @@ public class CoscoCategoryLibraryController extends BaseController {
|
||||
public BaseResponse approval(@RequestBody CoscoCategoryVO coscoCategoryVO) {
|
||||
CoscoCategoryLibrary coscoCategoryLibrary = coscoCategoryLibraryService.selectCoscoCategoryLibraryById(coscoCategoryVO.getId());
|
||||
if(coscoCategoryLibrary.getDeptId()==null){
|
||||
throw new RuntimeException("请选择负责部门");
|
||||
return BaseResponse.fail("请选择负责部门");
|
||||
}
|
||||
return BaseResponse.success(coscoCategoryLibraryService.approval(coscoCategoryVO));
|
||||
}
|
||||
|
@ -148,9 +148,7 @@ public class CoscoCategoryLibraryContainServiceImpl extends BaseServiceImpl<Cosc
|
||||
|
||||
@Override
|
||||
public int updateList(List<CoscoCategoryLibraryContain> coscoCategoryLibraryContain) {
|
||||
coscoCategoryLibraryContain.forEach(co->{
|
||||
coscoCategoryLibraryContainMapper.updateLockType(co);
|
||||
});
|
||||
coscoCategoryLibraryContain.forEach(co-> coscoCategoryLibraryContainMapper.updateLockType(co));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -247,7 +247,7 @@ public class CoscoCategoryLibraryServiceImpl extends BaseServiceImpl<CoscoCatego
|
||||
public int synchronousCategroyLibraryApproval(CoscoCategoryLibrary coscoCategoryLibrary) {
|
||||
CoscoCategoryLibrary coscoCategoryLibrary1 = coscoCategoryLibraryMapper.selectByWorkFlowId(coscoCategoryLibrary.getWorkFlowId());
|
||||
if (coscoCategoryLibrary1 == null) {
|
||||
throw new RuntimeException(ErrorMessageConstant.NO_APPROVAL_ORDER_FOUND);
|
||||
return 0;
|
||||
}
|
||||
coscoCategoryLibrary1.setApproveStatus(coscoCategoryLibrary.getApproveStatus());
|
||||
coscoCategoryLibrary1.setRemark(coscoCategoryLibrary.getRemark());
|
||||
|
@ -68,7 +68,7 @@ public class CoscoCategoryServiceImpl extends BaseServiceImpl<CoscoCategoryMappe
|
||||
if (!coscoCategory.getParentId().equals(CoscoCategoryConstant.LEVEL_TOP)) {
|
||||
CoscoCategory coscoCategory1 = coscoCategoryMapper.selectCoscoCategoryById(coscoCategory.getParentId());
|
||||
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());
|
||||
}
|
||||
|
Reference in New Issue
Block a user