Commit 383d45f1b8e00fffd95ee8c1bc4a03a0789f8501
1 parent
e509c8a9
fix: 补齐 Controller 简单参数的 RequestParam 注解
Showing
5 changed files
with
6 additions
and
5 deletions
yudao-module-mall/yudao-module-promotion/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/coupon/AppCouponTemplateController.java
| @@ -50,7 +50,7 @@ public class AppCouponTemplateController { | @@ -50,7 +50,7 @@ public class AppCouponTemplateController { | ||
| 50 | @Operation(summary = "获得优惠劵模版") | 50 | @Operation(summary = "获得优惠劵模版") |
| 51 | @Parameter(name = "id", description = "优惠券模板编号", required = true, example = "1024") | 51 | @Parameter(name = "id", description = "优惠券模板编号", required = true, example = "1024") |
| 52 | @PermitAll | 52 | @PermitAll |
| 53 | - public CommonResult<AppCouponTemplateRespVO> getCouponTemplate(Long id) { | 53 | + public CommonResult<AppCouponTemplateRespVO> getCouponTemplate(@RequestParam("id") Long id) { |
| 54 | CouponTemplateDO template = couponTemplateService.getCouponTemplate(id); | 54 | CouponTemplateDO template = couponTemplateService.getCouponTemplate(id); |
| 55 | if (template == null) { | 55 | if (template == null) { |
| 56 | return success(null); | 56 | return success(null); |
yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictTypeController.java
| @@ -57,7 +57,7 @@ public class DictTypeController { | @@ -57,7 +57,7 @@ public class DictTypeController { | ||
| 57 | @Operation(summary = "删除字典类型") | 57 | @Operation(summary = "删除字典类型") |
| 58 | @Parameter(name = "id", description = "编号", required = true, example = "1024") | 58 | @Parameter(name = "id", description = "编号", required = true, example = "1024") |
| 59 | @PreAuthorize("@ss.hasPermission('system:dict:delete')") | 59 | @PreAuthorize("@ss.hasPermission('system:dict:delete')") |
| 60 | - public CommonResult<Boolean> deleteDictType(Long id) { | 60 | + public CommonResult<Boolean> deleteDictType(@RequestParam("id") Long id) { |
| 61 | dictTypeService.deleteDictType(id); | 61 | dictTypeService.deleteDictType(id); |
| 62 | return success(true); | 62 | return success(true); |
| 63 | } | 63 | } |
yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/LoginLogController.java
| @@ -19,6 +19,7 @@ import org.springframework.security.access.prepost.PreAuthorize; | @@ -19,6 +19,7 @@ import org.springframework.security.access.prepost.PreAuthorize; | ||
| 19 | import org.springframework.validation.annotation.Validated; | 19 | import org.springframework.validation.annotation.Validated; |
| 20 | import org.springframework.web.bind.annotation.GetMapping; | 20 | import org.springframework.web.bind.annotation.GetMapping; |
| 21 | import org.springframework.web.bind.annotation.RequestMapping; | 21 | import org.springframework.web.bind.annotation.RequestMapping; |
| 22 | +import org.springframework.web.bind.annotation.RequestParam; | ||
| 22 | import org.springframework.web.bind.annotation.RestController; | 23 | import org.springframework.web.bind.annotation.RestController; |
| 23 | 24 | ||
| 24 | import java.io.IOException; | 25 | import java.io.IOException; |
| @@ -39,7 +40,7 @@ public class LoginLogController { | @@ -39,7 +40,7 @@ public class LoginLogController { | ||
| 39 | @GetMapping("/get") | 40 | @GetMapping("/get") |
| 40 | @Operation(summary = "获得登录日志") | 41 | @Operation(summary = "获得登录日志") |
| 41 | @PreAuthorize("@ss.hasPermission('system:login-log:query')") | 42 | @PreAuthorize("@ss.hasPermission('system:login-log:query')") |
| 42 | - public CommonResult<LoginLogRespVO> getLoginLog(Long id) { | 43 | + public CommonResult<LoginLogRespVO> getLoginLog(@RequestParam("id") Long id) { |
| 43 | LoginLogDO loginLog = loginLogService.getLoginLog(id); | 44 | LoginLogDO loginLog = loginLogService.getLoginLog(id); |
| 44 | return success(BeanUtils.toBean(loginLog, LoginLogRespVO.class)); | 45 | return success(BeanUtils.toBean(loginLog, LoginLogRespVO.class)); |
| 45 | } | 46 | } |
yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/MenuController.java
| @@ -89,7 +89,7 @@ public class MenuController { | @@ -89,7 +89,7 @@ public class MenuController { | ||
| 89 | @GetMapping("/get") | 89 | @GetMapping("/get") |
| 90 | @Operation(summary = "获取菜单信息") | 90 | @Operation(summary = "获取菜单信息") |
| 91 | @PreAuthorize("@ss.hasPermission('system:menu:query')") | 91 | @PreAuthorize("@ss.hasPermission('system:menu:query')") |
| 92 | - public CommonResult<MenuRespVO> getMenu(Long id) { | 92 | + public CommonResult<MenuRespVO> getMenu(@RequestParam("id") Long id) { |
| 93 | MenuDO menu = menuService.getMenu(id); | 93 | MenuDO menu = menuService.getMenu(id); |
| 94 | return success(BeanUtils.toBean(menu, MenuRespVO.class)); | 94 | return success(BeanUtils.toBean(menu, MenuRespVO.class)); |
| 95 | } | 95 | } |
yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/PermissionController.java
| @@ -34,7 +34,7 @@ public class PermissionController { | @@ -34,7 +34,7 @@ public class PermissionController { | ||
| 34 | @Parameter(name = "roleId", description = "角色编号", required = true) | 34 | @Parameter(name = "roleId", description = "角色编号", required = true) |
| 35 | @GetMapping("/list-role-menus") | 35 | @GetMapping("/list-role-menus") |
| 36 | @PreAuthorize("@ss.hasPermission('system:permission:assign-role-menu')") | 36 | @PreAuthorize("@ss.hasPermission('system:permission:assign-role-menu')") |
| 37 | - public CommonResult<Set<Long>> getRoleMenuList(Long roleId) { | 37 | + public CommonResult<Set<Long>> getRoleMenuList(@RequestParam("roleId") Long roleId) { |
| 38 | return success(permissionService.getRoleMenuListByRoleId(roleId)); | 38 | return success(permissionService.getRoleMenuListByRoleId(roleId)); |
| 39 | } | 39 | } |
| 40 | 40 |