虚拟清单--开放管理员的发布和撤回的权限

This commit is contained in:
zhn
2022-11-01 15:00:30 +08:00
parent d589c572bd
commit bdfb7d8528
@@ -323,19 +323,19 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
DummyInventoryBaseEO baseEO = queryById(dummyInventoryBaseEO.getId());
List<String> createByNameList =new ArrayList<>();
if (StringUtils.isNotBlank(baseEO.getCreateBy())) {
createByNameList = Arrays.asList(baseEO.getCreateBy().split(","));
if (CollectionUtils.isNotEmpty(createByNameList)){
if (!createByNameList.contains(loginUserName)) {
if (CutEnum.CN.getValue().equals(dummyInventoryBaseEO.getCut())) {
throw new JeroBootException("当前用户非创建者,无法发布");
} else {
throw new JeroBootException("The current user is not the creator and cannot be issued.");
}
}
}
}
// if (StringUtils.isNotBlank(baseEO.getCreateBy())) {
// createByNameList = Arrays.asList(baseEO.getCreateBy().split(","));
//
// if (CollectionUtils.isNotEmpty(createByNameList)){
// if (!createByNameList.contains(loginUserName)) {
// if (CutEnum.CN.getValue().equals(dummyInventoryBaseEO.getCut())) {
// throw new JeroBootException("当前用户非创建者,无法发布");
// } else {
// throw new JeroBootException("The current user is not the creator and cannot be issued.");
// }
// }
// }
// }
Date now = new Date();
UpdateWrapper<DummyInventoryBaseEO> baseWrapper=new UpdateWrapper<>();
baseWrapper.set("state",dummyInventoryBaseEO.getState());