【8.0】【权限】更新首页信息的权限控制

pull/57/head
fengshuonan 2023-07-07 14:49:23 +08:00
parent 3218475362
commit 7958fe9c04
2 changed files with 19 additions and 1 deletions

View File

@ -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";
}

View File

@ -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());
}