2a40e3f8
张志伟
feature(*): 续保跟进调整
|
1
|
package cn.fw.valhalla.component.producer;
|
6c848e1d
张志伟
|
2
|
|
bdbae7e3
张志伟
|
3
|
import cn.fw.valhalla.domain.vo.customer.CustomerDetailVO;
|
6c848e1d
张志伟
|
4
|
import cn.fw.valhalla.sdk.result.CustomerInfoDto;
|
bdbae7e3
张志伟
|
5
|
import cn.fw.valhalla.service.bus.cust.CustomerBizService;
|
6c848e1d
张志伟
|
6
7
|
import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.core.RocketMQTemplate;
|
bdbae7e3
张志伟
|
8
|
import org.springframework.beans.BeanUtils;
|
6c848e1d
张志伟
|
9
10
11
12
|
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
|
bdbae7e3
张志伟
|
13
14
|
import java.util.Objects;
|
6c848e1d
张志伟
|
15
16
17
18
19
20
21
22
|
/**
* @author kurisu
*/
@Slf4j
@Component
public class CustomerChangeProducer {
@Autowired
private RocketMQTemplate rocketMQTemplate;
|
bdbae7e3
张志伟
|
23
24
|
@Autowired
private CustomerBizService customerBizService;
|
6c848e1d
张志伟
|
25
|
|
6c848e1d
张志伟
|
26
27
28
29
|
@RequestMapping(value = "send")
public void send(CustomerInfoDto customerInfoDto) {
try {
log.info("售后保有客信息变更mq: body:[{}]", customerInfoDto);
|
bdbae7e3
张志伟
|
30
31
32
33
34
35
|
if (Objects.isNull(customerInfoDto.getGroupId())) {
log.warn("售后保有客信息变更mq集团id为空");
return;
}
CustomerDetailVO detailByVin = customerBizService.getDetailByVin(customerInfoDto.getFrameNo(), customerInfoDto.getGroupId());
BeanUtils.copyProperties(detailByVin, customerInfoDto);
|
8cd965a1
张志伟
feature(*): 续保跟进调整
|
36
|
rocketMQTemplate.syncSend(CustomerInfoDto.TOPIC + ":*", customerInfoDto);
|
6c848e1d
张志伟
|
37
38
39
40
41
|
} catch (Exception e) {
e.printStackTrace();
}
}
}
|