定时任务

This commit is contained in:
zhangheng 2024-05-28 10:41:04 +08:00
parent eb0cc4e958
commit 46b88d4de0
5 changed files with 47 additions and 2 deletions

View File

@ -264,6 +264,11 @@ public class Constants {
*/
public static final String OFFICIAL_ACCOUNT_TEMPLATE_SEND_URL = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=";
/**
* 微信小程序模板消息推送发送接口地址
*/
public static final String OFFICIAL_ACCOUNT_SUBSCRIBE_SEND_URL = "https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token=";
/**
* 获取 access_token AppSecret 错误或者 access_token 无效请开发者认真比对 AppSecret 的正确性或查看是否正在为恰当的公众号调用接口
*/
@ -294,6 +299,11 @@ public class Constants {
*/
public static final int ARGUMENT_INVALID = 47003;
/**
* api功能未授权
*/
public static final int API_UNAUTHORIZED = 48001;
/**
* 成功
*/

View File

@ -82,4 +82,12 @@ public class HomePageController extends BaseController {
private TableDataInfo satisfactionQuestionnaire(Long residentId) {
return homePageService.satisfactionQuestionnaire(residentId);
}
/**
* 微信小程序消息通知跳转页面
*/
@GetMapping("/subscriptionMessage")
public AjaxResult subscriptionMessage(Long id){
return homePageService.subscriptionMessage(id);
}
}

View File

@ -6,7 +6,6 @@ import com.xinelu.manage.domain.patienttaskexecuterecord.PatientTaskExecuteRecor
import com.xinelu.manage.domain.scriptInfo.ScriptInfo;
import com.xinelu.manage.dto.patientquestionsubmitresult.PatientQuestionSubmitResultDTO;
import com.xinelu.mobile.vo.myfollowup.MyFollowUpVO;
import com.xinelu.mobile.vo.satisfactionquestionnaire.SatisfactionQuestionnaire;
import java.util.List;
@ -42,7 +41,7 @@ public interface HomePageService {
* @param patientQuestionSubmitResultId 记录表id
* @return AjaxResult
*/
AjaxResult selectQuestionSubmit(Long patientQuestionSubmitResultId,Long patientTaskExecuteRecordId);
AjaxResult selectQuestionSubmit(Long patientQuestionSubmitResultId, Long patientTaskExecuteRecordId);
/**
* 问卷提交
@ -67,4 +66,12 @@ public interface HomePageService {
* @return SatisfactionQuestionnaire
*/
TableDataInfo satisfactionQuestionnaire(Long residentId);
/**
* 微信小程序消息通知跳转页面
*
* @param id 节点
* @return AjaxResult
*/
AjaxResult subscriptionMessage(Long id);
}

View File

@ -26,6 +26,7 @@ import com.xinelu.manage.mapper.questioninfo.QuestionInfoMapper;
import com.xinelu.manage.mapper.questionsubject.QuestionSubjectMapper;
import com.xinelu.manage.mapper.questionsubjectoption.QuestionSubjectOptionMapper;
import com.xinelu.manage.mapper.scriptInfo.ScriptInfoMapper;
import com.xinelu.manage.mapper.signpatientmanageroutenode.SignPatientManageRouteNodeMapper;
import com.xinelu.manage.vo.questionInfo.QuestionVO;
import com.xinelu.manage.vo.questionsubject.QuestionSubjectVO;
import com.xinelu.manage.vo.questionsubjectoption.QuestionSubjectOptionVO;
@ -70,6 +71,8 @@ public class HomePageServiceImpl implements HomePageService {
private PatientQuestionSubjectResultMapper patientQuestionSubjectResultMapper;
@Resource
private PatientQuestionOptionResultMapper patientQuestionOptionResultMapper;
@Resource
private SignPatientManageRouteNodeMapper signPatientManageRouteNodeMapper;
/**
* 我的随访列表
@ -244,4 +247,18 @@ public class HomePageServiceImpl implements HomePageService {
}
return pageServiceUtil.getDataTable(satisfactionQuestionnaires);
}
/**
* 微信小程序消息通知跳转页面
*
* @param id 节点
* @return AjaxResult
*/
@Override
public AjaxResult subscriptionMessage(Long id) {
if (Objects.isNull(id)) {
return AjaxResult.error("该节点以清空!");
}
return AjaxResult.success(signPatientManageRouteNodeMapper.selectSignPatientManageRouteNodeById(id));
}
}

View File

@ -53,6 +53,7 @@ public class SubscribeMessageSendDataServiceImpl implements SubscribeMessageSend
LocalDate localDate = patientVO.getDischargeTime().plusDays(signPatientManageRouteNode.getRouteNodeDay());
boolean before = localDate.isEqual(LocalDate.now());
if (before) {
signPatientManageRouteNode.setOpenId(patientVO.getOpenId());
patientVOS.add(signPatientManageRouteNode);
}
}
@ -63,6 +64,7 @@ public class SubscribeMessageSendDataServiceImpl implements SubscribeMessageSend
LocalDate localDate = patientVO.getAdmissionTime().plusDays(signPatientManageRouteNode.getRouteNodeDay());
boolean before = localDate.isEqual(LocalDate.now());
if (before) {
signPatientManageRouteNode.setOpenId(patientVO.getOpenId());
patientVOS.add(signPatientManageRouteNode);
}
}
@ -73,6 +75,7 @@ public class SubscribeMessageSendDataServiceImpl implements SubscribeMessageSend
LocalDate localDate = patientVO.getVisitDate().plusDays(signPatientManageRouteNode.getRouteNodeDay());
boolean before = localDate.isEqual(LocalDate.now());
if (before) {
signPatientManageRouteNode.setOpenId(patientVO.getOpenId());
patientVOS.add(signPatientManageRouteNode);
}
}