diff --git a/luoo_music/src/main/java/com/luoo/music/dao/TagDao.java b/luoo_music/src/main/java/com/luoo/music/dao/TagDao.java index 11d1855..21c50fa 100644 --- a/luoo_music/src/main/java/com/luoo/music/dao/TagDao.java +++ b/luoo_music/src/main/java/com/luoo/music/dao/TagDao.java @@ -22,10 +22,10 @@ public interface TagDao extends JpaRepository, JpaSpecificationExec @Query(value = "select * from tb_tag_info where state=1 and parent_id=(select id from tb_tag_info where name_ch='语言' and level=1 limit 1) ", nativeQuery = true) List getLanguageList(); - @Query(value = "select * from tb_tag_info where state=1 and is_show=1 and not name_ch='语言' ", nativeQuery = true) + @Query(value = "select * from tb_tag_info where state=1 and is_show=1 and not name_ch='语言' order by create_time", nativeQuery = true) List getStyleList(); - @Query(value = "select * from tb_tag_info where state=1 and is_show=1", nativeQuery = true) + @Query(value = "select * from tb_tag_info where state=1 and is_show=1 order by create_time", nativeQuery = true) List getCategoryTags(); @Query(value = "select journal_id,name_ch from tb_journal_tag,tb_tag_info where journal_id in ?1 and tb_journal_tag.tag_id =tb_tag_info.id ;", nativeQuery = true) diff --git a/luoo_user/src/main/java/com/luoo/user/controller/MyController.java b/luoo_user/src/main/java/com/luoo/user/controller/MyController.java index 80d5984..5e45609 100644 --- a/luoo_user/src/main/java/com/luoo/user/controller/MyController.java +++ b/luoo_user/src/main/java/com/luoo/user/controller/MyController.java @@ -346,5 +346,12 @@ public class MyController extends BaseController { return Result.success(new PageResult(pageList.getTotalElements(),pageList.getContent())); } + // 查询我收到的评论 + @ApiOperation(value = "11.感谢", notes = "贡献者列表") + @GetMapping("/thanks") + public Result> getThanks() { + List list=userInfoService.getThanks().stream().map(user->getUserRespDTO(user, false, Collections.emptySet())).collect(Collectors.toList()); + return Result.success(list); + } } diff --git a/luoo_user/src/main/java/com/luoo/user/dao/UserInfoDao.java b/luoo_user/src/main/java/com/luoo/user/dao/UserInfoDao.java index fdd09b1..952936e 100644 --- a/luoo_user/src/main/java/com/luoo/user/dao/UserInfoDao.java +++ b/luoo_user/src/main/java/com/luoo/user/dao/UserInfoDao.java @@ -35,4 +35,7 @@ public interface UserInfoDao extends JpaRepository, JpaSpecifi @Query(value = "select * from tb_user_info where id = ?1", nativeQuery = true) public UserInfo getById(String id); + + @Query(value = "select * from tb_user_info where badges like '%1%' ", nativeQuery = true) + public List getThanks(); } diff --git a/luoo_user/src/main/java/com/luoo/user/service/UserInfoService.java b/luoo_user/src/main/java/com/luoo/user/service/UserInfoService.java index 9bd38c6..8a8ffad 100644 --- a/luoo_user/src/main/java/com/luoo/user/service/UserInfoService.java +++ b/luoo_user/src/main/java/com/luoo/user/service/UserInfoService.java @@ -289,4 +289,8 @@ public class UserInfoService { return updateAvatarPath(userInfoDao.getById(id)); } + public List getThanks() { + return userInfoDao.getThanks(); + } + }