zhoushihao
2024-12-03 cf33278c73767f72e35a4898c23765f52a3bfd1d
hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/mapper/EdgStorageDeviceTaskMapper.xml
@@ -4,6 +4,8 @@
    <resultMap id="baseMap" type="com.mes.opctask.entity.EdgStorageDeviceTask">
        <id column="task_running" property="taskRunning"/>
        <id column="glass_id" property="glassId"/>
        <id column="in_place" property="inPlace"/>
        <id column="glass_id_in" property="glassIdIn"/>
        <id column="glass_id_out" property="glassIdOut"/>
        <id column="current_cell" property="currentCell"/>
@@ -16,19 +18,16 @@
    <select id="queryTaskMessage" resultMap="baseMap">
        select *
        from #{tableName}
        from ${tableName}
        limit 1
    </select>
    <update id="updateTaskMessage">
        UPDATE #{tableName}
        SET task_running = #{taskRunning},
        glass_id_out = #{glassIdOut},
        current_cell = #{currentCell},
        start_cell = #{startCell},
        enc_cell = #{endCell},
        <if test="taskState == 0">
            task_state = #{taskState},
        </if>
        UPDATE ${tableName}
        SET task_running = #{task.taskRunning},
        glass_id_out = #{task.glassIdOut},
        current_cell = #{task.currentCell},
        start_cell = #{task.startCell},
        end_cell = #{task.endCell}
    </update>
</mapper>