123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- <?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.fgw.FgwFjMapper">
-
- <resultMap type="FgwFj" id="FgwFjResult">
- <result property="id" column="id" />
- <result property="xmId" column="xm_id" />
- <result property="xmbh" column="xmbh" />
- <result property="sourceId" column="source_id" />
- <result property="fjName" column="fj_name" />
- <result property="path" column="path" />
- <result property="type" column="type" />
- <result property="remark" column="remark" />
- <result property="isSh" column="is_sh" />
- </resultMap>
- <sql id="selectFgwFjVo">
- select id, xm_id, xmbh,source_id, fj_name, path, type, remark,is_sh from fgw_fj
- </sql>
- <select id="selectFgwFjList" parameterType="FgwFj" resultMap="FgwFjResult">
- <include refid="selectFgwFjVo"/>
- <where>
- <if test="xmId != null "> and xm_id = #{xmId}</if>
- <if test="xmbh != null and xmbh != ''"> and xmbh = #{xmbh}</if>
- <if test="sourceId != null "> and source_id = #{sourceId}</if>
- <if test="fjName != null and fjName != ''"> and fj_name like concat('%', #{fjName}, '%')</if>
- <if test="path != null and path != ''"> and path = #{path}</if>
- <if test="type != null and type != ''"> and type = #{type}</if>
- <if test="isSh != null and isSh != ''"> and is_sh = #{isSh}</if>
- </where>
- </select>
-
- <select id="selectFgwFjById" parameterType="Long" resultMap="FgwFjResult">
- <include refid="selectFgwFjVo"/>
- where id = #{id}
- </select>
- <select id="selectFgwFjByXmId" parameterType="Long" resultMap="FgwFjResult">
- <include refid="selectFgwFjVo"/>
- where xm_id = #{id} and type != '18'
- </select>
- <select id="selectFgwFjBySourceId" parameterType="Long" resultMap="FgwFjResult">
- <include refid="selectFgwFjVo"/>
- where source_id = #{id} and type = '18'
- </select>
- <insert id="insertFgwFj" parameterType="FgwFj" useGeneratedKeys="true" keyProperty="id">
- insert into fgw_fj
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="xmId != null">xm_id,</if>
- <if test="xmbh != null">xmbh,</if>
- <if test="sourceId != null">source_id,</if>
- <if test="fjName != null and fjName != ''">fj_name,</if>
- <if test="path != null">path,</if>
- <if test="type != null">type,</if>
- <if test="remark != null">remark,</if>
- <if test="isSh != null and isSh != ''">is_sh,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="xmId != null">#{xmId},</if>
- <if test="xmbh != null">#{xmbh},</if>
- <if test="sourceId != null">#{sourceId},</if>
- <if test="fjName != null and fjName != ''">#{fjName},</if>
- <if test="path != null">#{path},</if>
- <if test="type != null">#{type},</if>
- <if test="remark != null">#{remark},</if>
- <if test="isSh != null and isSh != ''">#{isSh},</if>
- </trim>
- </insert>
- <update id="updateFgwFj" parameterType="FgwFj">
- update fgw_fj
- <trim prefix="SET" suffixOverrides=",">
- <if test="xmId != null">xm_id = #{xmId},</if>
- <if test="xmbh != null">xmbh = #{xmbh},</if>
- <if test="fjName != null and fjName != ''">fj_name = #{fjName},</if>
- <if test="path != null">path = #{path},</if>
- <if test="type != null">type = #{type},</if>
- <if test="remark != null">remark = #{remark},</if>
- <if test="isSh != null and isSh != ''">is_sh = #{isSh},</if>
- </trim>
- where id = #{id}
- </update>
- <delete id="deleteFgwFjById" parameterType="Long">
- delete from fgw_fj where id = #{id}
- </delete>
- <delete id="deleteFgwFjByIds" parameterType="String">
- delete from fgw_fj where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- <delete id="deleteFgwFjByXmId" parameterType="Long">
- delete from fgw_fj where xm_id = #{id} and is_sh != '2'
- <if test="type != null and type == 18"> and type = #{type}</if>
- <if test="type != null and type != 18"> and type != '18'</if>
- </delete>
- </mapper>
|