| | |
| | | user_id, |
| | | dept_id, |
| | | server_status |
| | | from ard_server_info |
| | | from ard_server |
| | | </sql> |
| | | |
| | | <sql id="selectArdServerInfoVo"> |
| | |
| | | c.user_id, |
| | | c.dept_id, |
| | | c.server_status |
| | | from ard_server_info c |
| | | from ard_server c |
| | | left join sys_dept d on d.dept_id = c.dept_id |
| | | left join sys_user u on u.user_id = c.user_id |
| | | </sql> |
| | |
| | | ${params.dataScope} |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="getServerLsNoPermission" parameterType="ArdServerInfo" resultMap="ArdServerInfoResult"> |
| | | <include refid="selectArdServerInfoVoNo"/> |
| | | <where> |
| | | <if test="id != null and id != ''"> and id = #{id}</if> |
| | | <if test="serverName != null and serverName != ''"> and server_name like concat('%', #{serverName}, '%')</if> |
| | | <if test="accessKeyId != null and accessKeyId != ''"> and access_key_id = #{accessKeyId}</if> |
| | | <if test="accessKeySecret != null and accessKeySecret != ''"> and access_key_secret = #{accessKeySecret}</if> |
| | | <if test="serverStatus != null and serverStatus != ''"> and server_status = #{serverStatus}</if> |
| | | <if test="deptId != null and deptId != 0">and dept_id = #{deptId}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectArdServerInfoById" parameterType="String" resultMap="ArdServerInfoResult"> |
| | | <include refid="selectArdServerInfoVo"/> |
| | |
| | | </select> |
| | | |
| | | <insert id="insertArdServerInfo" parameterType="ArdServerInfo"> |
| | | insert into ard_server_info |
| | | insert into ard_server |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="serverName != null">server_name,</if> |
| | |
| | | </insert> |
| | | |
| | | <update id="updateArdServerInfo" parameterType="ArdServerInfo"> |
| | | update ard_server_info |
| | | update ard_server |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="serverName != null">server_name = #{serverName},</if> |
| | | <if test="host != null">host = #{host},</if> |
| | |
| | | </update> |
| | | |
| | | <update id="updateServerStatus"> |
| | | update ard_server_info |
| | | update ard_server |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="status != null">server_status = #{status},</if> |
| | | </trim> |
| | |
| | | </update> |
| | | |
| | | <delete id="deleteArdServerInfoById" parameterType="String"> |
| | | delete from ard_server_info where id = #{id} |
| | | delete from ard_server where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteArdServerInfoByIds" parameterType="String"> |
| | | delete from ard_server_info where id in |
| | | delete from ard_server where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <select id="getServerIdsList" resultType="String"> |
| | | SELECT id |
| | | FROM ard_server |
| | | where server_status = "1" |
| | | </select> |
| | | </mapper> |