Преглед изворни кода

新增当前用户是否关注

fangqing пре 3 месеци
родитељ
комит
6e0ab06b73

+ 1 - 0
ruoyi-generator/src/main/java/com/ruoyi/generator/vo/LikeVo.java

@@ -21,4 +21,5 @@ public class LikeVo {
     private Date createTime;
     private String type;
     private boolean isRead;
+    private boolean isLike;
 }

+ 1 - 0
ruoyi-generator/src/main/resources/mapper/community/CommunityUserLikeMapper.xml

@@ -8,6 +8,7 @@
                cul.create_time,
                (select nick_name from sys_user su where su.user_id = cul.user_id) as nick_name,
                (select avatar from sys_user su where su.user_id = cul.user_id)    as avatar,
+               (select  id  from community_user_like cul2 where cul2.user_id = #{userId}  and cul2.like_user_id = cul.user_id) as isLike,
                cul.is_read,
                '4' as type
         from community_user_like cul