mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
权限管理-token管理权限修改
This commit is contained in:
+8
-8
@@ -14,6 +14,7 @@ import com.cf.imes.module.system.dal.dataobject.tokenconfig.TokenConfigDO;
|
||||
import com.cf.imes.module.system.service.tokenconfig.TokenConfigService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -42,7 +43,7 @@ public class TokenConfigController {
|
||||
|
||||
@GetMapping()
|
||||
@Operation(summary = "获得token配置的分页列表")
|
||||
// @PreAuthorize("@ss.hasAnyPermissions('system:token:query')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('system:token:query')")
|
||||
public CommonResult<PageResult<TokenConfigRespVO>> getTokenConfigPage(@Valid TokenConfigPageReqVO pageReqVO) {
|
||||
PageResult<TokenConfigRespVO> pageResult = tokenConfigService.getTokenConfigPage(pageReqVO);
|
||||
|
||||
@@ -54,7 +55,7 @@ public class TokenConfigController {
|
||||
|
||||
@GetMapping("/{id}")
|
||||
@Operation(summary = "根据ID获取对应的token配置信息")
|
||||
// @PreAuthorize("@ss.hasAnyPermissions('system:token:query')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('system:token:query','system:token:update')")
|
||||
public CommonResult<TokenConfigRespVO> getTokenConConfig(@PathVariable("id") Long id) {
|
||||
TokenConfigDO tokenConConfig = tokenConfigService.getTokenConConfig(id);
|
||||
return success(BeanUtils.toBean(tokenConConfig, TokenConfigRespVO.class));
|
||||
@@ -64,7 +65,7 @@ public class TokenConfigController {
|
||||
|
||||
@PostMapping()
|
||||
@Operation(summary = "token配置新增")
|
||||
// @PreAuthorize("@ss.hasAnyPermissions('system:token:create')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('system:token:create')")
|
||||
public CommonResult<Boolean> insertTokenConfig(@Valid @RequestBody TokenConfigSaveReqVO reqVO) {
|
||||
tokenConfigService.insertTokenConfig(reqVO);
|
||||
return success(true);
|
||||
@@ -74,7 +75,7 @@ public class TokenConfigController {
|
||||
|
||||
@PutMapping()
|
||||
@Operation(summary = "token配置修改")
|
||||
// @PreAuthorize("@ss.hasAnyPermissions('system:token:update')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('system:token:update')")
|
||||
public CommonResult<Boolean> updateTokenConfig(@Valid @RequestBody TokenConfigSaveReqVO reqVO) {
|
||||
tokenConfigService.updateTokenConfig(reqVO);
|
||||
return success(true);
|
||||
@@ -84,7 +85,7 @@ public class TokenConfigController {
|
||||
|
||||
@DeleteMapping("/{id}")
|
||||
@Operation(summary = "token配置删除")
|
||||
// @PreAuthorize("@ss.hasPermission('system:token:delete')")
|
||||
@PreAuthorize("@ss.hasPermission('system:token:delete')")
|
||||
public CommonResult<Boolean> deleteTokenConfig(@PathVariable("id") Long id) {
|
||||
tokenConfigService.deleteTokenConfig(id);
|
||||
return success(true);
|
||||
@@ -95,7 +96,6 @@ public class TokenConfigController {
|
||||
|
||||
@GetMapping("/check")
|
||||
@Operation(summary = "token校验")
|
||||
// @PreAuthorize("@ss.hasAnyPermissions('system:base-setting:query','unplannedOrders:query','placeorder:query')")
|
||||
public CommonResult<Long> checkTokenConfig(@RequestParam("token") String token) {
|
||||
|
||||
return success(tokenConfigService.checkTokenConfig(token));
|
||||
@@ -105,7 +105,7 @@ public class TokenConfigController {
|
||||
|
||||
@GetMapping("/copy")
|
||||
@Operation(summary = "token复制")
|
||||
// @PreAuthorize("@ss.hasAnyPermissions('system:base-setting:query','unplannedOrders:query','placeorder:query')")
|
||||
@PreAuthorize("@ss.hasPermission('system:token:copy')")
|
||||
public CommonResult<String> tokenConfigCopy(@RequestParam("id") Long id) {
|
||||
|
||||
return success(tokenConfigService.tokenConfigCopy(id));
|
||||
@@ -116,7 +116,7 @@ public class TokenConfigController {
|
||||
|
||||
@GetMapping("/export")
|
||||
@Operation(summary = "导出配置信息")
|
||||
// @PreAuthorize("@ss.hasAnyPermissions('system:token:export')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('system:token:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportTokenConfigExcel(@Valid TokenConfigPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
|
||||
Reference in New Issue
Block a user