|
@@ -315,31 +315,17 @@ public class SmsSendconfigServiceImpl implements SmsSendconfigService {
|
|
|
List<Map<String,Object>> linkList = tradeOrderMapper.queryOrderLink(day,type);
|
|
List<Map<String,Object>> linkList = tradeOrderMapper.queryOrderLink(day,type);
|
|
|
// 查询接站登记人
|
|
// 查询接站登记人
|
|
|
List<Map<String,Object>> jzPhoneList = tradeOrderMapper.queryOrderJzPhone(day,type);
|
|
List<Map<String,Object>> jzPhoneList = tradeOrderMapper.queryOrderJzPhone(day,type);
|
|
|
|
|
+ // 查询订单游客电话
|
|
|
|
|
+ List<Map<String,Object>> visitorMobileList = tradeOrderMapper.queryOrderVisitorMobile(day,type);
|
|
|
// 查询短信配置
|
|
// 查询短信配置
|
|
|
SmsTemplateDO smsTemplateDO = smsTemplateMapper.selectByCode(code);
|
|
SmsTemplateDO smsTemplateDO = smsTemplateMapper.selectByCode(code);
|
|
|
// 合并两个列表并去重
|
|
// 合并两个列表并去重
|
|
|
Set<String> phoneSet = new HashSet<>();
|
|
Set<String> phoneSet = new HashSet<>();
|
|
|
Map<String, Map<String, Object>> phoneDataMap = new HashMap<>();
|
|
Map<String, Map<String, Object>> phoneDataMap = new HashMap<>();
|
|
|
|
|
+ processPhoneList(linkList, "link_mobile", phoneSet, phoneDataMap);
|
|
|
|
|
+ processPhoneList(jzPhoneList, "phone", phoneSet, phoneDataMap);
|
|
|
|
|
+ processPhoneList(visitorMobileList, "mobile", phoneSet, phoneDataMap);
|
|
|
|
|
|
|
|
- if (linkList != null) {
|
|
|
|
|
- for (Map<String, Object> map : linkList) {
|
|
|
|
|
- String phone = (String) map.get("link_mobile");
|
|
|
|
|
- if (phone != null && !phone.isEmpty()) {
|
|
|
|
|
- phoneSet.add(phone);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- if (jzPhoneList != null) {
|
|
|
|
|
- for (Map<String, Object> map : jzPhoneList) {
|
|
|
|
|
- String phone = (String) map.get("phone");
|
|
|
|
|
- if (phone != null && !phone.isEmpty()) {
|
|
|
|
|
- phoneSet.add(phone);
|
|
|
|
|
- if (!phoneDataMap.containsKey(phone)) {
|
|
|
|
|
- phoneDataMap.put(phone, map);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
List<String> phoneList = new ArrayList<>(phoneSet);
|
|
List<String> phoneList = new ArrayList<>(phoneSet);
|
|
|
List<String> params = smsTemplateDO.getParams();// ["【pick】","【time】"]
|
|
List<String> params = smsTemplateDO.getParams();// ["【pick】","【time】"]
|
|
|
Map<String, Object> templateParams = new HashMap<>();
|
|
Map<String, Object> templateParams = new HashMap<>();
|
|
@@ -376,4 +362,20 @@ public class SmsSendconfigServiceImpl implements SmsSendconfigService {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ private void processPhoneList(List<Map<String, Object>> dataList, String phoneKey,
|
|
|
|
|
+ Set<String> phoneSet, Map<String, Map<String, Object>> phoneDataMap) {
|
|
|
|
|
+ if (dataList == null) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ for (Map<String, Object> map : dataList) {
|
|
|
|
|
+ String phone = (String) map.get(phoneKey);
|
|
|
|
|
+ if (phone != null && !phone.isEmpty()) {
|
|
|
|
|
+ phoneSet.add(phone);
|
|
|
|
|
+ if (!phoneDataMap.containsKey(phone)) {
|
|
|
|
|
+ phoneDataMap.put(phone, map);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|