| | |
| | | <result column="MONITOR_USERNAME" property="monitorUsername" jdbcType="CHAR" /> |
| | | <result column="MONITOR_PASSWORD" property="monitorPassword" jdbcType="CHAR" /> |
| | | <result column="CREATE_TIME" property="createTime" jdbcType="TIMESTAMP" /> |
| | | <result column="MONITOR_REMOTE_TYPE" property="monitorRemoteType" jdbcType="CHAR" /> |
| | | </resultMap> |
| | | |
| | | |
| | | <sql id="tableColumnList"> |
| | | ID,HOST_NAME, INFO_CONTENT, STATE,AREA_NUM,CREATE_TIME,MONITOR_ID,MONITOR_IP,MONITOR_USERNAME,MONITOR_PASSWORD |
| | | ID,HOST_NAME, INFO_CONTENT, STATE,AREA_NUM,CREATE_TIME,MONITOR_ID,MONITOR_IP,MONITOR_USERNAME,MONITOR_PASSWORD,MONITOR_REMOTE_TYPE |
| | | </sql> |
| | | |
| | | |
| | | <sql id="queryByParams"> |
| | | <if test="hostname != null"> |
| | | <choose> |
| | |
| | | <![CDATA[ AND AREA_NUM = #{areaNum} ]]> |
| | | </if> |
| | | </sql> |
| | | |
| | | |
| | | |
| | | |
| | | <select id="selectById" resultMap="resultMap" parameterType="java.lang.String"> |
| | | SELECT |
| | | <include refid="tableColumnList" /> |
| | | FROM OSPF_INFO WHERE ID=#{id} |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.String"> |
| | | DELETE FROM OSPF_INFO WHERE ID = #{id} |
| | | </delete> |
| | | |
| | | |
| | | <delete id="deleteByDate" parameterType="map"> |
| | | DELETE FROM OSPF_INFO WHERE |
| | | <if test="_databaseId == 'mysql'"> |
| | |
| | | <![CDATA[ CREATE_TIME <= to_date(#{endTime},'yyyy-MM-dd hh24:mi:ss')]]> |
| | | </if> |
| | | </delete> |
| | | |
| | | |
| | | |
| | | |
| | | <delete id="deleteByAccHname" parameterType="map"> |
| | | DELETE FROM OSPF_INFO WHERE ACCOUNT = #{account} AND HOST_NAME = #{hostname} |
| | | </delete> |
| | | |
| | | |
| | | <delete id="deleteById" parameterType="java.lang.String"> |
| | | DELETE FROM OSPF_INFO WHERE ID IN |
| | | <foreach item="item" index="index" collection="array" open="(" separator="," close=")"> |
| | |
| | | <when test="_databaseId == 'oracle'"> |
| | | begin |
| | | <foreach collection="list" item="item" index="index"> |
| | | INSERT INTO OSPF_INFO (ID,HOST_NAME,INFO_CONTENT,STATE,AREA_NUM,CREATE_TIME,MONITOR_IP,MONITOR_ID,MONITOR_USERNAME,MONITOR_PASSWORD) VALUES |
| | | (#{item.id},#{item.hostname},#{item.infoContent},#{item.state},#{item.areaNum},#{item.createTime},#{item.monitorIp},#{item.monitorId},#{item.monitorUsername},#{item.monitorPassword}); |
| | | INSERT INTO OSPF_INFO (ID,HOST_NAME,INFO_CONTENT,STATE,AREA_NUM,CREATE_TIME,MONITOR_IP,MONITOR_ID,MONITOR_REMOTE_TYPE,MONITOR_USERNAME,MONITOR_PASSWORD,CREATE_TIME) VALUES |
| | | (#{item.id},#{item.hostname},#{item.infoContent},#{item.state},#{item.areaNum},#{item.createTime},#{item.monitorIp},#{item.monitorId},#{item.monitorRemoteType},#{item.monitorUsername},#{item.monitorPassword},#{item.createTime}); |
| | | </foreach> |
| | | end; |
| | | </when> |
| | | <otherwise> |
| | | INSERT INTO OSPF_INFO (ID,HOST_NAME,INFO_CONTENT,STATE,AREA_NUM,CREATE_TIME,MONITOR_IP,MONITOR_ID,MONITOR_USERNAME,MONITOR_PASSWORD) VALUES |
| | | INSERT INTO OSPF_INFO (ID,HOST_NAME,INFO_CONTENT,STATE,AREA_NUM,CREATE_TIME,MONITOR_IP,MONITOR_ID,MONITOR_REMOTE_TYPE,MONITOR_USERNAME,MONITOR_PASSWORD,CREATE_TIME) VALUES |
| | | <foreach collection="list" item="item" index="index" separator="," > |
| | | (#{item.id},#{item.hostname},#{item.infoContent},#{item.state},#{item.areaNum},#{item.createTime},#{item.monitorIp},#{item.monitorId},#{item.monitorUsername},#{item.monitorPassword}) |
| | | (#{item.id},#{item.hostname},#{item.infoContent},#{item.state},#{item.areaNum},#{item.createTime},#{item.monitorIp},#{item.monitorId},#{item.monitorRemoteType},#{item.monitorUsername},#{item.monitorPassword},#{item.createTime}) |
| | | </foreach> |
| | | </otherwise> |
| | | </choose> |
| | |
| | | <if test="areaNum != null" >AREA_NUM,</if> |
| | | <if test="monitorIp != null" >MONITOR_IP,</if> |
| | | <if test="monitorId != null" >MONITOR_ID,</if> |
| | | <if test="monitorRemoteType != null" >MONITOR_REMOTE_TYPE,</if> |
| | | <if test="monitorUsername != null" >MONITOR_USERNAME,</if> |
| | | <if test="monitorPassword != null" >MONITOR_PASSWORD,</if> |
| | | <if test="createTime != null" >CREATE_TIME</if> |
| | |
| | | <if test="areaNum != null" >#{areaNum},</if> |
| | | <if test="monitorIp != null" >#{monitorIp},</if> |
| | | <if test="monitorId != null" >#{monitorId},</if> |
| | | <if test="monitorRemoteType != null" >#{monitorRemoteType},</if> |
| | | <if test="monitorUsername != null" >#{monitorUsername},</if> |
| | | <if test="monitorPassword != null" >#{monitorPassword},</if> |
| | | <if test="createTime != null" >#{createTime}</if> |
| | |
| | | </where> |
| | | ORDER BY CREATE_TIME DESC |
| | | </select> |
| | | |
| | | |
| | | <select id="selectByParams" parameterType="map" resultMap="resultMap"> |
| | | SELECT |
| | | <include refid="tableColumnList" /> |
| | |
| | | <if test="monitorPassword != null"> |
| | | MONITOR_PASSWORD = #{monitorPassword}, |
| | | </if> |
| | | <if test="monitorRemoteType != null"> |
| | | MONITOR_REMOTE_TYPE = #{monitorRemoteType}, |
| | | </if> |
| | | </set> |
| | | WHERE ID = #{id} |
| | | </update> |
| | | |
| | | |
| | | </mapper> |
| | | |
| | | |
| | | </mapper> |