ID,HOST_NAME, CUSTOM_NAME,CUSTOM_SHELL,CREATE_TIME,RESULT_EXP,STATE,ACTIVE,CUSTOM_VALUE,GROUP_ID
= #{startTime} and CREATE_TIME <=#{endTime}]]>
= cast(#{startTime} as timestamp) and CREATE_TIME <= cast(#{endTime} as timestamp)]]>
= to_date(#{startTime},'yyyy-MM-dd hh24:mi:ss') and CREATE_TIME <= to_date(#{endTime},'yyyy-MM-dd hh24:mi:ss')]]>
DELETE FROM CUSTOM_INFO
WHERE ID = #{id}
DELETE FROM CUSTOM_INFO WHERE
DELETE FROM
CUSTOM_INFO
WHERE ID IN
#{item}
INSERT INTO CUSTOM_INFO
ID,HOST_NAME,CUSTOM_NAME,CUSTOM_SHELL,RESULT_EXP,STATE,ACTIVE,GROUP_ID,CUSTOM_VALUE,CREATE_TIME#{id},#{hostname},#{customName},#{customShell},#{resultExp},#{state},#{active},#{groupId},#{customValue},#{createTime}
begin
INSERT INTO CUSTOM_INFO (ID,HOST_NAME, CUSTOM_NAME,CUSTOM_SHELL,CREATE_TIME,RESULT_EXP,STATE,ACTIVE,GROUP_ID,CUSTOM_VALUE) VALUES
(#{item.id},#{item.hostname},#{item.customName},#{item.customShell},#{item.createTime},#{item.state},#{item.active},#{item.groupId},#{item.customValue});
end;
INSERT INTO CUSTOM_INFO (ID,HOST_NAME, CUSTOM_NAME,CUSTOM_SHELL,CREATE_TIME,RESULT_EXP,STATE,ACTIVE,GROUP_ID,CUSTOM_VALUE) VALUES
(#{item.id},#{item.hostname},#{item.customName},#{item.customShell},#{item.createTime},#{item.state},#{item.active},#{item.groupId},#{item.customValue})
UPDATE CUSTOM_INFO SET STATE = '2'
WHERE HOST_NAME IN
#{item}
begin
UPDATE CUSTOM_INFO
HOST_NAME = #{item.hostname},
CUSTOM_NAME = #{item.customName},
CUSTOM_SHELL = #{item.customShell},
RESULT_EXP = #{item.resultExp},
STATE = #{item.state},
ACTIVE = #{item.active},
GROUP_ID = #{item.groupId},
CUSTOM_VALUE = #{item.customValue},
CREATE_TIME= #{item.createTime}
WHERE ID = #{item.id};
end;
UPDATE CUSTOM_INFO
HOST_NAME = #{hostname},
CUSTOM_NAME = #{customName},
CUSTOM_SHELL = #{customShell},
RESULT_EXP = #{resultExp},
STATE = #{state},
ACTIVE = #{active},
GROUP_ID = #{groupId},
CUSTOM_VALUE = #{customValue},
CREATE_TIME = #{createTime}
WHERE ID = #{id}