Commit 107042bde20aa359229c59f27f0653e23f4e19e5
1 parent
2010e613
模板短信调整
Showing
3 changed files
with
37 additions
and
21 deletions
fw-valhalla-server/src/main/resources/application-gray.yml
... | ... | @@ -53,6 +53,6 @@ follow: |
53 | 53 | IRCode: 'RsavIrkhZm' |
54 | 54 | ACCode: 'gWPMkrjkjH' |
55 | 55 | leave2do: 'uF08Vd38fi' |
56 | - FmTemplateCode: 'SMS_213774550' | |
57 | - RmTemplateCode: 'SMS_213774568' | |
58 | - IrTemplateCode: 'SMS_215115174' | |
56 | + FmTemplateCode: 'SMS_215120346' | |
57 | + RmTemplateCode: 'SMS_215120357' | |
58 | + IrTemplateCode: 'SMS_215070362' | ... | ... |
fw-valhalla-server/src/main/resources/application-prd.yml
... | ... | @@ -52,6 +52,6 @@ follow: |
52 | 52 | IRCode: 'RsavIrkhZm' |
53 | 53 | ACCode: 'gWPMkrjkjH' |
54 | 54 | leave2do: 'uF08Vd38fi' |
55 | - FmTemplateCode: 'SMS_213774550' | |
56 | - RmTemplateCode: 'SMS_213774568' | |
57 | - IrTemplateCode: 'SMS_215115174' | |
55 | + FmTemplateCode: 'SMS_215120346' | |
56 | + RmTemplateCode: 'SMS_215120357' | |
57 | + IrTemplateCode: 'SMS_215070362' | ... | ... |
fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/NoticeBizService.java
... | ... | @@ -27,7 +27,6 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
27 | 27 | import lombok.Getter; |
28 | 28 | import lombok.RequiredArgsConstructor; |
29 | 29 | import lombok.extern.slf4j.Slf4j; |
30 | -import org.springframework.beans.factory.annotation.Autowired; | |
31 | 30 | import org.springframework.beans.factory.annotation.Value; |
32 | 31 | import org.springframework.stereotype.Service; |
33 | 32 | import org.springframework.util.CollectionUtils; |
... | ... | @@ -156,10 +155,10 @@ public class NoticeBizService { |
156 | 155 | StaffInfoDTO infoDTO = ehrRpcService.queryStaffInfo(staffId); |
157 | 156 | if (Objects.nonNull(infoDTO)) { |
158 | 157 | Map<String, Object> map = new HashMap<>(4); |
159 | - map.put("plateNo", customer.getPlateNo()); | |
160 | - map.put("time", DateUtil.getStringDateShort(customer.getInsuranceExpires())); | |
158 | + map.put("date", DateUtil.getStringDateShort(customer.getInsuranceExpires())); | |
159 | + map.put("shopName", shopName); | |
161 | 160 | map.put("userName", infoDTO.getName()); |
162 | - map.put("mobilePhone", infoDTO.getMobile()); | |
161 | + map.put("phone", infoDTO.getMobile()); | |
163 | 162 | smsRpcService.sendSms(getIrTemplateCode(), baseInfo.getMobile(), map, cluePool.getOriginalShopId()); |
164 | 163 | } |
165 | 164 | } |
... | ... | @@ -171,7 +170,6 @@ public class NoticeBizService { |
171 | 170 | record.setStatus(SendStatusEnum.SUCCESS); |
172 | 171 | return followNoticeRecordService.updateById(record); |
173 | 172 | } |
174 | - Customer customer = Optional.ofNullable(customerService.getById(cluePool.getRefererId())).orElse(new Customer()); | |
175 | 173 | RenewInsurNoticeMessageParam param = new RenewInsurNoticeMessageParam(); |
176 | 174 | param.setMemberId(baseInfo.getMemberId()); |
177 | 175 | param.setShopName(shopName); |
... | ... | @@ -181,11 +179,19 @@ public class NoticeBizService { |
181 | 179 | record.setStatus(StringUtils.isEmpty(result) ? SendStatusEnum.SUCCESS : SendStatusEnum.FAILED); |
182 | 180 | record.setStatusDesc(result); |
183 | 181 | if (SendStatusEnum.FAILED.equals(record.getStatus())) { |
184 | - Map<String, Object> map = new HashMap<>(2); | |
185 | - String brandName = Optional.ofNullable(customer.getBrandName()).map(String::trim).map(t -> t.replace("汽车", "")).orElse(""); | |
186 | - map.put("brandName", brandName); | |
187 | - map.put("shopName", shopName); | |
188 | - smsRpcService.sendSms(getIrTemplateCode(), baseInfo.getMobile(), map, cluePool.getOriginalShopId()); | |
182 | + Long staffId = cluePool.getOriginalUserId(); | |
183 | + FollowTask task = followTaskService.queryOngoingTaskByClueId(cluePool.getId()); | |
184 | + if (Objects.nonNull(task)) { | |
185 | + staffId = task.getFollowUser(); | |
186 | + } | |
187 | + StaffInfoDTO infoDTO = ehrRpcService.queryStaffInfo(staffId); | |
188 | + if (Objects.nonNull(infoDTO)) { | |
189 | + Map<String, Object> map = new HashMap<>(3); | |
190 | + map.put("shopName", shopName); | |
191 | + map.put("userName", infoDTO.getName()); | |
192 | + map.put("phone", infoDTO.getMobile()); | |
193 | + smsRpcService.sendSms(getIrTemplateCode(), baseInfo.getMobile(), map, cluePool.getOriginalShopId()); | |
194 | + } | |
189 | 195 | } |
190 | 196 | return followNoticeRecordService.updateById(record); |
191 | 197 | } |
... | ... | @@ -204,11 +210,21 @@ public class NoticeBizService { |
204 | 210 | record.setStatus(StringUtils.isEmpty(result) ? SendStatusEnum.SUCCESS : SendStatusEnum.FAILED); |
205 | 211 | record.setStatusDesc(result); |
206 | 212 | if (SendStatusEnum.FAILED.equals(record.getStatus())) { |
207 | - Integer m = DateUtil.sub(cluePool.getAddTime(), new Date(), "m"); | |
208 | - Map<String, Object> map = new HashMap<>(2); | |
209 | - map.put("num", Math.abs(m)); | |
210 | - map.put("shopName", shopName); | |
211 | - smsRpcService.sendSms(getIrTemplateCode(), baseInfo.getMobile(), map, cluePool.getOriginalShopId()); | |
213 | + Long staffId = cluePool.getOriginalUserId(); | |
214 | + FollowTask task = followTaskService.queryOngoingTaskByClueId(cluePool.getId()); | |
215 | + if (Objects.nonNull(task)) { | |
216 | + staffId = task.getFollowUser(); | |
217 | + } | |
218 | + StaffInfoDTO infoDTO = ehrRpcService.queryStaffInfo(staffId); | |
219 | + if (Objects.nonNull(infoDTO)) { | |
220 | + Integer m = DateUtil.sub(cluePool.getAddTime(), new Date(), "m"); | |
221 | + Map<String, Object> map = new HashMap<>(4); | |
222 | + map.put("num", Math.abs(m)); | |
223 | + map.put("shopName", shopName); | |
224 | + map.put("userName", infoDTO.getName()); | |
225 | + map.put("phone", infoDTO.getMobile()); | |
226 | + smsRpcService.sendSms(getIrTemplateCode(), baseInfo.getMobile(), map, cluePool.getOriginalShopId()); | |
227 | + } | |
212 | 228 | } |
213 | 229 | return followNoticeRecordService.updateById(record); |
214 | 230 | } | ... | ... |