From 8b5f7469e4470e4b89f1659e1dc361dff5ea1b09 Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期三, 11 九月 2024 09:52:54 +0800
Subject: [PATCH] 修改
---
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TShoppingOrderServiceImpl.java | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TShoppingOrderServiceImpl.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TShoppingOrderServiceImpl.java
index 8013e2b..cb41922 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TShoppingOrderServiceImpl.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TShoppingOrderServiceImpl.java
@@ -44,6 +44,7 @@
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.SimpleDateFormat;
+import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*;
@@ -360,9 +361,10 @@
if(1 == paymentType){
WxPaymentRefundModel model = new WxPaymentRefundModel();
model.setOut_trade_no(shoppingOrder.getCode());
+ model.setTransaction_id(shoppingOrder.getSerialNumber());
model.setOut_refund_no(shoppingOrderRefund.getRefundCode());
model.setReason("取消订单");
- model.setNotify_url("http://127.0.0.1:9000/order/t-shopping-order/cancelShoppingOrderWxRefund");
+ model.setNotify_url("http://221.182.45.100:9000/order/t-shopping-order/cancelShoppingOrderWxRefund");
WxPaymentRefundModel.RefundAmount amount = new WxPaymentRefundModel.RefundAmount();
amount.setRefund(refundAmount.multiply(new BigDecimal(100)).intValue());
amount.setTotal(shoppingOrder.getPaymentAmount().multiply(new BigDecimal(100)).intValue());
@@ -405,6 +407,7 @@
public AjaxResult cancelShoppingOrderWxRefund(String out_refund_no, String refund_id, String refund_status, String success_time) {
if("SUCCESS".equals(refund_status)){
TShoppingOrderRefund one = shoppingOrderRefundService.getOne(new LambdaQueryWrapper<TShoppingOrderRefund>().eq(TShoppingOrderRefund::getRefundCode, out_refund_no));
+ one.setRefundStatus(2);
one.setRefundSerialNumber(refund_id);
one.setRefundTime(LocalDateTime.parse(success_time, DateTimeFormatter.ofPattern("yyyy-MM-DDTHH:mm:ss+TIMEZONE")));
shoppingOrderRefundService.updateById(one);
@@ -507,6 +510,7 @@
PageInfo<TShoppingOrder> pageInfo = new PageInfo<>(query.getPageCurr(),query.getPageSize());
List<TShoppingOrder> list = this.baseMapper.pageList(pageInfo,query,startTime1,startTime2);
for (TShoppingOrder tShoppingOrder : list) {
+ tShoppingOrder.setUid(tShoppingOrder.getId().toString());
switch (tShoppingOrder.getOrderType()){
case 1:
TGoods data = goodsClient.getGoodsById(tShoppingOrder.getGoodsId()).getData();
@@ -532,4 +536,16 @@
pageInfo.setRecords(list);
return pageInfo;
}
+
+ @Override
+ public List<SixShopDto> sixBefore(LocalDate sixBefore, Integer status) {
+ return this.baseMapper.sixBefore(sixBefore,status);
+ }
+
+ @Override
+ public BigDecimal getSumAmount(LocalDate sixBefore) {
+ return this.baseMapper.getSumAmount(sixBefore);
+ }
+
+
}
--
Gitblit v1.7.1