updates 抖音新增体育小程序
This commit is contained in:
parent
f06a3aaf2e
commit
238fecae7c
|
|
@ -12,6 +12,7 @@ import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.common.system.query.QueryGenerator;
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
import org.jeecg.common.util.AssertUtils;
|
import org.jeecg.common.util.AssertUtils;
|
||||||
import org.jeecg.modules.mini.douyin.config.DouYinConfig;
|
import org.jeecg.modules.mini.douyin.config.DouYinConfig;
|
||||||
|
import org.jeecg.modules.mini.douyin.config.DouYinTiyuConfig;
|
||||||
import org.jeecg.modules.mini.douyin.util.DouYinUtil;
|
import org.jeecg.modules.mini.douyin.util.DouYinUtil;
|
||||||
import org.jeecg.modules.yx.constant.YxConstant;
|
import org.jeecg.modules.yx.constant.YxConstant;
|
||||||
import org.jeecg.modules.yx.entity.YxOrder;
|
import org.jeecg.modules.yx.entity.YxOrder;
|
||||||
|
|
@ -46,6 +47,8 @@ public class YxOrderController extends JeecgController<YxOrder, IYxOrderService>
|
||||||
private IYxOrderService yxOrderService;
|
private IYxOrderService yxOrderService;
|
||||||
@Resource
|
@Resource
|
||||||
private DouYinConfig douYinConfig;
|
private DouYinConfig douYinConfig;
|
||||||
|
@Resource
|
||||||
|
private DouYinTiyuConfig douYinTiyuConfig;
|
||||||
/**
|
/**
|
||||||
* 分页列表查询
|
* 分页列表查询
|
||||||
*
|
*
|
||||||
|
|
@ -123,7 +126,21 @@ public class YxOrderController extends JeecgController<YxOrder, IYxOrderService>
|
||||||
BigDecimal refundAmount = yxOrder.getRefundAmount();
|
BigDecimal refundAmount = yxOrder.getRefundAmount();
|
||||||
BigDecimal multiply = refundAmount.multiply(YxConstant.bigDecimal100);
|
BigDecimal multiply = refundAmount.multiply(YxConstant.bigDecimal100);
|
||||||
long refundAmountLong = multiply.longValue();
|
long refundAmountLong = multiply.longValue();
|
||||||
String refundOverMessage = DouYinUtil.orderRefund(order.getOrderCode(), douYinConfig.getAppId(), refundAmountLong,yxOrder.getRefundReason(), douYinConfig.getSalt(), douYinConfig.getRefundNotifyUrl());
|
|
||||||
|
String appId,notifyUrl,salt,refundNotifyUrl;
|
||||||
|
if ("体育小程序".equals(order.getProgramType())) {
|
||||||
|
appId = douYinTiyuConfig.getAppId();
|
||||||
|
notifyUrl = douYinTiyuConfig.getNotifyUrl();
|
||||||
|
salt = douYinTiyuConfig.getSalt();
|
||||||
|
refundNotifyUrl = douYinTiyuConfig.getRefundNotifyUrl();
|
||||||
|
}else{
|
||||||
|
appId = douYinConfig.getAppId();
|
||||||
|
notifyUrl = douYinConfig.getNotifyUrl();
|
||||||
|
salt = douYinConfig.getSalt();
|
||||||
|
refundNotifyUrl = douYinConfig.getRefundNotifyUrl();
|
||||||
|
}
|
||||||
|
|
||||||
|
String refundOverMessage = DouYinUtil.orderRefund(order.getOrderCode(), appId, refundAmountLong,yxOrder.getRefundReason(), salt, refundNotifyUrl);
|
||||||
if (StringUtils.isNotBlank(refundOverMessage)) {
|
if (StringUtils.isNotBlank(refundOverMessage)) {
|
||||||
// 退款失败
|
// 退款失败
|
||||||
return Result.error(refundOverMessage);
|
return Result.error(refundOverMessage);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue