From 4351e71d782741143a98f86f6648acd16689165f Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Fri, 27 May 2022 19:48:02 +0800 Subject: [PATCH] Merge branch 'developer' into hive2.0 --- zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalesmanApplyDao.xml | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) diff --git a/zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalesmanApplyDao.xml b/zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalesmanApplyDao.xml index 1d001af..1a6d57d 100644 --- a/zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalesmanApplyDao.xml +++ b/zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalesmanApplyDao.xml @@ -132,6 +132,7 @@ <where> a.company_id = #{record.companyId} and a.is_sales != 1 + <if test="record.nickName != null and record.nickName != ''"> and a.nick_name like concat('%',#{record.nickName},'%') </if> @@ -185,8 +186,10 @@ ( SELECT count( * ) FROM shop_salesman_order c WHERE c.sales_user_id = #{openId} and revenue_type =1 ) AS salesorderCount, ( SELECT count( * ) FROM shop_salesman_order c WHERE c.sales_user_id = #{openId} and revenue_type =2 ) AS invitationOrderCount, - (select count(*) from sys_vip_info where recommend_id=#{openId} and is_sales=1) as invitationCount, - (select count(*) from sys_vip_info where recommend_id=#{openId} and is_sales=2) as customerCount + (select count(*) from sys_vip_info where recommend_id=#{openId} and is_sales=1 + ) as invitationCount, + (select count(*) from sys_vip_info where recommend_id=#{openId} and is_sales=2 + ) as customerCount from sys_vip_info a where a.id=#{id} @@ -202,9 +205,11 @@ (SELECT s.nick_name FROM sys_vip_info s WHERE s.id = a.parent_user_id ) parentUser, ( SELECT COUNT(*) FROM sys_vip_info - WHERE recommend_id = a.user_id AND is_sales != 1 ) lowerLevelNum, + WHERE recommend_id = a.user_id AND is_sales != 1 + ) lowerLevelNum, ( SELECT COUNT(*) FROM sys_vip_info - WHERE recommend_id = a.user_id AND is_sales = 1 ) invitedNum, + WHERE recommend_id = a.user_id AND is_sales = 1 + ) invitedNum, ( SELECT IFNULL(sum(IFNULL(amount, 0)), 0) FROM shop_salesman_order WHERE order_status = 2 AND sales_user_id = a.user_id ) totalRevenue, ( SELECT IFNULL(sum(IFNULL(amount, 0)), 0) FROM shop_salesman_order @@ -254,6 +259,7 @@ a.company_id = #{record.companyId} AND b.is_sales = 1 and b.recommend_id = #{record.userId} + and a.apply_status = 2 <if test="record.userName != null and record.userName != ''"> and b.nick_name like concat('%',#{record.userName},'%') -- Gitblit v1.9.1