|  | @@ -27,7 +27,7 @@
 | 
	
		
			
				|  |  |      <result column="modified_time" jdbcType="TIMESTAMP" property="modifiedTime" />
 | 
	
		
			
				|  |  |    </resultMap>
 | 
	
		
			
				|  |  |    <sql id="Base_Column_List">
 | 
	
		
			
				|  |  | -    guid, account, passwd, customer_type, customer_name, nick_name, pid, phone, sex, 
 | 
	
		
			
				|  |  | +    guid, account, passwd, customer_type, customer_name, nick_name, pid, phone, sex,
 | 
	
		
			
				|  |  |      score, wx_id, union_id,head_image,is_company, is_validate, is_enable, state, create_user, create_time,
 | 
	
		
			
				|  |  |      modified_user, modified_time
 | 
	
		
			
				|  |  |    </sql>
 | 
	
	
		
			
				|  | @@ -37,71 +37,71 @@
 | 
	
		
			
				|  |  |      aa.create_time,aa.modified_user, aa.modified_time
 | 
	
		
			
				|  |  |    </sql>
 | 
	
		
			
				|  |  |    <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
 | 
	
		
			
				|  |  | -    select 
 | 
	
		
			
				|  |  | +    select
 | 
	
		
			
				|  |  |      <include refid="Base_Column_List" />
 | 
	
		
			
				|  |  |      from t_customer_info
 | 
	
		
			
				|  |  |      where guid = #{guid,jdbcType=CHAR}
 | 
	
		
			
				|  |  |    </select>
 | 
	
		
			
				|  |  | -    <select id="searchCustomerByPage" parameterType="com.hcloud.microserver.commoncore.base.PageBean"
 | 
	
		
			
				|  |  | -            resultType="com.hcloud.microserver.h5.bo.CustomerInfoBO">
 | 
	
		
			
				|  |  | -      SELECT
 | 
	
		
			
				|  |  | -          aa.guid,
 | 
	
		
			
				|  |  | -          aa.account AS account,
 | 
	
		
			
				|  |  | -          aa.customer_name AS customerName,
 | 
	
		
			
				|  |  | -          CASE aa.customer_type
 | 
	
		
			
				|  |  | -      WHEN 1 THEN
 | 
	
		
			
				|  |  | -          '自然人'
 | 
	
		
			
				|  |  | -      WHEN 2 THEN
 | 
	
		
			
				|  |  | -          '履约企业'
 | 
	
		
			
				|  |  | -      ELSE
 | 
	
		
			
				|  |  | -          '非履约企业'
 | 
	
		
			
				|  |  | -      END AS customerType,
 | 
	
		
			
				|  |  | -       aa.is_company AS isCompany,
 | 
	
		
			
				|  |  | -       aa.is_validate AS isValidate,
 | 
	
		
			
				|  |  | -       aa.nick_name AS nickName,
 | 
	
		
			
				|  |  | -       aa.phone AS customerPhone,
 | 
	
		
			
				|  |  | -       aa.pid AS pid,
 | 
	
		
			
				|  |  | -       aa.score AS score,
 | 
	
		
			
				|  |  | -       aa.create_time as createTime,
 | 
	
		
			
				|  |  | -       aa.modified_time as modifiedTime,
 | 
	
		
			
				|  |  | -       aa.is_enable as isEnable,
 | 
	
		
			
				|  |  | -       aa.wx_id as wxId,
 | 
	
		
			
				|  |  | -       aa.phone,
 | 
	
		
			
				|  |  | -       CASE aa.sex
 | 
	
		
			
				|  |  | -      WHEN 1 THEN
 | 
	
		
			
				|  |  | -          '男'
 | 
	
		
			
				|  |  | -      ELSE
 | 
	
		
			
				|  |  | -          '女'
 | 
	
		
			
				|  |  | -      END AS sexName,
 | 
	
		
			
				|  |  | -       bb.company_name AS companyName,
 | 
	
		
			
				|  |  | -       bb.principals AS principals,
 | 
	
		
			
				|  |  | -       bb.phone AS companyPhone
 | 
	
		
			
				|  |  | -      FROM
 | 
	
		
			
				|  |  | -          t_customer_info aa
 | 
	
		
			
				|  |  | -      LEFT JOIN t_customer_company_info bb ON aa.guid = bb.fk_customer_id
 | 
	
		
			
				|  |  | -      <where>
 | 
	
		
			
				|  |  | -        aa.state = 1
 | 
	
		
			
				|  |  | -        <if test="data.customerName != null and data.customerName != ''">
 | 
	
		
			
				|  |  | -          and aa.customer_name like concat('%',#{data.customerName},'%')
 | 
	
		
			
				|  |  | -        </if>
 | 
	
		
			
				|  |  | -        <if test="data.phone != null and data.phone != ''">
 | 
	
		
			
				|  |  | -          and aa.phone like concat('%',#{data.phone},'%')
 | 
	
		
			
				|  |  | -        </if>
 | 
	
		
			
				|  |  | -        <if test="data.account != null and data.account != ''">
 | 
	
		
			
				|  |  | -          and aa.account like concat('%', #{data.account}, '%')
 | 
	
		
			
				|  |  | -        </if>
 | 
	
		
			
				|  |  | -        <if test="data.customerType != null">
 | 
	
		
			
				|  |  | -          and aa.customer_type = #{data.customerType}
 | 
	
		
			
				|  |  | -        </if>
 | 
	
		
			
				|  |  | -        <if test="data.isValidate != null">
 | 
	
		
			
				|  |  | -          and aa.is_validate = #{data.isValidate}
 | 
	
		
			
				|  |  | -        </if>
 | 
	
		
			
				|  |  | -      </where>
 | 
	
		
			
				|  |  | -        order by aa.modified_time desc
 | 
	
		
			
				|  |  | -    </select>
 | 
	
		
			
				|  |  | +  <select id="searchCustomerByPage" parameterType="com.hcloud.microserver.commoncore.base.PageBean"
 | 
	
		
			
				|  |  | +          resultType="com.hcloud.microserver.h5.bo.CustomerInfoBO">
 | 
	
		
			
				|  |  | +    SELECT
 | 
	
		
			
				|  |  | +    aa.guid,
 | 
	
		
			
				|  |  | +    aa.account AS account,
 | 
	
		
			
				|  |  | +    aa.customer_name AS customerName,
 | 
	
		
			
				|  |  | +    CASE aa.customer_type
 | 
	
		
			
				|  |  | +    WHEN 1 THEN
 | 
	
		
			
				|  |  | +    '自然人'
 | 
	
		
			
				|  |  | +    WHEN 2 THEN
 | 
	
		
			
				|  |  | +    '履约企业'
 | 
	
		
			
				|  |  | +    ELSE
 | 
	
		
			
				|  |  | +    '非履约企业'
 | 
	
		
			
				|  |  | +    END AS customerType,
 | 
	
		
			
				|  |  | +    aa.is_company AS isCompany,
 | 
	
		
			
				|  |  | +    aa.is_validate AS isValidate,
 | 
	
		
			
				|  |  | +    aa.nick_name AS nickName,
 | 
	
		
			
				|  |  | +    aa.phone AS customerPhone,
 | 
	
		
			
				|  |  | +    aa.pid AS pid,
 | 
	
		
			
				|  |  | +    aa.score AS score,
 | 
	
		
			
				|  |  | +    aa.create_time as createTime,
 | 
	
		
			
				|  |  | +    aa.modified_time as modifiedTime,
 | 
	
		
			
				|  |  | +    aa.is_enable as isEnable,
 | 
	
		
			
				|  |  | +    aa.wx_id as wxId,
 | 
	
		
			
				|  |  | +    aa.phone,
 | 
	
		
			
				|  |  | +    CASE aa.sex
 | 
	
		
			
				|  |  | +    WHEN 1 THEN
 | 
	
		
			
				|  |  | +    '男'
 | 
	
		
			
				|  |  | +    ELSE
 | 
	
		
			
				|  |  | +    '女'
 | 
	
		
			
				|  |  | +    END AS sexName,
 | 
	
		
			
				|  |  | +    bb.company_name AS companyName,
 | 
	
		
			
				|  |  | +    bb.principals AS principals,
 | 
	
		
			
				|  |  | +    bb.phone AS companyPhone
 | 
	
		
			
				|  |  | +    FROM
 | 
	
		
			
				|  |  | +    t_customer_info aa
 | 
	
		
			
				|  |  | +    LEFT JOIN t_customer_company_info bb ON aa.guid = bb.fk_customer_id
 | 
	
		
			
				|  |  | +    <where>
 | 
	
		
			
				|  |  | +      aa.state = 1
 | 
	
		
			
				|  |  | +      <if test="data.customerName != null and data.customerName != ''">
 | 
	
		
			
				|  |  | +        and aa.customer_name like concat('%',#{data.customerName},'%')
 | 
	
		
			
				|  |  | +      </if>
 | 
	
		
			
				|  |  | +      <if test="data.phone != null and data.phone != ''">
 | 
	
		
			
				|  |  | +        and aa.phone like concat('%',#{data.phone},'%')
 | 
	
		
			
				|  |  | +      </if>
 | 
	
		
			
				|  |  | +      <if test="data.account != null and data.account != ''">
 | 
	
		
			
				|  |  | +        and aa.account like concat('%', #{data.account}, '%')
 | 
	
		
			
				|  |  | +      </if>
 | 
	
		
			
				|  |  | +      <if test="data.customerType != null">
 | 
	
		
			
				|  |  | +        and aa.customer_type = #{data.customerType}
 | 
	
		
			
				|  |  | +      </if>
 | 
	
		
			
				|  |  | +      <if test="data.isValidate != null">
 | 
	
		
			
				|  |  | +        and aa.is_validate = #{data.isValidate}
 | 
	
		
			
				|  |  | +      </if>
 | 
	
		
			
				|  |  | +    </where>
 | 
	
		
			
				|  |  | +    order by aa.modified_time desc
 | 
	
		
			
				|  |  | +  </select>
 | 
	
		
			
				|  |  |    <select id="searchCustomerByAccount" parameterType="java.lang.String" resultMap="BaseResultMap">
 | 
	
		
			
				|  |  |      select
 | 
	
		
			
				|  |  | -      <include refid="Base_Column_List" />
 | 
	
		
			
				|  |  | +    <include refid="Base_Column_List" />
 | 
	
		
			
				|  |  |      from t_customer_info
 | 
	
		
			
				|  |  |      where account = #{account,jdbcType=CHAR} limit 1
 | 
	
		
			
				|  |  |    </select>
 | 
	
	
		
			
				|  | @@ -110,7 +110,7 @@
 | 
	
		
			
				|  |  |      <include refid="Base_Column_List" />
 | 
	
		
			
				|  |  |      from t_customer_info
 | 
	
		
			
				|  |  |      where
 | 
	
		
			
				|  |  | -      state =1
 | 
	
		
			
				|  |  | +    state =1
 | 
	
		
			
				|  |  |      and (account=#{queryStr,jdbcType=VARCHAR} or phone=#{queryStr,jdbcType=VARCHAR})
 | 
	
		
			
				|  |  |    </select>
 | 
	
		
			
				|  |  |    <select id="getCustomerByThreeCode" resultType="com.hcloud.microserver.h5.bo.CustomerInfoBO">
 | 
	
	
		
			
				|  | @@ -164,8 +164,8 @@
 | 
	
		
			
				|  |  |        FROM
 | 
	
		
			
				|  |  |            t_customer_info a
 | 
	
		
			
				|  |  |        WHERE
 | 
	
		
			
				|  |  | -          a.wx_id = #{MyWxMpUser.openId}
 | 
	
		
			
				|  |  | -      OR a.union_id =  #{MyWxMpUser.unionId}
 | 
	
		
			
				|  |  | +          a.wx_id = #{myWxMpUser.openId}
 | 
	
		
			
				|  |  | +      OR a.union_id = #{myWxMpUser.unionId}
 | 
	
		
			
				|  |  |        LIMIT 1
 | 
	
		
			
				|  |  |    </select>
 | 
	
		
			
				|  |  |    <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
 | 
	
	
		
			
				|  | @@ -173,19 +173,19 @@
 | 
	
		
			
				|  |  |    where guid = #{guid,jdbcType=CHAR}
 | 
	
		
			
				|  |  |    </delete>
 | 
	
		
			
				|  |  |    <insert id="insert" parameterType="CustomerInfo">
 | 
	
		
			
				|  |  | -    insert into t_customer_info (guid, account, passwd, 
 | 
	
		
			
				|  |  | -      customer_type, customer_name, nick_name, 
 | 
	
		
			
				|  |  | -      pid, phone, sex, score, 
 | 
	
		
			
				|  |  | +    insert into t_customer_info (guid, account, passwd,
 | 
	
		
			
				|  |  | +      customer_type, customer_name, nick_name,
 | 
	
		
			
				|  |  | +      pid, phone, sex, score,
 | 
	
		
			
				|  |  |        wx_id, union_id,head_image, is_company,
 | 
	
		
			
				|  |  | -      is_validate, is_enable, state, 
 | 
	
		
			
				|  |  | -      create_user, create_time, modified_user, 
 | 
	
		
			
				|  |  | +      is_validate, is_enable, state,
 | 
	
		
			
				|  |  | +      create_user, create_time, modified_user,
 | 
	
		
			
				|  |  |        modified_time)
 | 
	
		
			
				|  |  | -    values (#{guid,jdbcType=CHAR}, #{account,jdbcType=VARCHAR}, #{passwd,jdbcType=VARCHAR}, 
 | 
	
		
			
				|  |  | -      #{customerType,jdbcType=INTEGER}, #{customerName,jdbcType=VARCHAR}, #{nickName,jdbcType=VARCHAR}, 
 | 
	
		
			
				|  |  | -      #{pid,jdbcType=CHAR}, #{phone,jdbcType=CHAR}, #{sex,jdbcType=INTEGER}, #{score,jdbcType=INTEGER}, 
 | 
	
		
			
				|  |  | +    values (#{guid,jdbcType=CHAR}, #{account,jdbcType=VARCHAR}, #{passwd,jdbcType=VARCHAR},
 | 
	
		
			
				|  |  | +      #{customerType,jdbcType=INTEGER}, #{customerName,jdbcType=VARCHAR}, #{nickName,jdbcType=VARCHAR},
 | 
	
		
			
				|  |  | +      #{pid,jdbcType=CHAR}, #{phone,jdbcType=CHAR}, #{sex,jdbcType=INTEGER}, #{score,jdbcType=INTEGER},
 | 
	
		
			
				|  |  |        #{wxId,jdbcType=VARCHAR}, #{unionId,jdbcType=VARCHAR},#{headImage,jdbcType=VARCHAR},#{isCompany,jdbcType=INTEGER},
 | 
	
		
			
				|  |  | -      #{isValidate,jdbcType=INTEGER}, #{isEnable,jdbcType=INTEGER}, #{state,jdbcType=INTEGER}, 
 | 
	
		
			
				|  |  | -      #{createUser,jdbcType=CHAR}, #{createTime,jdbcType=TIMESTAMP}, #{modifiedUser,jdbcType=CHAR}, 
 | 
	
		
			
				|  |  | +      #{isValidate,jdbcType=INTEGER}, #{isEnable,jdbcType=INTEGER}, #{state,jdbcType=INTEGER},
 | 
	
		
			
				|  |  | +      #{createUser,jdbcType=CHAR}, #{createTime,jdbcType=TIMESTAMP}, #{modifiedUser,jdbcType=CHAR},
 | 
	
		
			
				|  |  |        #{modifiedTime,jdbcType=TIMESTAMP})
 | 
	
		
			
				|  |  |    </insert>
 | 
	
		
			
				|  |  |    <insert id="insertSelective" parameterType="CustomerInfo">
 |