| | |
| | | <result column="USERNAME" property="username" jdbcType="CHAR" /> |
| | | <result column="PASSWORD" property="password" jdbcType="CHAR" /> |
| | | <result column="CREATE_TIME" property="createTime" jdbcType="TIMESTAMP" /> |
| | | <result column="REMOTE_TYPE" property="remoteType" jdbcType="CHAR" /> |
| | | </resultMap> |
| | | |
| | | |
| | | <sql id="tableColumnList"> |
| | | ID,HOST_NAME, INFO_CONTENT, STATE,USERNAME,PASSWORD,CREATE_TIME |
| | | ID,HOST_NAME, INFO_CONTENT, STATE,USERNAME,PASSWORD,CREATE_TIME,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_MONITOR WHERE ID=#{id} |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.String"> |
| | | DELETE FROM OSPF_MONITOR WHERE ID = #{id} |
| | | </delete> |
| | | |
| | | |
| | | <delete id="deleteByDate" parameterType="map"> |
| | | DELETE FROM OSPF_MONITOR 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_MONITOR WHERE ACCOUNT = #{account} AND HOST_NAME = #{hostname} |
| | | </delete> |
| | | |
| | | |
| | | <delete id="deleteById" parameterType="java.lang.String"> |
| | | DELETE FROM OSPF_MONITOR WHERE ID IN |
| | | <foreach item="item" index="index" collection="array" open="(" separator="," close=")"> |
| | |
| | | end; |
| | | </when> |
| | | <otherwise> |
| | | INSERT INTO OSPF_MONITOR (ID,HOST_NAME,INFO_CONTENT,STATE,USERNAME,PASSWORD,CREATE_TIME) VALUES |
| | | INSERT INTO OSPF_MONITOR (ID,HOST_NAME,INFO_CONTENT,STATE,USERNAME,PASSWORD,CREATE_TIME,REMOTE_TYPE) VALUES |
| | | <foreach collection="list" item="item" index="index" separator="," > |
| | | (#{item.id},#{item.hostname},#{item.infoContent},#{item.state},#{item.username},#{item.password},#{item.createTime}) |
| | | (#{item.id},#{item.hostname},#{item.infoContent},#{item.state},#{item.username},#{item.password},#{item.createTime},#{item.remoteType}) |
| | | </foreach> |
| | | </otherwise> |
| | | </choose> |
| | |
| | | <if test="state != null" >STATE,</if> |
| | | <if test="username != null" >USERNAME,</if> |
| | | <if test="password != null" >PASSWORD,</if> |
| | | <if test="createTime != null" >CREATE_TIME</if> |
| | | <if test="createTime != null" >CREATE_TIME,</if> |
| | | <if test="remoteType != null" >REMOTE_TYPE</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides="," > |
| | | <if test="id != null" >#{id},</if> |
| | |
| | | <if test="state != null" >#{state},</if> |
| | | <if test="username != null" >#{username},</if> |
| | | <if test="password != null" >#{password},</if> |
| | | <if test="createTime != null" >#{createTime}</if> |
| | | <if test="createTime != null" >#{createTime},</if> |
| | | <if test="remoteType != null" >#{remoteType}</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | </where> |
| | | ORDER BY CREATE_TIME DESC |
| | | </select> |
| | | |
| | | |
| | | <select id="selectByParams" parameterType="map" resultMap="resultMap"> |
| | | SELECT |
| | | <include refid="tableColumnList" /> |
| | |
| | | <if test="createTime != null"> |
| | | CREATE_TIME = #{createTime}, |
| | | </if> |
| | | <if test="remoteType != null"> |
| | | REMOTE_TYPE = #{remoteType}, |
| | | </if> |
| | | </set> |
| | | WHERE ID = #{id} |
| | | </update> |
| | | |
| | | |
| | | </mapper> |
| | | |
| | | |
| | | </mapper> |