| | |
| | | private final RemoteAppUserService remoteAppUserService; |
| | | |
| | | /** |
| | | * 远程调用 根据章节id和用户id查询是否观看完毕 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @PostMapping("/getCourseChapterHistoryState/{id}/{chapterId}") |
| | | public R<Integer> getCourseChapterHistoryState(@PathVariable("id") Long id,@PathVariable("chapterId") Long chapterId) { |
| | | List<AppUserViewingHistory> list = appUserViewingHistoryService.lambdaQuery() |
| | | .eq(AppUserViewingHistory::getChapterId, chapterId) |
| | | .eq(AppUserViewingHistory::getAppUserId, id) |
| | | .eq(AppUserViewingHistory::getViewingType, 2) |
| | | .list(); |
| | | for (AppUserViewingHistory appUserViewingHistory : list) { |
| | | if (appUserViewingHistory.getIsOver()!=null && appUserViewingHistory.getIsOver()==1){ |
| | | return R.ok(1); |
| | | } |
| | | } |
| | | return R.ok(2); |
| | | } |
| | | |
| | | /** |
| | | * 远程调用查询用户观看了哪些课程 |
| | | * @return |
| | | */ |