code review:销售统计
This commit is contained in:
parent
cc82e471ea
commit
b20ff55511
@ -3,19 +3,23 @@
|
||||
<mapper namespace="cn.iocoder.yudao.module.crm.dal.mysql.statistics.CrmStatisticsFunnelMapper">
|
||||
|
||||
<select id="selectCustomerCountByDate" resultType="java.lang.Long">
|
||||
SELECT COUNT(*)
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM crm_customer
|
||||
WHERE deleted = 0
|
||||
AND owner_user_id IN
|
||||
<!-- TODO @puhui999:这个 foreach 搞个缩进哈 - -->
|
||||
<foreach collection="userIds" item="userId" open="(" close=")" separator=",">
|
||||
#{userId}
|
||||
</foreach>
|
||||
AND create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND
|
||||
<!-- TODO @puhui999:下面这个,就不缩进啦 - -->
|
||||
#{times[1],javaType=java.time.LocalDateTime}
|
||||
</select>
|
||||
|
||||
<select id="selectBusinessCountByDateAndEndStatus" resultType="java.lang.Long">
|
||||
SELECT COUNT(*)
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM crm_business
|
||||
WHERE deleted = 0
|
||||
<if test="status != null">
|
||||
@ -31,7 +35,10 @@
|
||||
|
||||
<select id="selectBusinessSummaryListGroupByEndStatus"
|
||||
resultType="cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.CrmStatisticsBusinessSummaryByEndStatusRespVO">
|
||||
SELECT end_status AS endStatus,COUNT(*) AS businessCount, SUM(total_price) AS totalPrice
|
||||
SELECT
|
||||
end_status AS endStatus,
|
||||
COUNT(*) AS businessCount,
|
||||
SUM(total_price) AS totalPrice
|
||||
FROM crm_business
|
||||
WHERE deleted = 0 AND end_status IS NOT NULL
|
||||
AND owner_user_id IN
|
||||
|
Loading…
Reference in New Issue
Block a user