| | |
| | | <result property="serverStatus" column="server_status" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectArdServerInfoVoNo"> |
| | | select id, |
| | | server_name, |
| | | host, |
| | | tcp_port, |
| | | http_port, |
| | | access_key_id, |
| | | access_key_secret, |
| | | longitude, |
| | | latitude, |
| | | altitude, |
| | | user_id, |
| | | dept_id, |
| | | server_status |
| | | from ard_server_info |
| | | </sql> |
| | | |
| | | <sql id="selectArdServerInfoVo"> |
| | | select c.id, |
| | | c.server_name, |
| | |
| | | <include refid="selectArdServerInfoVo"/> |
| | | <where> |
| | | <if test="id != null and id != ''"> and c.id = #{id}</if> |
| | | <if test="serverName != null and serverName != ''"> and server_name like c.concat('%', #{serverName}, '%')</if> |
| | | <if test="serverName != null and serverName != ''"> and c.server_name like concat('%', #{serverName}, '%')</if> |
| | | <if test="accessKeyId != null and accessKeyId != ''"> and c.access_key_id = #{accessKeyId}</if> |
| | | <if test="accessKeySecret != null and accessKeySecret != ''"> and c.access_key_secret = #{accessKeySecret}</if> |
| | | <if test="serverStatus != null and serverStatus != ''"> and c.server_status = #{serverStatus}</if> |
| | |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <update id="updateServerStatus"> |
| | | update ard_server_info |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="status != null">server_status = #{status},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteArdServerInfoById" parameterType="String"> |
| | | delete from ard_server_info where id = #{id} |
| | | </delete> |