Commit 7333a626f78ccded0766f08383b3c74156bbcae3

Authored by 张志伟
2 parents 1269a598 b3244f6a

Merge remote-tracking branch 'origin/test'

fw-valhalla-domain/src/main/java/cn/fw/valhalla/domain/vo/ipt/CustomerInitClueVO.kt
... ... @@ -15,26 +15,48 @@ import java.util.*
15 15 */
16 16 @NoArg
17 17 data class CustomerInitClueVO(
  18 + /** id */
18 19 val id: Long,
  20 + /** 车牌号 */
19 21 val plateNo: String?,
  22 + /** 车架号 */
20 23 val vin: String,
  24 + /** 品牌 */
21 25 val brandName: String?,
  26 + /** 车系 */
22 27 val seriesName: String?,
  28 + /** 车型 */
23 29 val specName: String?,
  30 + /** 发动机号 */
24 31 val engineNo: String?,
  32 + /** 购车日期 */
25 33 val buyDate: LocalDate?,
  34 + /** 客户名称 */
26 35 val customerName: String?,
  36 + /** 客户电话 */
27 37 val customerMobile: String,
  38 + /** 电话归属地 */
  39 + var cMobileRegion: String? = null,
  40 + /** 上次进站时间 */
28 41 val arrivalTime: LocalDateTime?,
  42 + /** 上次进站里程 */
29 43 val arrivalMileage: Int?,
  44 + /** 最后一次送修人 */
30 45 val senderName: String?,
  46 + /** 最后一次送修人电话 */
31 47 val senderMobile: String,
  48 + /** 电话归属地 */
  49 + var sMobileRegion: String? = null,
  50 + /** 顾问id */
32 51 val adviserId: Long,
  52 + /** 顾问名称 */
33 53 val adviserName: String?,
  54 + /** 门店id */
34 55 val shopId: Long,
  56 + /** 门店名称 */
35 57 val shopName: String,
  58 + /** 集团id */
36 59 val groupId: Long,
37   - val yn: Boolean,
38   - val createTime: Date,
39   - val updateTime: Date?,
  60 + /** 导入时间 */
  61 + val createTime: Date
40 62 )
... ...
fw-valhalla-rpc/src/main/java/cn/fw/valhalla/rpc/member/MemberRpcService.java
1 1 package cn.fw.valhalla.rpc.member;
2 2  
3 3 import cn.fw.common.util.MobileUtil;
  4 +import cn.fw.common.util.ValidationUtils;
4 5 import cn.fw.data.base.domain.common.Message;
5 6 import cn.fw.member.sdk.api.AccountApi;
6 7 import cn.fw.member.sdk.api.FunctionApi;
... ... @@ -119,7 +120,7 @@ public class MemberRpcService {
119 120 */
120 121 @Cacheable(cacheNames = "mobile:attribution", key = "#mobile", unless = "#result.isEmpty()")
121 122 public String attribution(final String mobile) {
122   - if (StringUtils.isBlank(mobile)) {
  123 + if (StringUtils.isBlank(mobile) || !ValidationUtils.checkMobile(mobile)) {
123 124 return "";
124 125 }
125 126 try {
... ...
fw-valhalla-server/src/main/java/cn/fw/valhalla/controller/app/InitClueController.kt
... ... @@ -9,6 +9,7 @@ import cn.fw.security.auth.client.annotation.IgnoreAuth
9 9 import cn.fw.security.auth.client.enums.AuthType
10 10 import cn.fw.valhalla.domain.query.InitClueQueryVO
11 11 import cn.fw.valhalla.domain.vo.ipt.CustomerInitClueVO
  12 +import cn.fw.valhalla.domain.vo.ipt.InitClueCallLogVO
12 13 import cn.fw.valhalla.service.bus.ipt.CustomerInitClueBizService
13 14 import org.springframework.validation.annotation.Validated
14 15 import org.springframework.web.bind.annotation.GetMapping
... ... @@ -34,4 +35,11 @@ class InitClueController(private val customerInitClueBizService: CustomerInitClu
34 35 fun customerPool(queryVO: InitClueQueryVO): Message<AppPage<CustomerInitClueVO>> {
35 36 return success(customerInitClueBizService.listPage(queryVO))
36 37 }
  38 +
  39 + @IgnoreAuth
  40 + @GetMapping("/history")
  41 + @ControllerMethod("查询历史跟进数据")
  42 + fun customerPoolHistory(clueId: Long): Message<List<InitClueCallLogVO>> {
  43 + return success(customerInitClueBizService.callLog(clueId))
  44 + }
37 45 }
38 46 \ No newline at end of file
... ...
fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/ipt/CustomerInitClueBizService.kt
... ... @@ -8,6 +8,7 @@ import cn.fw.valhalla.domain.query.InitClueQueryVO
8 8 import cn.fw.valhalla.domain.vo.AppPageVO
9 9 import cn.fw.valhalla.domain.vo.ipt.CustomerInitClueVO
10 10 import cn.fw.valhalla.domain.vo.ipt.InitClueCallLogVO
  11 +import cn.fw.valhalla.rpc.member.MemberRpcService
11 12 import cn.fw.valhalla.rpc.oop.OopService
12 13 import cn.fw.valhalla.service.data.CustomerInitClueCallLogService
13 14 import cn.fw.valhalla.service.data.CustomerInitClueService
... ... @@ -28,7 +29,8 @@ import java.util.function.Function
28 29 class CustomerInitClueBizService(
29 30 private val customerInitClueService: CustomerInitClueService,
30 31 private val customerInitClueCallLogService: CustomerInitClueCallLogService,
31   - private val oopService: OopService
  32 + private val oopService: OopService,
  33 + private val memberRpcService: MemberRpcService
32 34 ) {
33 35 /**
34 36 * 查询池子数据
... ... @@ -52,7 +54,10 @@ class CustomerInitClueBizService(
52 54 customerInitClueService.page(ipage, ktQuery)
53 55 page.total = ipage.total
54 56 page.data = ipage.records?.mapNotNull {
55   - it.toCustomerInitClueVO { id -> oopService.shop(id)?.shopName ?: "-" }
  57 + it.toCustomerInitClueVO { id -> oopService.shop(id)?.shopName ?: "-" }.apply {
  58 + cMobileRegion = memberRpcService.attribution(customerMobile)
  59 + sMobileRegion = memberRpcService.attribution(senderMobile)
  60 + }
56 61 }
57 62 return page
58 63 }
... ... @@ -64,6 +69,7 @@ class CustomerInitClueBizService(
64 69 return customerInitClueCallLogService.list(
65 70 KtQueryWrapper(CustomerInitClueCallLog::class.java)
66 71 .eq(CustomerInitClueCallLog::clueId, clueId)
  72 + .orderByAsc(CustomerInitClueCallLog::uploadTime)
67 73 )?.map {
68 74 InitClueCallLogVO(
69 75 id = it.id,
... ... @@ -100,9 +106,7 @@ fun CustomerInitClue.toCustomerInitClueVO(fn: Function&lt;Long, String&gt;): CustomerI
100 106 shopId = this.shopId,
101 107 shopName = shopName,
102 108 groupId = this.groupId,
103   - yn = this.yn,
104 109 createTime = this.createTime,
105   - updateTime = this.updateTime,
106 110 )
107 111 }
108 112  
... ...