1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- <?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.PoIssuerMapper">
- <resultMap type="PoIssuer" id="PoIssuerResult">
- <result property="issuerId" column="issuer_id" />
- <result property="issuerName" column="issuer_name" />
- <result property="issuerPhone" column="issuer_phone" />
- <result property="issuerAddress" column="issuer_address" />
- <result property="collectionTitle" column="collection_title" />
- <result property="createBy" column="create_by" />
- <result property="createTime" column="create_time" />
- <result property="updateTime" column="update_time" />
- <result property="updateBy" column="update_by" />
- <result property="remark" column="remark" />
- <result property="delFlag" column="del_flag" />
- </resultMap>
- <sql id="selectPoIssuerVo">
- select issuer_id, issuer_name, issuer_phone, issuer_address, collection_title, create_by, create_time, update_time, update_by, remark, del_flag from po_issuer
- </sql>
- <select id="selectPoIssuerList" parameterType="PoIssuer" resultMap="PoIssuerResult">
- <include refid="selectPoIssuerVo"/>
- <where>
- <if test="issuerName != null and issuerName != ''"> and issuer_name like concat('%', #{issuerName}, '%')</if>
- <if test="issuerPhone != null and issuerPhone != ''"> and issuer_phone = #{issuerPhone}</if>
- <if test="issuerAddress != null and issuerAddress != ''"> and issuer_address = #{issuerAddress}</if>
- <if test="collectionTitle != null and collectionTitle != ''"> and collection_title = #{collectionTitle}</if>
- </where>
- </select>
- <select id="selectPoIssuerByIssuerId" parameterType="Long" resultMap="PoIssuerResult">
- <include refid="selectPoIssuerVo"/>
- where issuer_id = #{issuerId}
- </select>
- <insert id="insertPoIssuer" parameterType="PoIssuer" useGeneratedKeys="true" keyProperty="issuerId">
- insert into po_issuer
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="issuerName != null and issuerName != ''">issuer_name,</if>
- <if test="issuerPhone != null and issuerPhone != ''">issuer_phone,</if>
- <if test="issuerAddress != null and issuerAddress != ''">issuer_address,</if>
- <if test="collectionTitle != null and collectionTitle != ''">collection_title,</if>
- <if test="createBy != null">create_by,</if>
- <if test="createTime != null">create_time,</if>
- <if test="updateTime != null">update_time,</if>
- <if test="updateBy != null">update_by,</if>
- <if test="remark != null">remark,</if>
- <if test="delFlag != null">del_flag,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="issuerName != null and issuerName != ''">#{issuerName},</if>
- <if test="issuerPhone != null and issuerPhone != ''">#{issuerPhone},</if>
- <if test="issuerAddress != null and issuerAddress != ''">#{issuerAddress},</if>
- <if test="collectionTitle != null and collectionTitle != ''">#{collectionTitle},</if>
- <if test="createBy != null">#{createBy},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="updateTime != null">#{updateTime},</if>
- <if test="updateBy != null">#{updateBy},</if>
- <if test="remark != null">#{remark},</if>
- <if test="delFlag != null">#{delFlag},</if>
- </trim>
- </insert>
- <update id="updatePoIssuer" parameterType="PoIssuer">
- update po_issuer
- <trim prefix="SET" suffixOverrides=",">
- <if test="issuerName != null and issuerName != ''">issuer_name = #{issuerName},</if>
- <if test="issuerPhone != null and issuerPhone != ''">issuer_phone = #{issuerPhone},</if>
- <if test="issuerAddress != null and issuerAddress != ''">issuer_address = #{issuerAddress},</if>
- <if test="collectionTitle != null and collectionTitle != ''">collection_title = #{collectionTitle},</if>
- <if test="createBy != null">create_by = #{createBy},</if>
- <if test="createTime != null">create_time = #{createTime},</if>
- <if test="updateTime != null">update_time = #{updateTime},</if>
- <if test="updateBy != null">update_by = #{updateBy},</if>
- <if test="remark != null">remark = #{remark},</if>
- <if test="delFlag != null">del_flag = #{delFlag},</if>
- </trim>
- where issuer_id = #{issuerId}
- </update>
- <delete id="deletePoIssuerByIssuerId" parameterType="Long">
- delete from po_issuer where issuer_id = #{issuerId}
- </delete>
- <delete id="deletePoIssuerByIssuerIds" parameterType="String">
- delete from po_issuer where issuer_id in
- <foreach item="issuerId" collection="array" open="(" separator="," close=")">
- #{issuerId}
- </foreach>
- </delete>
- </mapper>
|