Compare commits
5 Commits
82692fecaf
...
0aafa2fd7c
Author | SHA1 | Date |
---|---|---|
perry | 0aafa2fd7c | |
perry | 61b36bdca3 | |
perry | 8aa259531a | |
TianYu | 1377880c54 | |
TianYu | 7a2b8e64a3 |
|
@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.shop.controller.admin.notify;
|
||||||
|
|
||||||
import cn.hutool.core.util.NumberUtil;
|
import cn.hutool.core.util.NumberUtil;
|
||||||
import cn.hutool.json.JSONUtil;
|
import cn.hutool.json.JSONUtil;
|
||||||
|
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
||||||
import cn.iocoder.yudao.module.shop.dal.dataobject.recharge.RechargeOrderDO;
|
import cn.iocoder.yudao.module.shop.dal.dataobject.recharge.RechargeOrderDO;
|
||||||
import cn.iocoder.yudao.module.shop.dal.mysql.recharge.RechargeOrderMapper;
|
import cn.iocoder.yudao.module.shop.dal.mysql.recharge.RechargeOrderMapper;
|
||||||
import cn.iocoder.yudao.module.shop.service.order.StoreOrderService;
|
import cn.iocoder.yudao.module.shop.service.order.StoreOrderService;
|
||||||
|
@ -115,6 +116,7 @@ public class WxPayNotifyController {
|
||||||
* @return:
|
* @return:
|
||||||
*/
|
*/
|
||||||
@PostMapping("/refund_notify")
|
@PostMapping("/refund_notify")
|
||||||
|
@TenantIgnore
|
||||||
public String wxPayRefundNotify(@RequestBody String jsonData, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
public String wxPayRefundNotify(@RequestBody String jsonData, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||||
// 支付结果通用通知文档: https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=9_7
|
// 支付结果通用通知文档: https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=9_7
|
||||||
// 支付成功结果通知
|
// 支付成功结果通知
|
||||||
|
@ -134,18 +136,20 @@ public class WxPayNotifyController {
|
||||||
BigDecimal payerTotal = NumberUtil.div(result.getAmount().getPayerTotal() + "", "100", 2);
|
BigDecimal payerTotal = NumberUtil.div(result.getAmount().getPayerTotal() + "", "100", 2);
|
||||||
// 处理相关逻辑
|
// 处理相关逻辑
|
||||||
RechargeOrderDO orderDO = rechargeOrderMapper.selectOne(Wrappers.<RechargeOrderDO>lambdaQuery().eq(RechargeOrderDO::getOrderId, result.getOutTradeNo()));
|
RechargeOrderDO orderDO = rechargeOrderMapper.selectOne(Wrappers.<RechargeOrderDO>lambdaQuery().eq(RechargeOrderDO::getOrderId, result.getOutTradeNo()));
|
||||||
if (payerTotal.compareTo(orderDO.getPayPrice()) != 0) {
|
if(orderDO!=null){
|
||||||
log.error("支付金额不匹配,订单实际支付金额:{},微信入参验证金额:{}", orderDO.getPayPrice(), payerTotal);
|
if (payerTotal.compareTo(orderDO.getPayPrice()) != 0) {
|
||||||
return "failure";
|
log.error("支付金额不匹配,订单实际支付金额:{},微信入参验证金额:{}", orderDO.getPayPrice(), payerTotal);
|
||||||
|
return "failure";
|
||||||
|
}
|
||||||
|
orderDO.setRefundStatus(2);
|
||||||
|
orderDO.setPaid(2);
|
||||||
|
rechargeOrderMapper.updateById(orderDO);
|
||||||
|
//删除提报记录
|
||||||
|
phoneRecordService.deletePhoneGear(orderDO.getOrderId());
|
||||||
|
// 修改订单状态
|
||||||
|
// 写入
|
||||||
|
response.setStatus(HttpServletResponse.SC_OK);
|
||||||
}
|
}
|
||||||
orderDO.setRefundStatus(2);
|
|
||||||
orderDO.setPaid(2);
|
|
||||||
rechargeOrderMapper.updateById(orderDO);
|
|
||||||
//删除提报记录
|
|
||||||
phoneRecordService.deletePhoneGear(orderDO.getOrderId());
|
|
||||||
// 修改订单状态
|
|
||||||
// 写入
|
|
||||||
response.setStatus(HttpServletResponse.SC_OK);
|
|
||||||
return "success";
|
return "success";
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<view class="text">可享一年返回<span>{{item.refundAmount}}元</span>话费</view>
|
<view class="text">可享一年返回<span>{{item.refundAmount}}元</span>话费</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="tips">
|
<view class="tips">
|
||||||
三个活动可同时参与,每个手机号仅限一次,最高可反<span>1920元</span>话费!!!
|
三个活动可同时参与,每个手机号仅限一次,最高可返<span>{{total}}元</span>话费!!!
|
||||||
</view>
|
</view>
|
||||||
<view class="service-phone">{{tenantInfo.serviceMobile}}</view>
|
<view class="service-phone">{{tenantInfo.serviceMobile}}</view>
|
||||||
<view class="tenant-info-wrap">
|
<view class="tenant-info-wrap">
|
||||||
|
@ -55,7 +55,16 @@
|
||||||
isHideBtn: false
|
isHideBtn: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: mapGetters(['isLogin', 'uid', 'userInfo', 'tenantId', 'tenantInfo']),
|
computed:{
|
||||||
|
...mapGetters(['isLogin', 'uid', 'userInfo', 'tenantId', 'tenantInfo']),
|
||||||
|
total: function(){
|
||||||
|
let _total = 0
|
||||||
|
for (let active of this.activityList) {
|
||||||
|
_total+= parseInt(active.refundAmount)
|
||||||
|
}
|
||||||
|
return _total
|
||||||
|
},
|
||||||
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
if (!this.isLogin) {
|
if (!this.isLogin) {
|
||||||
toLogin()
|
toLogin()
|
||||||
|
|
Loading…
Reference in New Issue