1. 删除状态值

This commit is contained in:
ant 2024-07-18 16:29:19 +08:00
parent f24d94b25d
commit 1b309739e4
1 changed files with 45 additions and 49 deletions

View File

@ -57,11 +57,9 @@
<select id="pageList" resultType="com.chushang.inspection.terminal.vo.StoreTerminalVO">
<include refid="selectStoreTerminalSql"/>
<where>
<if test="1 == 1">
${query.sqlParam.get('sqlWhere')}
</if>
</where>
<if test="1 == 1">
${query.sqlParam.get('sqlWhere')}
</if>
ORDER BY #{query.orderBy} #{query.isAsc}
</select>
<sql id="selectStoreTerminalSql">
@ -116,6 +114,7 @@
INNER JOIN st_store s ON t.store_id = s.store_id
INNER JOIN ta_polling_task pt ON t.task_id = pt.id
INNER JOIN wrk_project p ON pt.project_id = p.project_id
where t.del_state = 0
</sql>
<select id="selectPageApp" resultType="com.chushang.inspection.project.vo.TerminalAppVO">
SELECT t.terminal_id AS terminalId,
@ -134,47 +133,46 @@
LEFT JOIN st_terminal_ins ti ON t.terminal_id = ti.terminal_id
LEFT JOIN ta_polling_task pt on pt.id = t.lower_task_id
INNER JOIN st_store s ON s.store_id = t.store_id
<where>
<if test="query.taskId != null">
AND t.task_id = #{query.taskId}
</if>
<if test="query.storeNo != null">
AND t.store_no = #{query.storeNo}
</if>
<if test="query.terminalNo != null">
AND t.terminal_no = #{query.terminalNo}
</if>
<if test="query.terminalSn != null">
AND t.terminal_no = #{query.terminalSn}
</if>
<if test="query.terminalAddress != null and query.terminalAddress != ''">
AND t.terminal_address like concat('%', #{query.terminalAddress}, '%')
</if>
<if test="query.occupy != null">
AND t.occupy = #{query.occupy}
</if>
<if test="query.storeState != null">
AND s.state = #{query.storeState}
</if>
<if test="query.shopName != null and query.shopName != ''">
AND s.shop_name like concat('%', #{query.shopName}, '%')
</if>
<if test="query.lowerTaskName != null and query.lowerTaskName != ''">
AND pt.name like concat('%', #{query.lowerTaskName}, '%')
</if>
<if test="query.storeName != null and query.storeName != ''">
AND s.store_name like concat('%', #{query.storeName}, '%')
</if>
<if test="query.storeContact != null and query.storeContact != ''">
AND s.store_contact like concat('%', #{query.storeContact}, '%')
</if>
<if test="query.storeAddress != null and query.storeAddress != ''">
AND s.store_address like concat('%', #{query.storeAddress}, '%')
</if>
<if test="1 == 1">
${query.sqlParam.get('dataScope')}
</if>
</where>
WHERE t.del_state = 0
<if test="query.taskId != null">
AND t.task_id = #{query.taskId}
</if>
<if test="query.storeNo != null">
AND t.store_no = #{query.storeNo}
</if>
<if test="query.terminalNo != null">
AND t.terminal_no = #{query.terminalNo}
</if>
<if test="query.terminalSn != null">
AND t.terminal_no = #{query.terminalSn}
</if>
<if test="query.terminalAddress != null and query.terminalAddress != ''">
AND t.terminal_address like concat('%', #{query.terminalAddress}, '%')
</if>
<if test="query.occupy != null">
AND t.occupy = #{query.occupy}
</if>
<if test="query.storeState != null">
AND s.state = #{query.storeState}
</if>
<if test="query.shopName != null and query.shopName != ''">
AND s.shop_name like concat('%', #{query.shopName}, '%')
</if>
<if test="query.lowerTaskName != null and query.lowerTaskName != ''">
AND pt.name like concat('%', #{query.lowerTaskName}, '%')
</if>
<if test="query.storeName != null and query.storeName != ''">
AND s.store_name like concat('%', #{query.storeName}, '%')
</if>
<if test="query.storeContact != null and query.storeContact != ''">
AND s.store_contact like concat('%', #{query.storeContact}, '%')
</if>
<if test="query.storeAddress != null and query.storeAddress != ''">
AND s.store_address like concat('%', #{query.storeAddress}, '%')
</if>
<if test="1 == 1">
${query.sqlParam.get('dataScope')}
</if>
ORDER BY t.create_time DESC
</select>
@ -212,12 +210,10 @@
from st_terminal t1
left join st_store t2 on t1.store_id = t2.store_id
left join st_terminal_ins t3 on t3.terminal_id = t1.terminal_id
<where>
where t1.del_state = 0
<if test="query.taskId != null">
AND t1.task_id = #{query.taskId}
</if>
</where>
ORDER BY t1.create_time DESC limit 10
</select>
</mapper>