| | |
| | | #{uniqueMark,jdbcType=VARCHAR}) |
| | | on conflict(unique_mark) do update set upload_time=#{uploadTime,jdbcType=VARCHAR} |
| | | </insert> |
| | | |
| | | <select id="selectArdTankLockStateByLockIdLimitOne" parameterType="java.lang.String" resultMap="ArdTankLockStateResult"> |
| | | select atls.id,atls.lock_id,atls.lock_num,atls.lock_state, |
| | | atls.lock_position_state,atls.lock_shell_state,atls.restart_state, |
| | | atls.batter_voltage,atls.power_voltage,atls.upload_time,atls.unique_mark, |
| | | case atls.lock_state |
| | | when '关锁状态' then false |
| | | when '异常状态' then false |
| | | /*when '动作状态' then false*/ |
| | | when '操控中...' then false |
| | | when '开锁状态' then true |
| | | end as lock_state_mark |
| | | from ard_tank_lock_state atls |
| | | where atls.lock_id = #{lockId} order by atls.upload_time desc |
| | | limit 1 |
| | | </select> |
| | | |
| | | <update id="updateArdTankLockStateByUniqueMark" parameterType="java.lang.String"> |
| | | update ard_tank_lock_state set upload_time = #{uploadTime} |
| | | where unique_mark = #{uniqueMark} |
| | | </update> |
| | | </mapper> |