mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-08 20:49:00 +08:00
♻️ 微调代码:限定请求方法的请求类型
This commit is contained in:
1 parent
c18544ece6
commit
0ff6b01bb5
8 files changed
+9
-10
No files matched your search
@@ -25,8 +25,8 @@ import lombok.AllArgsConstructor;
|
||||
import org.springframework.security.oauth2.common.OAuth2AccessToken;
|
||||
import org.springframework.security.oauth2.provider.token.TokenStore;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
@@ -44,7 +44,7 @@ public class RevokeTokenEndpoint {
|
||||
*
|
||||
* @param authHeader Authorization
|
||||
*/
|
||||
@RequestMapping("/oauth/removeToken")
|
||||
@GetMapping("/oauth/removeToken")
|
||||
public R<Boolean> logout(@RequestHeader(value = "Authorization", required = false) String authHeader) {
|
||||
if (StringUtils.hasText(authHeader)) {
|
||||
String tokenValue = authHeader.replace("Bearer", "").trim();
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus</artifactId>
|
||||
<version>${mbp.boot.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<!--core 工具类-->
|
||||
<dependency>
|
||||
|
||||
@@ -1 +1 @@
|
||||
provides: mybatis-plus-boot-starter, pigx-common-security
|
||||
provides: mybatis-plus, pigx-common-security
|
||||
+1
-1
@@ -68,7 +68,7 @@ public class DictController {
|
||||
* @param params 分页对象
|
||||
* @return 分页对象
|
||||
*/
|
||||
@RequestMapping("/dictPage")
|
||||
@GetMapping("/dictPage")
|
||||
public Page dictPage(@RequestParam Map<String, Object> params) {
|
||||
params.put(CommonConstant.DEL_FLAG, CommonConstant.STATUS_NORMAL);
|
||||
return sysDictService.selectPage(new Query<>(params), new EntityWrapper<>());
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ public class LogController {
|
||||
* @param params 分页对象
|
||||
* @return 分页对象
|
||||
*/
|
||||
@RequestMapping("/logPage")
|
||||
@GetMapping("/logPage")
|
||||
public Page logPage(@RequestParam Map<String, Object> params) {
|
||||
params.put(CommonConstant.DEL_FLAG, CommonConstant.STATUS_NORMAL);
|
||||
return sysLogService.selectPage(new Query<>(params), new EntityWrapper<>());
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@ public class OauthClientDetailsController {
|
||||
* @param params 分页对象
|
||||
* @return 分页对象
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
@GetMapping("/page")
|
||||
public Page page(@RequestParam Map<String, Object> params) {
|
||||
return sysOauthClientDetailsService.selectPage(new Query<>(params), new EntityWrapper<>());
|
||||
}
|
||||
|
||||
+2
-2
@@ -108,7 +108,7 @@ public class RoleController {
|
||||
* @param params 分页对象
|
||||
* @return 分页对象
|
||||
*/
|
||||
@RequestMapping("/rolePage")
|
||||
@GetMapping("/rolePage")
|
||||
public Page rolePage(@RequestParam Map<String, Object> params) {
|
||||
params.put(CommonConstant.DEL_FLAG, CommonConstant.STATUS_NORMAL);
|
||||
return sysRoleService.selectwithDeptPage(new Query<>(params), new EntityWrapper<>());
|
||||
@@ -123,7 +123,7 @@ public class RoleController {
|
||||
*/
|
||||
@PutMapping("/roleMenuUpd")
|
||||
@PreAuthorize("@pms.hasPermission('sys_role_perm')")
|
||||
public R<Boolean> roleMenuUpd(Integer roleId, @RequestParam(value = "menuIds",required = false) String menuIds) {
|
||||
public R<Boolean> roleMenuUpd(Integer roleId, @RequestParam(value = "menuIds", required = false) String menuIds) {
|
||||
SysRole sysRole = sysRoleService.selectById(roleId);
|
||||
return new R<>(sysRoleMenuService.insertRoleMenus(sysRole.getRoleCode(), roleId, menuIds));
|
||||
}
|
||||
|
||||
+1
-1
@@ -149,7 +149,7 @@ public class UserController {
|
||||
* @param params 参数集
|
||||
* @return 用户集合
|
||||
*/
|
||||
@RequestMapping("/userPage")
|
||||
@GetMapping("/userPage")
|
||||
public Page userPage(@RequestParam Map<String, Object> params) {
|
||||
return userService.selectWithRolePage(new Query(params));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user