通过@RequestHeader()来获取然后用token相关工具取出token里面的用户信息
@AutoLog(value = "appAndroid用户课程小节视频学习进度管理列表")
@ApiOperation(value = "appAndroid用户课程小节视频学习进度管理列表", notes = "appAndroid用户课程小节视频学习进度管理列表")
@GetMapping(value = "/appAndroidStudyRecordList")
public Result<?> queryAndroid(@RequestHeader("X-Access-Token") String language) {
QueryWrapper<AppStudyRecordDO> queryAndroidWrapper = new QueryWrapper<>();
LoginUser loginUser = shiroRealm.checkUserTokenIsEffect(language);
String userId = loginUser.getId();
queryAndroidWrapper.eq("user_id", userId);
queryAndroidWrapper.eq("type", 1);
List<AppStudyRecordDO> appStudyRecordDOList = appStudyRecordService.list(queryAndroidWrapper);
return Result.ok(appStudyRecordDOList);
}
转载请注明原文地址:https://blackberry.8miu.com/read-33499.html