1.update some Authorization to requried for better swagger desc

main
Gary 10 months ago
parent ec0ccb7ed6
commit dff5b7eddd

@ -120,7 +120,7 @@ public class JournalController {
@GetMapping("/collect/{userId}/{pageNum}/{pageSize}") @GetMapping("/collect/{userId}/{pageNum}/{pageSize}")
@GlobalInterceptor(checkAppUserLogin = true) @GlobalInterceptor(checkAppUserLogin = true)
public Result<PageResult<JournalRespDTO>> collectPage( public Result<PageResult<JournalRespDTO>> collectPage(
@RequestHeader(value = "Authorization", required = false) String authorization, @RequestHeader(value = "Authorization", required = true) String authorization,
@PathVariable @VerifyParam(required = true)String userId, @PathVariable @VerifyParam(required = true)String userId,
@PathVariable @VerifyParam(required = true)Integer pageNum, @PathVariable @VerifyParam(required = true)Integer pageNum,
@PathVariable @VerifyParam(required = true)Integer pageSize) { @PathVariable @VerifyParam(required = true)Integer pageSize) {

@ -80,7 +80,7 @@ public class SongController {
@GetMapping("/collect/{userId}/{pageNum}/{pageSize}") @GetMapping("/collect/{userId}/{pageNum}/{pageSize}")
@GlobalInterceptor(checkAppUserLogin = true) @GlobalInterceptor(checkAppUserLogin = true)
public Result<PageResult<SongRespDTO>> collectPage( public Result<PageResult<SongRespDTO>> collectPage(
@RequestHeader(value = "Authorization", required = false) String authorization, @RequestHeader(value = "Authorization", required = true) String authorization,
@PathVariable @VerifyParam(required = true) String userId, @PathVariable @VerifyParam(required = true) String userId,
@PathVariable @VerifyParam(required = true) Integer pageNum, @PathVariable @VerifyParam(required = true) Integer pageNum,
@PathVariable @VerifyParam(required = true) Integer pageSize) { @PathVariable @VerifyParam(required = true) Integer pageSize) {

@ -206,7 +206,7 @@ public class LoginController extends BaseController {
@ApiOperation(value = "6.退出登录") @ApiOperation(value = "6.退出登录")
@PostMapping("/logout") @PostMapping("/logout")
@GlobalInterceptor(checkAppUserLogin = true) @GlobalInterceptor(checkAppUserLogin = true)
public Result<Void> logout(@RequestHeader(value = "Authorization", required = false) String authorization){ public Result<Void> logout(@RequestHeader(value = "Authorization", required = true) String authorization){
return Result.success(); return Result.success();
} }
} }

@ -31,7 +31,7 @@ public class UserCollectController {
@ApiImplicitParam(name = "collectType", value = "0:歌曲1:期刊2:关注3:黑名单", required = true) }) @ApiImplicitParam(name = "collectType", value = "0:歌曲1:期刊2:关注3:黑名单", required = true) })
@PostMapping @PostMapping
@GlobalInterceptor(checkAppUserLogin = true) @GlobalInterceptor(checkAppUserLogin = true)
public Result<Void> addCollect(@RequestHeader(value = "Authorization", required = false) String authorization, public Result<Void> addCollect(@RequestHeader(value = "Authorization", required = true) String authorization,
@VerifyParam(required = true) @RequestParam("objectId") String objectId, @VerifyParam(required = true) @RequestParam("objectId") String objectId,
@VerifyParam(required = true) @RequestParam("collectType") Integer collectType) { @VerifyParam(required = true) @RequestParam("collectType") Integer collectType) {
UserLoginDto loginDto = jwtUtil.getUserLoginDto(authorization); UserLoginDto loginDto = jwtUtil.getUserLoginDto(authorization);
@ -48,7 +48,7 @@ public class UserCollectController {
@ApiImplicitParam(name = "collectType", value = "0:歌曲1:期刊2:关注3:黑名单4:粉丝", required = true) }) @ApiImplicitParam(name = "collectType", value = "0:歌曲1:期刊2:关注3:黑名单4:粉丝", required = true) })
@DeleteMapping @DeleteMapping
@GlobalInterceptor(checkAppUserLogin = true) @GlobalInterceptor(checkAppUserLogin = true)
public Result<Void> cancelCollect(@RequestHeader(value = "Authorization", required = false) String authorization, public Result<Void> cancelCollect(@RequestHeader(value = "Authorization", required = true) String authorization,
@VerifyParam(required = true) @RequestParam("objectId") String objectId, @VerifyParam(required = true) @RequestParam("objectId") String objectId,
@VerifyParam(required = true) @RequestParam("collectType") Integer collectType) { @VerifyParam(required = true) @RequestParam("collectType") Integer collectType) {
UserLoginDto loginDto = jwtUtil.getUserLoginDto(authorization); UserLoginDto loginDto = jwtUtil.getUserLoginDto(authorization);

Loading…
Cancel
Save