You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ry_zhky/ruoyi-system/src/main/resources/mapper/system/TdPropertyNetMapper.xml

104 lines
5.3 KiB

<?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.TdPropertyNetMapper">
<resultMap type="TdPropertyNet" id="TdPropertyNetResult">
<result property="netId" column="net_id" />
<result property="netDepart" column="net_depart" />
<result property="netUser" column="net_user" />
<result property="netDate" column="net_date" />
<result property="framework" column="framework" />
<result property="area" column="area" />
<result property="province" column="province" />
<result property="netMiji" column="net_miji" />
<result property="terminalNum" column="terminal_num" />
<result property="netRecoverdepart" column="net_recoverdepart" />
<result property="part" column="part" />
</resultMap>
<sql id="selectTdPropertyNetVo">
select net_id, net_depart, net_user, net_date, framework, area, province, net_miji, terminal_num, net_recoverdepart, part from td_property_net
</sql>
<select id="selectTdPropertyNetList" parameterType="TdPropertyNet" resultMap="TdPropertyNetResult">
<include refid="selectTdPropertyNetVo"/>
<where>
<if test="netDepart != null and netDepart != ''"> and net_depart = #{netDepart}</if>
<if test="netUser != null and netUser != ''"> and net_user = #{netUser}</if>
<if test="netDate != null "> and net_date = #{netDate}</if>
<if test="framework != null and framework != ''"> and framework = #{framework}</if>
<if test="area != null and area != ''"> and area = #{area}</if>
<if test="province != null and province != ''"> and province = #{province}</if>
<if test="netMiji != null and netMiji != ''"> and net_miji = #{netMiji}</if>
<if test="terminalNum != null and terminalNum != ''"> and terminal_num = #{terminalNum}</if>
<if test="netRecoverdepart != null and netRecoverdepart != ''"> and net_recoverdepart = #{netRecoverdepart}</if>
<if test="part != null and part != ''"> and part = #{part}</if>
</where>
</select>
<select id="selectTdPropertyNetByNetId" parameterType="String" resultMap="TdPropertyNetResult">
<include refid="selectTdPropertyNetVo"/>
where net_id = #{netId}
</select>
<insert id="insertTdPropertyNet" parameterType="TdPropertyNet">
insert into td_property_net
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="netId != null">net_id,</if>
<if test="netDepart != null">net_depart,</if>
<if test="netUser != null">net_user,</if>
<if test="netDate != null">net_date,</if>
<if test="framework != null">framework,</if>
<if test="area != null">area,</if>
<if test="province != null">province,</if>
<if test="netMiji != null">net_miji,</if>
<if test="terminalNum != null">terminal_num,</if>
<if test="netRecoverdepart != null">net_recoverdepart,</if>
<if test="part != null">part,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="netId != null">#{netId},</if>
<if test="netDepart != null">#{netDepart},</if>
<if test="netUser != null">#{netUser},</if>
<if test="netDate != null">#{netDate},</if>
<if test="framework != null">#{framework},</if>
<if test="area != null">#{area},</if>
<if test="province != null">#{province},</if>
<if test="netMiji != null">#{netMiji},</if>
<if test="terminalNum != null">#{terminalNum},</if>
<if test="netRecoverdepart != null">#{netRecoverdepart},</if>
<if test="part != null">#{part},</if>
</trim>
</insert>
<update id="updateTdPropertyNet" parameterType="TdPropertyNet">
update td_property_net
<trim prefix="SET" suffixOverrides=",">
<if test="netDepart != null">net_depart = #{netDepart},</if>
<if test="netUser != null">net_user = #{netUser},</if>
<if test="netDate != null">net_date = #{netDate},</if>
<if test="framework != null">framework = #{framework},</if>
<if test="area != null">area = #{area},</if>
<if test="province != null">province = #{province},</if>
<if test="netMiji != null">net_miji = #{netMiji},</if>
<if test="terminalNum != null">terminal_num = #{terminalNum},</if>
<if test="netRecoverdepart != null">net_recoverdepart = #{netRecoverdepart},</if>
<if test="part != null">part = #{part},</if>
</trim>
where net_id = #{netId}
</update>
<delete id="deleteTdPropertyNetByNetId" parameterType="String">
delete from td_property_net where net_id = #{netId}
</delete>
<delete id="deleteTdPropertyNetByNetIds" parameterType="String">
delete from td_property_net where net_id in
<foreach item="netId" collection="array" open="(" separator="," close=")">
#{netId}
</foreach>
</delete>
</mapper>