|
@@ -2,43 +2,8 @@
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.jeeplus.modules.workclientinfo.dao.WorkClientInfoDao">
|
|
|
|
|
|
- <sql id="workClientInfoColumnsJoinLink">
|
|
|
- a.id AS "id",
|
|
|
- a.create_by AS "createBy.id",
|
|
|
- a.create_date AS "createDate",
|
|
|
- a.update_by AS "updateBy.id",
|
|
|
- a.update_date AS "updateDate",
|
|
|
- a.del_flag AS "delFlag",
|
|
|
- a.name AS "name",
|
|
|
- a.name_for_short AS "nameForShort",
|
|
|
- a.or_unicode AS "orUnicode",
|
|
|
- a.company_type AS "companyType",
|
|
|
- a.company_industry AS "companyIndustry",
|
|
|
- a.client_type AS "clientType",
|
|
|
- a.credit_rank AS "creditRank",
|
|
|
- a.area_id AS "area.id",
|
|
|
- a.zip_code AS "zipCode",
|
|
|
- a.fax AS "fax",
|
|
|
- a.lawer_presint AS "lawerPresint",
|
|
|
- a.tax_id AS "taxId",
|
|
|
- a.email AS "email",
|
|
|
- a.address AS "address",
|
|
|
- a.register_address AS "registerAddress",
|
|
|
- a.company_url AS "companyUrl",
|
|
|
- a.remarks AS "unitIntroduction",
|
|
|
- a.has_uscc AS "hasUscc",
|
|
|
- a.usc_code AS "uscCode",
|
|
|
- area.name AS "area.name",
|
|
|
- b.id AS "workClientLinkman.id",
|
|
|
- b.name AS "workClientLinkman.name",
|
|
|
- b.link_mobile AS "workClientLinkman.linkMobile",
|
|
|
- b.link_phone AS "workClientLinkman.linkPhone",
|
|
|
- a.company_id AS "companyId",
|
|
|
- a.telephone AS "telephone"
|
|
|
- </sql>
|
|
|
-
|
|
|
<sql id="workClientInfoColumns">
|
|
|
- a.id AS "id",
|
|
|
+ distinct a.id AS "id",
|
|
|
a.create_by AS "createBy.id",
|
|
|
a.create_date AS "createDate",
|
|
|
a.update_by AS "updateBy.id",
|
|
@@ -109,8 +74,8 @@
|
|
|
|
|
|
<select id="findList" resultType="WorkClientInfo" >
|
|
|
SELECT
|
|
|
- su.name as "userName",
|
|
|
<include refid="workClientInfoColumns"/>
|
|
|
+ ,su.name as "userName"
|
|
|
FROM work_client_info a
|
|
|
<include refid="workClientInfoJoinsLink"/>
|
|
|
left join sys_user su on su.id = a.create_by
|
|
@@ -189,7 +154,7 @@
|
|
|
|
|
|
<select id="queryCount" resultType="int" >
|
|
|
SELECT
|
|
|
- count(1)
|
|
|
+ count(distinct a.id)
|
|
|
FROM work_client_info a
|
|
|
<if test="workClientLinkman != null and workClientLinkman.name !=null and workClientLinkman.name !=''">
|
|
|
LEFT JOIN work_client_linkman b ON a.id = b.client_id
|