feat(REQ-2899):菜单资源支持修改父级
This commit is contained in:
parent
bfa8a18432
commit
d643dae9c4
@ -25,7 +25,5 @@ public class DeletePageElementCategoryReq {
|
||||
private Long id;
|
||||
|
||||
/** 操作人personId **/
|
||||
@NotNull(message = "操作人不能为空")
|
||||
@Min(value = 1, message = "操作人有误")
|
||||
private Long operatorId;
|
||||
}
|
||||
|
||||
@ -25,7 +25,5 @@ public class DeletePageElementReq {
|
||||
private Long id;
|
||||
|
||||
/** 操作人personId **/
|
||||
@NotNull(message = "操作人不能为空")
|
||||
@Min(value = 1, message = "操作人有误")
|
||||
private Long operatorId;
|
||||
}
|
||||
|
||||
@ -34,7 +34,5 @@ public class SaveOrUpdatePageElementCategoryReq {
|
||||
private String terminal;
|
||||
|
||||
/** 操作人personId **/
|
||||
@NotNull(message = "操作人不能为空")
|
||||
@Min(value = 1, message = "操作人有误")
|
||||
private Long operatorId;
|
||||
}
|
||||
|
||||
@ -59,7 +59,5 @@ public class SaveOrUpdatePageElementReq {
|
||||
private Integer version;
|
||||
|
||||
/** 操作人personId **/
|
||||
@NotNull(message = "操作人不能为空")
|
||||
@Min(value = 1, message = "操作人有误")
|
||||
private Long operatorId;
|
||||
}
|
||||
|
||||
@ -270,8 +270,13 @@ public class SaasFeatureResourceServiceImpl extends ServiceImpl<SaasFeatureResou
|
||||
newResource(baseResource, parent == null ? "" : parent.getPath());
|
||||
} else {
|
||||
//补充path
|
||||
SaasFeatureResource dbResource = featureResourceDao.getById(req.getId());
|
||||
baseResource.setPath(dbResource.getPath());
|
||||
if (Objects.nonNull(req.getParentId())) {
|
||||
SaasFeatureResource parent = featureResourceDao.lambdaQuery().eq(SaasFeatureResource::getId,req.getParentId()).one();
|
||||
baseResource.setPath(StringUtils.isBlank(parent.getPath()) ? baseResource.getId().toString() + "," : parent.getPath() + baseResource.getId() + ",");
|
||||
} else {
|
||||
SaasFeatureResource dbResource = featureResourceDao.getById(req.getId());
|
||||
baseResource.setPath(dbResource.getPath());
|
||||
}
|
||||
baseResource.setFeatureCode(req.getUniCode());
|
||||
featureResourceDao.updateById(baseResource);
|
||||
}
|
||||
@ -343,7 +348,8 @@ public class SaasFeatureResourceServiceImpl extends ServiceImpl<SaasFeatureResou
|
||||
validFeatureName(saasFeatureResource);
|
||||
if (saasFeatureResource.getId() != null) {
|
||||
SaasFeatureResource dbResource = featureResourceDao.getById(saasFeatureResource.getId());
|
||||
saasFeatureResource.setPath(dbResource.getPath());
|
||||
// saasFeatureResource.setPath(dbResource.getPath());
|
||||
saasFeatureResource.setPath(StringUtils.isBlank(parentPath) ? dbResource.getPath() : parentPath + dbResource.getId() + ",");
|
||||
saasFeatureResource.setFeatureCode(featureComponentSaveReq.getUniCode());
|
||||
featureResourceDao.updateById(saasFeatureResource);
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user