|
|
@@ -5,10 +5,10 @@
|
|
|
<!-- 通用设置 -->
|
|
|
<!-- 通用查询列 -->
|
|
|
<sql id="Base_Column_List">
|
|
|
- follow_id, cus_id, follow_status, follow_type, follow_org, follow_staff, follow_time, follow_data, follow_time_len, stay_time_len, intention, invite_result, invite_time, design_staff, next_follow_plan, next_follow_time, annex_paths, measure_status, remarks, flg_valid, cp_id, op_create_time, op_create_user_id, op_update_time, op_update_user_id, op_app_code, op_timestamp, op_db_user
|
|
|
+ follow_id, cus_id, follow_status, follow_org, follow_staff, follow_time, follow_data, follow_time_len, stay_time_len, intention, invite_result, invite_time, design_staff, next_follow_plan, next_follow_time, annex_paths, measure_status, remarks, flg_valid, cp_id, op_create_time, op_create_user_id, op_update_time, op_update_user_id, op_app_code, op_timestamp, op_db_user
|
|
|
</sql>
|
|
|
<sql id="Base_Column_List_Join">
|
|
|
- tccf.follow_id, tccf.cus_id, tccf.follow_status, tccf.follow_type, tccf.follow_org, tccf.follow_staff, tccf.follow_time, tccf.follow_data,
|
|
|
+ tccf.follow_id, tccf.cus_id, tccf.follow_status, tccf.follow_org, tccf.follow_staff, tccf.follow_time, tccf.follow_data,
|
|
|
tccf.follow_time_len, tccf.stay_time_len, tccf.intention, tccf.invite_result, tccf.invite_time, tccf.design_staff,
|
|
|
tccf.next_follow_plan, tccf.next_follow_time,tccf.annex_paths, tccf.measure_status, tccf.remarks, tccf.flg_valid,
|
|
|
tccf.cp_id
|
|
|
@@ -18,7 +18,6 @@
|
|
|
<id column="follow_id" property="followId"/>
|
|
|
<result column="cus_id" property="cusId" typeHandler="UuidTypeHandler"/>
|
|
|
<result column="follow_status" property="followStatus"/>
|
|
|
- <result column="follow_type" property="followType"/>
|
|
|
<result column="follow_org" property="followOrg" typeHandler="UuidTypeHandler"/>
|
|
|
<result column="follow_staff" property="followStaff" typeHandler="UuidTypeHandler"/>
|
|
|
<result column="follow_time" property="followTime" typeHandler="TimestampTypeHandler"/>
|
|
|
@@ -48,7 +47,6 @@
|
|
|
<id column="follow_id" property="followId"/>
|
|
|
<result column="cus_id" property="cusId" typeHandler="UuidTypeHandler"/>
|
|
|
<result column="follow_status" property="followStatus"/>
|
|
|
- <result column="follow_type" property="followType"/>
|
|
|
<result column="follow_org" property="followOrg" typeHandler="UuidTypeHandler"/>
|
|
|
<result column="follow_staff" property="followStaff" typeHandler="UuidTypeHandler"/>
|
|
|
<result column="follow_time" property="followTime" typeHandler="TimestampTypeHandler"/>
|
|
|
@@ -75,7 +73,6 @@
|
|
|
<result column="follow_staff_name" property="followStaffName"/>
|
|
|
<result column="create_time" property="createTime" typeHandler="TimestampTypeHandler"/>
|
|
|
<result column="follow_status_name" property="followStatusName"/>
|
|
|
- <result column="follow_type_name" property="followTypeName"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<!-- 通用条件列 -->
|
|
|
@@ -87,9 +84,7 @@
|
|
|
<if test="followStatus != null and followStatus != ''">
|
|
|
AND follow_status = #{followStatus}
|
|
|
</if>
|
|
|
- <if test="followType != null and followType != ''">
|
|
|
- AND follow_type = #{followType}
|
|
|
- </if>
|
|
|
+
|
|
|
<if test="followOrg != null and followOrg != ''">
|
|
|
AND follow_org = #{followOrg}
|
|
|
</if>
|
|
|
@@ -173,9 +168,7 @@
|
|
|
<if test="followStatus != null and followStatus != ''">
|
|
|
AND tccf.follow_status = #{followStatus}
|
|
|
</if>
|
|
|
- <if test="followType != null and followType != ''">
|
|
|
- AND tccf.follow_type = #{followType}
|
|
|
- </if>
|
|
|
+
|
|
|
<if test="followOrg != null and followOrg != ''">
|
|
|
AND tccf.follow_org = #{followOrg}
|
|
|
</if>
|
|
|
@@ -249,14 +242,12 @@
|
|
|
tmo.org_name AS "orgName",
|
|
|
tms.staff_name AS "staffName",
|
|
|
tmc.follow_count AS follow_count,
|
|
|
- tdk1.kind_name_i18n ->> 'zh_CN' AS "follow_status_name",
|
|
|
- tdk2.kind_name_i18n ->> 'zh_CN' AS "follow_type_name"
|
|
|
+ tdk1.kind_name_i18n ->> 'zh_CN' AS "follow_status_name"
|
|
|
FROM dkic_b.t_crm_cus_follow tccf
|
|
|
LEFT JOIN dkic_b.t_mst_customer tmc ON tmc.cus_id = tccf.cus_id
|
|
|
LEFT JOIN dkic_b.t_mst_org tmo on tmo.org_id = tccf.follow_org
|
|
|
LEFT JOIN dkic_b.t_mst_staff tms on tms.staff_id = tccf.follow_staff
|
|
|
LEFT JOIN sys.t_data_kind tdk1 on tdk1.kind_code = tccf.follow_status
|
|
|
- LEFT JOIN sys.t_data_kind tdk2 on tdk2.kind_code = tccf.follow_type
|
|
|
<include refid="Condition_Join"/>
|
|
|
<if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
|
|
|
limit #{end} offset #{start}
|
|
|
@@ -275,15 +266,14 @@
|
|
|
tmc.follow_count AS follow_count,
|
|
|
tms.staff_name AS follow_staff_name,
|
|
|
tccf.op_create_time AS create_time,
|
|
|
- tdk1.kind_name_i18n ->> 'zh_CN' AS "follow_status_name",
|
|
|
- tdk2.kind_name_i18n ->> 'zh_CN' AS "follow_type_name"
|
|
|
+ tdk1.kind_name_i18n ->> 'zh_CN' AS "follow_status_name"
|
|
|
FROM dkic_b.t_crm_cus_follow tccf
|
|
|
LEFT JOIN dkic_b.t_mst_customer tmc ON tmc.cus_id = tccf.cus_id
|
|
|
LEFT JOIN dkic_b.t_mst_org tmo on tmo.org_id = tccf.follow_org
|
|
|
LEFT JOIN dkic_b.t_mst_staff tms on tms.staff_id = tccf.follow_staff
|
|
|
|
|
|
LEFT JOIN sys.t_data_kind tdk1 on tdk1.kind_code = tccf.follow_status
|
|
|
- LEFT JOIN sys.t_data_kind tdk2 on tdk2.kind_code = tccf.follow_type
|
|
|
+
|
|
|
<include refid="Condition_Join"/>
|
|
|
|
|
|
</select>
|
|
|
@@ -328,7 +318,6 @@
|
|
|
<trim suffixOverrides=",">
|
|
|
cus_id,
|
|
|
follow_status,
|
|
|
- follow_type,
|
|
|
follow_org,
|
|
|
follow_staff,
|
|
|
follow_time,
|
|
|
@@ -354,7 +343,6 @@
|
|
|
<trim suffixOverrides=",">
|
|
|
#{item.cusId}::uuid,
|
|
|
#{item.followStatus},
|
|
|
- #{item.followType},
|
|
|
#{item.followOrg}::uuid,
|
|
|
#{item.followStaff}::uuid,
|
|
|
#{item.followTime},
|