diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/task/PushArticleTask.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/task/PushArticleTask.java index e5bb6c0..3efe1d9 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/task/PushArticleTask.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/task/PushArticleTask.java @@ -51,7 +51,6 @@ public class PushArticleTask { */ @Scheduled(cron = "0 0 18 * * ?") // @Scheduled(cron = "0 15 17 * * ?")//测试用 下午5点15 - @Transactional(rollbackFor = Exception.class) public void pushArtcle(){ Map param=new HashMap<>(); param.put("vtype",999); @@ -217,10 +216,7 @@ public class PushArticleTask { String plogin=null; LymsPatient lymsPatient = lymsPatientService.getById(pid); if(StringUtil.isNotEmpty(lymsPatient.getEnrolmentPhone())){ - if(StringUtil.isNotEmpty(lymsPatient.getEnrolmentPhone())){ - plogin=lymsPatient.getEnrolmentPhone(); - } - + plogin=lymsPatient.getEnrolmentPhone(); }else { List pLst=patientInfoService.list(new QueryWrapper().eq("id", lymsPatient.getId())); if(CollectionUtils.isNotEmpty(pLst)){ @@ -232,7 +228,7 @@ public class PushArticleTask { return map; } //子女关注的患者推送短消息 - public void pushPatientAttention(LymsPushMessages lymsPushMessage,Map map){ + public void pushPatientAttention(LymsPushMessages lymsPushMessage,Map map) throws Exception{ QueryWrapper queryWrapper=new QueryWrapper<>(); queryWrapper.apply("TO_DAYS(created_time) = TO_DAYS(NOW()) and isweixin_state=0");//今天需要推送的消息 final List pushAttentionRecords = lymsPushAttentionRecordService.list(queryWrapper);