|
@@ -3,7 +3,6 @@
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="cn.xyh.amActivity.mapper.AmCommentMapper">
|
|
<mapper namespace="cn.xyh.amActivity.mapper.AmCommentMapper">
|
|
|
-
|
|
|
|
|
<resultMap type="cn.xyh.amActivity.domain.AmComment" id="AmCommentResult">
|
|
<resultMap type="cn.xyh.amActivity.domain.AmComment" id="AmCommentResult">
|
|
|
<result property="commentId" column="comment_id"/>
|
|
<result property="commentId" column="comment_id"/>
|
|
|
<result property="sourceId" column="source_id"/>
|
|
<result property="sourceId" column="source_id"/>
|
|
@@ -35,6 +34,7 @@
|
|
|
content,
|
|
content,
|
|
|
`status`,
|
|
`status`,
|
|
|
create_time,
|
|
create_time,
|
|
|
|
|
+ am_id,
|
|
|
`name`,
|
|
`name`,
|
|
|
avatar,
|
|
avatar,
|
|
|
parent_user_name,
|
|
parent_user_name,
|
|
@@ -49,6 +49,7 @@
|
|
|
ac.content,
|
|
ac.content,
|
|
|
ac.`status`,
|
|
ac.`status`,
|
|
|
ac.create_time,
|
|
ac.create_time,
|
|
|
|
|
+ a.am_id,
|
|
|
u.nick_name AS `name`,
|
|
u.nick_name AS `name`,
|
|
|
u.avatar,
|
|
u.avatar,
|
|
|
pu.user_name AS parent_user_name,
|
|
pu.user_name AS parent_user_name,
|
|
@@ -56,6 +57,7 @@
|
|
|
IFNULL(aca.count, 0) AS children_count
|
|
IFNULL(aca.count, 0) AS children_count
|
|
|
FROM am_comment AS ac
|
|
FROM am_comment AS ac
|
|
|
LEFT JOIN sys_user AS u ON ac.user_name = u.user_name
|
|
LEFT JOIN sys_user AS u ON ac.user_name = u.user_name
|
|
|
|
|
+ LEFT JOIN am_alumnus AS a ON a.user_id = u.user_id
|
|
|
LEFT JOIN am_comment AS pac ON ac.parent_id = pac.comment_id
|
|
LEFT JOIN am_comment AS pac ON ac.parent_id = pac.comment_id
|
|
|
LEFT JOIN sys_user AS pu ON pac.user_name = pu.user_name
|
|
LEFT JOIN sys_user AS pu ON pac.user_name = pu.user_name
|
|
|
LEFT JOIN (SELECT root_id, COUNT(root_id) AS count FROM am_comment GROUP BY root_id) AS aca
|
|
LEFT JOIN (SELECT root_id, COUNT(root_id) AS count FROM am_comment GROUP BY root_id) AS aca
|
|
@@ -70,6 +72,4 @@
|
|
|
<include refid="selectCommentVo"/>
|
|
<include refid="selectCommentVo"/>
|
|
|
${ew.getCustomSqlSegment}
|
|
${ew.getCustomSqlSegment}
|
|
|
</select>
|
|
</select>
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
</mapper>
|
|
</mapper>
|