记得上下班打卡 | git大法好,push需谨慎

Commit f7200860 authored by 张国柄's avatar 张国柄

Merge remote-tracking branch 'origin/master' into dev_goblin

parents 1d51ff73 1a58f591
...@@ -26,7 +26,7 @@ liquidnet: ...@@ -26,7 +26,7 @@ liquidnet:
mobile: 13724286255 mobile: 13724286255
user-info: false user-info: false
limit: limit:
enters: 10 enters: 12
enters_opr: 20 enters_opr: 20
#以下为spring各环境个性配置 #以下为spring各环境个性配置
...@@ -49,7 +49,6 @@ public class DragonServiceCommonBiz { ...@@ -49,7 +49,6 @@ public class DragonServiceCommonBiz {
orders.setOrderCodeId(dragonPayBaseReqDto.getOrderId()); orders.setOrderCodeId(dragonPayBaseReqDto.getOrderId());
orders.setClientIp(dragonPayBaseReqDto.getClientIp()); orders.setClientIp(dragonPayBaseReqDto.getClientIp());
orders.setNotifyUrl(dragonPayBaseReqDto.getNotifyUrl()); orders.setNotifyUrl(dragonPayBaseReqDto.getNotifyUrl());
orders.setNotifyUrl(dragonPayBaseReqDto.getNotifyUrl());
orders.setNotifyStatus(Integer.valueOf(DragonConstant.PayNotifyStatusEnum.NOTIFY_INIT.getCode())); orders.setNotifyStatus(Integer.valueOf(DragonConstant.PayNotifyStatusEnum.NOTIFY_INIT.getCode()));
orders.setPaymentType((dragonPayBaseReqDto.getDeviceFrom()+dragonPayBaseReqDto.getPayType()).toUpperCase()); orders.setPaymentType((dragonPayBaseReqDto.getDeviceFrom()+dragonPayBaseReqDto.getPayType()).toUpperCase());
// orders.setPaymentId(); // orders.setPaymentId();
......
...@@ -90,6 +90,9 @@ public class PayChannelStrategyAlipayImpl extends AbstractPayChannelStrategyImpl ...@@ -90,6 +90,9 @@ public class PayChannelStrategyAlipayImpl extends AbstractPayChannelStrategyImpl
String returnStr = "fail"; String returnStr = "fail";
String code = notifyMap.get("out_trade_no"); String code = notifyMap.get("out_trade_no");
if(StringUtil.isBlank(code)){
throw new LiquidnetServiceException(DragonErrorCodeEnum.TRADE_ERROR_NOT_EXISTS.getCode(),DragonErrorCodeEnum.TRADE_ERROR_NOT_EXISTS.getMessage());
}
//持久化通知记录 //持久化通知记录
dragonServiceCommonBiz.createDragonOrderLogs(code,dragonPayBiz.getPaymentType(payType,deviceFrom),JSON.toJSONString(notifyMap)); dragonServiceCommonBiz.createDragonOrderLogs(code,dragonPayBiz.getPaymentType(payType,deviceFrom),JSON.toJSONString(notifyMap));
......
...@@ -3,15 +3,12 @@ package com.liquidnet.service.dragon.channel.strategy.impl; ...@@ -3,15 +3,12 @@ package com.liquidnet.service.dragon.channel.strategy.impl;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.liquidnet.common.exception.LiquidnetServiceException; import com.liquidnet.common.exception.LiquidnetServiceException;
import com.liquidnet.commons.lang.util.DateUtil;
import com.liquidnet.commons.lang.util.StringUtil; import com.liquidnet.commons.lang.util.StringUtil;
import com.liquidnet.service.base.ResponseDto; import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.dragon.biz.DragonServiceCommonBiz; import com.liquidnet.service.dragon.biz.DragonServiceCommonBiz;
import com.liquidnet.service.dragon.channel.douyinpay.strategy.DouYinayStrategyContext; import com.liquidnet.service.dragon.channel.douyinpay.strategy.DouYinayStrategyContext;
import com.liquidnet.service.dragon.channel.strategy.annotation.StrategyPayChannelHandler; import com.liquidnet.service.dragon.channel.strategy.annotation.StrategyPayChannelHandler;
import com.liquidnet.service.dragon.channel.strategy.biz.DragonPayBiz; import com.liquidnet.service.dragon.channel.strategy.biz.DragonPayBiz;
import com.liquidnet.service.dragon.channel.wepay.constant.WepayConstant;
import com.liquidnet.service.dragon.channel.wepay.strategy.WepayStrategyContext;
import com.liquidnet.service.dragon.constant.DragonConstant; import com.liquidnet.service.dragon.constant.DragonConstant;
import com.liquidnet.service.dragon.constant.DragonErrorCodeEnum; import com.liquidnet.service.dragon.constant.DragonErrorCodeEnum;
import com.liquidnet.service.dragon.dto.DragonOrdersDto; import com.liquidnet.service.dragon.dto.DragonOrdersDto;
...@@ -20,18 +17,12 @@ import com.liquidnet.service.dragon.dto.DragonPayBaseRespDto; ...@@ -20,18 +17,12 @@ import com.liquidnet.service.dragon.dto.DragonPayBaseRespDto;
import com.liquidnet.service.dragon.dto.DragonPayOrderQueryRespDto; import com.liquidnet.service.dragon.dto.DragonPayOrderQueryRespDto;
import com.liquidnet.service.dragon.utils.DataUtils; import com.liquidnet.service.dragon.utils.DataUtils;
import com.liquidnet.service.dragon.utils.PayDouYinpayUtils; import com.liquidnet.service.dragon.utils.PayDouYinpayUtils;
import com.liquidnet.service.dragon.utils.PayWepayUtils;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.io.InputStream;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
/** /**
...@@ -74,6 +65,9 @@ public class PayChannelStrategyDouYinImpl extends AbstractPayChannelStrategyImpl ...@@ -74,6 +65,9 @@ public class PayChannelStrategyDouYinImpl extends AbstractPayChannelStrategyImpl
JSONObject msg=jsonObject.getJSONObject("msg"); JSONObject msg=jsonObject.getJSONObject("msg");
// Map msg= (Map) map.get("msg"); // Map msg= (Map) map.get("msg");
String code =msg.get("cp_orderno").toString(); String code =msg.get("cp_orderno").toString();
if(StringUtil.isBlank(code)){
throw new LiquidnetServiceException(DragonErrorCodeEnum.TRADE_ERROR_NOT_EXISTS.getCode(),DragonErrorCodeEnum.TRADE_ERROR_NOT_EXISTS.getMessage());
}
//持久化通知记录 //持久化通知记录
dragonServiceCommonBiz.createDragonOrderLogs(code,dragonPayBiz.getPaymentType(payType,deviceFrom),JSON.toJSONString(jsonObject)); dragonServiceCommonBiz.createDragonOrderLogs(code,dragonPayBiz.getPaymentType(payType,deviceFrom),JSON.toJSONString(jsonObject));
// 根据银行订单号获取支付信息 // 根据银行订单号获取支付信息
......
...@@ -2,13 +2,12 @@ package com.liquidnet.service.dragon.channel.strategy.impl; ...@@ -2,13 +2,12 @@ package com.liquidnet.service.dragon.channel.strategy.impl;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.liquidnet.common.exception.LiquidnetServiceException; import com.liquidnet.common.exception.LiquidnetServiceException;
import com.liquidnet.commons.lang.util.StringUtil;
import com.liquidnet.service.base.ResponseDto; import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.dragon.biz.DragonServiceCommonBiz; import com.liquidnet.service.dragon.biz.DragonServiceCommonBiz;
import com.liquidnet.service.dragon.channel.alipay.constant.AlipayConstant;
import com.liquidnet.service.dragon.channel.strategy.annotation.StrategyPayChannelHandler; import com.liquidnet.service.dragon.channel.strategy.annotation.StrategyPayChannelHandler;
import com.liquidnet.service.dragon.channel.strategy.biz.DragonPayBiz; import com.liquidnet.service.dragon.channel.strategy.biz.DragonPayBiz;
import com.liquidnet.service.dragon.channel.unionpay.biz.UnionpayBiz; import com.liquidnet.service.dragon.channel.unionpay.biz.UnionpayBiz;
import com.liquidnet.service.dragon.channel.unionpay.constant.UnionpayConstant;
import com.liquidnet.service.dragon.channel.unionpay.sdk.AcpService; import com.liquidnet.service.dragon.channel.unionpay.sdk.AcpService;
import com.liquidnet.service.dragon.channel.unionpay.sdk.SDKConstants; import com.liquidnet.service.dragon.channel.unionpay.sdk.SDKConstants;
import com.liquidnet.service.dragon.channel.unionpay.strategy.UnionpayStrategyContext; import com.liquidnet.service.dragon.channel.unionpay.strategy.UnionpayStrategyContext;
...@@ -26,7 +25,6 @@ import org.springframework.stereotype.Component; ...@@ -26,7 +25,6 @@ import org.springframework.stereotype.Component;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map; import java.util.Map;
/** /**
...@@ -77,6 +75,9 @@ public class PayChannelStrategyUnionpayImpl extends AbstractPayChannelStrategyIm ...@@ -77,6 +75,9 @@ public class PayChannelStrategyUnionpayImpl extends AbstractPayChannelStrategyIm
log.info("接收到{}支付结果{}", payType, notifyMap); log.info("接收到{}支付结果{}", payType, notifyMap);
//商户订单号 //商户订单号
String code =notifyMap.get("orderId"); //获取后台通知的数据 String code =notifyMap.get("orderId"); //获取后台通知的数据
if(StringUtil.isBlank(code)){
throw new LiquidnetServiceException(DragonErrorCodeEnum.TRADE_ERROR_NOT_EXISTS.getCode(),DragonErrorCodeEnum.TRADE_ERROR_NOT_EXISTS.getMessage());
}
//持久化通知记录 //持久化通知记录
dragonServiceCommonBiz.createDragonOrderLogs(code,dragonPayBiz.getPaymentType(payType,deviceFrom),JSON.toJSONString(notifyMap)); dragonServiceCommonBiz.createDragonOrderLogs(code,dragonPayBiz.getPaymentType(payType,deviceFrom),JSON.toJSONString(notifyMap));
// 根据银行订单号获取支付信息 // 根据银行订单号获取支付信息
......
...@@ -72,7 +72,9 @@ public class PayChannelStrategyWepayImpl extends AbstractPayChannelStrategyImpl ...@@ -72,7 +72,9 @@ public class PayChannelStrategyWepayImpl extends AbstractPayChannelStrategyImpl
log.info("接收到{}支付结果{}", payType, notifyMap); log.info("接收到{}支付结果{}", payType, notifyMap);
String code = notifyMap.get("out_trade_no"); String code = notifyMap.get("out_trade_no");
if(StringUtil.isBlank(code)){
throw new LiquidnetServiceException(DragonErrorCodeEnum.TRADE_ERROR_NOT_EXISTS.getCode(),DragonErrorCodeEnum.TRADE_ERROR_NOT_EXISTS.getMessage());
}
//持久化通知记录 //持久化通知记录
dragonServiceCommonBiz.createDragonOrderLogs(code,dragonPayBiz.getPaymentType(payType,deviceFrom),JSON.toJSONString(notifyMap)); dragonServiceCommonBiz.createDragonOrderLogs(code,dragonPayBiz.getPaymentType(payType,deviceFrom),JSON.toJSONString(notifyMap));
......
...@@ -46,6 +46,7 @@ public class DragonServiceCommonBiz { ...@@ -46,6 +46,7 @@ public class DragonServiceCommonBiz {
orders.setName(dragonPayBaseReqDto.getName()); orders.setName(dragonPayBaseReqDto.getName());
orders.setDetail(dragonPayBaseReqDto.getDetail()); orders.setDetail(dragonPayBaseReqDto.getDetail());
orders.setOrderCode(dragonPayBaseReqDto.getOrderCode()); orders.setOrderCode(dragonPayBaseReqDto.getOrderCode());
orders.setOrderCodeId(dragonPayBaseReqDto.getOrderId());
orders.setClientIp(dragonPayBaseReqDto.getClientIp()); orders.setClientIp(dragonPayBaseReqDto.getClientIp());
orders.setNotifyUrl(dragonPayBaseReqDto.getNotifyUrl()); orders.setNotifyUrl(dragonPayBaseReqDto.getNotifyUrl());
orders.setNotifyStatus(Integer.valueOf(DragonConstant.PayNotifyStatusEnum.NOTIFY_INIT.getCode())); orders.setNotifyStatus(Integer.valueOf(DragonConstant.PayNotifyStatusEnum.NOTIFY_INIT.getCode()));
......
...@@ -38,7 +38,7 @@ public class DragonPayBiz { ...@@ -38,7 +38,7 @@ public class DragonPayBiz {
private DragonServiceCommonBiz dragonServiceCommonBiz; private DragonServiceCommonBiz dragonServiceCommonBiz;
public PayNotifyReqBo buildPayNotifyReqBo(DragonOrdersDto dragonOrdersDto){ public PayNotifyReqBo buildPayNotifyReqBo(DragonOrdersDto dragonOrdersDto) {
PayNotifyReqBo payNotifyReqBo = new PayNotifyReqBo(); PayNotifyReqBo payNotifyReqBo = new PayNotifyReqBo();
payNotifyReqBo.setNotifyUrl(dragonOrdersDto.getNotifyUrl()); payNotifyReqBo.setNotifyUrl(dragonOrdersDto.getNotifyUrl());
PayNotifyDto payNotifyDto = new PayNotifyDto(); PayNotifyDto payNotifyDto = new PayNotifyDto();
...@@ -47,36 +47,38 @@ public class DragonPayBiz { ...@@ -47,36 +47,38 @@ public class DragonPayBiz {
payNotifyDto.setCode(dragonOrdersDto.getCode()); payNotifyDto.setCode(dragonOrdersDto.getCode());
payNotifyDto.setPaymentId(dragonOrdersDto.getPaymentId()); payNotifyDto.setPaymentId(dragonOrdersDto.getPaymentId());
payNotifyDto.setOrderCode(dragonOrdersDto.getOrderCode()); payNotifyDto.setOrderCode(dragonOrdersDto.getOrderCode());
payNotifyDto.setOrderCodeId(dragonOrdersDto.getOrderCodeId());
payNotifyDto.setPrice(dragonOrdersDto.getPrice()); payNotifyDto.setPrice(dragonOrdersDto.getPrice());
payNotifyDto.setPaymentType(dragonOrdersDto.getPaymentType()); payNotifyDto.setPaymentType(dragonOrdersDto.getPaymentType());
if(StringUtil.isNotNull(dragonOrdersDto.getPaymentAt())){ if (StringUtil.isNotNull(dragonOrdersDto.getPaymentAt())) {
payNotifyDto.setPaymentAt(DateUtil.Formatter.yyyyMMddHHmmss.format(dragonOrdersDto.getPaymentAt())); payNotifyDto.setPaymentAt(DateUtil.Formatter.yyyyMMddHHmmss.format(dragonOrdersDto.getPaymentAt()));
}else{ } else {
payNotifyDto.setPaymentAt(""); payNotifyDto.setPaymentAt("");
} }
payNotifyReqBo.setPayNotifyDto(payNotifyDto); payNotifyReqBo.setPayNotifyDto(payNotifyDto);
return payNotifyReqBo; return payNotifyReqBo;
} }
public DragonPayOrderQueryRespDto buildPayOrderQueryRespDto(DragonOrdersDto ordersDto){ public DragonPayOrderQueryRespDto buildPayOrderQueryRespDto(DragonOrdersDto ordersDto) {
DragonPayOrderQueryRespDto queryRespDto = new DragonPayOrderQueryRespDto(); DragonPayOrderQueryRespDto queryRespDto = new DragonPayOrderQueryRespDto();
queryRespDto.setStatus(ordersDto.getStatus()); queryRespDto.setStatus(ordersDto.getStatus());
queryRespDto.setType(ordersDto.getType()); queryRespDto.setType(ordersDto.getType());
queryRespDto.setCode(ordersDto.getCode()); queryRespDto.setCode(ordersDto.getCode());
queryRespDto.setPaymentId(ordersDto.getPaymentId()); queryRespDto.setPaymentId(ordersDto.getPaymentId());
queryRespDto.setOrderCode(ordersDto.getOrderCode()); queryRespDto.setOrderCode(ordersDto.getOrderCode());
queryRespDto.setOrderCodeId(ordersDto.getOrderCodeId());
queryRespDto.setPrice(ordersDto.getPrice()); queryRespDto.setPrice(ordersDto.getPrice());
queryRespDto.setPaymentType(ordersDto.getPaymentType()); queryRespDto.setPaymentType(ordersDto.getPaymentType());
if(StringUtil.isNotNull(ordersDto.getPaymentAt())){ if (StringUtil.isNotNull(ordersDto.getPaymentAt())) {
queryRespDto.setPaymentAt(DateUtil.Formatter.yyyyMMddHHmmss.format(ordersDto.getPaymentAt())); queryRespDto.setPaymentAt(DateUtil.Formatter.yyyyMMddHHmmss.format(ordersDto.getPaymentAt()));
}else{ } else {
queryRespDto.setPaymentAt(""); queryRespDto.setPaymentAt("");
} }
return queryRespDto; return queryRespDto;
} }
public boolean sendNotify(PayNotifyReqBo payNotifyReqBo){ public boolean sendNotify(PayNotifyReqBo payNotifyReqBo) {
PayNotifyDto payNotifyDto = payNotifyReqBo.getPayNotifyDto(); PayNotifyDto payNotifyDto = payNotifyReqBo.getPayNotifyDto();
LocalDateTime nowTime = LocalDateTime.now(); LocalDateTime nowTime = LocalDateTime.now();
...@@ -88,25 +90,26 @@ public class DragonPayBiz { ...@@ -88,25 +90,26 @@ public class DragonPayBiz {
params.add("code", payNotifyDto.getCode()); params.add("code", payNotifyDto.getCode());
params.add("paymentId", payNotifyDto.getPaymentId()); params.add("paymentId", payNotifyDto.getPaymentId());
params.add("orderCode", payNotifyDto.getOrderCode()); params.add("orderCode", payNotifyDto.getOrderCode());
params.add("orderCodeId", payNotifyDto.getOrderCodeId());
params.add("price", payNotifyDto.getPrice().toString()); params.add("price", payNotifyDto.getPrice().toString());
params.add("paymentType", payNotifyDto.getPaymentType()); params.add("paymentType", payNotifyDto.getPaymentType());
params.add("paymentAt", payNotifyDto.getPaymentAt()); params.add("paymentAt", payNotifyDto.getPaymentAt());
jsonData = JsonUtils.toJson(covertNVPS2Params(params)); jsonData = JsonUtils.toJson(covertNVPS2Params(params));
log.info("dragon:notify:post url:{}",payNotifyReqBo.getNotifyUrl()); log.info("dragon:notify:post url:{}", payNotifyReqBo.getNotifyUrl());
log.info("dragon:notify:post data:{}",jsonData); log.info("dragon:notify:post data:{}", jsonData);
//执行post请求 //执行post请求
String response = HttpUtil.post(payNotifyReqBo.getNotifyUrl(), params); String response = HttpUtil.post(payNotifyReqBo.getNotifyUrl(), params);
log.debug("PAY RESPONSE=" + response); log.debug("PAY RESPONSE=" + response);
if (response.equalsIgnoreCase("success")) { if (response.equalsIgnoreCase("success")) {
dragonServiceCommonBiz.createDragonPayNotify(payNotifyReqBo,jsonData); dragonServiceCommonBiz.createDragonPayNotify(payNotifyReqBo, jsonData);
//更新通知状态-通知成功 //更新通知状态-通知成功
dragonServiceCommonBiz.updateNotifyStatus(payNotifyDto.getCode(),Integer.valueOf(DragonConstant.PayNotifyStatusEnum.NOTIFY_SUCCESS.getCode())); dragonServiceCommonBiz.updateNotifyStatus(payNotifyDto.getCode(), Integer.valueOf(DragonConstant.PayNotifyStatusEnum.NOTIFY_SUCCESS.getCode()));
return true; return true;
} else { } else {
dragonServiceCommonBiz.createDragonPayNotifyFail(payNotifyReqBo,jsonData); dragonServiceCommonBiz.createDragonPayNotifyFail(payNotifyReqBo, jsonData);
//更新通知状态-通知失败 //更新通知状态-通知失败
dragonServiceCommonBiz.updateNotifyStatus(payNotifyDto.getCode(),Integer.valueOf(DragonConstant.PayNotifyStatusEnum.NOTIFY_FAIL.getCode())); dragonServiceCommonBiz.updateNotifyStatus(payNotifyDto.getCode(), Integer.valueOf(DragonConstant.PayNotifyStatusEnum.NOTIFY_FAIL.getCode()));
return false; return false;
} }
...@@ -119,10 +122,10 @@ public class DragonPayBiz { ...@@ -119,10 +122,10 @@ public class DragonPayBiz {
// return false; // return false;
// } // }
catch (Exception e) { catch (Exception e) {
log.error("dragon:sendNotify 请求失败",e); log.error("dragon:sendNotify 请求失败", e);
dragonServiceCommonBiz.createDragonPayNotifyFail(payNotifyReqBo,jsonData); dragonServiceCommonBiz.createDragonPayNotifyFail(payNotifyReqBo, jsonData);
//更新通知状态-通知失败 //更新通知状态-通知失败
dragonServiceCommonBiz.updateNotifyStatus(payNotifyDto.getCode(),Integer.valueOf(DragonConstant.PayNotifyStatusEnum.NOTIFY_FAIL.getCode())); dragonServiceCommonBiz.updateNotifyStatus(payNotifyDto.getCode(), Integer.valueOf(DragonConstant.PayNotifyStatusEnum.NOTIFY_FAIL.getCode()));
return false; return false;
} }
} }
...@@ -195,14 +198,14 @@ public class DragonPayBiz { ...@@ -195,14 +198,14 @@ public class DragonPayBiz {
// } // }
// } // }
public String getPaymentType(String payType,String deviceFrom){ public String getPaymentType(String payType, String deviceFrom) {
return (deviceFrom+payType).toUpperCase(); return (deviceFrom + payType).toUpperCase();
} }
private static Map<String, Object> covertNVPS2Params(List<NameValuePair> nvpList) { private static Map<String, Object> covertNVPS2Params(List<NameValuePair> nvpList) {
Map<String, Object> rsMap = ObjectUtil.cloneHashMapStringAndObj(); Map<String, Object> rsMap = ObjectUtil.cloneHashMapStringAndObj();
for (NameValuePair nameValuePair : nvpList) { for (NameValuePair nameValuePair : nvpList) {
rsMap.put(nameValuePair.getName(),nameValuePair.getValue()); rsMap.put(nameValuePair.getName(), nameValuePair.getValue());
} }
return rsMap; return rsMap;
} }
......
...@@ -90,6 +90,9 @@ public class PayChannelStrategyAlipayImpl extends AbstractPayChannelStrategyImpl ...@@ -90,6 +90,9 @@ public class PayChannelStrategyAlipayImpl extends AbstractPayChannelStrategyImpl
String returnStr = "fail"; String returnStr = "fail";
String code = notifyMap.get("out_trade_no"); String code = notifyMap.get("out_trade_no");
if(StringUtil.isBlank(code)){
throw new LiquidnetServiceException(DragonErrorCodeEnum.TRADE_ERROR_NOT_EXISTS.getCode(),DragonErrorCodeEnum.TRADE_ERROR_NOT_EXISTS.getMessage());
}
//持久化通知记录 //持久化通知记录
dragonServiceCommonBiz.createDragonOrderLogs(code,dragonPayBiz.getPaymentType(payType,deviceFrom),JSON.toJSONString(notifyMap)); dragonServiceCommonBiz.createDragonOrderLogs(code,dragonPayBiz.getPaymentType(payType,deviceFrom),JSON.toJSONString(notifyMap));
......
...@@ -3,6 +3,7 @@ package com.liquidnet.service.dragon.channel.strategy.impl; ...@@ -3,6 +3,7 @@ package com.liquidnet.service.dragon.channel.strategy.impl;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.liquidnet.common.exception.LiquidnetServiceException; import com.liquidnet.common.exception.LiquidnetServiceException;
import com.liquidnet.commons.lang.util.StringUtil;
import com.liquidnet.service.base.ResponseDto; import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.dragon.biz.DragonServiceCommonBiz; import com.liquidnet.service.dragon.biz.DragonServiceCommonBiz;
import com.liquidnet.service.dragon.channel.douyinpay.strategy.DouYinayStrategyContext; import com.liquidnet.service.dragon.channel.douyinpay.strategy.DouYinayStrategyContext;
...@@ -64,6 +65,9 @@ public class PayChannelStrategyDouYinImpl extends AbstractPayChannelStrategyImpl ...@@ -64,6 +65,9 @@ public class PayChannelStrategyDouYinImpl extends AbstractPayChannelStrategyImpl
JSONObject msg=jsonObject.getJSONObject("msg"); JSONObject msg=jsonObject.getJSONObject("msg");
// Map msg= (Map) map.get("msg"); // Map msg= (Map) map.get("msg");
String code =msg.get("cp_orderno").toString(); String code =msg.get("cp_orderno").toString();
if(StringUtil.isBlank(code)){
throw new LiquidnetServiceException(DragonErrorCodeEnum.TRADE_ERROR_NOT_EXISTS.getCode(),DragonErrorCodeEnum.TRADE_ERROR_NOT_EXISTS.getMessage());
}
//持久化通知记录 //持久化通知记录
dragonServiceCommonBiz.createDragonOrderLogs(code,dragonPayBiz.getPaymentType(payType,deviceFrom),JSON.toJSONString(jsonObject)); dragonServiceCommonBiz.createDragonOrderLogs(code,dragonPayBiz.getPaymentType(payType,deviceFrom),JSON.toJSONString(jsonObject));
// 根据银行订单号获取支付信息 // 根据银行订单号获取支付信息
......
...@@ -2,6 +2,7 @@ package com.liquidnet.service.dragon.channel.strategy.impl; ...@@ -2,6 +2,7 @@ package com.liquidnet.service.dragon.channel.strategy.impl;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.liquidnet.common.exception.LiquidnetServiceException; import com.liquidnet.common.exception.LiquidnetServiceException;
import com.liquidnet.commons.lang.util.StringUtil;
import com.liquidnet.service.base.ResponseDto; import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.dragon.biz.DragonServiceCommonBiz; import com.liquidnet.service.dragon.biz.DragonServiceCommonBiz;
import com.liquidnet.service.dragon.channel.strategy.annotation.StrategyPayChannelHandler; import com.liquidnet.service.dragon.channel.strategy.annotation.StrategyPayChannelHandler;
...@@ -74,6 +75,9 @@ public class PayChannelStrategyUnionpayImpl extends AbstractPayChannelStrategyIm ...@@ -74,6 +75,9 @@ public class PayChannelStrategyUnionpayImpl extends AbstractPayChannelStrategyIm
log.info("接收到{}支付结果{}", payType, notifyMap); log.info("接收到{}支付结果{}", payType, notifyMap);
//商户订单号 //商户订单号
String code =notifyMap.get("orderId"); //获取后台通知的数据 String code =notifyMap.get("orderId"); //获取后台通知的数据
if(StringUtil.isBlank(code)){
throw new LiquidnetServiceException(DragonErrorCodeEnum.TRADE_ERROR_NOT_EXISTS.getCode(),DragonErrorCodeEnum.TRADE_ERROR_NOT_EXISTS.getMessage());
}
//持久化通知记录 //持久化通知记录
dragonServiceCommonBiz.createDragonOrderLogs(code,dragonPayBiz.getPaymentType(payType,deviceFrom),JSON.toJSONString(notifyMap)); dragonServiceCommonBiz.createDragonOrderLogs(code,dragonPayBiz.getPaymentType(payType,deviceFrom),JSON.toJSONString(notifyMap));
// 根据银行订单号获取支付信息 // 根据银行订单号获取支付信息
......
...@@ -72,7 +72,9 @@ public class PayChannelStrategyWepayImpl extends AbstractPayChannelStrategyImpl ...@@ -72,7 +72,9 @@ public class PayChannelStrategyWepayImpl extends AbstractPayChannelStrategyImpl
log.info("接收到{}支付结果{}", payType, notifyMap); log.info("接收到{}支付结果{}", payType, notifyMap);
String code = notifyMap.get("out_trade_no"); String code = notifyMap.get("out_trade_no");
if(StringUtil.isBlank(code)){
throw new LiquidnetServiceException(DragonErrorCodeEnum.TRADE_ERROR_NOT_EXISTS.getCode(),DragonErrorCodeEnum.TRADE_ERROR_NOT_EXISTS.getMessage());
}
//持久化通知记录 //持久化通知记录
dragonServiceCommonBiz.createDragonOrderLogs(code,dragonPayBiz.getPaymentType(payType,deviceFrom),JSON.toJSONString(notifyMap)); dragonServiceCommonBiz.createDragonOrderLogs(code,dragonPayBiz.getPaymentType(payType,deviceFrom),JSON.toJSONString(notifyMap));
......
...@@ -42,6 +42,7 @@ public class PayController { ...@@ -42,6 +42,7 @@ public class PayController {
*/ */
/** /**
* 电脑网页支付宝支付 * 电脑网页支付宝支付
*
* @return * @return
*//* *//*
...@@ -55,6 +56,7 @@ public class PayController { ...@@ -55,6 +56,7 @@ public class PayController {
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "price", value = "支付金额", example = "0.1"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "price", value = "支付金额", example = "0.1"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "name", value = "订单名称", example = "测试订单001"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "name", value = "订单名称", example = "测试订单001"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "detail", value = "订单描述", example = "测试订单001"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "detail", value = "订单描述", example = "测试订单001"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "orderId", value = "订单id", example = "orderId"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "orderCode", value = "订单编号", example = "ORDER0001"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "orderCode", value = "订单编号", example = "ORDER0001"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "clientIp", value = "客户端ip", example = "127.0.0.1"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "clientIp", value = "客户端ip", example = "127.0.0.1"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "notifyUrl", value = "通知url", example = "devdragon.zhengzai.tv"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "notifyUrl", value = "通知url", example = "devdragon.zhengzai.tv"),
...@@ -65,24 +67,25 @@ public class PayController { ...@@ -65,24 +67,25 @@ public class PayController {
public ResponseDto<DragonPayBaseRespDto> dragonPay( public ResponseDto<DragonPayBaseRespDto> dragonPay(
@RequestParam(value = "payType") @NotNull(message = "支付类型不能为空") String payType, @RequestParam(value = "payType") @NotNull(message = "支付类型不能为空") String payType,
@RequestParam(value = "deviceFrom") @NotNull(message = "设备来源不能为空") String deviceFrom, @RequestParam(value = "deviceFrom") @NotNull(message = "设备来源不能为空") String deviceFrom,
@RequestParam(value = "openId",required = false) String openId, @RequestParam(value = "openId", required = false) String openId,
@RequestParam(value = "type") @NotNull(message = "业务类型不能为空") String type, @RequestParam(value = "type") @NotNull(message = "业务类型不能为空") String type,
@RequestParam(value = "price") @NotNull(message = "支付金额不能为空") BigDecimal price, @RequestParam(value = "price") @NotNull(message = "支付金额不能为空") BigDecimal price,
@RequestParam(value = "name") @NotNull(message = "订单名称不能为空") String name, @RequestParam(value = "name") @NotNull(message = "订单名称不能为空") String name,
@RequestParam(value = "detail") @NotNull(message = "订单描述不能为空") String detail, @RequestParam(value = "detail") @NotNull(message = "订单描述不能为空") String detail,
@RequestParam(value = "orderCode") @NotNull(message = "订单编号不能为空") String orderCode, @RequestParam(value = "orderCode") @NotNull(message = "订单编号不能为空") String orderCode,
@RequestParam(value = "clientIp") @NotNull(message = "客户端ip不能为空") String clientIp, @RequestParam(value = "orderId", required = false) String orderId,
@RequestParam(value = "notifyUrl") @NotNull(message = "通知Url不能为空") String notifyUrl, @RequestParam(value = "clientIp") @NotNull(message = "客户端ip不能为空") String clientIp,
@RequestParam(value = "returnUrl",required = false) String returnUrl, @RequestParam(value = "notifyUrl") @NotNull(message = "通知Url不能为空") String notifyUrl,
@RequestParam(value = "returnUrl", required = false) String returnUrl,
// @RequestParam(value = "quitUrl",required = false) String quitUrl, // @RequestParam(value = "quitUrl",required = false) String quitUrl,
@RequestParam(value = "showUrl",required = false) String showUrl, @RequestParam(value = "showUrl", required = false) String showUrl,
// @RequestParam(value = "code",required = false) String code, // @RequestParam(value = "code",required = false) String code,
@RequestParam(value = "createDate",required = true) String createDate, @RequestParam(value = "createDate", required = true) String createDate,
@RequestParam(value = "expireTime",required = true) String expireTime){ @RequestParam(value = "expireTime", required = true) String expireTime) {
long startTime = System.currentTimeMillis(); long startTime = System.currentTimeMillis();
//为什么在js和applet中才需要判断open_id? //为什么在js和applet中才需要判断open_id?
if(payType.equalsIgnoreCase(DragonConstant.PayChannelEnum.WEPAY.getCode())){ if (payType.equalsIgnoreCase(DragonConstant.PayChannelEnum.WEPAY.getCode())) {
if(deviceFrom.equalsIgnoreCase(DragonConstant.DeviceFromEnum.JS.getCode())||deviceFrom.equalsIgnoreCase(DragonConstant.DeviceFromEnum.APPLET.getCode())) { if (deviceFrom.equalsIgnoreCase(DragonConstant.DeviceFromEnum.JS.getCode()) || deviceFrom.equalsIgnoreCase(DragonConstant.DeviceFromEnum.APPLET.getCode())) {
if (StringUtil.isEmpty(openId)) { if (StringUtil.isEmpty(openId)) {
return ResponseDto.failure("微信支付openId不能为空!"); return ResponseDto.failure("微信支付openId不能为空!");
} }
...@@ -103,6 +106,9 @@ public class PayController { ...@@ -103,6 +106,9 @@ public class PayController {
// } // }
dragonPayBaseReqDto.setDetail("正在现场"); dragonPayBaseReqDto.setDetail("正在现场");
dragonPayBaseReqDto.setOrderCode(orderCode); dragonPayBaseReqDto.setOrderCode(orderCode);
if(orderId!=null) {
dragonPayBaseReqDto.setOrderId(orderId);
}
dragonPayBaseReqDto.setClientIp(clientIp); dragonPayBaseReqDto.setClientIp(clientIp);
dragonPayBaseReqDto.setNotifyUrl(notifyUrl); dragonPayBaseReqDto.setNotifyUrl(notifyUrl);
dragonPayBaseReqDto.setReturnUrl(returnUrl); dragonPayBaseReqDto.setReturnUrl(returnUrl);
...@@ -112,7 +118,7 @@ public class PayController { ...@@ -112,7 +118,7 @@ public class PayController {
dragonPayBaseReqDto.setCreateDate(createDate); dragonPayBaseReqDto.setCreateDate(createDate);
dragonPayBaseReqDto.setExpireTime(expireTime); dragonPayBaseReqDto.setExpireTime(expireTime);
ResponseDto<DragonPayBaseRespDto> responseDto = dragonOrdersService.dragonPay(dragonPayBaseReqDto); ResponseDto<DragonPayBaseRespDto> responseDto = dragonOrdersService.dragonPay(dragonPayBaseReqDto);
log.info("PayController->dragonPay->总耗时:{}",(System.currentTimeMillis() - startTime)+"毫秒"); log.info("PayController->dragonPay->总耗时:{}", (System.currentTimeMillis() - startTime) + "毫秒");
return responseDto; return responseDto;
} }
...@@ -123,7 +129,7 @@ public class PayController { ...@@ -123,7 +129,7 @@ public class PayController {
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "code", value = "", example = "PAY202107131522368438531155") @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "code", value = "", example = "PAY202107131522368438531155")
}) })
@ResponseBody @ResponseBody
public ResponseDto<DragonPayOrderQueryRespDto> checkOrder(@RequestParam(value = "code") @NotNull(message = "支付编号不能为空!") String code){ public ResponseDto<DragonPayOrderQueryRespDto> checkOrder(@RequestParam(value = "code") @NotNull(message = "支付编号不能为空!") String code) {
DragonPayOrderQueryRespDto respDto = dragonOrdersService.checkOrderStatusByCode(code); DragonPayOrderQueryRespDto respDto = dragonOrdersService.checkOrderStatusByCode(code);
return ResponseDto.success(respDto); return ResponseDto.success(respDto);
} }
...@@ -135,7 +141,7 @@ public class PayController { ...@@ -135,7 +141,7 @@ public class PayController {
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "code", value = "", example = "PAY202107131522368438531155") @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "code", value = "", example = "PAY202107131522368438531155")
}) })
@ResponseBody @ResponseBody
public ResponseDto<DragonPayOrderQueryRespDto> thirdCheckOrder(@RequestParam(value = "code") @NotNull(message = "支付编号不能为空!") String code){ public ResponseDto<DragonPayOrderQueryRespDto> thirdCheckOrder(@RequestParam(value = "code") @NotNull(message = "支付编号不能为空!") String code) {
DragonPayOrderQueryRespDto respDto = dragonOrdersService.checkOrderStatusByCode(code); DragonPayOrderQueryRespDto respDto = dragonOrdersService.checkOrderStatusByCode(code);
return ResponseDto.success(respDto); return ResponseDto.success(respDto);
} }
...@@ -147,11 +153,11 @@ public class PayController { ...@@ -147,11 +153,11 @@ public class PayController {
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "code", value = "", example = "PAY202107131522368438531155") @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "code", value = "", example = "PAY202107131522368438531155")
}) })
@ResponseBody @ResponseBody
public ResponseDto<Map<String,String>> manulNotify(@RequestParam(value = "code") @NotNull(message = "支付编号不能为空!") String code){ public ResponseDto<Map<String, String>> manulNotify(@RequestParam(value = "code") @NotNull(message = "支付编号不能为空!") String code) {
boolean respDto = dragonOrdersService.manulNotify(code); boolean respDto = dragonOrdersService.manulNotify(code);
Map<String,String> rs = new HashMap<>(); Map<String, String> rs = new HashMap<>();
rs.put("code",code); rs.put("code", code);
rs.put("result",""+respDto); rs.put("result", "" + respDto);
return ResponseDto.success(rs); return ResponseDto.success(rs);
} }
} }
......
...@@ -639,7 +639,7 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService ...@@ -639,7 +639,7 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
// 没有订单号 从redids里面查 // 没有订单号 从redids里面查
dto.setRefundCode(dataUtils.getOrderCode(msg.getString("cp_refundno"))); dto.setRefundCode(dataUtils.getOrderCode(msg.getString("cp_refundno")));
dto.setRefundPrice(msg.getBigDecimal("refund_amount").divide(BigDecimal.valueOf(100)).toString()); dto.setRefundPrice(msg.getBigDecimal("refund_amount").divide(BigDecimal.valueOf(100)).toString());
// SimpleDateFormat sdf = new SimpleDateFormat( " yyyy年MM月dd日 " ); // SimpleDateFormat sdf = new SimpleDateFormat( " yyyy年MM月dd日 " );
// 抖音没有传回时间 // 抖音没有传回时间
dto.setRefundAt(DateUtil.Formatter.yyyyMMddHHmmss.format(LocalDateTime.now())); dto.setRefundAt(DateUtil.Formatter.yyyyMMddHHmmss.format(LocalDateTime.now()));
//抖音回调没有写错误原因 //抖音回调没有写错误原因
......
...@@ -11,7 +11,7 @@ public class DataUtils { ...@@ -11,7 +11,7 @@ public class DataUtils {
@Autowired @Autowired
private RedisUtil redisUtil; private RedisUtil redisUtil;
private long keyExpireTime = 3600*24*7; private long keyExpireTime = 3600*24*30;
public void createPayOrder(String code, DragonOrdersDto ordersDto) { public void createPayOrder(String code, DragonOrdersDto ordersDto) {
redisUtil.set(DragonConstant.REDIS_KET_PAY_CODE + code, ordersDto,keyExpireTime); redisUtil.set(DragonConstant.REDIS_KET_PAY_CODE + code, ordersDto,keyExpireTime);
......
...@@ -213,7 +213,7 @@ public class KylinTicketTimesPartnerServiceImpl implements IKylinTicketTimesPart ...@@ -213,7 +213,7 @@ public class KylinTicketTimesPartnerServiceImpl implements IKylinTicketTimesPart
ticketPartnerVo.setTimesId(createTicketTimesParam.getTicketTimesId()); ticketPartnerVo.setTimesId(createTicketTimesParam.getTicketTimesId());
ticketPartnerVo.setUseEnd(kylinTicketTimesPartnerVo.getUseEnd()); ticketPartnerVo.setUseEnd(kylinTicketTimesPartnerVo.getUseEnd());
ticketPartnerVo.setUseStart(kylinTicketTimesPartnerVo.getUseStart()); ticketPartnerVo.setUseStart(kylinTicketTimesPartnerVo.getUseStart());
mongoSlimeUtils.updateTicketPartnerVo(ticketPartnerVo); mongoSlimeUtils.updateTicketPartnerVoByTimes(ticketPartnerVo);
log.info(UserPathDto.setPartnerData("0", "changeTimes", createTicketTimesParam, "SUCCESS")); log.info(UserPathDto.setPartnerData("0", "changeTimes", createTicketTimesParam, "SUCCESS"));
//JsonUtils.fromJson(doc.toJson(), KylinTicketTimesPartnerVo.class) //JsonUtils.fromJson(doc.toJson(), KylinTicketTimesPartnerVo.class)
return ResponseDto.success(null); return ResponseDto.success(null);
......
...@@ -116,6 +116,15 @@ public class MongoSlimeUtils { ...@@ -116,6 +116,15 @@ public class MongoSlimeUtils {
); );
} }
public void updateTicketPartnerVoByTimes(KylinTicketPartnerVo data) {
Query query = Query.query(Criteria.where("timesId").is(data.getTimesId()));
BasicDBObject objectTicketVo = ObjectUtil.cloneBasicDBObject().append("$set", mongoConverter.convertToMongoType(data));
mongoTemplate.getCollection(KylinTicketPartnerVo.class.getSimpleName()).updateMany(
query.getQueryObject(),
objectTicketVo
);
}
public void submitTicketByTimes(KylinTicketPartnerVo data) { public void submitTicketByTimes(KylinTicketPartnerVo data) {
Query query = Query.query(Criteria.where("timesId").is(data.getTimesId()).and("status").nin(-2, 7)); Query query = Query.query(Criteria.where("timesId").is(data.getTimesId()).and("status").nin(-2, 7));
BasicDBObject objectTicketVo = ObjectUtil.cloneBasicDBObject().append("$set", mongoConverter.convertToMongoType(data)); BasicDBObject objectTicketVo = ObjectUtil.cloneBasicDBObject().append("$set", mongoConverter.convertToMongoType(data));
......
package com.liquidnet.service.sweet.service.impl;
import cn.binarywang.wx.miniapp.api.WxMaService;
import cn.binarywang.wx.miniapp.bean.WxMaSubscribeMessage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.liquidnet.commons.lang.util.CollectionUtil;
import com.liquidnet.service.sweet.config.WechatMaConfigure;
import com.liquidnet.service.sweet.entity.SweetAppletSubMsg;
import com.liquidnet.service.sweet.mapper.SweetAppletSubMsgMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
/**
* <p>
* 小程序订阅消息记录表 服务实现类
* </p>
*
* @author jiangxiulong
* @since 2021-11-22
*/
@Service
@Slf4j
public class SweetAppletSubMsgSendServiceImpl {
@Autowired
private SweetAppletSubMsgMapper subMsgMapper;
@Autowired
WechatMaConfigure wechatMaConfigure;
@Async
public void toSend(List<SweetAppletSubMsg> msgList, String targetId, String title, String timeStart) {
ArrayList<String> msgIdList = CollectionUtil.arrayListString();
if (!CollectionUtils.isEmpty(msgList)) {
for (SweetAppletSubMsg info : msgList) {
try {
String msgId = info.getMsgId();
// 发送订阅消息接口
boolean subMessage = sendSubMessage(info, targetId, title, timeStart);
if (subMessage) {
msgIdList.add(msgId);
}
} catch (Exception e) {
// log.error("小程序演出订阅提醒消息处理异常", e);
}
}
if (!CollectionUtils.isEmpty(msgIdList)) {
SweetAppletSubMsg update = new SweetAppletSubMsg();
update.setIsPush(2);
update.setUpdatedAt(LocalDateTime.now());
subMsgMapper.update(
update,
Wrappers.lambdaUpdate(SweetAppletSubMsg.class)
.in(SweetAppletSubMsg::getMsgId, msgIdList)
);
}
}
}
/**
* 微信小程序推送订阅消息
*/
private boolean sendSubMessage(SweetAppletSubMsg info, String performancesId, String title, String timeStart) {
WxMaSubscribeMessage subscribeMessage = new WxMaSubscribeMessage();
subscribeMessage.setPage("pages/webview?query=showdetails&id=".concat(performancesId));
subscribeMessage.setTemplateId(info.getTemplateId());
subscribeMessage.setToUser(info.getOpenId());
ArrayList<WxMaSubscribeMessage.MsgData> wxMaSubscribeData = new ArrayList<>();
WxMaSubscribeMessage.MsgData wxMaSubscribeData1 = new WxMaSubscribeMessage.MsgData();
wxMaSubscribeData1.setName("thing1");
wxMaSubscribeData1.setValue(title);
//每个参数 存放到大集合中
wxMaSubscribeData.add(wxMaSubscribeData1);
// 第二个内容:用户昵称
WxMaSubscribeMessage.MsgData wxMaSubscribeData2 = new WxMaSubscribeMessage.MsgData();
wxMaSubscribeData2.setName("time2");
wxMaSubscribeData2.setValue(timeStart);
wxMaSubscribeData.add(wxMaSubscribeData2);
// 第三个内容:领取方式
WxMaSubscribeMessage.MsgData wxMaSubscribeData3 = new WxMaSubscribeMessage.MsgData();
wxMaSubscribeData3.setName("thing3");
wxMaSubscribeData3.setValue("您关注的演出活动门票即将开售,请准备购票");
wxMaSubscribeData.add(wxMaSubscribeData3);
subscribeMessage.setData(wxMaSubscribeData);
try {
//获取微信小程序配置:
WxMaService wxService = wechatMaConfigure.getWxMaService(info.getAppletType());
//进行推送
wxService.getMsgService().sendSubscribeMsg(subscribeMessage);
return true;
} catch (Exception e) {
// log.error("sendSubMessageException e{}", e);
}
return false;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment