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