| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ard.work.mapper.ArdServerManagementMapper"> |
| | | |
| | | <resultMap type="ArdServerManagement" id="ArdServerManagementResult"> |
| | | <resultMap type="ServerInfo" id="ArdServerManagementResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="serverName" column="server_name" /> |
| | | <result property="host" column="host" /> |
| | | <result property="hostPort" column="host_pont" /> |
| | | <result property="tcpPort" column="tcp_port" /> |
| | | <result property="httpPort" column="http_port" /> |
| | | <result property="accessKeyId" column="access_key_id" /> |
| | | <result property="accessKeySecret" column="access_key_secret" /> |
| | | <result property="tcpServer" column="tcp_server" /> |
| | | <result property="tcpPort" column="tcp_port" /> |
| | | <result property="longitude" column="longitude" /> |
| | | <result property="latitude" column="latitude" /> |
| | | <result property="altitude" column="altitude" /> |
| | |
| | | select id, |
| | | server_name, |
| | | host, |
| | | host_pont, |
| | | tcp_server, |
| | | tcp_port, |
| | | http_port, |
| | | access_key_id, |
| | | access_key_secret, |
| | | longitude, |
| | |
| | | altitude, |
| | | user_id, |
| | | dept_id |
| | | from ard_server_management |
| | | from ard_server_info |
| | | </sql> |
| | | |
| | | <select id="selectArdServerManagementList" parameterType="ArdServerManagement" resultMap="ArdServerManagementResult"> |
| | |
| | | </select> |
| | | |
| | | <insert id="insertArdServerManagement" parameterType="ArdServerManagement"> |
| | | insert into ard_server_management |
| | | insert into ard_server_info |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="serverName != null">server_name,</if> |
| | | <if test="host != null">host,</if> |
| | | <if test="hostPort != null">host_pont,</if> |
| | | <if test="tcpPort != null">tcp_port,</if> |
| | | <if test="httpPort != null">http_port,</if> |
| | | <if test="accessKeyId != null">access_key_id,</if> |
| | | <if test="accessKeySecret != null">access_key_secret,</if> |
| | | <if test="tcpServer != null">tcp_server,</if> |
| | | <if test="tcpPort != null">tcp_port,</if> |
| | | <if test="longitude != null">longitude,</if> |
| | | <if test="latitude != null">latitude,</if> |
| | | <if test="altitude != null">altitude,</if> |
| | |
| | | <if test="id != null">#{id},</if> |
| | | <if test="serverName != null">#{serverName},</if> |
| | | <if test="host != null">#{host},</if> |
| | | <if test="hostPort != null">#{hostPort},</if> |
| | | <if test="tcpPort != null">#{tcpPort},</if> |
| | | <if test="httpPort != null">#{httpPort},</if> |
| | | <if test="accessKeyId != null">#{accessKeyId},</if> |
| | | <if test="accessKeySecret != null">#{accessKeySecret},</if> |
| | | <if test="tcpServer != null">#{tcpServer},</if> |
| | | <if test="tcpPort != null">#{tcpPort},</if> |
| | | <if test="longitude != null">#{longitude},</if> |
| | | <if test="latitude != null">#{latitude},</if> |
| | | <if test="altitude != null">#{altitude},</if> |
| | |
| | | </insert> |
| | | |
| | | <update id="updateArdServerManagement" parameterType="ArdServerManagement"> |
| | | update ard_server_management |
| | | update ard_server_info |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="serverName != null">server_name = #{serverName},</if> |
| | | <if test="host != null">host = #{host},</if> |
| | | <if test="hostPort != null">host_pont = #{hostPort},</if> |
| | | <if test="tcpPort != null">tcp_port = #{tcpPort},</if> |
| | | <if test="httpPort != null">http_port = #{httpPort},</if> |
| | | <if test="accessKeyId != null">access_key_id = #{accessKeyId},</if> |
| | | <if test="accessKeySecret != null">access_key_secret = #{accessKeySecret},</if> |
| | | <if test="tcpServer != null">tcp_server = #{tcpServer},</if> |
| | | <if test="tcpPort != null">tcp_port = #{tcpPort},</if> |
| | | <if test="longitude != null">longitude = #{longitude},</if> |
| | | <if test="latitude != null">latitude = #{latitude},</if> |
| | | <if test="altitude != null">altitude = #{altitude},</if> |
| | |
| | | </update> |
| | | |
| | | <delete id="deleteArdServerManagementById" parameterType="String"> |
| | | delete from ard_server_management where id = #{id} |
| | | delete from ard_server_info where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteArdServerManagementByIds" parameterType="String"> |
| | | delete from ard_server_management where id in |
| | | delete from ard_server_info where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |