| | |
| | | <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"> |
| | |
| | | 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> |
| | | |
| | |
| | | <if test="createTime != null"> |
| | | CREATE_TIME = #{createTime}, |
| | | </if> |
| | | <if test="remoteType != null"> |
| | | REMOTE_TYPE = #{remoteType}, |
| | | </if> |
| | | </set> |
| | | WHERE ID = #{id} |
| | | </update> |