| | |
| | | #{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 as slock_num, |
| | | atls.lock_state,atls.lock_position_state,atls.lock_shell_state, |
| | | atls.restart_state as srestart_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 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> |
| | | </mapper> |