2024-04-13 23:30:11 +08:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
<mapper namespace="cn.iocoder.yudao.module.crm.dal.mysql.statistics.CrmStatisticsFunnelMapper">
|
|
|
|
|
2024-04-14 16:31:53 +08:00
|
|
|
<select id="selectBusinessCreateCountGroupByDate"
|
|
|
|
resultType="cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.funnel.CrmStatisticsBusinessSummaryByDateRespVO">
|
|
|
|
SELECT DATE_FORMAT(create_time, '%Y-%m-%d') AS time, COUNT(*) AS businessCreateCount
|
|
|
|
FROM crm_business
|
|
|
|
WHERE deleted = 0
|
|
|
|
AND owner_user_id IN
|
|
|
|
<foreach collection="userIds" item="userId" open="(" close=")" separator=",">
|
|
|
|
#{userId}
|
|
|
|
</foreach>
|
|
|
|
AND create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND
|
|
|
|
#{times[1],javaType=java.time.LocalDateTime}
|
|
|
|
GROUP BY time
|
|
|
|
</select>
|
|
|
|
|
2024-04-13 23:30:11 +08:00
|
|
|
</mapper>
|