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

Commit 50628455 authored by zhengfuxin's avatar zhengfuxin

修改抖音 bug

parent 7217b3ac
......@@ -168,17 +168,19 @@ public abstract class AbstractDouYinPayStrategy implements IDouYinpayStrategy {
@Override
public DragonPayOrderQueryRespDto checkOrderStatus(String code) {
DragonOrdersDto ordersDto = dataUtils.getPayOrderByCode(code);
Map<String, Object> resultMap = douYinPayBiz.tradeQuery(code,this.getAppid());
Map<String, Object> resultMaps = douYinPayBiz.tradeQuery(code,this.getAppid());
DragonPayOrderQueryRespDto respDto = dragonPayBiz.buildPayOrderQueryRespDto(ordersDto);
Map<String, Object> resultMap= (Map<String, Object>) resultMaps.get("payment_info");
Object orderStatus = resultMap.get("order_status");
// 查询失败
/* // 查询失败
if (null == orderStatus || "FAIL".equals(orderStatus)) {
throw new LiquidnetServiceException(DragonErrorCodeEnum.TRADE_DOUYINPAY_QUERY_ERROR.getCode(),DragonErrorCodeEnum.TRADE_DOUYINPAY_QUERY_ERROR.getMessage());
}
}*/
// 当trade_state为SUCCESS时才返回result_code
if ("SUCCESS".equals(resultMap.get("trade_state"))) {
if ("SUCCESS".equals(orderStatus)) {
respDto.setStatus(Integer.valueOf(DragonConstant.PayStatusEnum.STATUS_PAID.getCode()));
}else {
respDto.setStatus(Integer.valueOf(DragonConstant.PayStatusEnum.STATUS_PAY_FAIL.getCode()));
}
return respDto;
}
......
......@@ -113,6 +113,6 @@ public class PayChannelStrategyDouYinImpl extends AbstractPayChannelStrategyImpl
public DragonPayOrderQueryRespDto checkOrderStatus(String code) {
DragonOrdersDto ordersDto = dataUtils.getPayOrderByCode(code);
DragonPayOrderQueryRespDto respDto = douYinayStrategyContext.getStrategy(DragonConstant.PayTypeEnum.getEnumByCode(ordersDto.getPaymentType()).getDeviceFrom()).checkOrderStatus(code);
return null;
return respDto;
}
}
......@@ -492,11 +492,11 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
//抖音回调没有写错误原因
dto.setRefundError("");
log.info("SEND DOUYINPAY NOTIFTURL = " + JSON.toJSONString(dto));
//sendNotifyUrl(dto, null);
sendNotifyUrl(dto, null);
//创建退款订单日志
mqHandleUtil.sendMySqlRedis(
SqlMapping.get("dragon_order_refund_log.insert"),
new Object[]{msg.getString("cp_refundno"), "", JSON.toJSONString(jsonObject), nowTime, nowTime},
new Object[]{msg.getString("cp_refundno"), "APPLETDOUYIN", JSON.toJSONString(jsonObject), nowTime, nowTime},
DragonConstant.MysqlRedisQueueEnum.DRAGON_REFUND_KEY.getCode()
);
//修改订单 状态
......@@ -539,7 +539,7 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
//接受到返回信息
String json = EntityUtils.toString(response.getEntity(), "UTF-8");
EntityUtils.consume(entity);
log.info("查询抖音退款返回值:{}",json);
log.info("查询抖音退款查询返回值:{}",json);
//解析、如果成功,则更新
LocalDateTime nowTime = LocalDateTime.now();
JSONObject jsonObject = JSONObject.parseObject(json);
......@@ -562,7 +562,7 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
//抖音回调没有写错误原因
dto.setRefundError("");
log.info("SEND DOUYINPAY NOTIFTURL = " + JSON.toJSONString(dto));
sendNotifyUrl(dto, null);
// sendNotifyUrl(dto, null);
//创建退款订单日志
mqHandleUtil.sendMySqlRedis(
SqlMapping.get("dragon_order_refund_log.insert"),
......
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