修改入库bug 资源管理模块bug
This commit is contained in:
+48
-25
@@ -3,7 +3,7 @@
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.AllInterfaceNameMapper">
|
||||
|
||||
|
||||
<resultMap type="AllInterfaceName" id="AllInterfaceNameResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="clientId" column="client_id" />
|
||||
@@ -17,15 +17,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="switchName" column="switch_name" />
|
||||
<result property="interfaceDeviceType" column="interface_device_type" />
|
||||
<result property="serverPort" column="server_port" />
|
||||
<result property="switchSn" column="switch_sn" />
|
||||
<result property="switchIp" column="switch_ip" />
|
||||
<result property="serverIp" column="server_ip" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectAllInterfaceNameVo">
|
||||
select id, client_id, interface_name, device_sn, node_name, business_code, business_name, resource_type, switch_name, interface_device_type, server_port, switch_sn, create_time, update_time, create_by, update_by from all_interface_name
|
||||
select id, client_id, interface_name, device_sn, node_name, business_code, business_name, resource_type, create_time, update_time, create_by, update_by, switch_name, interface_device_type, server_port, switch_sn, switch_ip, server_ip from all_interface_name
|
||||
</sql>
|
||||
|
||||
<select id="selectAllInterfaceNameList" parameterType="AllInterfaceName" resultMap="AllInterfaceNameResult">
|
||||
<include refid="selectAllInterfaceNameVo"/>
|
||||
<where>
|
||||
<where>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
<if test="interfaceName != null and interfaceName != ''"> and interface_name like concat('%', #{interfaceName}, '%')</if>
|
||||
<if test="deviceSn != null and deviceSn != ''"> and device_sn = #{deviceSn}</if>
|
||||
@@ -33,9 +39,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="businessCode != null and businessCode != ''"> and business_code = #{businessCode}</if>
|
||||
<if test="businessName != null and businessName != ''"> and business_name like concat('%', #{businessName}, '%')</if>
|
||||
<if test="resourceType != null and resourceType != ''"> and resource_type = #{resourceType}</if>
|
||||
<if test="switchName != null and switchName != ''"> and switch_name like concat('%', #{switchName}, '%')</if>
|
||||
<if test="interfaceDeviceType != null and interfaceDeviceType != ''"> and interface_device_type = #{interfaceDeviceType}</if>
|
||||
<if test="serverPort != null and serverPort != ''"> and server_port = #{serverPort}</if>
|
||||
<if test="switchSn != null and switchSn != ''"> and switch_sn = #{switchSn}</if>
|
||||
<if test="switchIp != null and switchIp != ''"> and switch_ip = #{switchIp}</if>
|
||||
<if test="serverIp != null and serverIp != ''"> and server_ip = #{serverIp}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectAllInterfaceNameById" parameterType="Long" resultMap="AllInterfaceNameResult">
|
||||
<include refid="selectAllInterfaceNameVo"/>
|
||||
where id = #{id}
|
||||
@@ -51,15 +63,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="businessCode != null">business_code,</if>
|
||||
<if test="businessName != null">business_name,</if>
|
||||
<if test="resourceType != null">resource_type,</if>
|
||||
<if test="switchName != null">switch_name,</if>
|
||||
<if test="interfaceDeviceType != null">interface_device_type,</if>
|
||||
<if test="serverPort != null">server_port,</if>
|
||||
<if test="switchSn != null">switch_sn,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
</trim>
|
||||
<if test="switchName != null">switch_name,</if>
|
||||
<if test="interfaceDeviceType != null">interface_device_type,</if>
|
||||
<if test="serverPort != null">server_port,</if>
|
||||
<if test="switchSn != null">switch_sn,</if>
|
||||
<if test="switchIp != null">switch_ip,</if>
|
||||
<if test="serverIp != null">server_ip,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">#{clientId},</if>
|
||||
<if test="interfaceName != null and interfaceName != ''">#{interfaceName},</if>
|
||||
@@ -68,15 +82,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="businessCode != null">#{businessCode},</if>
|
||||
<if test="businessName != null">#{businessName},</if>
|
||||
<if test="resourceType != null">#{resourceType},</if>
|
||||
<if test="switchName != null">#{switchName},</if>
|
||||
<if test="interfaceDeviceType != null">#{interfaceDeviceType},</if>
|
||||
<if test="serverPort != null">#{serverPort},</if>
|
||||
<if test="switchSn != null">#{switchSn},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
</trim>
|
||||
<if test="switchName != null">#{switchName},</if>
|
||||
<if test="interfaceDeviceType != null">#{interfaceDeviceType},</if>
|
||||
<if test="serverPort != null">#{serverPort},</if>
|
||||
<if test="switchSn != null">#{switchSn},</if>
|
||||
<if test="switchIp != null">#{switchIp},</if>
|
||||
<if test="serverIp != null">#{serverIp},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateAllInterfaceName" parameterType="AllInterfaceName">
|
||||
@@ -89,14 +105,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="businessCode != null">business_code = #{businessCode},</if>
|
||||
<if test="businessName != null">business_name = #{businessName},</if>
|
||||
<if test="resourceType != null">resource_type = #{resourceType},</if>
|
||||
<if test="switchName != null">switch_name = #{switchName},</if>
|
||||
<if test="interfaceDeviceType != null">interface_device_type = #{interfaceDeviceType},</if>
|
||||
<if test="serverPort != null">server_port = #{serverPort},</if>
|
||||
<if test="switchSn != null">switch_sn = #{switchSn},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="switchName != null">switch_name = #{switchName},</if>
|
||||
<if test="interfaceDeviceType != null">interface_device_type = #{interfaceDeviceType},</if>
|
||||
<if test="serverPort != null">server_port = #{serverPort},</if>
|
||||
<if test="switchSn != null">switch_sn = #{switchSn},</if>
|
||||
<if test="switchIp != null">switch_ip = #{switchIp},</if>
|
||||
<if test="serverIp != null">server_ip = #{serverIp},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
@@ -106,13 +124,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</delete>
|
||||
|
||||
<delete id="deleteAllInterfaceNameByIds" parameterType="String">
|
||||
delete from all_interface_name where id in
|
||||
delete from all_interface_name where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<!-- 根据接口名称批量查询 -->
|
||||
<select id="selectByNames" parameterType="java.lang.String" resultType="AllInterfaceName">
|
||||
<select id="selectByNames" parameterType="AllInterfaceName" resultType="AllInterfaceName">
|
||||
SELECT
|
||||
id,
|
||||
interface_name AS interfaceName,
|
||||
@@ -125,12 +143,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
switch_name AS switchName,
|
||||
interface_device_type AS interfaceDeviceType,
|
||||
server_port AS serverPort,
|
||||
switch_sn AS switchSn
|
||||
switch_sn AS switchSn,
|
||||
switch_ip AS switchIp,
|
||||
server_ip AS serverIp
|
||||
FROM
|
||||
all_interface_name
|
||||
WHERE
|
||||
client_id = #{clientId} and
|
||||
interface_name IN
|
||||
<foreach collection="collection" item="name" open="(" separator="," close=")">
|
||||
<foreach collection="interfaceNames" item="name" open="(" separator="," close=")">
|
||||
#{name}
|
||||
</foreach>
|
||||
</select>
|
||||
@@ -146,7 +167,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
node_name,
|
||||
business_code,
|
||||
business_name,
|
||||
switch_name, interface_device_type, server_port, switch_sn,
|
||||
switch_name, interface_device_type, server_port, switch_sn, switch_ip, server_ip,
|
||||
create_time,
|
||||
update_time
|
||||
)
|
||||
@@ -160,7 +181,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{item.nodeName},
|
||||
#{item.businessCode},
|
||||
#{item.businessName},
|
||||
#{item.switchName}, #{item.interfaceDeviceType}, #{item.serverPort}, #{item.switchSn},
|
||||
#{item.switchName}, #{item.interfaceDeviceType}, #{item.serverPort}, #{item.switchSn}, #{item.switchIp}, #{item.serverIp},
|
||||
NOW(),
|
||||
NOW()
|
||||
)
|
||||
@@ -203,7 +224,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
server_port = #{item.serverPort},
|
||||
interface_device_type = #{item.interfaceDeviceType},
|
||||
switch_name = #{item.switchName},
|
||||
switch_sn = #{item.switchSn}
|
||||
switch_sn = #{item.switchSn},
|
||||
switch_ip = #{item.switchIp},
|
||||
server_ip = #{item.serverIp}
|
||||
WHERE id = #{item.id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
Reference in New Issue
Block a user