refactor(权限点): 参数处理调整
This commit is contained in:
parent
614b3289ea
commit
adc9e97a39
@ -35,4 +35,8 @@ public enum DelegatedType {
|
||||
public static DelegatedType apply(Integer code) {
|
||||
return code == null ? null :MAPPING.get(code);
|
||||
}
|
||||
|
||||
public boolean sameCode(Integer code) {
|
||||
return this.code.equals(code);
|
||||
}
|
||||
}
|
||||
|
||||
@ -36,4 +36,8 @@ public enum FeatureType {
|
||||
public static FeatureType apply(Integer code) {
|
||||
return code == null ? null :MAPPING.get(code);
|
||||
}
|
||||
|
||||
public boolean sameCode(Integer code) {
|
||||
return this.code.equals(code);
|
||||
}
|
||||
}
|
||||
|
||||
@ -34,4 +34,8 @@ public enum PageLinkType {
|
||||
public static PageLinkType apply(Integer code) {
|
||||
return code == null ? null :MAPPING.get(code);
|
||||
}
|
||||
|
||||
public boolean sameCode(Integer code) {
|
||||
return this.code.equals(code);
|
||||
}
|
||||
}
|
||||
|
||||
@ -49,8 +49,7 @@ public class PermissionPointController implements PermissionPointApi {
|
||||
|
||||
@Override
|
||||
public ApiResult<PermissionPointDTO> savePermissionPoint(PermissionPointDTO dto) {
|
||||
permissionPointService.save(dto);
|
||||
return ApiResult.ok();
|
||||
return ApiResult.ok(permissionPointService.save(dto));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -254,14 +254,14 @@ public class PermissionPointServiceImpl implements PermissionPointService {
|
||||
private PermissionPointDTO doUpdate(PermissionPointDTO dto) {
|
||||
SaasFeature feature = getAndCheck(dto.getId());
|
||||
SaasFeature saasFeature = BeanMapper.copyBean(dto, SaasFeature.class);
|
||||
//清理不可更新的数据
|
||||
saasFeature.setFeatureCode(null);
|
||||
//清理不可直接更新的数据
|
||||
saasFeature.setParentId(null);
|
||||
saasFeature.setPath(null);
|
||||
saasFeature.setSort(null);
|
||||
saasFeature.setTerminal(null);
|
||||
saasFeature.setBusinessNo(null);
|
||||
this.saasFeatureDao.updateById(saasFeature);
|
||||
//返回一些要用的数据
|
||||
dto.setBusinessNo(feature.getBusinessNo());
|
||||
return dto;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user