|
@@ -1,6 +1,53 @@
|
|
|
<?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.iamberry.rst.service.customer.mapper.CustomerBasicMapper" >
|
|
|
-
|
|
|
+ <select id="listCustomerBasic" resultType="CustomerBasicInfo" parameterType="CustomerBasicInfo">
|
|
|
+ SELECT
|
|
|
+ bi.customer_id customerId,
|
|
|
+ bi.customer_name customerName,
|
|
|
+ bi.customer_industry customerIndustry,
|
|
|
+ bi.customer_type customerType,
|
|
|
+ bi.cooperative_state cooperativeState,
|
|
|
+ bi.customer_province_code customerProvinceCode,
|
|
|
+ bi.customer_city_code customerCityCode,
|
|
|
+ bi.customer_address customerAddress,
|
|
|
+ bi.customer_status customerStatus,
|
|
|
+ bi.create_date createDate,
|
|
|
+ bi.update_date updateDate,
|
|
|
+ bi.id_create_by idCreateBy,
|
|
|
+ bi.customer_remarks customerRemarks,
|
|
|
+ sa.admin_name adminName
|
|
|
+ from tb_rst_customer_basic_info bi
|
|
|
+ LEFT JOIN tb_rst_sys_admin sa on bi.id_create_by = sa.admin_id
|
|
|
+ <where>
|
|
|
+ <if test="customerName != null and customerName!='' ">
|
|
|
+ customer_name like CONCAT('%',#{customerName},'%')
|
|
|
+ </if>
|
|
|
+ <if test="customerIndustry != null and customerIndustry!='' ">
|
|
|
+ AND customer_industry = #{customerIndustry}
|
|
|
+ </if>
|
|
|
+ <if test="customerType != null and customerType!='' ">
|
|
|
+ AND customer_type = #{customerType}
|
|
|
+ </if>
|
|
|
+ <if test="cooperativeState != null and cooperativeState!='' ">
|
|
|
+ AND cooperative_state = #{cooperativeState}
|
|
|
+ </if>
|
|
|
+ <if test="customerProvinceCode != null and customerProvinceCode!='' ">
|
|
|
+ AND customer_province_code = #{customerProvinceCode}
|
|
|
+ </if>
|
|
|
+ <if test="customerCityCode != null and customerCityCode!='' ">
|
|
|
+ AND customer_city_code = #{customerCityCode}
|
|
|
+ </if>
|
|
|
+ <if test="customerAddress != null and customerAddress!='' ">
|
|
|
+ AND customer_address = #{customerAddress}
|
|
|
+ </if>
|
|
|
+ <if test="customerStatus != null and customerStatus!='' ">
|
|
|
+ AND customer_status = #{customerStatus}
|
|
|
+ </if>
|
|
|
+ <if test="idCreateBy != null and idCreateBy!='' ">
|
|
|
+ AND id_create_by = #{idCreateBy}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
|
|
|
</mapper>
|