|
@@ -61,17 +61,17 @@ public class MessageService {
|
|
* @param alipayUid 支付宝用户 id
|
|
* @param alipayUid 支付宝用户 id
|
|
* @param jsonBody 业务参数,具体根据业务类型按照文档拼接
|
|
* @param jsonBody 业务参数,具体根据业务类型按照文档拼接
|
|
*/
|
|
*/
|
|
- public void sendIntelliMsg(String appId, String alipayUid, JSONObject jsonBody) {
|
|
|
|
|
|
+ public void sendIntelliMsg(String appId, String alipayUid, JSONObject jsonBody, String hospitalPid, String tenantAppId) {
|
|
try {
|
|
try {
|
|
String rk = String.format(Constants.RK_ACCESS_TOKEN, appId, alipayUid);
|
|
String rk = String.format(Constants.RK_ACCESS_TOKEN, appId, alipayUid);
|
|
String accessToken = jedisCommands.get(rk);
|
|
String accessToken = jedisCommands.get(rk);
|
|
CheckUtil.ensureNotEmpty(accessToken, rk + " 无法获取 accessToken");
|
|
CheckUtil.ensureNotEmpty(accessToken, rk + " 无法获取 accessToken");
|
|
AlipayCommerceAppAuthUploadRequest request = new AlipayCommerceAppAuthUploadRequest();
|
|
AlipayCommerceAppAuthUploadRequest request = new AlipayCommerceAppAuthUploadRequest();
|
|
request.setServiceName("alipay.commerce.app.data");//应用服务名称 固定值 String(256) 不可空
|
|
request.setServiceName("alipay.commerce.app.data");//应用服务名称 固定值 String(256) 不可空
|
|
- request.setTargetId("2088441565011410"); //目标用户 String(64) 签约商家 PID 不可空
|
|
|
|
|
|
+ request.setTargetId(hospitalPid); //目标用户 String(64) 签约商家 PID 不可空
|
|
|
|
|
|
CommerceAppUploadRequestContent content = new CommerceAppUploadRequestContent(); //服务数据参数
|
|
CommerceAppUploadRequestContent content = new CommerceAppUploadRequestContent(); //服务数据参数
|
|
- content.setTenantAppId("20220815114100017389"); //租户应 用ID String(64) 支付宝分配 不可空
|
|
|
|
|
|
+ content.setTenantAppId(tenantAppId); //租户应 用ID String(64) 支付宝分配 不可空
|
|
content.setActivityId("upload_hospital_order"); //业务流程ID String(64) 不可空 此处固定为“upload_hospital_order”
|
|
content.setActivityId("upload_hospital_order"); //业务流程ID String(64) 不可空 此处固定为“upload_hospital_order”
|
|
|
|
|
|
content.setBody(JSONObject.toJSONString(jsonBody));
|
|
content.setBody(JSONObject.toJSONString(jsonBody));
|
|
@@ -93,10 +93,8 @@ public class MessageService {
|
|
public void sendRegMsg(int orderId, String orderNo, String alipayUid, String orderCreateTime, String orderAmountStr,
|
|
public void sendRegMsg(int orderId, String orderNo, String alipayUid, String orderCreateTime, String orderAmountStr,
|
|
String tradeNo, String hospitalName, String deptName, String doctorName, String doctorId,
|
|
String tradeNo, String hospitalName, String deptName, String doctorName, String doctorId,
|
|
String patientName, String regDate, String deptLoc, String appId, String merchantOrderStatus,
|
|
String patientName, String regDate, String deptLoc, String appId, String merchantOrderStatus,
|
|
- String isvPid) throws AppMessageException {
|
|
|
|
|
|
+ String isvPid, String hospitalPid, String tenantAppId, String hospitalRegId) throws AppMessageException {
|
|
CheckUtil.ensureNotEmpty(deptLoc, "科室位置不能为空");
|
|
CheckUtil.ensureNotEmpty(deptLoc, "科室位置不能为空");
|
|
- // 医院登记号
|
|
|
|
- String hospRegId = "352790440111410131";
|
|
|
|
// 小程序跳转路径
|
|
// 小程序跳转路径
|
|
String pathParam = "";
|
|
String pathParam = "";
|
|
try {
|
|
try {
|
|
@@ -139,7 +137,7 @@ public class MessageService {
|
|
|
|
|
|
JSONObject extInfo = new JSONObject();
|
|
JSONObject extInfo = new JSONObject();
|
|
extInfo.put("hospital", hospitalName);//医院名称
|
|
extInfo.put("hospital", hospitalName);//医院名称
|
|
- extInfo.put("hospital_register_id", hospRegId);//医院登记号
|
|
|
|
|
|
+ extInfo.put("hospital_register_id", hospitalRegId);//医院登记号
|
|
extInfo.put("department", deptName);//就诊科室
|
|
extInfo.put("department", deptName);//就诊科室
|
|
extInfo.put("dept_num", "");//诊室编号
|
|
extInfo.put("dept_num", "");//诊室编号
|
|
extInfo.put("dept_loc", deptLoc);//科室位置
|
|
extInfo.put("dept_loc", deptLoc);//科室位置
|
|
@@ -158,6 +156,6 @@ public class MessageService {
|
|
extInfo.put("merchant_order_link_page", mpPath);//订单链接
|
|
extInfo.put("merchant_order_link_page", mpPath);//订单链接
|
|
jsonBody.put("ext_info", extInfo);
|
|
jsonBody.put("ext_info", extInfo);
|
|
|
|
|
|
- sendIntelliMsg(appId, alipayUid, jsonBody);
|
|
|
|
|
|
+ sendIntelliMsg(appId, alipayUid, jsonBody, hospitalPid, tenantAppId);
|
|
}
|
|
}
|
|
}
|
|
}
|