zhaowenxuan
2025-02-27 1c4935c13c44f35bc59e77cff6a66e3131a35d94
ltkj-hosp/src/main/resources/mapper/TjCustomerMapper.xml
@@ -31,6 +31,11 @@
        <result property="idType" column="id_type"/>
        <result property="ageUnit" column="age_unit"/>
        <result property="career" column="career"/>
        <result property="dwPhone" column="dw_phone"/>
        <result property="pym" column="pym"/>
        <result property="dictCompId" column="dict_comp_id"/>
        <result property="compName" column="comp_name"/>
        <result property="hisJzkh" column="his_jzkh"/>
    </resultMap>
    <sql id="selectTjCustomerVo">
@@ -59,7 +64,9 @@
               age,
               id_type,
               age_unit,
               career
               career,
               dw_phone,
               pym,dict_comp_id,comp_name,his_jzkh
        from tj_customer
    </sql>
@@ -81,6 +88,9 @@
            <if test="cusIntroduce != null  and cusIntroduce != ''">and cus_introduce = #{cusIntroduce}</if>
            <if test="cusNumber != null ">and cus_number = #{cusNumber}</if>
            <if test="cusIsvip != null  and cusIsvip != ''">and cus_isvip = #{cusIsvip}</if>
            <if test="pym != null  and pym != ''">and pym = #{pym}</if>
            <if test="dictCompId != null  and dictCompId != ''">and dict_comp_id = #{dictCompId}</if>
            <if test="compName != null  and compName != ''">and comp_name = #{compName}</if>
        </where>
    </select>
@@ -117,6 +127,11 @@
            <if test="idType != null">id_type,</if>
            <if test="ageUnit != null">age_unit,</if>
            <if test="career != null">career,</if>
            <if test="dwPhone != null">dw_phone,</if>
            <if test="pym != null">pym,</if>
            <if test="dictCompId != null">dict_comp_id,</if>
            <if test="compName != null">comp_name,</if>
            <if test="hisJzkh != null">his_jzkh,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="cusName != null and cusName != ''">#{cusName},</if>
@@ -144,6 +159,11 @@
            <if test="idType != null">#{idType},</if>
            <if test="ageUnit != null">#{ageUnit},</if>
            <if test="career != null">#{career},</if>
            <if test="dw_phone != null">#{dwPhone},</if>
            <if test="pym != null">#{pym},</if>
            <if test="dictCompId != null">#{dictCompId},</if>
            <if test="compName != null">#{compName},</if>
            <if test="hisJzkh != null">#{hisJzkh},</if>
        </trim>
    </insert>
@@ -175,6 +195,11 @@
            <if test="idType != null">id_type = #{idType},</if>
            <if test="ageUnit != null">age_unit = #{ageUnit},</if>
            <if test="career != null">career = #{career},</if>
            <if test="dwPhone != null">dw_phone = #{dwPhone},</if>
            <if test="pym != null">pym = #{pym},</if>
            <if test="dictCompId != null">dict_comp_id = #{dictCompId},</if>
            <if test="compName != null">comp_name = #{compName},</if>
            <if test="hisJzkh != null">his_jzkh = #{hisJzkh},</if>
        </trim>
        where cus_id = #{cusId}
    </update>
@@ -191,4 +216,39 @@
            #{cusId}
        </foreach>
    </delete>
    <select id="vcustomerlist" parameterType="string" resultType="map">
        select  * from  v_customer
        <where>
            <if test="name != null  and name != ''">and xm like concat('%', #{name}, '%')</if>
            <if test="sjh != null  and sjh != ''">and lxdh like concat('%', #{sjh}, '%')</if>
            <if test="sfzh != null  and sfzh != ''">and sfzh like concat('%', #{sfzh}, '%')</if>
        </where>
    </select>
    <select id="getcusList" parameterType="TjCustomer" resultMap="TjCustomerResult">
        <include refid="selectTjCustomerVo"/>
        <where>
            <if test="cusName != null  and cusName != ''">and cus_name like concat('%', #{cusName}, '%')</if>
            <if test="cusSex != null ">and cus_sex = #{cusSex}</if>
            <if test="cusBrithday != null ">and cus_brithday = #{cusBrithday}</if>
            <if test="cusAddr != null  and cusAddr != ''">and cus_addr = #{cusAddr}</if>
            <if test="addr != null  and addr != ''">and addr = #{addr}</if>
            <if test="cusPhone != null  and cusPhone != ''">and cus_phone = #{cusPhone}</if>
            <if test="cusPostcode != null  and cusPostcode != ''">and cus_postCode = #{cusPostcode}</if>
            <if test="cusEmail != null  and cusEmail != ''">and cus_email = #{cusEmail}</if>
            <if test="indexCard != null  and indexCard != ''">and index_card = #{indexCard}</if>
            <if test="cusNational != null  and cusNational != ''">and cus_national = #{cusNational}</if>
            <if test="cusMarryStatus != null  and cusMarryStatus != ''">and cus_marry_status = #{cusMarryStatus}</if>
            <if test="cusIdcard != null  and cusIdcard != ''">and cus_idcard = #{cusIdcard}</if>
            <if test="cusIntroduce != null  and cusIntroduce != ''">and cus_introduce = #{cusIntroduce}</if>
            <if test="cusNumber != null ">and cus_number = #{cusNumber}</if>
            <if test="cusIsvip != null  and cusIsvip != ''">and cus_isvip = #{cusIsvip}</if>
            <if test="pym != null  and pym != ''">and pym = #{pym}</if>
            <if test="dictCompId != null  and dictCompId != ''">and dict_comp_id = #{dictCompId}</if>
            <if test="compName != null  and compName != ''">and comp_name = #{compName}</if>
            and deleted =0
        </where>
    </select>
</mapper>