You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
2.1 KiB
58 lines
2.1 KiB
package com.ynxbd.wx.wxfactory;
|
|
|
|
import com.ynxbd.common.result.JsonResult;
|
|
import com.ynxbd.wx.config.WeChatConfig;
|
|
import com.ynxbd.wx.wxfactory.medical.MdConfig;
|
|
import com.ynxbd.wx.wxfactory.message.MdClient;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
/**
|
|
* 就医助手
|
|
*/
|
|
@Slf4j
|
|
public class WxMessageHelper {
|
|
|
|
/**
|
|
* 就医助手授权
|
|
*
|
|
* @param patCardNo 患者证件号码
|
|
* @param patName 患者姓名
|
|
*/
|
|
public static void auth(String patCardNo, String patName, String orderId) {
|
|
JsonResult result = new MdClient().push(WxCacheHelper.getAccessToken(), WeChatConfig.APP_ID, 9001, orderId, messageType -> messageType.auth(patCardNo, patName));
|
|
}
|
|
|
|
|
|
public static void regPush(String url, Integer status, String patCardNo, String patName, String patHospitalId, String deptName, String docName, String appointmentTime, String memo) {
|
|
JsonResult result = new MdClient().push(WxCacheHelper.getAccessToken(), WeChatConfig.APP_ID, 9001, "123",
|
|
messageType -> messageType.reg(
|
|
MdConfig.HOSPITAL_NAME,
|
|
url,
|
|
status,
|
|
patCardNo,
|
|
patName,
|
|
patHospitalId,
|
|
deptName,
|
|
docName,
|
|
appointmentTime,
|
|
memo)
|
|
);
|
|
}
|
|
|
|
|
|
public static void recipePush(String url, Integer status, String patCardNo, String patName, String deptName, String payOrderNo, String payOrderAmount, String memo, String payTime, String payFailReason) {
|
|
JsonResult result = new MdClient().push(WxCacheHelper.getAccessToken(), WeChatConfig.APP_ID, 9001, "123", messageType ->
|
|
messageType.recipe(
|
|
url,
|
|
status,
|
|
patCardNo,
|
|
patName,
|
|
deptName,
|
|
payOrderNo,
|
|
payOrderAmount,
|
|
memo,
|
|
payTime,
|
|
payFailReason)
|
|
);
|
|
}
|
|
}
|
|
|