fix:修复查询为null的问题
This commit is contained in:
@@ -33,11 +33,11 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="queryMomentComment" resultMap="commentResultMap">
|
<select id="queryMomentComment" resultMap="commentResultMap">
|
||||||
SELECT a.id AS id,
|
SELECT a.id AS id,
|
||||||
b.username AS username,
|
b.username AS username,
|
||||||
b.avatar AS avatar,
|
COALESCE(b.avatar, '') AS avatar,
|
||||||
a.content AS content,
|
a.content AS content,
|
||||||
a.create_time AS date
|
a.create_time AS date
|
||||||
FROM comment_record AS a
|
FROM comment_record AS a
|
||||||
LEFT JOIN user AS b ON a.create_by = b.id
|
LEFT JOIN user AS b ON a.create_by = b.id
|
||||||
WHERE subject_id = #{id}
|
WHERE subject_id = #{id}
|
||||||
@@ -45,12 +45,12 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="queryMomentList" resultMap="momentResultMap">
|
<select id="queryMomentList" resultMap="momentResultMap">
|
||||||
SELECT a.id AS id,
|
SELECT a.id AS id,
|
||||||
b.id AS userId,
|
b.id AS userId,
|
||||||
b.username AS username,
|
b.username AS username,
|
||||||
b.avatar AS avatar,
|
COALESCE(b.avatar, '') AS avatar,
|
||||||
a.content AS content,
|
a.content AS content,
|
||||||
a.create_time AS date
|
a.create_time AS date
|
||||||
FROM moment AS a
|
FROM moment AS a
|
||||||
LEFT JOIN user AS b ON a.create_by = b.id
|
LEFT JOIN user AS b ON a.create_by = b.id
|
||||||
ORDER BY a.create_time DESC
|
ORDER BY a.create_time DESC
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
SELECT a.id AS id,
|
SELECT a.id AS id,
|
||||||
b.id AS userId,
|
b.id AS userId,
|
||||||
b.username AS username,
|
b.username AS username,
|
||||||
b.avatar AS avatar,
|
COALESCE(b.avatar, '') AS avatar,
|
||||||
a.content AS content,
|
a.content AS content,
|
||||||
a.create_time AS date
|
a.create_time AS date
|
||||||
FROM moment AS a
|
FROM moment AS a
|
||||||
|
|||||||
Reference in New Issue
Block a user