Browse Source

我收到的sql

master
yinzuomei 4 years ago
parent
commit
7564ef74fc
  1. 14
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetmessage/InfoProfileDao.xml

14
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetmessage/InfoProfileDao.xml

@ -75,9 +75,9 @@
SELECT
ir.INFO_ID,
ip.content,
ii.CREATED_TIME,
ip.CREATED_TIME,
ir.READ_FLAG,
ii.publish_staff_id,
ip.publish_staff_id,
ip.first_att_id,
ia.ATTACHMENT_NAME AS name,
ia.ATTACHMENT_FORMAT AS format,
@ -91,18 +91,20 @@
end) as duration
FROM
info_receivers ir
INNER JOIN info ii ON ( ir.INFO_ID = ii.ID )
INNER JOIN info_profile ip ON ( ii.ID = ip.INFO_ID AND ip.DEL_FLAG = '0' )
<if test="null != content and content !=''">
INNER JOIN info ii ON ( ir.INFO_ID = ii.ID )
</if>
INNER JOIN info_profile ip ON ( ir.INFO_ID = ip.INFO_ID AND ip.DEL_FLAG = '0' )
LEFT JOIN info_att ia on ( ip.first_att_id = ia.id AND ia.DEL_FLAG = '0' )
WHERE
ir.DEL_FLAG = '0'
AND ii.DEL_FLAG = '0'
AND ir.STAFF_ID = #{userId}
<if test="null != content and content !=''">
AND ii.DEL_FLAG = '0'
and ii.content like concat('%',trim(#{content}),'%')
</if>
ORDER BY
ii.CREATED_TIME DESC
ip.CREATED_TIME DESC
</select>
<select id="selectInfoDetail" parameterType="java.lang.String" resultType="com.epmet.dataaggre.dto.message.result.InfoDetailResDTO">

Loading…
Cancel
Save