mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
update
This commit is contained in:
@@ -169,49 +169,6 @@ public class OrderService {
|
||||
*/
|
||||
public Map<String, Object> payOrder(PayOrderDTO dto) throws Exception {
|
||||
Map<String, Object> resultMap = orderBasicInfoService.payOrder(dto);
|
||||
|
||||
// OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByOrderCode(dto.getOrderCode());
|
||||
// if (orderInfo == null) {
|
||||
// throw new BusinessException(ReturnCodeEnum.CODE_QUERY_ORDER_NULL_ERROR);
|
||||
// }
|
||||
// if (!StringUtils.equals(orderInfo.getPayStatus(), "0")) {
|
||||
// // 订单已支付
|
||||
// throw new BusinessException(ReturnCodeEnum.CODE_ORDER_IS_NOT_TO_BE_PAID_ERROR);
|
||||
// }
|
||||
// Map<String, Object> resultMap = Maps.newHashMap();
|
||||
// if (StringUtils.equals(dto.getPayMode(), OrderPayModeEnum.PAYMENT_OF_BALANCE.getValue())) {
|
||||
// // 余额支付
|
||||
// balancePayOrder(dto);
|
||||
// } else if (StringUtils.equals(dto.getPayMode(), OrderPayModeEnum.PAYMENT_OF_WECHATPAY.getValue())) {
|
||||
// // 微信支付
|
||||
// dto.setOrderBasicInfo(orderInfo);
|
||||
//
|
||||
// // 从字典中获取使用汇付支付的站点
|
||||
// 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());
|
||||
// }
|
||||
// }
|
||||
// Map<String, Object> weixinMap;
|
||||
// if (stationIdList.contains(orderInfo.getStationId())) {
|
||||
// log.info("该站点:{}在字典中配置了使用汇付支付", orderInfo.getStationId());
|
||||
// weixinMap = adapayPayOrder(dto);
|
||||
// } else {
|
||||
// log.info("该站点:{}使用微信支付", orderInfo.getStationId());
|
||||
// weixinMap = wechatPayOrder(dto);
|
||||
// }
|
||||
//
|
||||
// // 返回微信支付参数
|
||||
// resultMap.put("weixinMap", weixinMap);
|
||||
// } else if (StringUtils.equals(dto.getPayMode(), OrderPayModeEnum.PAYMENT_OF_ALIPAY.getValue())) { // 支付宝支付
|
||||
// // TODO 返回支付宝支付参数
|
||||
// } else if (StringUtils.equals(dto.getPayMode(), OrderPayModeEnum.PAYMENT_OF_WHITELIST.getValue())) { // 白名单支付
|
||||
// // 白名单支付可以直接调支付回调方法
|
||||
// dto.setPayAmount(new BigDecimal("500"));
|
||||
// whiteListPayOrder(dto);
|
||||
// }
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
|
||||
@@ -1114,6 +1114,17 @@ public class SpringBootTestController {
|
||||
// } else {
|
||||
// System.out.println("更新余额失败");
|
||||
// }
|
||||
|
||||
Map<String, Object> refundParams = new HashMap<>(2);
|
||||
refundParams.put("payment_id", "002212023071011321210524320114191904768");
|
||||
// refundParams.put("refund_id", refund_id);
|
||||
// refundParams.put("refund_order_no", refund_order_no);
|
||||
try {
|
||||
Map<String, Object> refund = Refund.query(refundParams);
|
||||
System.out.println(refund);
|
||||
} catch (BaseAdaPayException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user