Commit a8bec19196cd63b135734011b1de13d8b728b6a8
1 parent
90f82b15
CRM:code review【客户统计】的代码实现
Showing
5 changed files
with
51 additions
and
47 deletions
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/CrmStatisticsCustomerController.java
| @@ -61,8 +61,10 @@ public class CrmStatisticsCustomerController { | @@ -61,8 +61,10 @@ public class CrmStatisticsCustomerController { | ||
| 61 | return success(customerService.getFollowUpSummaryByType(reqVO)); | 61 | return success(customerService.getFollowUpSummaryByType(reqVO)); |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | + // TODO @dhb52:【客户转化率】里,应该少了一个接口,给上面图标的; | ||
| 65 | + | ||
| 64 | @GetMapping("/get-contract-summary") | 66 | @GetMapping("/get-contract-summary") |
| 65 | - @Operation(summary = "获取合同摘要信息(客户转化率页面)") | 67 | + @Operation(summary = "获取客户的首次合同、回款信息列表", description = "用于【客户转化率】页面") |
| 66 | @PreAuthorize("@ss.hasPermission('crm:statistics-customer:query')") | 68 | @PreAuthorize("@ss.hasPermission('crm:statistics-customer:query')") |
| 67 | public CommonResult<List<CrmStatisticsCustomerContractSummaryRespVO>> getContractSummary(@Valid CrmStatisticsCustomerReqVO reqVO) { | 69 | public CommonResult<List<CrmStatisticsCustomerContractSummaryRespVO>> getContractSummary(@Valid CrmStatisticsCustomerReqVO reqVO) { |
| 68 | return success(customerService.getContractSummary(reqVO)); | 70 | return success(customerService.getContractSummary(reqVO)); |
| @@ -82,4 +84,6 @@ public class CrmStatisticsCustomerController { | @@ -82,4 +84,6 @@ public class CrmStatisticsCustomerController { | ||
| 82 | return success(customerService.getCustomerDealCycleByUser(reqVO)); | 84 | return success(customerService.getCustomerDealCycleByUser(reqVO)); |
| 83 | } | 85 | } |
| 84 | 86 | ||
| 87 | + // TODO dhb52:【成交周期分析】里,有按照员工(已实现)、地区(未实现)、产品(未实现),需要在看看哈;可以把 CustomerDealCycle 拆成 3 个 tab,员工客户成交周期分析、地区客户成交周期分析、产品客户成交周期分析; | ||
| 88 | + | ||
| 85 | } | 89 | } |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/statistics/CrmStatisticsCustomerMapper.java
| @@ -39,6 +39,6 @@ public interface CrmStatisticsCustomerMapper { | @@ -39,6 +39,6 @@ public interface CrmStatisticsCustomerMapper { | ||
| 39 | 39 | ||
| 40 | List<CrmStatisticsCustomerDealCycleByDateRespVO> selectCustomerDealCycleGroupByDate(CrmStatisticsCustomerReqVO reqVO); | 40 | List<CrmStatisticsCustomerDealCycleByDateRespVO> selectCustomerDealCycleGroupByDate(CrmStatisticsCustomerReqVO reqVO); |
| 41 | 41 | ||
| 42 | - List<CrmStatisticsCustomerDealCycleByUserRespVO> selectCustomerDealCycleGroupByUser(CrmStatisticsCustomerReqVO reqVO); // TODO | 42 | + List<CrmStatisticsCustomerDealCycleByUserRespVO> selectCustomerDealCycleGroupByUser(CrmStatisticsCustomerReqVO reqVO); |
| 43 | 43 | ||
| 44 | } | 44 | } |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/statistics/CrmStatisticsCustomerService.java
| @@ -52,16 +52,18 @@ public interface CrmStatisticsCustomerService { | @@ -52,16 +52,18 @@ public interface CrmStatisticsCustomerService { | ||
| 52 | List<CrmStatisticsFollowUpSummaryByTypeRespVO> getFollowUpSummaryByType(CrmStatisticsCustomerReqVO reqVO); | 52 | List<CrmStatisticsFollowUpSummaryByTypeRespVO> getFollowUpSummaryByType(CrmStatisticsCustomerReqVO reqVO); |
| 53 | 53 | ||
| 54 | /** | 54 | /** |
| 55 | - * 获取合同摘要信息(客户转化率页面) | 55 | + * 获取客户的首次合同、回款信息列表,用于【客户转化率】页面 |
| 56 | * | 56 | * |
| 57 | * @param reqVO 请求参数 | 57 | * @param reqVO 请求参数 |
| 58 | - * @return 合同摘要列表 | 58 | + * @return 客户的首次合同、回款信息列表 |
| 59 | */ | 59 | */ |
| 60 | List<CrmStatisticsCustomerContractSummaryRespVO> getContractSummary(CrmStatisticsCustomerReqVO reqVO); | 60 | List<CrmStatisticsCustomerContractSummaryRespVO> getContractSummary(CrmStatisticsCustomerReqVO reqVO); |
| 61 | 61 | ||
| 62 | /** | 62 | /** |
| 63 | * 客户成交周期(按日期) | 63 | * 客户成交周期(按日期) |
| 64 | * | 64 | * |
| 65 | + * 成交的定义:客户 customer 在创建出来,到合同 contract 第一次成交的时间差 | ||
| 66 | + * | ||
| 65 | * @param reqVO 请求参数 | 67 | * @param reqVO 请求参数 |
| 66 | * @return 统计数据 | 68 | * @return 统计数据 |
| 67 | */ | 69 | */ |
yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsCustomerMapper.xml
| @@ -24,7 +24,7 @@ | @@ -24,7 +24,7 @@ | ||
| 24 | COUNT( DISTINCT customer_id ) AS customerDealCount | 24 | COUNT( DISTINCT customer_id ) AS customerDealCount |
| 25 | FROM crm_contract | 25 | FROM crm_contract |
| 26 | WHERE deleted = 0 | 26 | WHERE deleted = 0 |
| 27 | - AND audit_status = 20 | 27 | + AND audit_status = ${@cn.iocoder.yudao.module.crm.enums.common.CrmAuditStatusEnum@APPROVE.status} |
| 28 | AND owner_user_id IN | 28 | AND owner_user_id IN |
| 29 | <foreach collection="userIds" item="userId" open="(" close=")" separator=","> | 29 | <foreach collection="userIds" item="userId" open="(" close=")" separator=","> |
| 30 | #{userId} | 30 | #{userId} |
| @@ -56,7 +56,7 @@ | @@ -56,7 +56,7 @@ | ||
| 56 | FROM crm_customer AS customer | 56 | FROM crm_customer AS customer |
| 57 | LEFT JOIN crm_contract AS contract ON contract.customer_id = customer.id | 57 | LEFT JOIN crm_contract AS contract ON contract.customer_id = customer.id |
| 58 | WHERE customer.deleted = 0 AND contract.deleted = 0 | 58 | WHERE customer.deleted = 0 AND contract.deleted = 0 |
| 59 | - AND contract.audit_status = 20 | 59 | + AND contract.audit_status = ${@cn.iocoder.yudao.module.crm.enums.common.CrmAuditStatusEnum@APPROVE.status} |
| 60 | AND customer.owner_user_id IN | 60 | AND customer.owner_user_id IN |
| 61 | <foreach collection="userIds" item="userId" open="(" close=")" separator=","> | 61 | <foreach collection="userIds" item="userId" open="(" close=")" separator=","> |
| 62 | #{userId} | 62 | #{userId} |
| @@ -72,7 +72,7 @@ | @@ -72,7 +72,7 @@ | ||
| 72 | IFNULL(SUM(total_price), 0) AS contract_price | 72 | IFNULL(SUM(total_price), 0) AS contract_price |
| 73 | FROM crm_contract | 73 | FROM crm_contract |
| 74 | WHERE deleted = 0 | 74 | WHERE deleted = 0 |
| 75 | - AND audit_status = 20 | 75 | + AND audit_status = ${@cn.iocoder.yudao.module.crm.enums.common.CrmAuditStatusEnum@APPROVE.status} |
| 76 | AND owner_user_id in | 76 | AND owner_user_id in |
| 77 | <foreach collection="userIds" item="userId" open="(" close=")" separator=","> | 77 | <foreach collection="userIds" item="userId" open="(" close=")" separator=","> |
| 78 | #{userId} | 78 | #{userId} |
| @@ -88,7 +88,7 @@ | @@ -88,7 +88,7 @@ | ||
| 88 | IFNULL(SUM(price), 0) AS receivable_price | 88 | IFNULL(SUM(price), 0) AS receivable_price |
| 89 | FROM crm_receivable | 89 | FROM crm_receivable |
| 90 | WHERE deleted = 0 | 90 | WHERE deleted = 0 |
| 91 | - AND audit_status = 20 | 91 | + AND audit_status = ${@cn.iocoder.yudao.module.crm.enums.common.CrmAuditStatusEnum@APPROVE.status} |
| 92 | AND owner_user_id IN | 92 | AND owner_user_id IN |
| 93 | <foreach collection="userIds" item="userId" open="(" close=")" separator=","> | 93 | <foreach collection="userIds" item="userId" open="(" close=")" separator=","> |
| 94 | #{userId} | 94 | #{userId} |
| @@ -175,28 +175,24 @@ | @@ -175,28 +175,24 @@ | ||
| 175 | <select id="selectContractSummary" | 175 | <select id="selectContractSummary" |
| 176 | resultType="cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.CrmStatisticsCustomerContractSummaryRespVO"> | 176 | resultType="cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.CrmStatisticsCustomerContractSummaryRespVO"> |
| 177 | SELECT | 177 | SELECT |
| 178 | - customer.name AS customer_name, | ||
| 179 | - contract.name AS contract_name, | ||
| 180 | - contract.total_price, | ||
| 181 | - IFNULL( receivable.price, 0 ) AS receivable_price, | ||
| 182 | - customer.industry_id, | ||
| 183 | - customer.source, | ||
| 184 | - customer.owner_user_id, | ||
| 185 | - customer.creator, | 178 | + customer.name AS customer_name, customer.industry_id, customer.source, customer.owner_user_id, customer.creator, |
| 186 | customer.create_time, | 179 | customer.create_time, |
| 187 | - contract.order_date | 180 | + contract.name AS contract_name, contract.total_price, contract.order_date, |
| 181 | + IFNULL( receivable.price, 0 ) AS receivable_price | ||
| 188 | FROM crm_customer AS customer | 182 | FROM crm_customer AS customer |
| 189 | INNER JOIN crm_contract AS contract ON customer.id = contract.customer_id | 183 | INNER JOIN crm_contract AS contract ON customer.id = contract.customer_id |
| 190 | LEFT JOIN crm_receivable AS receivable ON contract.id = receivable.contract_id | 184 | LEFT JOIN crm_receivable AS receivable ON contract.id = receivable.contract_id |
| 191 | WHERE customer.deleted = 0 AND contract.deleted = 0 AND receivable.deleted = 0 | 185 | WHERE customer.deleted = 0 AND contract.deleted = 0 AND receivable.deleted = 0 |
| 192 | - AND contract.audit_status = 20 | 186 | + AND contract.audit_status = ${@cn.iocoder.yudao.module.crm.enums.common.CrmAuditStatusEnum@APPROVE.status} |
| 193 | AND customer.owner_user_id IN | 187 | AND customer.owner_user_id IN |
| 194 | <foreach collection="userIds" item="userId" open="(" close=")" separator=","> | 188 | <foreach collection="userIds" item="userId" open="(" close=")" separator=","> |
| 195 | #{userId} | 189 | #{userId} |
| 196 | </foreach> | 190 | </foreach> |
| 191 | + <!-- TODO @dhb52:应该是客户的创建时间;因为它的定位,是知道这个时间范围内创建的客户,是否下合同了(转化); --> | ||
| 197 | AND contract.create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND #{times[1],javaType=java.time.LocalDateTime} | 192 | AND contract.create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND #{times[1],javaType=java.time.LocalDateTime} |
| 198 | </select> | 193 | </select> |
| 199 | 194 | ||
| 195 | + <!-- TIMESTAMPDIFF 用于求差值;AVG 求平均;TRUNCATE 去掉小数点、只保留整数 --> | ||
| 200 | <select id="selectCustomerDealCycleGroupByDate" | 196 | <select id="selectCustomerDealCycleGroupByDate" |
| 201 | resultType="cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.CrmStatisticsCustomerDealCycleByDateRespVO"> | 197 | resultType="cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.customer.CrmStatisticsCustomerDealCycleByDateRespVO"> |
| 202 | SELECT | 198 | SELECT |
| @@ -205,11 +201,12 @@ | @@ -205,11 +201,12 @@ | ||
| 205 | FROM crm_customer AS customer | 201 | FROM crm_customer AS customer |
| 206 | LEFT JOIN crm_contract AS contract ON contract.customer_id = customer.id | 202 | LEFT JOIN crm_contract AS contract ON contract.customer_id = customer.id |
| 207 | WHERE customer.deleted = 0 AND contract.deleted = 0 | 203 | WHERE customer.deleted = 0 AND contract.deleted = 0 |
| 208 | - AND contract.audit_status = 20 | 204 | + AND contract.audit_status = ${@cn.iocoder.yudao.module.crm.enums.common.CrmAuditStatusEnum@APPROVE.status} |
| 209 | AND customer.owner_user_id IN | 205 | AND customer.owner_user_id IN |
| 210 | <foreach collection="userIds" item="userId" open="(" close=")" separator=","> | 206 | <foreach collection="userIds" item="userId" open="(" close=")" separator=","> |
| 211 | #{userId} | 207 | #{userId} |
| 212 | </foreach> | 208 | </foreach> |
| 209 | + <!-- TODO @dhb52:应该是客户的创建时间; --> | ||
| 213 | AND contract.create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND #{times[1],javaType=java.time.LocalDateTime} | 210 | AND contract.create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND #{times[1],javaType=java.time.LocalDateTime} |
| 214 | GROUP BY time | 211 | GROUP BY time |
| 215 | </select> | 212 | </select> |
| @@ -222,11 +219,12 @@ | @@ -222,11 +219,12 @@ | ||
| 222 | FROM crm_customer AS customer | 219 | FROM crm_customer AS customer |
| 223 | LEFT JOIN crm_contract AS contract ON contract.customer_id = customer.id | 220 | LEFT JOIN crm_contract AS contract ON contract.customer_id = customer.id |
| 224 | WHERE customer.deleted = 0 AND contract.deleted = 0 | 221 | WHERE customer.deleted = 0 AND contract.deleted = 0 |
| 225 | - AND contract.audit_status = 20 | 222 | + AND contract.audit_status = ${@cn.iocoder.yudao.module.crm.enums.common.CrmAuditStatusEnum@APPROVE.status} |
| 226 | AND customer.owner_user_id IN | 223 | AND customer.owner_user_id IN |
| 227 | <foreach collection="userIds" item="userId" open="(" close=")" separator=","> | 224 | <foreach collection="userIds" item="userId" open="(" close=")" separator=","> |
| 228 | #{userId} | 225 | #{userId} |
| 229 | </foreach> | 226 | </foreach> |
| 227 | + <!-- TODO @dhb52:应该是客户的创建时间; --> | ||
| 230 | AND contract.create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND #{times[1],javaType=java.time.LocalDateTime} | 228 | AND contract.create_time BETWEEN #{times[0],javaType=java.time.LocalDateTime} AND #{times[1],javaType=java.time.LocalDateTime} |
| 231 | GROUP BY customer.owner_user_id | 229 | GROUP BY customer.owner_user_id |
| 232 | </select> | 230 | </select> |
yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/statistics/CrmStatisticsRankMapper.xml
| @@ -7,11 +7,11 @@ | @@ -7,11 +7,11 @@ | ||
| 7 | SELECT IFNULL(SUM(total_price), 0) AS count, owner_user_id | 7 | SELECT IFNULL(SUM(total_price), 0) AS count, owner_user_id |
| 8 | FROM crm_contract | 8 | FROM crm_contract |
| 9 | WHERE deleted = 0 | 9 | WHERE deleted = 0 |
| 10 | - AND audit_status = 20 | 10 | + AND audit_status = ${@cn.iocoder.yudao.module.crm.enums.common.CrmAuditStatusEnum@APPROVE.status} |
| 11 | and owner_user_id in | 11 | and owner_user_id in |
| 12 | - <foreach collection="userIds" item="userId" open="(" close=")" separator=","> | ||
| 13 | - #{userId} | ||
| 14 | - </foreach> | 12 | + <foreach collection="userIds" item="userId" open="(" close=")" separator=","> |
| 13 | + #{userId} | ||
| 14 | + </foreach> | ||
| 15 | AND order_date between #{times[0],javaType=java.time.LocalDateTime} and | 15 | AND order_date between #{times[0],javaType=java.time.LocalDateTime} and |
| 16 | #{times[1],javaType=java.time.LocalDateTime} | 16 | #{times[1],javaType=java.time.LocalDateTime} |
| 17 | GROUP BY owner_user_id | 17 | GROUP BY owner_user_id |
| @@ -22,11 +22,11 @@ | @@ -22,11 +22,11 @@ | ||
| 22 | SELECT IFNULL(SUM(price), 0) AS count, owner_user_id | 22 | SELECT IFNULL(SUM(price), 0) AS count, owner_user_id |
| 23 | FROM crm_receivable | 23 | FROM crm_receivable |
| 24 | WHERE deleted = 0 | 24 | WHERE deleted = 0 |
| 25 | - AND audit_status = 20 | 25 | + AND audit_status = ${@cn.iocoder.yudao.module.crm.enums.common.CrmAuditStatusEnum@APPROVE.status} |
| 26 | AND owner_user_id in | 26 | AND owner_user_id in |
| 27 | - <foreach collection="userIds" item="userId" open="(" close=")" separator=","> | ||
| 28 | - #{userId} | ||
| 29 | - </foreach> | 27 | + <foreach collection="userIds" item="userId" open="(" close=")" separator=","> |
| 28 | + #{userId} | ||
| 29 | + </foreach> | ||
| 30 | AND return_time between #{times[0],javaType=java.time.LocalDateTime} and | 30 | AND return_time between #{times[0],javaType=java.time.LocalDateTime} and |
| 31 | #{times[1],javaType=java.time.LocalDateTime} | 31 | #{times[1],javaType=java.time.LocalDateTime} |
| 32 | GROUP BY owner_user_id | 32 | GROUP BY owner_user_id |
| @@ -37,11 +37,11 @@ | @@ -37,11 +37,11 @@ | ||
| 37 | SELECT COUNT(1) AS count, owner_user_id | 37 | SELECT COUNT(1) AS count, owner_user_id |
| 38 | FROM crm_contract | 38 | FROM crm_contract |
| 39 | WHERE deleted = 0 | 39 | WHERE deleted = 0 |
| 40 | - AND audit_status = 20 | 40 | + AND audit_status = ${@cn.iocoder.yudao.module.crm.enums.common.CrmAuditStatusEnum@APPROVE.status} |
| 41 | AND owner_user_id in | 41 | AND owner_user_id in |
| 42 | - <foreach collection="userIds" item="userId" open="(" close=")" separator=","> | ||
| 43 | - #{userId} | ||
| 44 | - </foreach> | 42 | + <foreach collection="userIds" item="userId" open="(" close=")" separator=","> |
| 43 | + #{userId} | ||
| 44 | + </foreach> | ||
| 45 | AND order_date between #{times[0],javaType=java.time.LocalDateTime} and | 45 | AND order_date between #{times[0],javaType=java.time.LocalDateTime} and |
| 46 | #{times[1],javaType=java.time.LocalDateTime} | 46 | #{times[1],javaType=java.time.LocalDateTime} |
| 47 | GROUP BY owner_user_id | 47 | GROUP BY owner_user_id |
| @@ -55,9 +55,9 @@ | @@ -55,9 +55,9 @@ | ||
| 55 | WHERE deleted = 0 | 55 | WHERE deleted = 0 |
| 56 | AND audit_status = 20 | 56 | AND audit_status = 20 |
| 57 | AND owner_user_id in | 57 | AND owner_user_id in |
| 58 | - <foreach collection="userIds" item="userId" open="(" close=")" separator=","> | ||
| 59 | - #{userId} | ||
| 60 | - </foreach> | 58 | + <foreach collection="userIds" item="userId" open="(" close=")" separator=","> |
| 59 | + #{userId} | ||
| 60 | + </foreach> | ||
| 61 | AND order_date between #{times[0],javaType=java.time.LocalDateTime} and | 61 | AND order_date between #{times[0],javaType=java.time.LocalDateTime} and |
| 62 | #{times[1],javaType=java.time.LocalDateTime} | 62 | #{times[1],javaType=java.time.LocalDateTime} |
| 63 | GROUP BY owner_user_id | 63 | GROUP BY owner_user_id |
| @@ -69,9 +69,9 @@ | @@ -69,9 +69,9 @@ | ||
| 69 | FROM crm_customer | 69 | FROM crm_customer |
| 70 | WHERE deleted = 0 | 70 | WHERE deleted = 0 |
| 71 | AND owner_user_id in | 71 | AND owner_user_id in |
| 72 | - <foreach collection="userIds" item="userId" open="(" close=")" separator=","> | ||
| 73 | - #{userId} | ||
| 74 | - </foreach> | 72 | + <foreach collection="userIds" item="userId" open="(" close=")" separator=","> |
| 73 | + #{userId} | ||
| 74 | + </foreach> | ||
| 75 | AND create_time between #{times[0],javaType=java.time.LocalDateTime} and | 75 | AND create_time between #{times[0],javaType=java.time.LocalDateTime} and |
| 76 | #{times[1],javaType=java.time.LocalDateTime} | 76 | #{times[1],javaType=java.time.LocalDateTime} |
| 77 | GROUP BY owner_user_id | 77 | GROUP BY owner_user_id |
| @@ -83,9 +83,9 @@ | @@ -83,9 +83,9 @@ | ||
| 83 | FROM crm_contact | 83 | FROM crm_contact |
| 84 | WHERE deleted = 0 | 84 | WHERE deleted = 0 |
| 85 | AND owner_user_id in | 85 | AND owner_user_id in |
| 86 | - <foreach collection="userIds" item="userId" open="(" close=")" separator=","> | ||
| 87 | - #{userId} | ||
| 88 | - </foreach> | 86 | + <foreach collection="userIds" item="userId" open="(" close=")" separator=","> |
| 87 | + #{userId} | ||
| 88 | + </foreach> | ||
| 89 | AND create_time between #{times[0],javaType=java.time.LocalDateTime} and | 89 | AND create_time between #{times[0],javaType=java.time.LocalDateTime} and |
| 90 | #{times[1],javaType=java.time.LocalDateTime} | 90 | #{times[1],javaType=java.time.LocalDateTime} |
| 91 | GROUP BY owner_user_id | 91 | GROUP BY owner_user_id |
| @@ -99,9 +99,9 @@ | @@ -99,9 +99,9 @@ | ||
| 99 | WHERE cfur.deleted = 0 | 99 | WHERE cfur.deleted = 0 |
| 100 | AND cc.deleted = 0 | 100 | AND cc.deleted = 0 |
| 101 | AND cc.owner_user_id in | 101 | AND cc.owner_user_id in |
| 102 | - <foreach collection="userIds" item="userId" open="(" close=")" separator=","> | ||
| 103 | - #{userId} | ||
| 104 | - </foreach> | 102 | + <foreach collection="userIds" item="userId" open="(" close=")" separator=","> |
| 103 | + #{userId} | ||
| 104 | + </foreach> | ||
| 105 | AND cfur.create_time between #{times[0],javaType=java.time.LocalDateTime} and | 105 | AND cfur.create_time between #{times[0],javaType=java.time.LocalDateTime} and |
| 106 | #{times[1],javaType=java.time.LocalDateTime} | 106 | #{times[1],javaType=java.time.LocalDateTime} |
| 107 | GROUP BY cc.owner_user_id | 107 | GROUP BY cc.owner_user_id |
| @@ -115,9 +115,9 @@ | @@ -115,9 +115,9 @@ | ||
| 115 | WHERE cfur.deleted = 0 | 115 | WHERE cfur.deleted = 0 |
| 116 | AND cc.deleted = 0 | 116 | AND cc.deleted = 0 |
| 117 | AND cc.owner_user_id in | 117 | AND cc.owner_user_id in |
| 118 | - <foreach collection="userIds" item="userId" open="(" close=")" separator=","> | ||
| 119 | - #{userId} | ||
| 120 | - </foreach> | 118 | + <foreach collection="userIds" item="userId" open="(" close=")" separator=","> |
| 119 | + #{userId} | ||
| 120 | + </foreach> | ||
| 121 | AND cfur.create_time between #{times[0],javaType=java.time.LocalDateTime} and | 121 | AND cfur.create_time between #{times[0],javaType=java.time.LocalDateTime} and |
| 122 | #{times[1],javaType=java.time.LocalDateTime} | 122 | #{times[1],javaType=java.time.LocalDateTime} |
| 123 | GROUP BY cc.owner_user_id | 123 | GROUP BY cc.owner_user_id |