Commit 89bd2e6ce20d7fe5eb5cc8f126dfb5fea9337239

Authored by 张志伟
1 parent 953745ee

feature(*): 新增区域站岗线索池

- 新增区域站岗线索池
doc/v2.0/update.sql
... ... @@ -2,6 +2,9 @@ drop table if exists customer_clue_pool;
2 2  
3 3 drop table if exists follow_task;
4 4  
  5 +alter table clue_task
  6 + add version int null after rpc_success;
  7 +
5 8 alter table customer
6 9 add last_arrival_shop bigint null comment '上次进站门店' after arrival_time;
7 10  
... ...
fw-valhalla-dao/src/main/resources/mapper/ClueTaskMapper.xml
... ... @@ -28,6 +28,7 @@
28 28 t1.state state,
29 29 t1.close_time close_time,
30 30 t1.reason initiative,
  31 + t1.version version,
31 32 t1.group_id group_id
32 33 FROM clue_task t1
33 34 left join follow_clue t6 on t1.clue_id=t6.id
... ... @@ -37,7 +38,7 @@
37 38 left join customer_loan_info t2 on t6.vin = t2.frame_no and t6.group_id = t2.group_id
38 39 <where>
39 40 t1.group_id = #{condition.groupId}
40   - and t1.tye != 10
  41 + and t1.type != 10
41 42 <if test="condition.userId !=null">
42 43 and t1.follow_user = #{condition.userId}
43 44 </if>
... ... @@ -118,7 +119,7 @@
118 119 left join customer_loan_info t2 on t6.vin = t2.frame_no and t6.group_id = t2.group_id
119 120 <where>
120 121 t1.group_id = #{condition.groupId}
121   - and t1.tye != 10
  122 + and t1.type != 10
122 123 <if test="condition.userId !=null">
123 124 and t1.follow_user = #{condition.userId}
124 125 </if>
... ...
fw-valhalla-dao/src/main/resources/mapper/PubCluePoolMapper.xml
... ... @@ -29,6 +29,7 @@
29 29 t1.state state,
30 30 t1.close_time close_time,
31 31 t1.reason initiative,
  32 + t1.version version,
32 33 t1.group_id group_id
33 34 FROM clue_task t1
34 35 left join pub_clue_pool t6 on t1.clue_id=t6.id
... ...
fw-valhalla-domain/src/main/java/cn/fw/valhalla/domain/db/follow/ClueTask.java
... ... @@ -79,4 +79,8 @@ public class ClueTask extends BaseAuditableTimeEntity&lt;ClueTask, Long&gt; {
79 79 * 已跟进次数
80 80 */
81 81 private Integer times;
  82 + /**
  83 + * 版本
  84 + */
  85 + private Integer version;
82 86 }
... ...
fw-valhalla-domain/src/main/java/cn/fw/valhalla/domain/dto/FollowPoolDTO.java
... ... @@ -102,4 +102,8 @@ public class FollowPoolDTO {
102 102 */
103 103 private Long groupId;
104 104 private Integer sourceType;
  105 + /**
  106 + * 版本
  107 + */
  108 + private Integer version;
105 109 }
... ...
fw-valhalla-domain/src/main/java/cn/fw/valhalla/domain/vo/pool/FollowPoolListVO.java
... ... @@ -101,6 +101,10 @@ public class FollowPoolListVO {
101 101 */
102 102 private Long groupId;
103 103 private Integer sourceType;
  104 + /**
  105 + * 版本
  106 + */
  107 + private Integer version;
104 108  
105 109 public String getRemaining() {
106 110 if (Objects.isNull(remaining) || state != 1) {
... ...
fw-valhalla-server/src/main/resources/application-local.yml
... ... @@ -7,7 +7,7 @@ spring:
7 7 preferred-networks:
8 8 - 10.8
9 9 application:
10   - name: fw-valhalla-local
  10 + name: fw-valhalla
11 11 datasource:
12 12 hikari:
13 13 connection-test-query: ''
... ...
fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/AbstractFollowStrategy.java
... ... @@ -666,6 +666,7 @@ public abstract class AbstractFollowStrategy implements FollowStrategy {
666 666 }
667 667 clueTask.setFollowShop(shopId);
668 668 clueTask.setFollowUser(userId);
  669 + clueTask.setVersion(2);
669 670 return clueTask;
670 671 }
671 672  
... ...
fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/impl/IRFollowStrategy.java
... ... @@ -264,6 +264,7 @@ public class IRFollowStrategy extends AbstractFollowStrategy {
264 264 }
265 265 clueTask.setFollowShop(shopId);
266 266 clueTask.setFollowUser(userId);
  267 + clueTask.setVersion(2);
267 268 return clueTask;
268 269 }
269 270  
... ...
fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/impl/PubFollowStrategy.java
... ... @@ -124,6 +124,7 @@ public class PubFollowStrategy implements FollowStrategy {
124 124 clueTask.setFollowShop(pubClue.getShopId());
125 125 clueTask.setFollowUser(pubClue.getAdviserId());
126 126 clueTask.setFollowUserName(pubClue.getAdviserName());
  127 + clueTask.setVersion(2);
127 128 clueTaskService.save(clueTask);
128 129 final FollowInitDTO followInitDTO = creteFollowInitDTO(pubClue, clueTask);
129 130 shirasawaRpcService.createFollowData(followInitDTO);
... ...