0302-海宁管户报表优化+客群代码初稿
This commit is contained in:
@@ -142,6 +142,28 @@
|
||||
<if test="managerId != null and managerId !='' ">and manager_id = #{managerId}</if>
|
||||
<if test="outletId != null and outletId !='' ">and outlet_id = #{outletId}</if>
|
||||
<if test="branchId != null and branchId !='' ">and branch_id = #{branchId}</if>
|
||||
<if test="statusType != null and statusType !=''">
|
||||
<choose>
|
||||
<when test="statusType == 'current'">
|
||||
<!-- 本月:本月是指定星级的客户 -->
|
||||
and cust_level = #{custLevel}
|
||||
</when>
|
||||
<when test="statusType == 'last'">
|
||||
<!-- 上月:上月是指定星级的客户 -->
|
||||
and cust_level_lm = #{custLevel}
|
||||
</when>
|
||||
<when test="statusType == 'rise'">
|
||||
<!-- 上升:上升到指定星级的客户(本月是指定星级,上月星级更低) -->
|
||||
and cust_level = #{custLevel}
|
||||
and cust_level_comp_lm like '上升%'
|
||||
</when>
|
||||
<when test="statusType == 'fall'">
|
||||
<!-- 下降:从指定星级下降的客户(上月是指定星级,本月星级更低) -->
|
||||
and cust_level_lm = #{custLevel}
|
||||
and cust_level_comp_lm like '下降%'
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@@ -438,6 +460,7 @@
|
||||
select distinct
|
||||
cust_level
|
||||
from dwb_retail_cust_level_manager_detail_875
|
||||
order by cust_level
|
||||
</select>
|
||||
|
||||
<select id="getCustCountByLevel" resultType="int">
|
||||
|
||||
Reference in New Issue
Block a user