mirror of https://gitee.com/stylefeng/roses
【8.0】【权限】更新首页信息的权限控制
parent
3218475362
commit
7958fe9c04
|
@ -0,0 +1,16 @@
|
|||
package cn.stylefeng.roses.kernel.sys.api.constants;
|
||||
|
||||
/**
|
||||
* 权限编码(菜单功能的编码),一般用在给@ApiResource注解加一些权限控制标识
|
||||
*
|
||||
* @author fengshuonan
|
||||
* @since 2023/7/7 14:20
|
||||
*/
|
||||
public interface PermissionCodeConstants {
|
||||
|
||||
/**
|
||||
* 首页-公司信息统计信息
|
||||
*/
|
||||
String STAT_INFO_OPTION_CODE = "COMPANY_STAT_INFO";
|
||||
|
||||
}
|
|
@ -4,6 +4,7 @@ import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData;
|
|||
import cn.stylefeng.roses.kernel.rule.pojo.response.SuccessResponseData;
|
||||
import cn.stylefeng.roses.kernel.scanner.api.annotation.ApiResource;
|
||||
import cn.stylefeng.roses.kernel.scanner.api.annotation.GetResource;
|
||||
import cn.stylefeng.roses.kernel.sys.api.constants.PermissionCodeConstants;
|
||||
import cn.stylefeng.roses.kernel.sys.modular.org.pojo.response.HomeCompanyInfo;
|
||||
import cn.stylefeng.roses.kernel.sys.modular.org.service.HrOrganizationService;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
@ -31,7 +32,8 @@ public class HomeOrgStatController {
|
|||
* @author fengshuonan
|
||||
* @since 2023/6/26 22:51
|
||||
*/
|
||||
@GetResource(name = "获取组织机构统计信息", path = "/org/statInfo")
|
||||
@GetResource(name = "获取组织机构统计信息", path = "/org/statInfo", requiredPermission = true,
|
||||
requirePermissionCode = PermissionCodeConstants.STAT_INFO_OPTION_CODE)
|
||||
public ResponseData<HomeCompanyInfo> orgStatInfo() {
|
||||
return new SuccessResponseData<>(hrOrganizationService.orgStatInfo());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue