2023-01-14 21:02:18 +08:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
2024-04-16 15:03:26 +08:00
|
|
|
<mapper namespace="com.aizuda.snailjob.template.datasource.persistence.mapper.ServerNodeMapper">
|
2024-03-29 13:37:55 +08:00
|
|
|
|
2024-05-21 15:16:04 +08:00
|
|
|
<update id="updateBatchExpireAt" parameterType="java.util.List">
|
2024-05-14 00:14:47 +08:00
|
|
|
UPDATE sj_server_node rt,
|
2024-05-20 23:39:11 +08:00
|
|
|
(
|
|
|
|
<foreach collection="list" item="item" index="index" separator="UNION ALL">
|
|
|
|
SELECT
|
2024-05-21 12:54:48 +08:00
|
|
|
#{item.hostId} AS host_id,
|
|
|
|
#{item.hostIp} AS host_ip,
|
|
|
|
#{item.expireAt} AS expire_at
|
2024-05-20 23:39:11 +08:00
|
|
|
</foreach>
|
|
|
|
) tt
|
|
|
|
SET rt.expire_at = tt.expire_at
|
|
|
|
WHERE rt.host_id = tt.host_id
|
|
|
|
AND rt.host_ip = tt.host_ip
|
2024-03-30 18:36:06 +08:00
|
|
|
</update>
|
2024-03-31 21:12:29 +08:00
|
|
|
|
2023-01-09 15:54:07 +08:00
|
|
|
</mapper>
|