| | |
| | | </delete> |
| | | |
| | | <select id="getAll" resultMap="ArdTankLockResult"> |
| | | select * from ard_tank_lock atl order by atl.car_id |
| | | select * from ard_tank_lock atl order by atl.car_id,lock_num |
| | | </select> |
| | | |
| | | <insert id="insertArdTankLocks" parameterType="com.ruoyi.sy.domain.ArdTankLock" > |
| | | insert into ard_tank_lock (id, lock_num, lock_name, |
| | | img_position_top, img_position_left, car_id, |
| | | enable, restart_state, online_time) |
| | | values |
| | | <foreach collection ="ardTankLocks" item="ardTankLock" separator =","> |
| | | (#{ardTankLock.id},#{ardTankLock.lockNum},#{ardTankLock.lockName}, |
| | | #{ardTankLock.imgPositionTop},#{ardTankLock.imgPositionLeft}, |
| | | #{ardTankLock.carId},#{ardTankLock.enable},#{ardTankLock.restartState}, |
| | | #{ardTankLock.onlineTime}) |
| | | </foreach > |
| | | </insert> |
| | | |
| | | <select id="getLockByCarId" resultMap="ArdTankLockResult" parameterType="java.lang.String"> |
| | | select * from ard_tank_lock atl where car_id = #{carId} order by atl.lock_num |
| | | </select> |
| | | |
| | | <delete id="deleteLockByCarId" parameterType="java.lang.String"> |
| | | delete from ard_tank_lock where car_id = #{carId} |
| | | </delete> |
| | | |
| | | <delete id="deleteArdTankLockByIdSet" > |
| | | delete from ard_tank_lock where id in |
| | | <foreach item="id" collection="idSet" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <select id="selectArdTankLockTotal" resultType="java.lang.Long"> |
| | | select count(distinct atl.car_id) from ard_tank_lock atl |
| | | </select> |
| | | |
| | | <select id="getLockByCarIdList" resultType="com.ruoyi.sy.domain.ArdTankLock" > |
| | | select * from ard_tank_lock atl where car_id in |
| | | <foreach item="id" collection="carIdList" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | order by atl.car_id,lock_num |
| | | </select> |
| | | |
| | | <select id="selectArdTankLockAllTotal" resultType="java.lang.Long"> |
| | | select count(*) from ard_tank_lock atl |
| | | </select> |
| | | |
| | | <select id="selectArdTankLockTotalByCarIdList" resultType="java.lang.Long"> |
| | | select count(*) from ard_tank_lock where car_id in |
| | | <foreach item="id" collection="carIdList" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </select> |
| | | |
| | | <delete id="deleteArdTankLockAndWallByCarIds" > |
| | | delete from ard_tank_wall_lock atwl where atwl.lock_id in ( |
| | | select atl.id from ard_tank_lock atl |
| | | where atl.car_id in |
| | | <foreach item="carId" collection="carIds" open="(" separator="," close=")"> |
| | | #{carId} |
| | | </foreach> |
| | | ); |
| | | delete from ard_tank_lock atl |
| | | where atl.car_id in |
| | | <foreach item="carId" collection="carIds" open="(" separator="," close=")"> |
| | | #{carId} |
| | | </foreach> |
| | | </delete> |
| | | </mapper> |