榆山
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
1.0 KiB

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.elink.esua.epdc.modules.screen.dao.EpdcScreenDao">
<select id="gridGovernanceItemList" resultType="com.elink.esua.epdc.dto.analysis.pc.screen.result.EpdcScreenGridGovernanceItemResultDTO">
SELECT
i.ID,
i.ITEM_CONTENT,
c.CATEGORY_NAME,
i.DISTRIBUTE_TIME,
IFNULL(e.APPROVE_NUM + e.OPPOSE_NUM + e.COMMENT_NUM, 0) AS attentionNum
FROM
yushan_esua_epdc_events.epdc_item i
LEFT JOIN yushan_esua_epdc_events.epdc_category c ON c.CATEGORY_CODE = i.CATEGORY_CODE
LEFT JOIN yushan_esua_epdc_events.epdc_events e ON e.ID = i.EVENT_ID
WHERE
i.DEL_FLAG = '0'
ORDER BY
<if test="orderType == 1">
attentionNum DESC,
</if>
i.DISTRIBUTE_TIME DESC
LIMIT #{pageIndex}, #{pageSize}
</select>
</mapper>