ID,HOST_NAME, APP_PID,APP_NAME,CREATE_TIME,CPU_PER,MEM_PER,APP_TYPE,STATE,ACTIVE,READ_BYTES,WRITES_BYTES,THREADS_NUM,GATHER_PID,GROUP_ID,APP_TIMES = #{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')]]> = #{cpuPer} ]]> DELETE FROM APP_INFO WHERE ID = #{id} DELETE FROM APP_INFO WHERE DELETE FROM APP_INFO WHERE ID IN #{item} INSERT INTO APP_INFO ID, HOST_NAME, APP_PID, APP_NAME, CPU_PER, MEM_PER, APP_TYPE, STATE, ACTIVE, READ_BYTES, WRITES_BYTES, THREADS_NUM, GATHER_PID, GROUP_ID, APP_TIMES, CREATE_TIME #{id}, #{hostname}, #{appPid}, #{appName}, #{cpuPer}, #{memPer}, #{appType}, #{state}, #{active}, #{readBytes}, #{writesBytes}, #{threadsNum}, #{gatherPid}, #{groupId}, #{appTimes}, #{createTime} begin INSERT INTO APP_INFO (ID,HOST_NAME, APP_PID,APP_NAME,CREATE_TIME,CPU_PER,MEM_PER,APP_TYPE,STATE,ACTIVE,READ_BYTES,WRITES_BYTES,THREADS_NUM,GATHER_PID,GROUP_ID,APP_TIMES) VALUES (#{item.id},#{item.hostname},#{item.appPid},#{item.appName},#{item.createTime},#{item.cpuPer},#{item.memPer},#{item.appType},#{item.state},#{item.active},#{item.readBytes},#{item.writesBytes},#{item.threadsNum},#{item.gatherPid},#{item.groupId},#{item.appTimes}); end; INSERT INTO APP_INFO (ID,HOST_NAME, APP_PID,APP_NAME,CREATE_TIME,CPU_PER,MEM_PER,APP_TYPE,STATE,ACTIVE,READ_BYTES,WRITES_BYTES,THREADS_NUM,GATHER_PID,GROUP_ID,APP_TIMES) VALUES (#{item.id},#{item.hostname},#{item.appPid},#{item.appName},#{item.createTime},#{item.cpuPer},#{item.memPer},#{item.appType},#{item.state},#{item.active},#{item.readBytes},#{item.writesBytes},#{item.threadsNum},#{item.gatherPid},#{item.groupId},#{item.appTimes}) UPDATE APP_INFO SET STATE = '2' WHERE HOST_NAME IN #{item} begin UPDATE APP_INFO HOST_NAME = #{item.hostname}, APP_PID = #{item.appPid}, APP_NAME = #{item.appName}, CPU_PER = #{item.cpuPer}, MEM_PER = #{item.memPer}, APP_TYPE = #{item.appType}, STATE = #{item.state}, ACTIVE = #{item.active}, READ_BYTES = #{item.readBytes}, WRITES_BYTES = #{item.writesBytes}, THREADS_NUM = #{item.threadsNum}, GATHER_PID = #{item.gatherPid}, GROUP_ID = #{item.groupId}, APP_TIMES = #{item.appTimes}, CREATE_TIME= #{item.createTime} WHERE ID = #{item.id}; end; UPDATE APP_INFO HOST_NAME = #{hostname}, APP_PID = #{appPid}, APP_NAME = #{appName}, CPU_PER = #{cpuPer}, MEM_PER = #{memPer}, APP_TYPE = #{appType}, STATE = #{state}, ACTIVE = #{active}, READ_BYTES = #{readBytes}, WRITES_BYTES = #{writesBytes}, THREADS_NUM = #{threadsNum}, GATHER_PID = #{gatherPid}, GROUP_ID = #{groupId}, APP_TIMES = #{appTimes}, CREATE_TIME = #{createTime} WHERE ID = #{id}