|
@@ -32,12 +32,13 @@ public class EpiTemplateMessageService {
|
|
|
public int sendUserMessage(Long userId) {
|
|
|
UserOpen userOpen = userOpenMapper.selectByUserId(userId);
|
|
|
Map<String, String> map = Maps.newHashMap();
|
|
|
- List<Uptown> uptownList = rbMapper.selectUptown(userId);
|
|
|
-
|
|
|
- map.put("uptownName", uptownList.get(0).getUptownName());
|
|
|
- map.put("tagName", "家人");
|
|
|
- templateMessageService.sendRemindMessage(userOpen.getOpenId(), "", map);
|
|
|
-
|
|
|
+ if (userId == 1236933883278417922L || userId == 1253125235569696769L) {
|
|
|
+ } else {
|
|
|
+ List<Uptown> uptownList = rbMapper.selectUptown(userId);
|
|
|
+ map.put("uptownName", uptownList.get(0).getUptownName());
|
|
|
+ map.put("tagName", "家人");
|
|
|
+ templateMessageService.sendRemindMessage(userOpen.getOpenId(), "", map);
|
|
|
+ }
|
|
|
return 1;
|
|
|
}
|
|
|
|
|
@@ -92,63 +93,71 @@ public class EpiTemplateMessageService {
|
|
|
public int systemSendRemindMessage(Long userId, String openId) {
|
|
|
int re = 0;
|
|
|
Map<String, String> map = Maps.newHashMap();
|
|
|
- List<UptownHome> uptownHomeList = uptownHomeMapper.getUptownHomeByUserId(userId);
|
|
|
- if (uptownHomeList != null && uptownHomeList.size()>0) {
|
|
|
- map.put("first", "");
|
|
|
- map.put("keyword1", "尊敬的 "+uptownHomeList.get(0).getLinkman()+" 先生/女士");
|
|
|
- SimpleDateFormat sdf1 =new SimpleDateFormat("yyyy-MM-dd" );
|
|
|
- Date d1= new Date();
|
|
|
- String str1 = sdf1.format(d1);
|
|
|
- map.put("keyword2", str1);
|
|
|
- map.put("keyword3", "健康日报 上报");
|
|
|
- map.put("remark", "凌云互助家园提醒您,为了您和他人的健康请及时提交每天的健康日报,上报情况将直接关系到您办公园区的临时出入,如已填报忽略本消息");
|
|
|
- re = 1;
|
|
|
+ if (userId == 1236933883278417922L || userId == 1253125235569696769L) {
|
|
|
+ } else {
|
|
|
+ List<UptownHome> uptownHomeList = uptownHomeMapper.getUptownHomeByUserId(userId);
|
|
|
+ if (uptownHomeList != null && uptownHomeList.size() > 0) {
|
|
|
+ map.put("first", "");
|
|
|
+ map.put("keyword1", "尊敬的 " + uptownHomeList.get(0).getLinkman() + " 先生/女士");
|
|
|
+ SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+ Date d1 = new Date();
|
|
|
+ String str1 = sdf1.format(d1);
|
|
|
+ map.put("keyword2", str1);
|
|
|
+ map.put("keyword3", "健康日报 上报");
|
|
|
+ map.put("remark", "凌云互助家园提醒您,为了您和他人的健康请及时提交每天的健康日报,上报情况将直接关系到您办公园区的临时出入,如已填报忽略本消息");
|
|
|
+ re = 1;
|
|
|
+ }
|
|
|
+ templateMessageService.sendSysRemindMessage(openId, "", map);
|
|
|
}
|
|
|
- templateMessageService.sendSysRemindMessage(openId, "", map);
|
|
|
return re;
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
public int systemSendRemindMessageTest(Long userId, String openId) {
|
|
|
int re = 0;
|
|
|
Map<String, String> map = Maps.newHashMap();
|
|
|
- List<UptownHome> uptownHomeList = uptownHomeMapper.getUptownHomeByUserId(userId);
|
|
|
- if (uptownHomeList != null && uptownHomeList.size()>0) {
|
|
|
- map.put("first", "尊敬的 "+uptownHomeList.get(0).getLinkman()+" 先生/女士,");
|
|
|
- map.put("keyword1", "公众号迁移");
|
|
|
- map.put("keyword2", "扫码关注新公众号 绑定手机号");
|
|
|
- SimpleDateFormat sdf1 =new SimpleDateFormat("yyyy-MM-dd" );
|
|
|
- Date d1= new Date();
|
|
|
- String str1 = sdf1.format(d1);
|
|
|
- map.put("keyword3", str1);
|
|
|
- map.put("keyword4", "无");
|
|
|
- map.put("keyword5", "系统");
|
|
|
- map.put("remark", "家园互助平台提醒您,即日起此公众号停用,请尽快扫码关注“凌云互助家园”并绑定原“家园互助平台”的注册手机号"+uptownHomeList.get(0).getPhone()+"。如未及时完成迁移的用户将无法正常复工。");
|
|
|
- re = 1;
|
|
|
+ if (userId == 1236933883278417922L || userId == 1253125235569696769L) {
|
|
|
+ } else {
|
|
|
+ List<UptownHome> uptownHomeList = uptownHomeMapper.getUptownHomeByUserId(userId);
|
|
|
+ if (uptownHomeList != null && uptownHomeList.size() > 0) {
|
|
|
+ map.put("first", "尊敬的 " + uptownHomeList.get(0).getLinkman() + " 先生/女士,");
|
|
|
+ map.put("keyword1", "公众号迁移");
|
|
|
+ map.put("keyword2", "扫码关注新公众号 绑定手机号");
|
|
|
+ SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+ Date d1 = new Date();
|
|
|
+ String str1 = sdf1.format(d1);
|
|
|
+ map.put("keyword3", str1);
|
|
|
+ map.put("keyword4", "无");
|
|
|
+ map.put("keyword5", "系统");
|
|
|
+ map.put("remark", "家园互助平台提醒您,即日起此公众号停用,请尽快扫码关注“凌云互助家园”并绑定原“家园互助平台”的注册手机号" + uptownHomeList.get(0).getPhone() + "。如未及时完成迁移的用户将无法正常复工。");
|
|
|
+ re = 1;
|
|
|
+ }
|
|
|
+ templateMessageService.sendSysRemindMessage(openId, "", map);
|
|
|
}
|
|
|
- templateMessageService.sendSysRemindMessage(openId, "", map);
|
|
|
return re;
|
|
|
}
|
|
|
|
|
|
public int systemSendRemindMessageTestOne(Long userId, String openId) {
|
|
|
int re = 0;
|
|
|
Map<String, String> map = Maps.newHashMap();
|
|
|
- List<UptownHome> uptownHomeList = uptownHomeMapper.getUptownHomeByUserId(userId);
|
|
|
- if (uptownHomeList != null && uptownHomeList.size()>0) {
|
|
|
- map.put("first", "尊敬的 "+uptownHomeList.get(0).getLinkman()+" 先生/女士,");
|
|
|
- map.put("keyword1", "公众号迁移");
|
|
|
- map.put("keyword2", "扫码关注新公众号 绑定手机号");
|
|
|
- SimpleDateFormat sdf1 =new SimpleDateFormat("yyyy-MM-dd" );
|
|
|
- Date d1= new Date();
|
|
|
- String str1 = sdf1.format(d1);
|
|
|
- map.put("keyword3", str1);
|
|
|
- map.put("keyword4", "无");
|
|
|
- map.put("keyword5", "系统");
|
|
|
- map.put("remark", "家园互助平台提醒您,即日起此公众号停用,请尽快扫码关注“凌云互助家园”并绑定原“家园互助平台”的注册手机号"+uptownHomeList.get(0).getPhone()+"。如未及时完成迁移的用户将无法正常复工。");
|
|
|
- re = 1;
|
|
|
+ if (userId == 1236933883278417922L || userId == 1253125235569696769L) {
|
|
|
+ } else {
|
|
|
+ List<UptownHome> uptownHomeList = uptownHomeMapper.getUptownHomeByUserId(userId);
|
|
|
+ if (uptownHomeList != null && uptownHomeList.size() > 0) {
|
|
|
+ map.put("first", "尊敬的 " + uptownHomeList.get(0).getLinkman() + " 先生/女士,");
|
|
|
+ map.put("keyword1", "公众号迁移");
|
|
|
+ map.put("keyword2", "扫码关注新公众号 绑定手机号");
|
|
|
+ SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+ Date d1 = new Date();
|
|
|
+ String str1 = sdf1.format(d1);
|
|
|
+ map.put("keyword3", str1);
|
|
|
+ map.put("keyword4", "无");
|
|
|
+ map.put("keyword5", "系统");
|
|
|
+ map.put("remark", "家园互助平台提醒您,即日起此公众号停用,请尽快扫码关注“凌云互助家园”并绑定原“家园互助平台”的注册手机号" + uptownHomeList.get(0).getPhone() + "。如未及时完成迁移的用户将无法正常复工。");
|
|
|
+ re = 1;
|
|
|
+ }
|
|
|
+ templateMessageService.sendSysRemindMessage(openId, "", map);
|
|
|
}
|
|
|
- templateMessageService.sendSysRemindMessage(openId, "", map);
|
|
|
return re;
|
|
|
}
|
|
|
|
|
@@ -156,20 +165,23 @@ public class EpiTemplateMessageService {
|
|
|
public int tuangouSendRemindMessage(Long userId, String openId, Date endDate) {
|
|
|
int re = 0;
|
|
|
Map<String, String> map = Maps.newHashMap();
|
|
|
- List<UptownHome> uptownHomeList = uptownHomeMapper.getUptownHomeByUserId(userId);
|
|
|
- if (uptownHomeList != null && uptownHomeList.size()>0) {
|
|
|
- map.put("first", "尊敬的 "+uptownHomeList.get(0).getLinkman()+" 先生/女士,");
|
|
|
- map.put("keyword1", "家园互助平台");
|
|
|
- map.put("keyword2", "团购上报");
|
|
|
- SimpleDateFormat sdf1 =new SimpleDateFormat("yyyy-MM-dd" );
|
|
|
- String str1 = sdf1.format(endDate);
|
|
|
- map.put("keyword3", str1);
|
|
|
- map.put("keyword4", "无");
|
|
|
- map.put("keyword5", "系统");
|
|
|
- map.put("remark", "亲爱的居民,有新的团购正在组织进行请及时关注,如有需要进入应用在截止时间前上报您的物资需求,谢谢配合");
|
|
|
- re = 1;
|
|
|
+ if (userId == 1236933883278417922L || userId == 1253125235569696769L) {
|
|
|
+ } else {
|
|
|
+ List<UptownHome> uptownHomeList = uptownHomeMapper.getUptownHomeByUserId(userId);
|
|
|
+ if (uptownHomeList != null && uptownHomeList.size() > 0) {
|
|
|
+ map.put("first", "尊敬的 " + uptownHomeList.get(0).getLinkman() + " 先生/女士,");
|
|
|
+ map.put("keyword1", "家园互助平台");
|
|
|
+ map.put("keyword2", "团购上报");
|
|
|
+ SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+ String str1 = sdf1.format(endDate);
|
|
|
+ map.put("keyword3", str1);
|
|
|
+ map.put("keyword4", "无");
|
|
|
+ map.put("keyword5", "系统");
|
|
|
+ map.put("remark", "亲爱的居民,有新的团购正在组织进行请及时关注,如有需要进入应用在截止时间前上报您的物资需求,谢谢配合");
|
|
|
+ re = 1;
|
|
|
+ }
|
|
|
+ templateMessageService.sendSysRemindMessage(openId, "", map);
|
|
|
}
|
|
|
- templateMessageService.sendSysRemindMessage(openId, "", map);
|
|
|
return re;
|
|
|
}
|
|
|
|