|
@@ -28,7 +28,7 @@
|
|
<select id="findList" resultType="com.jeeplus.modules.knowledgeSharing.entity.KnowledgeSharingInfo" >
|
|
<select id="findList" resultType="com.jeeplus.modules.knowledgeSharing.entity.KnowledgeSharingInfo" >
|
|
SELECT
|
|
SELECT
|
|
<include refid="businessQuestionsColumns"/>
|
|
<include refid="businessQuestionsColumns"/>
|
|
- ,(select sum(ksv.visit_count) from knowledge_sharing_view ksv where a.id = ksv.knowledge_sharing_id) as "readCount"
|
|
|
|
|
|
+ ,ifnull((select sum(ksv.visit_count) from knowledge_sharing_view ksv where a.id = ksv.knowledge_sharing_id),0) as "readCount"
|
|
,(select count(ksc.id) from knowledge_sharing_comment ksc where a.id = ksc.knowledge_sharing_id) as "replyCount"
|
|
,(select count(ksc.id) from knowledge_sharing_comment ksc where a.id = ksc.knowledge_sharing_id) as "replyCount"
|
|
FROM knowledge_sharing_info a
|
|
FROM knowledge_sharing_info a
|
|
left join sys_user su on su.id = a.create_by
|
|
left join sys_user su on su.id = a.create_by
|
|
@@ -37,6 +37,9 @@
|
|
<if test="columnId != null and columnId != ''">
|
|
<if test="columnId != null and columnId != ''">
|
|
AND a.column_id = #{columnId}
|
|
AND a.column_id = #{columnId}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="subject != null and subject != ''">
|
|
|
|
+ AND a.subject like concat('%',#{subject})
|
|
|
|
+ </if>
|
|
<if test="(jordanswId != null and jordanswId != '') or (jordanswName != null and jordanswName != '')">
|
|
<if test="(jordanswId != null and jordanswId != '') or (jordanswName != null and jordanswName != '')">
|
|
AND (a.create_by = #{jordanswId} or su.name like concat('%',#{jordanswName},'%'))
|
|
AND (a.create_by = #{jordanswId} or su.name like concat('%',#{jordanswName},'%'))
|
|
</if>
|
|
</if>
|
|
@@ -60,6 +63,9 @@
|
|
<if test="columnId != null and columnId != ''">
|
|
<if test="columnId != null and columnId != ''">
|
|
AND a.column_id = #{columnId}
|
|
AND a.column_id = #{columnId}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="subject != null and subject != ''">
|
|
|
|
+ AND a.subject like concat('%',#{subject})
|
|
|
|
+ </if>
|
|
<if test="(jordanswId != null and jordanswId != '') or (jordanswName != null and jordanswName != '')">
|
|
<if test="(jordanswId != null and jordanswId != '') or (jordanswName != null and jordanswName != '')">
|
|
AND (a.create_by = #{jordanswId} or su.name like concat('%',#{jordanswName},'%'))
|
|
AND (a.create_by = #{jordanswId} or su.name like concat('%',#{jordanswName},'%'))
|
|
</if>
|
|
</if>
|