优化
This commit is contained in:
@ -108,6 +108,7 @@ public class PayNotifyController {
|
|||||||
orderService.notifyOrder(channelId, notify);
|
orderService.notifyOrder(channelId, notify);
|
||||||
String re = notifyRedisTemplate.opsForValue().get("ADD" + notify.getOutTradeNo());
|
String re = notifyRedisTemplate.opsForValue().get("ADD" + notify.getOutTradeNo());
|
||||||
if(StringUtils.isNotBlank(re)){
|
if(StringUtils.isNotBlank(re)){
|
||||||
|
log.info("开始进行余额增加,获取的金额:"+re);
|
||||||
cardApi.recharge(new BigDecimal(re));
|
cardApi.recharge(new BigDecimal(re));
|
||||||
notifyRedisTemplate.delete("ADD" + notify.getOutTradeNo());
|
notifyRedisTemplate.delete("ADD" + notify.getOutTradeNo());
|
||||||
}
|
}
|
||||||
|
@ -174,7 +174,8 @@ public class PayOrderServiceImpl implements PayOrderService {
|
|||||||
// 订单相关字段
|
// 订单相关字段
|
||||||
.setPrice(order.getPrice()).setExpireTime(order.getExpireTime());
|
.setPrice(order.getPrice()).setExpireTime(order.getExpireTime());
|
||||||
PayOrderRespDTO unifiedOrderResp = client.unifiedOrder(unifiedOrderReqDTO);
|
PayOrderRespDTO unifiedOrderResp = client.unifiedOrder(unifiedOrderReqDTO);
|
||||||
|
payRedis.opsForValue().set("ADD"+unifiedOrderReqDTO.getOutTradeNo(),unifiedOrderReqDTO.getPrice().toString());
|
||||||
|
log.info("REDISID:"+"ADD"+unifiedOrderReqDTO.getOutTradeNo()+" 总金额:"+unifiedOrderReqDTO.getPrice().toString());
|
||||||
// 4. 如果调用直接支付成功,则直接更新支付单状态为成功。例如说:付款码支付,免密支付时,就直接验证支付成功
|
// 4. 如果调用直接支付成功,则直接更新支付单状态为成功。例如说:付款码支付,免密支付时,就直接验证支付成功
|
||||||
if (unifiedOrderResp != null) {
|
if (unifiedOrderResp != null) {
|
||||||
getSelf().notifyOrder(channel, unifiedOrderResp);
|
getSelf().notifyOrder(channel, unifiedOrderResp);
|
||||||
@ -317,8 +318,6 @@ public class PayOrderServiceImpl implements PayOrderService {
|
|||||||
// .setChannelUserId(payOrderDO.getChannelUserId());
|
// .setChannelUserId(payOrderDO.getChannelUserId());
|
||||||
// divideService.createDivide(divideSaveReqVO);
|
// divideService.createDivide(divideSaveReqVO);
|
||||||
|
|
||||||
payRedis.opsForValue().set("ADD"+payOrderDO.getNo(),payOrderDO.getPrice().toString());
|
|
||||||
|
|
||||||
WxOrderSaveReqVO wxOrderSaveReqVO = new WxOrderSaveReqVO();
|
WxOrderSaveReqVO wxOrderSaveReqVO = new WxOrderSaveReqVO();
|
||||||
wxOrderSaveReqVO.setChannelId(channel.getId())
|
wxOrderSaveReqVO.setChannelId(channel.getId())
|
||||||
.setChannelCode(channel.getCode())
|
.setChannelCode(channel.getCode())
|
||||||
|
Reference in New Issue
Block a user