Commit 2010e613f3727c3575915c7d37a40df26d30ed74
1 parent
ecbb43bc
升级common包
Showing
7 changed files
with
27 additions
and
48 deletions
doc/v1.1.4_alpha/sql.sql
fw-valhalla-domain/src/main/java/cn/fw/valhalla/domain/vo/AppPageVO.java
... | ... | @@ -12,7 +12,6 @@ import java.util.Collections; |
12 | 12 | * @date: 2020-11-20 17:12 |
13 | 13 | */ |
14 | 14 | public class AppPageVO<T> extends AppPage<T> { |
15 | - private long total; | |
16 | 15 | |
17 | 16 | public static <T> AppPageVO<T> init(PageQuery param) { |
18 | 17 | return init(param.getCurrent(), param.getPageSize()); |
... | ... | @@ -28,17 +27,4 @@ public class AppPageVO<T> extends AppPage<T> { |
28 | 27 | |
29 | 28 | public AppPageVO() { |
30 | 29 | } |
31 | - | |
32 | - public long getTotal() { | |
33 | - return total; | |
34 | - } | |
35 | - | |
36 | - public void setTotal(long total) { | |
37 | - this.total = total; | |
38 | - } | |
39 | - | |
40 | - @Override | |
41 | - public String toString() { | |
42 | - return "AppPageVO(super=" + super.toString() + ", total=" + this.getTotal() + ")"; | |
43 | - } | |
44 | 30 | } | ... | ... |
fw-valhalla-server/src/main/java/cn/fw/valhalla/ValhallaApplication.java
... | ... | @@ -27,7 +27,7 @@ import org.springframework.scheduling.annotation.EnableScheduling; |
27 | 27 | @Configuration |
28 | 28 | @EnableRedisRepositories |
29 | 29 | @MapperScan("cn.fw.**.mapper") |
30 | -@ComponentScan({"cn.fw.valhalla.*", "cn.fw.common.web.aspect"}) | |
30 | +@ComponentScan({"cn.fw.valhalla.*"}) | |
31 | 31 | @EnableFeignClients({"cn.fw.**.sdk", "cn.fw.flow.api"}) |
32 | 32 | @EnableConfigurationProperties({UrlProperty.class}) |
33 | 33 | public class ValhallaApplication { | ... | ... |
fw-valhalla-server/src/main/resources/application-gray.yml
fw-valhalla-server/src/main/resources/application-prd.yml
fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/NoticeBizService.java
... | ... | @@ -5,6 +5,7 @@ import cn.fw.valhalla.common.utils.StringUtils; |
5 | 5 | import cn.fw.valhalla.domain.db.customer.Customer; |
6 | 6 | import cn.fw.valhalla.domain.db.customer.CustomerBaseInfo; |
7 | 7 | import cn.fw.valhalla.domain.db.follow.FollowNoticeRecord; |
8 | +import cn.fw.valhalla.domain.db.follow.FollowTask; | |
8 | 9 | import cn.fw.valhalla.domain.db.pool.CustomerCluePool; |
9 | 10 | import cn.fw.valhalla.domain.enums.FollowTypeEnum; |
10 | 11 | import cn.fw.valhalla.domain.enums.SendStatusEnum; |
... | ... | @@ -13,18 +14,18 @@ import cn.fw.valhalla.domain.enums.SettingUnitEnum; |
13 | 14 | import cn.fw.valhalla.domain.vo.setting.SettingVO; |
14 | 15 | import cn.fw.valhalla.rpc.angel.InsurerRpcService; |
15 | 16 | import cn.fw.valhalla.rpc.angel.dto.InsuranceDTO; |
17 | +import cn.fw.valhalla.rpc.ehr.EhrRpcService; | |
18 | +import cn.fw.valhalla.rpc.ehr.dto.StaffInfoDTO; | |
16 | 19 | import cn.fw.valhalla.rpc.oop.OopService; |
17 | 20 | import cn.fw.valhalla.rpc.oop.dto.ShopDTO; |
18 | 21 | import cn.fw.valhalla.rpc.passport.TemplateMessageService; |
19 | 22 | import cn.fw.valhalla.rpc.passport.dto.RenewInsurNoticeMessageParam; |
20 | 23 | import cn.fw.valhalla.rpc.sms.SmsRpcService; |
21 | 24 | import cn.fw.valhalla.service.bus.setting.SettingBizService; |
22 | -import cn.fw.valhalla.service.data.CustomerBaseInfoService; | |
23 | -import cn.fw.valhalla.service.data.CustomerCluePoolService; | |
24 | -import cn.fw.valhalla.service.data.CustomerService; | |
25 | -import cn.fw.valhalla.service.data.FollowNoticeRecordService; | |
25 | +import cn.fw.valhalla.service.data.*; | |
26 | 26 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
27 | 27 | import lombok.Getter; |
28 | +import lombok.RequiredArgsConstructor; | |
28 | 29 | import lombok.extern.slf4j.Slf4j; |
29 | 30 | import org.springframework.beans.factory.annotation.Autowired; |
30 | 31 | import org.springframework.beans.factory.annotation.Value; |
... | ... | @@ -45,6 +46,7 @@ import static cn.fw.valhalla.service.bus.follow.strategy.AbstractFollowStrategy. |
45 | 46 | */ |
46 | 47 | @Service |
47 | 48 | @Slf4j |
49 | +@RequiredArgsConstructor | |
48 | 50 | public class NoticeBizService { |
49 | 51 | private final TemplateMessageService templateMessageService; |
50 | 52 | private final FollowNoticeRecordService followNoticeRecordService; |
... | ... | @@ -55,6 +57,8 @@ public class NoticeBizService { |
55 | 57 | private final OopService oopService; |
56 | 58 | private final CustomerCluePoolService customerCluePoolService; |
57 | 59 | private final SmsRpcService smsRpcService; |
60 | + private final FollowTaskService followTaskService; | |
61 | + private final EhrRpcService ehrRpcService; | |
58 | 62 | |
59 | 63 | private final String type = "d"; |
60 | 64 | private final int day = 2; |
... | ... | @@ -71,26 +75,6 @@ public class NoticeBizService { |
71 | 75 | @Getter |
72 | 76 | private String irTemplateCode; |
73 | 77 | |
74 | - @Autowired | |
75 | - public NoticeBizService(final TemplateMessageService templateMessageService, | |
76 | - final FollowNoticeRecordService followNoticeRecordService, | |
77 | - final SettingBizService settingBizService, | |
78 | - final InsurerRpcService insurerRpcService, | |
79 | - final CustomerService customerService, | |
80 | - final CustomerBaseInfoService customerBaseInfoService, | |
81 | - final OopService oopService, | |
82 | - final CustomerCluePoolService customerCluePoolService, | |
83 | - final SmsRpcService smsRpcService) { | |
84 | - this.templateMessageService = templateMessageService; | |
85 | - this.followNoticeRecordService = followNoticeRecordService; | |
86 | - this.settingBizService = settingBizService; | |
87 | - this.insurerRpcService = insurerRpcService; | |
88 | - this.customerService = customerService; | |
89 | - this.customerBaseInfoService = customerBaseInfoService; | |
90 | - this.oopService = oopService; | |
91 | - this.customerCluePoolService = customerCluePoolService; | |
92 | - this.smsRpcService = smsRpcService; | |
93 | - } | |
94 | 78 | |
95 | 79 | /** |
96 | 80 | * 发送模板消息 |
... | ... | @@ -164,11 +148,20 @@ public class NoticeBizService { |
164 | 148 | record.setStatus(StringUtils.isEmpty(result) ? SendStatusEnum.SUCCESS : SendStatusEnum.FAILED); |
165 | 149 | record.setStatusDesc(result); |
166 | 150 | if (SendStatusEnum.FAILED.equals(record.getStatus())) { |
167 | - Map<String, Object> map = new HashMap<>(3); | |
168 | - map.put("plateNo", customer.getPlateNo()); | |
169 | - map.put("time", DateUtil.getStringDateShort(customer.getInsuranceExpires())); | |
170 | - map.put("shopName", shopName); | |
171 | - smsRpcService.sendSms(getIrTemplateCode(), baseInfo.getMobile(), map, cluePool.getOriginalShopId()); | |
151 | + Long staffId = cluePool.getOriginalUserId(); | |
152 | + FollowTask task = followTaskService.queryOngoingTaskByClueId(cluePool.getId()); | |
153 | + if (Objects.nonNull(task)) { | |
154 | + staffId = task.getFollowUser(); | |
155 | + } | |
156 | + StaffInfoDTO infoDTO = ehrRpcService.queryStaffInfo(staffId); | |
157 | + if (Objects.nonNull(infoDTO)) { | |
158 | + Map<String, Object> map = new HashMap<>(4); | |
159 | + map.put("plateNo", customer.getPlateNo()); | |
160 | + map.put("time", DateUtil.getStringDateShort(customer.getInsuranceExpires())); | |
161 | + map.put("userName", infoDTO.getName()); | |
162 | + map.put("mobilePhone", infoDTO.getMobile()); | |
163 | + smsRpcService.sendSms(getIrTemplateCode(), baseInfo.getMobile(), map, cluePool.getOriginalShopId()); | |
164 | + } | |
172 | 165 | } |
173 | 166 | return followNoticeRecordService.updateById(record); |
174 | 167 | } | ... | ... |