فهرست منبع

后台im功能

zouxuan 2 سال پیش
والد
کامیت
42f6d58b20

+ 11 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/NameDto.java

@@ -7,9 +7,20 @@ public class NameDto {
 
     private String name;
 
+    @ApiModelProperty(value = "头像",required = false)
+    private String avatar;
+
     @ApiModelProperty(value = "1 单人, 3 群组",required = false)
     private Integer type;
 
+    public String getAvatar() {
+        return avatar;
+    }
+
+    public void setAvatar(String avatar) {
+        this.avatar = avatar;
+    }
+
     public String getId() {
         return id;
     }

+ 5 - 1
mec-biz/src/main/resources/config/mybatis/ImUserFriendMapper.xml

@@ -123,8 +123,12 @@
 		<result property="id" column="id_" />
 		<result property="name" column="name_" />
 		<result property="type" column="type_"/>
+		<result property="avatar" column="avatar_"/>
 	</resultMap>
     <select id="queryNameByIds" resultMap="NameDto">
-		select friend_id_ id_,friend_nickname_ name_,1 type_ from im_user_friend where user_id_ = #{userId} and find_in_set(friend_id_,#{ids})
+		select iuf.friend_id_ id_,iuf.friend_nickname_ name_,1 type_,su.avatar_
+		from im_user_friend iuf
+		left join sys_user su on iuf.friend_id_ = su.id_
+		where iuf.user_id_ = #{userId} and find_in_set(friend_id_,#{ids})
 	</select>
 </mapper>