mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-07-03 21:48:13 +08:00
update
This commit is contained in:
@@ -350,8 +350,8 @@ public class PayController extends BaseController {
|
||||
public void adapayCallback(HttpServletRequest request) {
|
||||
try {
|
||||
orderService.adapayCallback(request);
|
||||
// String type = request.getParameter("type");
|
||||
// logger.info("汇付回调type:{}", type);
|
||||
String type = request.getParameter("type");
|
||||
logger.info("汇付回调type:{}", type);
|
||||
} catch (Exception e) {
|
||||
logger.error("汇付支付回调失败 error", e);
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ import com.jsowell.common.core.page.PageResponse;
|
||||
import com.jsowell.common.core.redis.RedisCache;
|
||||
import com.jsowell.common.enums.InvoiceRecordEnum;
|
||||
import com.jsowell.common.enums.MemberWalletEnum;
|
||||
import com.jsowell.common.enums.adapay.AdapayEventEnum;
|
||||
import com.jsowell.common.enums.ykc.*;
|
||||
import com.jsowell.common.exception.BusinessException;
|
||||
import com.jsowell.common.util.AdapayUtil;
|
||||
@@ -1325,10 +1326,17 @@ public class OrderService {
|
||||
return;
|
||||
}
|
||||
|
||||
if (StringUtils.equals("payment.succeeded", type)) {
|
||||
if (StringUtils.equals(AdapayEventEnum.payment_succeeded.getValue(), type)) {
|
||||
paymentSucceeded(data);
|
||||
}
|
||||
|
||||
// switch (type) {
|
||||
// case AdapayEventEnum.payment_succeeded.getValue():
|
||||
//
|
||||
// }
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void paymentSucceeded(String data) throws JsonProcessingException {
|
||||
|
||||
@@ -2145,22 +2145,22 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
||||
// 微信支付
|
||||
dto.setOrderBasicInfo(orderInfo);
|
||||
|
||||
Map<String, Object> weixinMap = null;
|
||||
Map<String, Object> weixinMap = adapayPayOrder(dto);
|
||||
// 从字典中获取使用汇付支付的站点
|
||||
List<SysDictData> adapay_station = DictUtils.getDictCache("adapay_station");
|
||||
List<String> stationIdList = Lists.newArrayList();
|
||||
if (CollectionUtils.isNotEmpty(adapay_station)) {
|
||||
for (SysDictData sysDictData : adapay_station) {
|
||||
stationIdList.add(sysDictData.getDictValue());
|
||||
}
|
||||
}
|
||||
if (stationIdList.contains(orderInfo.getStationId())) {
|
||||
logger.info("该站点:{}在字典中配置了使用汇付支付", orderInfo.getStationId());
|
||||
weixinMap = adapayPayOrder(dto);
|
||||
} else {
|
||||
logger.info("该站点:{}使用微信支付", orderInfo.getStationId());
|
||||
weixinMap = wechatPayOrder(dto);
|
||||
}
|
||||
// List<SysDictData> adapay_station = DictUtils.getDictCache("adapay_station");
|
||||
// List<String> stationIdList = Lists.newArrayList();
|
||||
// if (CollectionUtils.isNotEmpty(adapay_station)) {
|
||||
// for (SysDictData sysDictData : adapay_station) {
|
||||
// stationIdList.add(sysDictData.getDictValue());
|
||||
// }
|
||||
// }
|
||||
// if (stationIdList.contains(orderInfo.getStationId())) {
|
||||
// logger.info("该站点:{}在字典中配置了使用汇付支付", orderInfo.getStationId());
|
||||
// weixinMap = adapayPayOrder(dto);
|
||||
// } else {
|
||||
// logger.info("该站点:{}使用微信支付", orderInfo.getStationId());
|
||||
// weixinMap = wechatPayOrder(dto);
|
||||
// }
|
||||
|
||||
// 返回微信支付参数
|
||||
resultMap.put("weixinMap", weixinMap);
|
||||
|
||||
Reference in New Issue
Block a user