<?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="SXtszMdzhglAccountmanagementMapper" >
    <!-- 通用查询映射结果 -->

    <select id="selectSXtszMdzhglAccountmanagementList" parameterType="pd" resultType="pd">
        select * from s_xtsz_mdzhgl_accountmanagement where 1=1
        <if test="id !=null and id !='' ">
            and id = #{id}
        </if>
        <if test="storeId !=null and storeId !='' ">
            and storeId = #{storeId}
        </if>
        <if test="accountName !=null and accountName !='' ">
            and accountName = #{accountName}
        </if>
        <if test="realName !=null and realName !='' ">
            and realName = #{realName}
        </if>
        <if test="mobileNumber !=null and mobileNumber !='' ">
            and mobileNumber = #{mobileNumber}
        </if>
        <if test="qrcodeUrl !=null and qrcodeUrl !='' ">
            and qrcodeUrl = #{qrcodeUrl}
        </if>
        <if test="id !=null and id !='' ">
            and id = #{id}
        </if>
    </select>


    <update id="updateSXtszMdzhglAccountmanagement" parameterType="pd" >
        update s_xtsz_mdzhgl_accountmanagement
        <trim prefix=" SET " suffix="" prefixOverrides="," suffixOverrides=",">
        <if test="storeId !=null and storeId !='' ">
            storeId = #{storeId},
        </if>
        <if test="accountName !=null and accountName !='' ">
            accountName = #{accountName},
        </if>
        <if test="realName !=null and realName !='' ">
            realName = #{realName},
        </if>
        <if test="mobileNumber !=null and mobileNumber !='' ">
            mobileNumber = #{mobileNumber},
        </if>
        <if test="qrcodeUrl !=null and qrcodeUrl !='' ">
            qrcodeUrl = #{qrcodeUrl},
        </if>
        </trim>
        <if test="up != null and up!=''">
            <if test="id != null and id!=''">
                where id=#{id}
            </if>
        </if>
    </update>

    <delete id="SXtszMdzhglAccountmanagementRemove" parameterType="pd">
        <if test="ids != null">
            delete from s_xtsz_mdzhgl_accountmanagement where
            <if test="ids != null">
                id in(${ids})
            </if>
        </if>
    </delete>

    <insert id="addSXtszMdzhglAccountmanagement" parameterType="pd" >

        insert into s_xtsz_mdzhgl_accountmanagement
        <trim prefix="(" suffix=")" prefixOverrides="," suffixOverrides=",">

        <if test="storeId !=null and storeId !='' ">
            storeId,
        </if>
        <if test="accountName !=null and accountName !='' ">
            accountName,
        </if>
        <if test="realName !=null and realName !='' ">
            realName,
        </if>
        <if test="mobileNumber !=null and mobileNumber !='' ">
            mobileNumber,
        </if>
        <if test="qrcodeUrl !=null and qrcodeUrl !='' ">
            qrcodeUrl,
        </if>
        </trim>
        <trim prefix=" VALUES (" suffix=")" prefixOverrides="," suffixOverrides=",">
        <if test="storeId !=null and storeId !='' ">
             #{storeId},
        </if>
        <if test="accountName !=null and accountName !='' ">
             #{accountName},
        </if>
        <if test="realName !=null and realName !='' ">
             #{realName},
        </if>
        <if test="mobileNumber !=null and mobileNumber !='' ">
             #{mobileNumber},
        </if>
        <if test="qrcodeUrl !=null and qrcodeUrl !='' ">
             #{qrcodeUrl},
        </if>
        </trim>

    </insert>

</mapper>
