From 2354e7553566373c7767190750902953d21381fc Mon Sep 17 00:00:00 2001 From: HuangXin Date: Tue, 2 Nov 2021 09:56:46 +0800 Subject: [PATCH] =?UTF-8?q?OCT=20REM:=201.=20=20=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=E6=BA=90=E6=96=87=E4=BB=B6=E6=8D=A2=E8=A1=8C=E7=AC=A6=E7=BB=9F?= =?UTF-8?q?=E4=B8=80=E4=B8=BA=20unix=20=E6=8D=A2=E8=A1=8C=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/mappers/DeviceTask.xml | 314 +++++++------- .../resources/mappers/DisposeCapacity.xml | 92 ++--- src/main/resources/mappers/DisposeDevice.xml | 324 +++++++-------- src/main/resources/mappers/DisposeTask.xml | 382 +++++++++--------- src/main/resources/mappers/UserAccount.xml | 232 +++++------ 5 files changed, 672 insertions(+), 672 deletions(-) diff --git a/src/main/resources/mappers/DeviceTask.xml b/src/main/resources/mappers/DeviceTask.xml index 63e30ae5..557277bc 100644 --- a/src/main/resources/mappers/DeviceTask.xml +++ b/src/main/resources/mappers/DeviceTask.xml @@ -1,158 +1,158 @@ - - - - - - - - - - - - - - - - - - - - - - - - INSERT IGNORE INTO device_task(taskId, deviceId, taskAttackType, status, devStatus) - VALUES - - (#{task.taskId}, #{task.deviceId}, #{task.taskAttackType}, - ${@com.dispose.common.DisposeTaskStatus@TASK_NEW.getValue()}, -1) - - - - - INSERT IGNORE INTO device_task(taskId, deviceId, taskAttackType, status, devStatus) - VALUES (#{taskId}, #{deviceId}, #{taskAttackType}, - ${@com.dispose.common.DisposeTaskStatus@TASK_NEW.getValue()}, -1) - - - - - - - - - - - - - - UPDATE device_task - SET status = #{status} - - , endTime = CURRENT_TIMESTAMP - - - , beginTime = CURRENT_TIMESTAMP - - WHERE id = #{id} - - - - UPDATE device_task - SET devStatus = #{devStatus} - WHERE id = #{id} - AND devStatus != #{devStatus} - - - - UPDATE device_task - SET execAttackTypeIn = #{attackTypeValue} - WHERE id = #{id} - - - - UPDATE device_task - SET execAttackTypeOut = #{attackTypeValue} - WHERE id = #{id} - - - - UPDATE device_task - SET attackTypeStatusIn = #{attackStatsValue} - WHERE id = #{id} - - - - UPDATE device_task - SET attackTypeStatusOut = #{attackStatsValue} - WHERE id = #{id} - - - - UPDATE device_task - SET errRetry = #{errRetry} - WHERE id = #{id} - - - - UPDATE device_task - SET externId = #{externId} - WHERE id = #{id} - - - + + + + + + + + + + + + + + + + + + + + + + + + INSERT IGNORE INTO device_task(taskId, deviceId, taskAttackType, status, devStatus) + VALUES + + (#{task.taskId}, #{task.deviceId}, #{task.taskAttackType}, + ${@com.dispose.common.DisposeTaskStatus@TASK_NEW.getValue()}, -1) + + + + + INSERT IGNORE INTO device_task(taskId, deviceId, taskAttackType, status, devStatus) + VALUES (#{taskId}, #{deviceId}, #{taskAttackType}, + ${@com.dispose.common.DisposeTaskStatus@TASK_NEW.getValue()}, -1) + + + + + + + + + + + + + + UPDATE device_task + SET status = #{status} + + , endTime = CURRENT_TIMESTAMP + + + , beginTime = CURRENT_TIMESTAMP + + WHERE id = #{id} + + + + UPDATE device_task + SET devStatus = #{devStatus} + WHERE id = #{id} + AND devStatus != #{devStatus} + + + + UPDATE device_task + SET execAttackTypeIn = #{attackTypeValue} + WHERE id = #{id} + + + + UPDATE device_task + SET execAttackTypeOut = #{attackTypeValue} + WHERE id = #{id} + + + + UPDATE device_task + SET attackTypeStatusIn = #{attackStatsValue} + WHERE id = #{id} + + + + UPDATE device_task + SET attackTypeStatusOut = #{attackStatsValue} + WHERE id = #{id} + + + + UPDATE device_task + SET errRetry = #{errRetry} + WHERE id = #{id} + + + + UPDATE device_task + SET externId = #{externId} + WHERE id = #{id} + + + \ No newline at end of file diff --git a/src/main/resources/mappers/DisposeCapacity.xml b/src/main/resources/mappers/DisposeCapacity.xml index 36443dcf..8fe436c0 100644 --- a/src/main/resources/mappers/DisposeCapacity.xml +++ b/src/main/resources/mappers/DisposeCapacity.xml @@ -1,47 +1,47 @@ - - - - - - - - - - - - - - - - - INSERT IGNORE INTO dispose_capacity(deviceId, capacityType, objectType, ipType, protectIp, reserveNetflow) - VALUES - - (#{cap.deviceId}, #{cap.capacityType}, #{cap.objectType}, #{cap.ipType}, - #{cap.protectIp}, #{cap.reserveNetflow}) - - - - - DELETE - FROM dispose_capacity - WHERE dispose_capacity.deviceId = #{deviceId} - AND dispose_capacity.capacityType = #{capacityType} - - - - DELETE - FROM dispose_capacity - WHERE dispose_capacity.deviceId = #{deviceId} - - - + + + + + + + + + + + + + + + + + INSERT IGNORE INTO dispose_capacity(deviceId, capacityType, objectType, ipType, protectIp, reserveNetflow) + VALUES + + (#{cap.deviceId}, #{cap.capacityType}, #{cap.objectType}, #{cap.ipType}, + #{cap.protectIp}, #{cap.reserveNetflow}) + + + + + DELETE + FROM dispose_capacity + WHERE dispose_capacity.deviceId = #{deviceId} + AND dispose_capacity.capacityType = #{capacityType} + + + + DELETE + FROM dispose_capacity + WHERE dispose_capacity.deviceId = #{deviceId} + + + \ No newline at end of file diff --git a/src/main/resources/mappers/DisposeDevice.xml b/src/main/resources/mappers/DisposeDevice.xml index 1ed86469..5eb251cd 100644 --- a/src/main/resources/mappers/DisposeDevice.xml +++ b/src/main/resources/mappers/DisposeDevice.xml @@ -1,162 +1,162 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - INSERT IGNORE INTO dispose_device(ipAddr, ipPort, deviceType, - areaCode, deviceName, manufacturer, - model, version, userName, password, urlPath, urlType, readme, status) - VALUES (#{ipAddr}, #{ipPort}, #{deviceType}, - #{areaCode}, #{deviceName}, #{manufacturer}, - #{model}, #{version}, #{userName}, #{password}, #{urlPath}, #{urlType}, #{readme}, - ${@com.dispose.common.ObjectStatus@NORMAL.getValue()}) - - - - UPDATE dispose_device - SET status = ${@com.dispose.common.ObjectStatus@DELETED.getValue()} - WHERE id = #{id} - - - - UPDATE dispose_device - SET ipAddr = #{ipAddr}, - ipPort = #{ipPort}, - deviceType = #{deviceType}, - areaCode = #{areaCode}, - deviceName = #{deviceName}, - manufacturer = #{manufacturer}, - model = #{model}, - version = #{version}, - userName = #{userName}, - password = #{password}, - urlPath = #{urlPath}, - urlType = #{urlType}, - readme = #{readme}, - status = #{status} - WHERE id = #{id} - - - - UPDATE - dispose_device - SET status = ${@com.dispose.common.ObjectStatus@DISABLED.getValue()} - WHERE id = #{id} - - - - UPDATE - dispose_device - SET status = ${@com.dispose.common.ObjectStatus@NORMAL.getValue()} - WHERE id = #{id} - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT IGNORE INTO dispose_device(ipAddr, ipPort, deviceType, + areaCode, deviceName, manufacturer, + model, version, userName, password, urlPath, urlType, readme, status) + VALUES (#{ipAddr}, #{ipPort}, #{deviceType}, + #{areaCode}, #{deviceName}, #{manufacturer}, + #{model}, #{version}, #{userName}, #{password}, #{urlPath}, #{urlType}, #{readme}, + ${@com.dispose.common.ObjectStatus@NORMAL.getValue()}) + + + + UPDATE dispose_device + SET status = ${@com.dispose.common.ObjectStatus@DELETED.getValue()} + WHERE id = #{id} + + + + UPDATE dispose_device + SET ipAddr = #{ipAddr}, + ipPort = #{ipPort}, + deviceType = #{deviceType}, + areaCode = #{areaCode}, + deviceName = #{deviceName}, + manufacturer = #{manufacturer}, + model = #{model}, + version = #{version}, + userName = #{userName}, + password = #{password}, + urlPath = #{urlPath}, + urlType = #{urlType}, + readme = #{readme}, + status = #{status} + WHERE id = #{id} + + + + UPDATE + dispose_device + SET status = ${@com.dispose.common.ObjectStatus@DISABLED.getValue()} + WHERE id = #{id} + + + + UPDATE + dispose_device + SET status = ${@com.dispose.common.ObjectStatus@NORMAL.getValue()} + WHERE id = #{id} + + + + diff --git a/src/main/resources/mappers/DisposeTask.xml b/src/main/resources/mappers/DisposeTask.xml index 31be363d..b956cf1f 100644 --- a/src/main/resources/mappers/DisposeTask.xml +++ b/src/main/resources/mappers/DisposeTask.xml @@ -1,192 +1,192 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - INSERT IGNORE INTO dispose_task(deviceId, accountId, areaCode, disposeCapacity, disposeObject, objectType, - planEndTime, flowDirection, attackType, flowBandWidth, - currentStatus) - VALUES (#{deviceId}, #{accountId}, #{areaCode}, #{disposeCapacity}, #{disposeObject}, #{objectType}, - date_add(now(), interval #{planEndTime} MINUTE), #{flowDirection}, #{attackType}, - #{flowBandWidth}, ${@com.dispose.common.DisposeTaskStatus@TASK_NEW.getValue()}) - - - - UPDATE - dispose_task - SET - currentStatus = #{status} - - , endTime = CURRENT_TIMESTAMP - - WHERE - id = #{id, jdbcType=INTEGER} - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT IGNORE INTO dispose_task(deviceId, accountId, areaCode, disposeCapacity, disposeObject, objectType, + planEndTime, flowDirection, attackType, flowBandWidth, + currentStatus) + VALUES (#{deviceId}, #{accountId}, #{areaCode}, #{disposeCapacity}, #{disposeObject}, #{objectType}, + date_add(now(), interval #{planEndTime} MINUTE), #{flowDirection}, #{attackType}, + #{flowBandWidth}, ${@com.dispose.common.DisposeTaskStatus@TASK_NEW.getValue()}) + + + + UPDATE + dispose_task + SET + currentStatus = #{status} + + , endTime = CURRENT_TIMESTAMP + + WHERE + id = #{id, jdbcType=INTEGER} + + + + \ No newline at end of file diff --git a/src/main/resources/mappers/UserAccount.xml b/src/main/resources/mappers/UserAccount.xml index ad894538..9c6afe80 100644 --- a/src/main/resources/mappers/UserAccount.xml +++ b/src/main/resources/mappers/UserAccount.xml @@ -1,117 +1,117 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - UPDATE - user_account - SET lastAccess = CURRENT_TIMESTAMP - WHERE username = #{username, jdbcType=VARCHAR}; - - - - UPDATE - user_account - SET lastLoginTime = CURRENT_TIMESTAMP - WHERE username = #{username, jdbcType=VARCHAR} - - - - UPDATE - user_account - SET token = #{token, jdbcType=VARCHAR} - WHERE username = #{username, jdbcType=VARCHAR} - - - - - - UPDATE - user_account - SET status = ${@com.dispose.common.ObjectStatus@DELETED.getValue()}, - operators = #{operators}, - lockTime = CURRENT_TIMESTAMP - WHERE username = #{username, jdbcType=VARCHAR} - - - - UPDATE - user_account - SET status = ${@com.dispose.common.ObjectStatus@DISABLED.getValue()}, - operators = #{operators}, - lockTime = CURRENT_TIMESTAMP - WHERE username = #{username, jdbcType=VARCHAR} - - - - UPDATE - user_account - SET status = ${@com.dispose.common.ObjectStatus@LOCKED.getValue()}, - lockTime = CURRENT_TIMESTAMP - WHERE username = #{username, jdbcType=VARCHAR} - - - - UPDATE - user_account - SET status = ${@com.dispose.common.ObjectStatus@NORMAL.getValue()}, - lockTime = 0 - WHERE username = #{username, jdbcType=VARCHAR} - + + + + + + + + + + + + + + + + + + + + + + + + + + + + UPDATE + user_account + SET lastAccess = CURRENT_TIMESTAMP + WHERE username = #{username, jdbcType=VARCHAR}; + + + + UPDATE + user_account + SET lastLoginTime = CURRENT_TIMESTAMP + WHERE username = #{username, jdbcType=VARCHAR} + + + + UPDATE + user_account + SET token = #{token, jdbcType=VARCHAR} + WHERE username = #{username, jdbcType=VARCHAR} + + + + + + UPDATE + user_account + SET status = ${@com.dispose.common.ObjectStatus@DELETED.getValue()}, + operators = #{operators}, + lockTime = CURRENT_TIMESTAMP + WHERE username = #{username, jdbcType=VARCHAR} + + + + UPDATE + user_account + SET status = ${@com.dispose.common.ObjectStatus@DISABLED.getValue()}, + operators = #{operators}, + lockTime = CURRENT_TIMESTAMP + WHERE username = #{username, jdbcType=VARCHAR} + + + + UPDATE + user_account + SET status = ${@com.dispose.common.ObjectStatus@LOCKED.getValue()}, + lockTime = CURRENT_TIMESTAMP + WHERE username = #{username, jdbcType=VARCHAR} + + + + UPDATE + user_account + SET status = ${@com.dispose.common.ObjectStatus@NORMAL.getValue()}, + lockTime = 0 + WHERE username = #{username, jdbcType=VARCHAR} + \ No newline at end of file