qinhouyu 1 år sedan
förälder
incheckning
4b100c1fe0

+ 3 - 0
sooka-jnb/src/main/java/com/sooka/jnb/information/domain/Information.java

@@ -63,4 +63,7 @@ public class Information extends BaseEntity
 
     @TableField(exist = false)
     private String nickName;
+
+    @TableField(exist = false)
+    private String headImg;
 }

+ 20 - 16
sooka-jnb/src/main/resources/mapper/information/InformationMapper.xml

@@ -17,6 +17,7 @@
         <result property="createTime" column="create_time"/>
         <result property="updateBy" column="update_by"/>
         <result property="nickName" column="nick_name"/>
+        <result property="headImg" column="head_img"/>
         <result property="imgUrlList" column="imgUrlList"/>
         <result property="updateTime" column="update_time"/>
         <result property="delFlag" column="del_flag"/>
@@ -134,22 +135,25 @@
     </select>
 
     <select id="selectInformationById" resultMap="InformationResult">
-        select a.id,
-               a.title_name,
-               a.text_details,
-               a.type,
-               a.create_by,
-               a.create_time,
-               a.update_by,
-               a.update_time,
-               a.del_flag,
-               a.is_government,
-               a.is_top,
-               a.like_num,
-               a.watch_num,
-               b.nick_name
-        from jnb_high_server as a
-        left join sys_user as b on b.user_id = a.create_by
+        SELECT
+            a.id,
+            a.title_name,
+            a.text_details,
+            a.type,
+            a.create_by,
+            a.create_time,
+            a.update_by,
+            a.update_time,
+            a.del_flag,
+            a.is_government,
+            a.is_top,
+            a.like_num,
+            a.watch_num,
+            b.wechat_name as nick_name,
+            b.head_img as head_img
+        FROM
+            jnb_high_server AS a
+                LEFT JOIN jnb_wx_user AS b ON b.id = a.create_by
         where a.id = #{id} and a.type = #{type}
     </select>