2025-08-21 09:28:46 +08:00
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
|
<!DOCTYPE mapper
|
|
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
<mapper namespace="com.ruoyi.system.mapper.EpsServerRevenueConfigMapper">
|
|
|
|
|
|
|
|
|
|
<resultMap type="EpsServerRevenueConfig" id="EpsServerRevenueConfigResult">
|
|
|
|
|
<result property="id" column="id" />
|
|
|
|
|
<result property="nodeName" column="node_name" />
|
|
|
|
|
<result property="revenueMethod" column="revenue_method" />
|
|
|
|
|
<result property="hardwareSn" column="hardware_sn" />
|
|
|
|
|
<result property="trafficPort" column="traffic_port" />
|
|
|
|
|
<result property="bandwidth95" column="bandwidth_95" />
|
|
|
|
|
<result property="packageBandwidth" column="package_bandwidth" />
|
|
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
|
|
<result property="businessName" column="business_name" />
|
|
|
|
|
<result property="businessCode" column="business_code" />
|
|
|
|
|
<result property="registrationStatus" column="registration_status" />
|
|
|
|
|
<result property="createBy" column="create_by" />
|
|
|
|
|
<result property="updateBy" column="update_by" />
|
|
|
|
|
<result property="createTime" column="create_time" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectEpsServerRevenueConfigVo">
|
|
|
|
|
select id, node_name, revenue_method, hardware_sn, traffic_port, bandwidth_95, package_bandwidth, update_time, business_name, business_code, registration_status, create_by, update_by, create_time from eps_server_revenue_config
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectEpsServerRevenueConfigList" parameterType="EpsServerRevenueConfig" resultMap="EpsServerRevenueConfigResult">
|
|
|
|
|
<include refid="selectEpsServerRevenueConfigVo"/>
|
|
|
|
|
<where>
|
|
|
|
|
and registration_status = '1'
|
|
|
|
|
<if test="nodeName != null and nodeName != ''"> and node_name like concat('%', #{nodeName}, '%')</if>
|
|
|
|
|
<if test="revenueMethod != null and revenueMethod != ''"> and revenue_method = #{revenueMethod}</if>
|
|
|
|
|
<if test="hardwareSn != null and hardwareSn != ''"> and hardware_sn = #{hardwareSn}</if>
|
|
|
|
|
<if test="trafficPort != null and trafficPort != ''"> and traffic_port = #{trafficPort}</if>
|
|
|
|
|
<if test="bandwidth95 != null "> and bandwidth_95 = #{bandwidth95}</if>
|
|
|
|
|
<if test="packageBandwidth != null "> and package_bandwidth = #{packageBandwidth}</if>
|
|
|
|
|
<if test="businessName != null and businessName != ''"> and business_name like concat('%', #{businessName}, '%')</if>
|
|
|
|
|
<if test="businessCode != null and businessCode != ''"> and business_code = #{businessCode}</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectEpsServerRevenueConfigById" parameterType="Long" resultMap="EpsServerRevenueConfigResult">
|
|
|
|
|
<include refid="selectEpsServerRevenueConfigVo"/>
|
|
|
|
|
where id = #{id}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="countBySn" parameterType="String">
|
|
|
|
|
select count(1) from eps_server_revenue_config
|
|
|
|
|
where hardware_sn = #{hardwareSn}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<insert id="insertEpsServerRevenueConfig" parameterType="EpsServerRevenueConfig">
|
|
|
|
|
insert into eps_server_revenue_config
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="id != null">id,</if>
|
|
|
|
|
<if test="nodeName != null">node_name,</if>
|
|
|
|
|
<if test="revenueMethod != null">revenue_method,</if>
|
|
|
|
|
<if test="hardwareSn != null">hardware_sn,</if>
|
|
|
|
|
<if test="trafficPort != null">traffic_port,</if>
|
|
|
|
|
<if test="bandwidth95 != null">bandwidth_95,</if>
|
|
|
|
|
<if test="packageBandwidth != null">package_bandwidth,</if>
|
|
|
|
|
<if test="updateTime != null">update_time,</if>
|
|
|
|
|
<if test="businessName != null">business_name,</if>
|
|
|
|
|
<if test="businessCode != null">business_code,</if>
|
|
|
|
|
<if test="registrationStatus != null">registration_status,</if>
|
|
|
|
|
<if test="createBy != null">create_by,</if>
|
|
|
|
|
<if test="updateBy != null">update_by,</if>
|
|
|
|
|
<if test="createTime != null">create_time,</if>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="id != null">#{id},</if>
|
|
|
|
|
<if test="nodeName != null">#{nodeName},</if>
|
|
|
|
|
<if test="revenueMethod != null">#{revenueMethod},</if>
|
|
|
|
|
<if test="hardwareSn != null">#{hardwareSn},</if>
|
|
|
|
|
<if test="trafficPort != null">#{trafficPort},</if>
|
|
|
|
|
<if test="bandwidth95 != null">#{bandwidth95},</if>
|
|
|
|
|
<if test="packageBandwidth != null">#{packageBandwidth},</if>
|
|
|
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
|
|
|
<if test="businessName != null">#{businessName},</if>
|
|
|
|
|
<if test="businessCode != null">#{businessCode},</if>
|
|
|
|
|
<if test="registrationStatus != null">#{registrationStatus},</if>
|
|
|
|
|
<if test="createBy != null">#{createBy},</if>
|
|
|
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
|
|
|
<if test="createTime != null">#{createTime},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
<update id="updateEpsServerRevenueConfig" parameterType="EpsServerRevenueConfig">
|
|
|
|
|
update eps_server_revenue_config
|
|
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
|
|
<if test="nodeName != null">node_name = #{nodeName},</if>
|
|
|
|
|
<if test="revenueMethod != null">revenue_method = #{revenueMethod},</if>
|
|
|
|
|
<if test="hardwareSn != null">hardware_sn = #{hardwareSn},</if>
|
|
|
|
|
<if test="trafficPort != null">traffic_port = #{trafficPort},</if>
|
|
|
|
|
<if test="bandwidth95 != null">bandwidth_95 = #{bandwidth95},</if>
|
|
|
|
|
<if test="packageBandwidth != null">package_bandwidth = #{packageBandwidth},</if>
|
|
|
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
|
|
<if test="businessName != null">business_name = #{businessName},</if>
|
|
|
|
|
<if test="businessCode != null">business_code = #{businessCode},</if>
|
|
|
|
|
<if test="registrationStatus != null">registration_status = #{registrationStatus},</if>
|
|
|
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
|
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
where id = #{id}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteEpsServerRevenueConfigById" parameterType="Long">
|
|
|
|
|
delete from eps_server_revenue_config where id = #{id}
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteEpsServerRevenueConfigByIds" parameterType="String">
|
|
|
|
|
delete from eps_server_revenue_config where id in
|
|
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
|
|
#{id}
|
|
|
|
|
</foreach>
|
|
|
|
|
</delete>
|
2025-08-21 18:29:22 +08:00
|
|
|
|
|
|
|
|
<select id="getNodeMsgByIp" parameterType="String" resultType="java.util.Map">
|
|
|
|
|
SELECT
|
|
|
|
|
rrr.hardware_sn AS hardwareSn,
|
|
|
|
|
rrr.resource_name AS resourceName,
|
|
|
|
|
esrc.revenue_method AS revenueMethod,
|
|
|
|
|
esrc.business_code AS businessCode,
|
|
|
|
|
esrc.business_name AS businessName
|
|
|
|
|
FROM
|
|
|
|
|
rm_resource_registration rrr
|
|
|
|
|
LEFT JOIN
|
|
|
|
|
eps_server_revenue_config esrc
|
|
|
|
|
ON
|
|
|
|
|
rrr.hardware_sn = esrc.hardware_sn
|
|
|
|
|
<where>
|
|
|
|
|
and rrr.registration_status = '1'
|
|
|
|
|
<if test="ipAddress != null and ipAddress != ''"> and rrr.ip_address = #{ipAddress}</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
2025-08-21 09:28:46 +08:00
|
|
|
</mapper>
|