Commit b19562ba by 墨竹

feat:新增接口

parent 4c03761d
package com.gic.haoban.manage.web.controller.test;
package com.gic.haoban.manage.web.controller;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.commons.webapi.reponse.RestResponse;
import com.gic.haoban.base.api.common.pojo.dto.WebLoginDTO;
import com.gic.haoban.common.utils.AuthWebRequestUtil;
import com.gic.haoban.manage.api.dto.qdto.role.HaobanRoleQDTO;
import com.gic.haoban.manage.api.dto.role.HaobanMenuDTO;
import com.gic.haoban.manage.api.service.role.HaobanMenuApiService;
import com.gic.haoban.manage.api.service.role.HaobanRoleApiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
......@@ -20,6 +26,8 @@ public class HaobanRoleController {
@Autowired
private HaobanMenuApiService haobanMenuApiService;
@Autowired
private HaobanRoleApiService haobanRoleApiService;
/**
* 获取菜单树
......@@ -31,4 +39,28 @@ public class HaobanRoleController {
return RestResponse.successResult(serviceMenuTreeList.getResult());
}
/**
* 修改
* @param haobanRoleQDTO
* @return
*/
@RequestMapping(value = "/edit",method = RequestMethod.POST)
private RestResponse edit(@RequestBody HaobanRoleQDTO haobanRoleQDTO) {
WebLoginDTO login = AuthWebRequestUtil.getLoginUser();
return RestResponse.successResult(haobanRoleApiService.edit(haobanRoleQDTO,login));
}
/**
* 根据角色查询菜单
* @param roleId
* @return
*/
@RequestMapping(value = "/queryMenuByRoleId",method = RequestMethod.GET)
private RestResponse queryMenuByRoleId(Long roleId) {
WebLoginDTO login = AuthWebRequestUtil.getLoginUser();
ServiceResponse serviceResponse = haobanRoleApiService.getByWxEnterpriseIdAndRoleId(login.getWxEnterpriseId(), roleId);
return RestResponse.successResult(serviceResponse.getResult());
}
}
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