<?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.party.mapper.PartyMemberErrorMapper">
    
    <resultMap type="PartyMemberError" id="PartyMemberErrorResult">
        <result property="id"    column="id"    />
        <result property="xm"    column="xm"    />
        <result property="xb"    column="xb"    />
        <result property="sfzh"    column="sfzh"    />
        <result property="csrq"    column="csrq"    />
        <result property="mz"    column="mz"    />
        <result property="jg"    column="jg"    />
        <result property="xl"    column="xl"    />
        <result property="rdrq"    column="rdrq"    />
        <result property="zzrq"    column="zzrq"    />
        <result property="rylb"    column="rylb"    />
        <result property="lxdh"    column="lxdh"    />
        <result property="dzzmc"    column="dzzmc"    />
        <result property="dyphoto"    column="dyphoto"    />
        <result property="rksj"    column="rksj"    />
        <result property="remark"    column="remark"    />
        <result property="createTime"    column="create_time"    />
    </resultMap>

    <sql id="selectPartyMemberErrorVo">
        select id, xm, xb, sfzh, csrq, mz, jg, xl, rdrq, zzrq, rylb, lxdh, dzzmc, dyphoto, rksj, remark, create_time from party_member_error
    </sql>

    <select id="selectPartyMemberErrorList" parameterType="PartyMemberError" resultMap="PartyMemberErrorResult">
        <include refid="selectPartyMemberErrorVo"/>
        <where>  
            <if test="xm != null  and xm != ''"> and xm = #{xm}</if>
            <if test="xb != null  and xb != ''"> and xb = #{xb}</if>
            <if test="sfzh != null  and sfzh != ''"> and sfzh = #{sfzh}</if>
            <if test="csrq != null  and csrq != ''"> and csrq = #{csrq}</if>
            <if test="mz != null  and mz != ''"> and mz = #{mz}</if>
            <if test="jg != null  and jg != ''"> and jg = #{jg}</if>
            <if test="xl != null  and xl != ''"> and xl = #{xl}</if>
            <if test="rdrq != null "> and rdrq = #{rdrq}</if>
            <if test="zzrq != null "> and zzrq = #{zzrq}</if>
            <if test="rylb != null  and rylb != ''"> and rylb = #{rylb}</if>
            <if test="lxdh != null  and lxdh != ''"> and lxdh = #{lxdh}</if>
            <if test="dzzmc != null  and dzzmc != ''"> and dzzmc = #{dzzmc}</if>
            <if test="dyphoto != null  and dyphoto != ''"> and dyphoto = #{dyphoto}</if>
            <if test="rksj != null "> and rksj = #{rksj}</if>
        </where>
    </select>
    
    <select id="selectPartyMemberErrorById" parameterType="Long" resultMap="PartyMemberErrorResult">
        <include refid="selectPartyMemberErrorVo"/>
        where id = #{id}
    </select>
        
    <insert id="insertPartyMemberError" parameterType="PartyMemberError" useGeneratedKeys="true" keyProperty="id">
        insert into party_member_error
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="xm != null">xm,</if>
            <if test="xb != null">xb,</if>
            <if test="sfzh != null">sfzh,</if>
            <if test="csrq != null">csrq,</if>
            <if test="mz != null">mz,</if>
            <if test="jg != null">jg,</if>
            <if test="xl != null">xl,</if>
            <if test="rdrq != null">rdrq,</if>
            <if test="zzrq != null">zzrq,</if>
            <if test="rylb != null">rylb,</if>
            <if test="lxdh != null">lxdh,</if>
            <if test="dzzmc != null">dzzmc,</if>
            <if test="dyphoto != null">dyphoto,</if>
            <if test="rksj != null">rksj,</if>
            <if test="remark != null">remark,</if>
            <if test="createTime != null">create_time,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="xm != null">#{xm},</if>
            <if test="xb != null">#{xb},</if>
            <if test="sfzh != null">#{sfzh},</if>
            <if test="csrq != null">#{csrq},</if>
            <if test="mz != null">#{mz},</if>
            <if test="jg != null">#{jg},</if>
            <if test="xl != null">#{xl},</if>
            <if test="rdrq != null">#{rdrq},</if>
            <if test="zzrq != null">#{zzrq},</if>
            <if test="rylb != null">#{rylb},</if>
            <if test="lxdh != null">#{lxdh},</if>
            <if test="dzzmc != null">#{dzzmc},</if>
            <if test="dyphoto != null">#{dyphoto},</if>
            <if test="rksj != null">#{rksj},</if>
            <if test="remark != null">#{remark},</if>
            <if test="createTime != null">#{createTime},</if>
         </trim>
    </insert>

    <update id="updatePartyMemberError" parameterType="PartyMemberError">
        update party_member_error
        <trim prefix="SET" suffixOverrides=",">
            <if test="xm != null">xm = #{xm},</if>
            <if test="xb != null">xb = #{xb},</if>
            <if test="sfzh != null">sfzh = #{sfzh},</if>
            <if test="csrq != null">csrq = #{csrq},</if>
            <if test="mz != null">mz = #{mz},</if>
            <if test="jg != null">jg = #{jg},</if>
            <if test="xl != null">xl = #{xl},</if>
            <if test="rdrq != null">rdrq = #{rdrq},</if>
            <if test="zzrq != null">zzrq = #{zzrq},</if>
            <if test="rylb != null">rylb = #{rylb},</if>
            <if test="lxdh != null">lxdh = #{lxdh},</if>
            <if test="dzzmc != null">dzzmc = #{dzzmc},</if>
            <if test="dyphoto != null">dyphoto = #{dyphoto},</if>
            <if test="rksj != null">rksj = #{rksj},</if>
            <if test="remark != null">remark = #{remark},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
        </trim>
        where id = #{id}
    </update>

    <delete id="deletePartyMemberErrorById" parameterType="Long">
        delete from party_member_error where id = #{id}
    </delete>

    <delete id="deletePartyMemberErrorByIds" parameterType="String">
        delete from party_member_error where id in 
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>