1.add auth check for journal/song/myInfo

main
Gary 10 months ago
parent 6dca2f6477
commit 6ce581047b

@ -73,7 +73,7 @@ public class JournalController {
@ApiImplicitParam(name = "pageSize", value = "分页: 每页数量", required = true) @ApiImplicitParam(name = "pageSize", value = "分页: 每页数量", required = true)
}) })
@GetMapping("/collect/{userId}/{pageNum}/{pageSize}") @GetMapping("/collect/{userId}/{pageNum}/{pageSize}")
@GlobalInterceptor @GlobalInterceptor(checkAppUserLogin = true)
public Result<PageResult<JournalRespDTO>> collectPage( public Result<PageResult<JournalRespDTO>> collectPage(
@PathVariable @VerifyParam(required = true)String userId, @PathVariable @VerifyParam(required = true)String userId,
@PathVariable @VerifyParam(required = true)Integer pageNum, @PathVariable @VerifyParam(required = true)Integer pageNum,

@ -80,7 +80,7 @@ public class SongController {
@ApiImplicitParam(name = "pageSize", value = "分页: 每页数量", required = true) @ApiImplicitParam(name = "pageSize", value = "分页: 每页数量", required = true)
}) })
@GetMapping("/collect/{userId}/{pageNum}/{pageSize}") @GetMapping("/collect/{userId}/{pageNum}/{pageSize}")
@GlobalInterceptor @GlobalInterceptor(checkAppUserLogin = true)
public Result<PageResult<SongRespDTO>> collectPage( public Result<PageResult<SongRespDTO>> collectPage(
@PathVariable @VerifyParam(required = true)String userId, @PathVariable @VerifyParam(required = true)String userId,
@PathVariable @VerifyParam(required = true)Integer pageNum, @PathVariable @VerifyParam(required = true)Integer pageNum,

@ -173,8 +173,7 @@ public class MyController extends BaseController {
@ApiOperation(value = "4.查看他人信息", notes = "游客无法查看他人信息") @ApiOperation(value = "4.查看他人信息", notes = "游客无法查看他人信息")
@GetMapping("/getOtherUserInfo/{userId}") @GetMapping("/getOtherUserInfo/{userId}")
@GlobalInterceptor(checkAppUserLogin = true) @GlobalInterceptor(checkAppUserLogin = true)
public Result<UserRespDTO> getOtherUserInfo(@RequestHeader(value = "token", required = false) String token, public Result<UserRespDTO> getOtherUserInfo(@VerifyParam(required = true) @PathVariable String userId) {
@VerifyParam(required = true) @PathVariable String userId) {
UserInfo user = userInfoService.findById(userId); UserInfo user = userInfoService.findById(userId);
if (null == user) { if (null == user) {
return Result.failed(StatusCode.USER_INVALID_USER_ID); return Result.failed(StatusCode.USER_INVALID_USER_ID);

Loading…
Cancel
Save