| | |
| | | <sql id="Base_Column_List"> |
| | | task_id,terminal_id |
| | | </sql> |
| | | <insert id="insertTask"> |
| | | INSERT INTO |
| | | broadcast_v2_task_terminal ( task_id, terminal_id ) |
| | | VALUES |
| | | ( |
| | | #{taskId}, #{terminalId} |
| | | ) |
| | | </insert> |
| | | <!-- <insert id="insertTaskTerminal" |
| | | parameterType="java.util.List<com.sandu.ximon.dao.domain.BroadcastV2TaskTerminal>"> |
| | | INSERT INTO |
| | | broadcast_v2_task_terminal ( task_id, terminal_id ) |
| | | VALUES |
| | | <foreach collection="list" item="item" index="index" separator=","> |
| | | ( |
| | | #{item.taskId}, #{item.terminalId} |
| | | ) |
| | | </foreach> |
| | | </insert>--> |
| | | |
| | | <delete id="deleteByTaskId" parameterType="java.lang.Integer"> |
| | | delete from broadcast_v2_task_terminal where task_id=#{taskId} |
| | | delete |
| | | from |
| | | broadcast_v2_task_terminal |
| | | <!-- <if test="_parameter !=null" > |
| | | and task_id=#{taskId,jdbcType=INTEGER} |
| | | </if >--> |
| | | where |
| | | task_id=#{taskId} |
| | | </delete> |
| | | |
| | | |
| | | |
| | | |
| | | <select id="listAll" resultType="com.sandu.ximon.dao.domain.BroadcastTerminalV2Entity"> |
| | | SELECT |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getBroadcastTerminalList" resultType="com.sandu.ximon.dao.domain.BroadcastTerminalV2Entity"> |
| | | <select id="getBroadcastTerminalList" resultType="com.sandu.ximon.dao.bo.BroadcastTerminalV2EntityBo"> |
| | | SELECT |
| | | t1.*, t2.pole_id, |
| | | t3.pole_name |
| | |
| | | AND t2.device_type = 5 |
| | | LEFT JOIN pole t3 ON t3.id = t2.pole_id |
| | | <where> |
| | | t1.id IN |
| | | <foreach collection="listBroadcastTerminalId" open="(" close=")" item="airId" separator=","> |
| | | #{airId} |
| | | </foreach> |
| | | </where> |
| | | </select> |
| | | <select id="listBroadcastV2TerminalId" resultType="java.lang.Long"> |
| | | SELECT |
| | | t1.* |
| | | FROM |
| | | broadcast_v2_terminal t1 |
| | | <if test="keyword != null and keyword != ''"> |
| | | LEFT JOIN pole_binding t2 ON t1.id = t2.device_code |
| | | AND t2.device_type = 5 |
| | | LEFT JOIN pole t3 ON t3.id = t2.pole_id |
| | | </if> |
| | | <where> |
| | | <if test="keyword != null and keyword != ''"> |
| | | AND t3.pole_name LIKE CONCAT(CONCAT('%', #{keyword}), '%') |
| | | OR t1.terminal_name LIKE CONCAT(CONCAT('%', #{keyword}), '%') |
| | | </if> |
| | | <if test="clientId != null"> |
| | | AND t3.client_id = #{clientId} |