Commit 8818e09c80029036f28d737f2ee290538988109b

Authored by 张志伟
2 parents 9489fc88 361bbddb

Merge remote-tracking branch 'origin/dev' into test

# Conflicts:
#	fw-valhalla-domain/src/main/java/cn/fw/valhalla/domain/db/follow/ClueTask.java
#	fw-valhalla-domain/src/main/java/cn/fw/valhalla/domain/dto/FollowPoolDTO.java
#	fw-valhalla-domain/src/main/java/cn/fw/valhalla/domain/vo/pool/FollowPoolListVO.java
fw-valhalla-dao/src/main/resources/mapper/ClueTaskMapper.xml
... ... @@ -30,6 +30,7 @@
30 30 t1.reason initiative,
31 31 t1.version version,
32 32 t1.group_id group_id
  33 + t1.`version` `version`
33 34 FROM clue_task t1
34 35 left join follow_clue t6 on t1.clue_id=t6.id
35 36 left join customer t3 on t6.vin = t3.frame_no and t6.group_id = t3.group_id and t3.yn=1
... ... @@ -163,14 +164,14 @@
163 164 </if>
164 165 <if test="condition.closeTime1 !=null or condition.closeTime2 !=null">
165 166 and ( t1.close_time is null or (
166   - <trim prefixOverrides="and">
167   - <if test="condition.closeTime1 !=null">
168   - and t1.close_time >= #{condition.closeTime1}
169   - </if>
170   - <if test="condition.closeTime2 !=null">
171   - and t1.close_time &lt;= #{condition.closeTime2}
172   - </if>
173   - </trim>
  167 + <trim prefixOverrides="and">
  168 + <if test="condition.closeTime1 !=null">
  169 + and t1.close_time >= #{condition.closeTime1}
  170 + </if>
  171 + <if test="condition.closeTime2 !=null">
  172 + and t1.close_time &lt;= #{condition.closeTime2}
  173 + </if>
  174 + </trim>
174 175 ))
175 176 </if>
176 177 <if test="condition.initiative !=null">
... ...
fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/cust/CustomerBizService.java
... ... @@ -580,6 +580,7 @@ public class CustomerBizService extends AbstractCustomerService {
580 580 boolean updated = customerService.update(Wrappers.<Customer>lambdaUpdate()
581 581 .set(Customer::getAdviserId, null)
582 582 .set(Customer::getShopId, null)
  583 + .set(Customer::getTemporary, null)
583 584 .eq(Customer::getId, detailDto.getId()));
584 585 if (!updated) {
585 586 return;
... ... @@ -618,6 +619,7 @@ public class CustomerBizService extends AbstractCustomerService {
618 619 boolean updated = customerService.update(Wrappers.<Customer>lambdaUpdate()
619 620 .set(Customer::getAdviserId, null)
620 621 .set(Customer::getShopId, null)
  622 + .set(Customer::getTemporary, null)
621 623 .eq(Customer::getId, detailDto.getId()));
622 624 if (!updated) {
623 625 return;
... ... @@ -840,6 +842,7 @@ public class CustomerBizService extends AbstractCustomerService {
840 842 customer.setCreateTime(new Date());
841 843 customer.setUpdateTime(new Date());
842 844 customer.setYn(Boolean.TRUE);
  845 + customer.setTemporary(Boolean.FALSE);
843 846 final SpecDTO spec = oopService.spec(customerParams.getSpecId());
844 847 customer.setCarImage(Optional.ofNullable(spec).orElse(new SpecDTO()).getThumbnail());
845 848 customer.setShopId(casShopId);
... ... @@ -1040,6 +1043,7 @@ public class CustomerBizService extends AbstractCustomerService {
1040 1043 customerService.update(Wrappers.<Customer>lambdaUpdate()
1041 1044 .set(Customer::getAdviserId, null)
1042 1045 .set(Customer::getShopId, null)
  1046 + .set(Customer::getTemporary, null)
1043 1047 .in(Customer::getId, customerIdList));
1044 1048 }
1045 1049  
... ... @@ -1054,6 +1058,7 @@ public class CustomerBizService extends AbstractCustomerService {
1054 1058 customerService.update(Wrappers.<Customer>lambdaUpdate()
1055 1059 .set(Customer::getAdviserId, null)
1056 1060 .set(Customer::getShopId, null)
  1061 + .set(Customer::getTemporary, null)
1057 1062 .eq(Customer::getId, customerId));
1058 1063 }
1059 1064  
... ...
fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/cust/CustomerChangeBizService.java
... ... @@ -351,6 +351,8 @@ public class CustomerChangeBizService extends AbstractCustomerService {
351 351 publicCluePoolService.removeClue(customer.getId(), adviserId);
352 352 }
353 353 }
  354 + customer.setTemporary(Boolean.FALSE);
  355 + customerService.updateById(customer);
354 356 stammkundePoolService.updateById(stammkundePool);
355 357 }
356 358 return true;
... ... @@ -360,6 +362,7 @@ public class CustomerChangeBizService extends AbstractCustomerService {
360 362 boolean updated = customerService.update(Wrappers.<Customer>lambdaUpdate()
361 363 .set(Customer::getAdviserId, adviserId)
362 364 .set(Customer::getShopId, shopId)
  365 + .set(Customer::getTemporary, Boolean.FALSE)
363 366 .eq(Customer::getId, changeAdviserReq.getCusId()));
364 367  
365 368 BV.isTrue(updated, () -> "变更档案服务顾问失败,请重试");
... ... @@ -497,7 +500,7 @@ public class CustomerChangeBizService extends AbstractCustomerService {
497 500 stammkundePoolService.save(simpleInfo);
498 501 commonService.createClue(customer);
499 502 }
500   -
  503 + customer.setTemporary(Boolean.FALSE);
501 504 final CustomerInfoDto customerInfoDto = new CustomerInfoDto();
502 505 BeanUtils.copyProperties(customer, customerInfoDto);
503 506 customerInfoDto.setConsultantId(customer.getAdviserId());
... ...
fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/AbstractFollowStrategy.java
... ... @@ -738,6 +738,7 @@ public abstract class AbstractFollowStrategy implements FollowStrategy {
738 738 }
739 739 redistributionTask.setGroupId(clue.getGroupId());
740 740 redistributionTask.setRpcSuccess(Boolean.FALSE);
  741 + redistributionTask.setVersion(2);
741 742 clueTaskService.save(redistributionTask);
742 743 FollowInitDTO followInitDTO = creteRedistributionFollowInitDTO(clue, redistributionTask);
743 744 shirasawaRpcService.changeFollowData(followInitDTO, redistributionTask.getBeginTime().toLocalDate());
... ...
fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/pub/PubFollowBizService.java
... ... @@ -242,9 +242,14 @@ public class PubFollowBizService {
242 242 PublicPool publicPool = createPublicPool(customer);
243 243 publicPoolService.save(publicPool);
244 244 stammkundePoolService.reject(customer.getId(), customer.getGroupId(), DefeatReasonEnum.RC);
245   - customer.setAdviserId(null);
246   - customer.setShopId(null);
247   - customerService.updateById(customer);
  245 +
  246 + customerService.update(Wrappers.<Customer>lambdaUpdate()
  247 + .set(Customer::getTemporary, null)
  248 + .set(Customer::getShopId, null)
  249 + .set(Customer::getAdviserId, null)
  250 + .eq(Customer::getId, customer.getId())
  251 + );
  252 +
248 253 }
249 254  
250 255 private PublicPool createPublicPool(Customer customer) {
... ...
fw-valhalla-service/src/main/java/cn/fw/valhalla/service/data/impl/CustomerServiceImpl.java
... ... @@ -144,6 +144,7 @@ public class CustomerServiceImpl extends ServiceImpl&lt;CustomerMapper, Customer&gt; i
144 144 update(Wrappers.<Customer>lambdaUpdate()
145 145 .set(Customer::getAdviserId, userId)
146 146 .set(Customer::getShopId, shopId)
  147 + .set(Customer::getTemporary, Boolean.TRUE)
147 148 .eq(Customer::getYn, Boolean.TRUE)
148 149 .eq(Customer::getGroupId, groupId)
149 150 .in(Customer::getFrameNo, vinList)
... ...