赵冬冬 4 anni fa
parent
commit
55eebbddfa

+ 100 - 98
carbon-h5/carbon-h5-service/src/main/resources/com/hcloud/microserver/h5/dao/CustomerInfoMapper.xml

@@ -1,30 +1,32 @@
 <?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.hcloud.microserver.h5.dao.CustomerInfoMapper">
-    <resultMap id="BaseResultMap" type="com.hcloud.microserver.facade.carbon.entity.CustomerInfo">
-        <id column="guid" jdbcType="CHAR" property="guid"/>
-        <result column="account" jdbcType="VARCHAR" property="account"/>
-        <result column="passwd" jdbcType="VARCHAR" property="passwd"/>
-        <result column="customer_type" jdbcType="INTEGER" property="customerType"/>
-        <result column="customer_name" jdbcType="VARCHAR" property="customerName"/>
-        <result column="nick_name" jdbcType="VARCHAR" property="nickName"/>
-        <result column="pid" jdbcType="CHAR" property="pid"/>
-        <result column="phone" jdbcType="CHAR" property="phone"/>
-        <result column="sex" jdbcType="INTEGER" property="sex"/>
-        <result column="score" jdbcType="INTEGER" property="score"/>
-        <result column="wx_id" jdbcType="VARCHAR" property="wxId"/>
-        <result column="union_id" jdbcType="VARCHAR" property="unionId"/>
-        <result column="head_image" jdbcType="VARCHAR" property="headImage"/>
-        <result column="is_company" jdbcType="INTEGER" property="isCompany"/>
-        <result column="is_validate" jdbcType="INTEGER" property="isValidate"/>
-        <result column="is_enable" jdbcType="INTEGER" property="isEnable"/>
-        <result column="state" jdbcType="INTEGER" property="state"/>
-        <result column="create_user" jdbcType="CHAR" property="createUser"/>
-        <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
-        <result column="modified_user" jdbcType="CHAR" property="modifiedUser"/>
-        <result column="modified_time" jdbcType="TIMESTAMP" property="modifiedTime"/>
-    </resultMap>
-    <sql id="Base_Column_List">
+  <resultMap id="BaseResultMap" type="CustomerInfo">
+    <id column="guid" jdbcType="CHAR" property="guid" />
+    <result column="account" jdbcType="VARCHAR" property="account" />
+    <result column="passwd" jdbcType="VARCHAR" property="passwd" />
+    <result column="customer_type" jdbcType="INTEGER" property="customerType" />
+    <result column="customer_name" jdbcType="VARCHAR" property="customerName" />
+    <result column="nick_name" jdbcType="VARCHAR" property="nickName" />
+    <result column="pid" jdbcType="CHAR" property="pid" />
+    <result column="phone" jdbcType="CHAR" property="phone" />
+    <result column="sex" jdbcType="INTEGER" property="sex" />
+    <result column="score" jdbcType="INTEGER" property="score" />
+    <result column="wx_id" jdbcType="VARCHAR" property="wxId" />
+    <result column="union_id" jdbcType="VARCHAR" property="unionId" />
+    <result column="head_image" jdbcType="VARCHAR" property="headImage" />
+    <result column="is_company" jdbcType="INTEGER" property="isCompany" />
+    <result column="is_validate" jdbcType="INTEGER" property="isValidate" />
+    <result column="is_enable" jdbcType="INTEGER" property="isEnable" />
+    <result column="state" jdbcType="INTEGER" property="state" />
+    <result column="create_user" jdbcType="CHAR" property="createUser" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="modified_user" jdbcType="CHAR" property="modifiedUser" />
+
+
+    <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,
     score, wx_id, union_id,head_image,is_company, is_validate, is_enable, state, create_user, create_time,
     modified_user, modified_time
@@ -35,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>
@@ -108,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">
@@ -170,23 +172,23 @@
   delete from t_customer_info
   where guid = #{guid,jdbcType=CHAR}
   </delete>
-  <insert id="insert" parameterType="com.hcloud.microserver.facade.carbon.entity.CustomerInfo">
-    insert into t_customer_info (guid, account, passwd, 
-      customer_type, customer_name, nick_name, 
-      pid, phone, sex, score, 
+  <insert id="insert" parameterType="CustomerInfo">
+    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="com.hcloud.microserver.facade.carbon.entity.CustomerInfo">
+  <insert id="insertSelective" parameterType="CustomerInfo">
     insert into t_customer_info
     <trim prefix="(" suffix=")" suffixOverrides=",">
       <if test="guid != null">
@@ -319,7 +321,7 @@
       </if>
     </trim>
   </insert>
-  <update id="updateByPrimaryKeySelective" parameterType="com.hcloud.microserver.facade.carbon.entity.CustomerInfo">
+  <update id="updateByPrimaryKeySelective" parameterType="CustomerInfo">
     update t_customer_info
     <set>
       <if test="account != null">
@@ -385,7 +387,7 @@
     </set>
     where guid = #{guid,jdbcType=CHAR}
   </update>
-  <update id="updateByPrimaryKey" parameterType="com.hcloud.microserver.facade.carbon.entity.CustomerInfo">
+  <update id="updateByPrimaryKey" parameterType="CustomerInfo">
     update t_customer_info
     set account = #{account,jdbcType=VARCHAR},
       passwd = #{passwd,jdbcType=VARCHAR},