首页>代码>微信小程序活动助手,包括nodejs后台管理系统和java后台接口>/mini-app-active-helper/03/mini-app-active-helper/src/main/java/com/core/server/controller/PrivilegeController.java
package com.core.server.controller; import com.core.server.entity.BasePrivilege; import com.core.server.entity.dto.BasePrivilegeDto; import com.core.server.entity.dto.search.BasePrivilegeSearchDto; import com.core.server.entity.dto.system.PrivilegeTree; import com.core.server.system.init.AllService; import com.core.server.system.response.RestResponse; import com.core.server.system.security.SecurityUtil; import com.github.pagehelper.PageInfo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.List; /** * @author :qilong sun * @date :Created in 2020/2/11 9:52 * @description:资源控制器 * @modified By: * @version: V1.0$ */ @RestController @RequestMapping(value = "/privilege") public class PrivilegeController { @Autowired AllService allService; /** * 根据用户ID查询资源列表 * @return */ @PostMapping(value = "/queryBasePrivilegeByUserId", produces = {"application/json; charset=UTF-8"}) public RestResponse<List<BasePrivilege>> queryBasePrivilegeByUserId(){ Integer userId = SecurityUtil.getUserId(); List<BasePrivilege> basePrivileges = allService.basePrivilegeService.queryBasePrivilegeByUserId(userId); return new RestResponse(basePrivileges); } /** * 查询所有资源 * @return */ @PostMapping(value = "/queryAllPrivilege") public RestResponse queryAllPrivilege(){ List<PrivilegeTree> privilegeTrees = allService.baseRoleService.queryAllPrivilegeTree(); return new RestResponse(privilegeTrees); } /** * 查询资源分页列表 * @param basePrivilegeSearchDto */ @PostMapping(value = "/queryBasePrivilegePageList") public RestResponse<PageInfo<BasePrivilegeDto>> queryBasePrivilegePageList(@RequestBody BasePrivilegeSearchDto basePrivilegeSearchDto){ PageInfo<BasePrivilegeDto> basePrivilegeDtoPageInfo = allService.basePrivilegeService.queryBasePrivilegePageList(basePrivilegeSearchDto); return new RestResponse(basePrivilegeDtoPageInfo); } }
最近下载更多
1195146710 LV4
1月16日
Lyj 329511 LV4
2023年10月11日
yinyun1985 LV14
2023年8月5日
dzlwindy LV8
2023年7月13日
fcx2019610048 LV3
2022年12月29日
lironggang LV38
2022年5月27日
wanglinddad LV53
2022年2月16日
不停yayaya LV4
2021年11月17日
peixizhu LV16
2021年8月24日
mudingc木钉 LV30
2021年7月22日
最近浏览更多
最代码_码鑫源 LV6
昨天
顾北城 LV12
3月24日
sky丶小十 LV7
3月8日
做你的景天 LV7
2月22日
yanixh LV1
2月19日
dody02 LV9
1月31日
weiwei_2 LV2
1月30日
BestClever LV32
1月24日
1195146710 LV4
1月16日
Gin19960217 LV4
1月11日