Commit 7fb4da87 by guojuxing

更新应用第一级页面接口修复

parent 83ac04ac
......@@ -117,7 +117,24 @@ public class MenuApiServiceImpl implements MenuApiService {
@Override
public ServiceResponse<Void> updateAppPage(MenuDTO menuDTO) {
return updatePage(menuDTO, MenuTypeEnum.PAGE, MenuDTO.UpdateAppPageValid.class);
//只修改页面code
TabSysMenu record = menuService.getMenuById(menuDTO.getMenuId());
if (record == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "主键参数有误,查无数据");
}
if (record.getLevel().intValue() != MenuLevelConstants.FIRST_LEVEL) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "主键参数有误,非第一级页面");
}
if (record.getMenuType().intValue() != MenuTypeEnum.PAGE.getCode()) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(),
"主键参数有误,非" + MenuTypeEnum.PAGE.getMessage());
}
ServiceResponse paramsValid = ValidParamsUtils.allCheckValidate(menuDTO, MenuDTO.UpdateAppPageValid.class);
if (!paramsValid.isSuccess()) {
return paramsValid;
}
menuService.updatePage(menuDTO);
return ServiceResponse.success();
}
@Override
......@@ -309,7 +326,8 @@ public class MenuApiServiceImpl implements MenuApiService {
return updateNormalPage(menuDTO, menuTypeEnum, clazz, false);
}
private ServiceResponse<Void> updateNormalPage(MenuDTO menuDTO, MenuTypeEnum menuTypeEnum, Class clazz, boolean isFirstLevelPage) {
private ServiceResponse<Void> updateNormalPage(MenuDTO menuDTO, MenuTypeEnum menuTypeEnum, Class clazz,
boolean isFirstLevelPage) {
TabSysMenu record = menuService.getMenuById(menuDTO.getMenuId());
if (record == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "主键参数有误,查无数据");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment