|
|
@@ -76,10 +76,13 @@
|
|
|
</select>
|
|
|
<select id="selectPageListForApp"
|
|
|
resultType="com.xunmei.common.core.domain.letter.vo.CoreIntroduceLetterVo">
|
|
|
+ select * from (
|
|
|
select
|
|
|
- a.*
|
|
|
+ a.*,
|
|
|
+ group_concat(u.user_name) as letterUserNames
|
|
|
from core_introduce_letter a
|
|
|
INNER JOIN core_introduce_letter_to_org o ON a.id =o.letter_id
|
|
|
+ INNER JOIN core_introduce_letter_user u ON a.id = u.letter_id
|
|
|
where a.deleted=0 ANd a.status!=0
|
|
|
<if test="coreIntroduceLetter.orgId != null ">
|
|
|
and o.org_id = #{coreIntroduceLetter.orgId}
|
|
|
@@ -87,13 +90,18 @@
|
|
|
<if test="coreIntroduceLetter.letterNo !=null and coreIntroduceLetter.letterNo !=''">
|
|
|
and a.letter_no like concat('%', #{coreIntroduceLetter.letterNo}, '%')
|
|
|
</if>
|
|
|
- <if test="coreIntroduceLetter.reasons !=null and coreIntroduceLetter.reasons !=''">
|
|
|
- and a.reasons like concat('%', #{coreIntroduceLetter.reasons}, '%')
|
|
|
- </if>
|
|
|
<if test="coreIntroduceLetter.type !=null and coreIntroduceLetter.type !=''">
|
|
|
and a.type = #{coreIntroduceLetter.type}
|
|
|
</if>
|
|
|
+ GROUP BY a.id
|
|
|
order by a.create_time DESC
|
|
|
+ ) as c
|
|
|
+ <where>
|
|
|
+ <if test="coreIntroduceLetter.keyWords !=null and coreIntroduceLetter.reasons !=''">
|
|
|
+ and c.reasons like concat('%', #{coreIntroduceLetter.keyWords}, '%')
|
|
|
+ or c.letterUserNames like concat('%', #{coreIntroduceLetter.keyWords}, '%')
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
</select>
|
|
|
|
|
|
|