Commit c5f8b23d by guojuxing

权限添加部门权限

parent 01e91f58
......@@ -2,6 +2,7 @@ package com.gic.operation.web.controller;
import java.util.*;
import com.gic.auth.dto.MenuAuthDepartDTO;
import com.gic.auth.qo.MenuOperationItemListQO;
import com.gic.open.api.dto.ServePropDTO;
import com.gic.open.api.service.ServeApiService;
......@@ -56,12 +57,14 @@ public class MenuController {
* @return com.gic.commons.webapi.reponse.RestResponse


 */
@RequestMapping("/save-gic-page")
public RestResponse saveGICPage(MenuDTO menuDTO) {
public RestResponse saveGICPage(MenuDTO menuDTO, String authDepartJson) {
setAuthType(menuDTO, authDepartJson);
return ResultControllerUtils.commonResult(menuApiService.saveGICPage(menuDTO));
}
@RequestMapping("/update-gic-page")
public RestResponse updateGICPage(MenuDTO menuDTO) {
public RestResponse updateGICPage(MenuDTO menuDTO, String authDepartJson) {
setAuthType(menuDTO, authDepartJson);
return ResultControllerUtils.commonResult(menuApiService.updateGICPage(menuDTO));
}
......@@ -79,12 +82,14 @@ public class MenuController {
* @return com.gic.commons.webapi.reponse.RestResponse


 */
@RequestMapping("/save-gic-child-page")
public RestResponse saveGICChildPage(MenuDTO menuDTO) {
public RestResponse saveGICChildPage(MenuDTO menuDTO, String authDepartJson) {
setAuthType(menuDTO, authDepartJson);
return ResultControllerUtils.commonResult(menuApiService.saveGICChildPage(menuDTO));
}
@RequestMapping("/update-gic-child-page")
public RestResponse updateGICChildPage(MenuDTO menuDTO) {
public RestResponse updateGICChildPage(MenuDTO menuDTO, String authDepartJson) {
setAuthType(menuDTO, authDepartJson);
return ResultControllerUtils.commonResult(menuApiService.updateGICChildPage(menuDTO));
}
......@@ -97,17 +102,20 @@ public class MenuController {
* @return com.gic.commons.webapi.reponse.RestResponse


 */
@RequestMapping("/update-app-page")
public RestResponse updateAppPage(MenuDTO menuDTO) {
public RestResponse updateAppPage(MenuDTO menuDTO, String authDepartJson) {
setAuthType(menuDTO, authDepartJson);
return ResultControllerUtils.commonResult(menuApiService.updateAppPage(menuDTO));
}
@RequestMapping("/save-app-child-page")
public RestResponse saveAppChildPage(MenuDTO menuDTO) {
public RestResponse saveAppChildPage(MenuDTO menuDTO, String authDepartJson) {
setAuthType(menuDTO, authDepartJson);
return ResultControllerUtils.commonResult(menuApiService.saveAppChildPage(menuDTO));
}
@RequestMapping("/update-app-child-page")
public RestResponse updateAppChildPage(MenuDTO menuDTO) {
public RestResponse updateAppChildPage(MenuDTO menuDTO, String authDepartJson) {
setAuthType(menuDTO, authDepartJson);
return ResultControllerUtils.commonResult(menuApiService.updateAppChildPage(menuDTO));
}
......@@ -261,12 +269,14 @@ public class MenuController {
}
@RequestMapping("/save-operation-item")
public RestResponse saveOperationItem(MenuDTO menuDTO) {
public RestResponse saveOperationItem(MenuDTO menuDTO, String authDepartJson) {
setAuthType(menuDTO, authDepartJson);
return ResultControllerUtils.commonResult(menuApiService.saveOperationItem(menuDTO));
}
@RequestMapping("/update-operation-item")
public RestResponse updateOperationItem(MenuDTO menuDTO) {
public RestResponse updateOperationItem(MenuDTO menuDTO, String authDepartJson) {
setAuthType(menuDTO, authDepartJson);
return ResultControllerUtils.commonResult(menuApiService.updateOperationItem(menuDTO));
}
......@@ -458,4 +468,10 @@ public class MenuController {
}
return false;
}
private void setAuthType(MenuDTO menuDTO, String authDepartJson) {
if (StringUtils.isNotBlank(authDepartJson)) {
menuDTO.setMenuAuthDepartList(JSON.parseArray(authDepartJson, MenuAuthDepartDTO.class));
}
}
}
package com.gic.operation.web.vo;
import com.gic.auth.dto.MenuAuthDepartDTO;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
/**
......@@ -79,6 +82,16 @@ public class MenuDetailVO implements Serializable{
*/
private Integer adminOnlySign;
/**
* 1:管理员权限集 2:商户级超管及达摩侧人员 3:仅达摩侧人员
*/
private Integer authType;
/**
* 部门职位
*/
private List<MenuAuthDepartDTO> menuAuthDepartList;
public Integer getMenuId() {
return menuId;
}
......@@ -190,4 +203,22 @@ public class MenuDetailVO implements Serializable{
public void setAdminOnlySign(Integer adminOnlySign) {
this.adminOnlySign = adminOnlySign;
}
public Integer getAuthType() {
return authType;
}
public MenuDetailVO setAuthType(Integer authType) {
this.authType = authType;
return this;
}
public List<MenuAuthDepartDTO> getMenuAuthDepartList() {
return menuAuthDepartList;
}
public MenuDetailVO setMenuAuthDepartList(List<MenuAuthDepartDTO> menuAuthDepartList) {
this.menuAuthDepartList = menuAuthDepartList;
return this;
}
}
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