From 85ed5ccbecbcb6e129fb9e5d08c9f7feb157a29c Mon Sep 17 00:00:00 2001
From: liujie <1793218484@qq.com>
Date: 星期一, 15 十二月 2025 11:35:43 +0800
Subject: [PATCH] 后台接口

---
 ruoyi-system/src/main/java/com/ruoyi/system/service/TPhysicalGoodsOrderService.java          |    4 
 ruoyi-system/src/main/resources/mapper/system/TRefundApplicationMapper.xml                   |   10 
 ruoyi-system/src/main/java/com/ruoyi/system/mapper/TPhysicalGoodsOrderMapper.java            |    5 
 ruoyi-system/src/main/java/com/ruoyi/system/model/TPhysicalGoodsOrder.java                   |   12 +
 ruoyi-system/src/main/java/com/ruoyi/system/mapper/TRefundApplicationMapper.java             |    4 
 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TRefundApplicationServiceImpl.java  |    8 
 ruoyi-system/src/main/java/com/ruoyi/system/service/TRefundApplicationService.java           |    4 
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TRefundApplicationController.java     |   50 ++++
 ruoyi-system/src/main/java/com/ruoyi/system/model/TBigGiftPackageOrder.java                  |   22 +
 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TPhysicalGoodsOrderServiceImpl.java |    8 
 ruoyi-system/src/main/java/com/ruoyi/system/config/IcbcConfig.java                           |  272 ++++++++++++------------
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TPhysicalGoodsOrderController.java    |   42 +++
 ruoyi-system/src/main/java/com/ruoyi/system/utils/ICBCPayUtil.java                           |  160 +++++++-------
 ruoyi-system/src/main/resources/mapper/system/TPhysicalGoodsOrderMapper.xml                  |   12 +
 14 files changed, 388 insertions(+), 225 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TPhysicalGoodsOrderController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TPhysicalGoodsOrderController.java
index 66552f2..b0771e0 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TPhysicalGoodsOrderController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TPhysicalGoodsOrderController.java
@@ -1,10 +1,14 @@
 package com.ruoyi.web.controller.api;
 
 
+import cn.afterturn.easypoi.excel.ExcelExportUtil;
+import cn.afterturn.easypoi.excel.entity.ExportParams;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.ruoyi.common.annotation.Log;
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.WebUtils;
+import com.ruoyi.system.model.TBigGiftPackageOrder;
 import com.ruoyi.system.model.TPhysicalGoods;
 import com.ruoyi.system.model.TPhysicalGoodsOrder;
 import com.ruoyi.system.query.BigGiftPackageQuery;
@@ -13,7 +17,14 @@
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.apache.poi.ss.formula.functions.T;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.net.URLEncoder;
+import java.util.List;
 
 /**
  * <p>
@@ -83,6 +94,37 @@
     }
 
 
+    @ApiOperation(value = "实物商品订单导出")
+    @PostMapping(value = "/export")
+    @Log(title = "实物商品订单导出-导出", businessType = BusinessType.EXPORT)
+    public void export(@RequestBody BigGiftPackageQuery query){
+
+        List<TPhysicalGoodsOrder> list = tPhysicalGoodsOrderService.export(query);
+        Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), TPhysicalGoodsOrder.class, list);
+        HttpServletResponse response = WebUtils.response();
+        assert response != null;
+        response.setContentType("application/vnd.ms-excel");
+        response.setCharacterEncoding("utf-8");
+        ServletOutputStream outputStream = null;
+        try {
+            String fileName = URLEncoder.encode("实物商品订单导出信息.xls", "utf-8");
+            response.setHeader("Content-Disposition", "attachment;filename=" + fileName);
+            response.setContentType("application/vnd.ms-excel;charset=UTF-8");
+            response.setHeader("Pragma", "no-cache");
+            response.setHeader("Cache-Control", "no-cache");
+            outputStream = response.getOutputStream();
+            workbook.write(outputStream);
+        } catch (IOException e) {
+            e.printStackTrace();
+        } finally {
+            try {
+                outputStream.close();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+    }
+
 
 }
 
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TRefundApplicationController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TRefundApplicationController.java
index 0ae4826..ea0a100 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TRefundApplicationController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TRefundApplicationController.java
@@ -1,17 +1,18 @@
 package com.ruoyi.web.controller.api;
 
 
+import cn.afterturn.easypoi.excel.ExcelExportUtil;
+import cn.afterturn.easypoi.excel.entity.ExportParams;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.ruoyi.common.annotation.Log;
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.WebUtils;
 import com.ruoyi.framework.web.service.TokenService;
 import com.ruoyi.system.dto.RefundAuditDto;
-import com.ruoyi.system.model.TAppUser;
-import com.ruoyi.system.model.TBigGiftPackage;
-import com.ruoyi.system.model.TBigGiftPackageOrder;
-import com.ruoyi.system.model.TRefundApplication;
+import com.ruoyi.system.export.TPhysicalGoodsImport;
+import com.ruoyi.system.model.*;
 import com.ruoyi.system.query.BigGiftPackageQuery;
 import com.ruoyi.system.service.TAppUserService;
 import com.ruoyi.system.service.TBigGiftPackageOrderService;
@@ -20,9 +21,17 @@
 import com.ruoyi.system.vo.TRefundApplicationVo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.springframework.web.bind.annotation.*;
 
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.net.URLEncoder;
 import java.time.LocalDateTime;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
 
 /**
  * <p>
@@ -128,5 +137,38 @@
         return R.ok("操作成功");
     }
 
+    @ApiOperation(value = "退款申请导出")
+    @PostMapping(value = "/export")
+    @Log(title = "退款申请-导出", businessType = BusinessType.EXPORT)
+    public void exportRegistration(@RequestBody BigGiftPackageQuery query){
+
+        List<TBigGiftPackageOrder> list = tRefundApplicationService.pageRefundExportList(query);
+
+
+        Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), TBigGiftPackageOrder.class, list);
+        HttpServletResponse response = WebUtils.response();
+        assert response != null;
+        response.setContentType("application/vnd.ms-excel");
+        response.setCharacterEncoding("utf-8");
+        ServletOutputStream outputStream = null;
+        try {
+            String fileName = URLEncoder.encode("退款申请导出信息.xls", "utf-8");
+            response.setHeader("Content-Disposition", "attachment;filename=" + fileName);
+            response.setContentType("application/vnd.ms-excel;charset=UTF-8");
+            response.setHeader("Pragma", "no-cache");
+            response.setHeader("Cache-Control", "no-cache");
+            outputStream = response.getOutputStream();
+            workbook.write(outputStream);
+        } catch (IOException e) {
+            e.printStackTrace();
+        } finally {
+            try {
+                outputStream.close();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+    }
+
 }
 
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/config/IcbcConfig.java b/ruoyi-system/src/main/java/com/ruoyi/system/config/IcbcConfig.java
index 774274e..a6838e7 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/config/IcbcConfig.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/config/IcbcConfig.java
@@ -1,136 +1,136 @@
-package com.ruoyi.system.config;
-
-import com.icbc.api.DefaultIcbcClient;
-import com.icbc.api.IcbcConstants;
-import lombok.Data;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Component;
-
-/**
- * @description:
- * @author: yangchuan
- * @create: 2024-11-18 17:10
- */
-@Component
-@Data
-public class IcbcConfig {
-
-    /**
-     * 聚合支付B2C线上消费下单接口url (无界面)
-     */
-    @Value("${icbc.api.pay-url}")
-    private String apiPayUrl;
-
-    /**
-     * 订单拆分请求url
-     */
-    @Value("${icbc.api.suborder-url}")
-    private String apiSubOrderUrl;
-
-    /**
-     * 订单拆分前退款url
-     */
-    @Value("${icbc.api.refund-url}")
-    private String refundUrl;
-
-    /**
-     * 订单拆分后退款url
-     */
-    @Value("${icbc.api.sub-order-refund-url}")
-    private String subOrderRefundUrl;
-
-    /**
-     * 订单支付查询url
-     */
-    @Value("${icbc.api.order-pay-url}")
-    private String selectOrderPayUrl;
-
-    /**
-     * 订单退款查询url
-     */
-    @Value("${icbc.api.order-refund-url}")
-    private String selectOrderRefundUrl;
-
-
-    /**
-     * 我方私钥,用于签名请求
-     */
-    @Value("${icbc.keys.my-private-key}")
-    private String myPrivateKey;
-
-    /**
-     * 对方(即工行)网关公钥,用于验证返回的签名
-     */
-    @Value("${icbc.keys.api-gw-public-key}")
-    private String apiGwPublicKey;
-
-    /**
-     * APP编号
-     */
-    @Value("${icbc.app-id}")
-    private String appId;
-
-    /**
-     * 商户编号
-     */
-    @Value("${icbc.mer-id}")
-    private String merId;
-
-    /**
-     * 收单产品协议编号
-     */
-    @Value("${icbc.mer-prtcl-no}")
-    private String merPrtclNo;
-
-    /**
-     * 设备号
-     */
-    @Value("${icbc.decive-info}")
-    private String deciveInfo;
-
-    /**
-     * 完整回调通知地址
-     */
-    @Value("${icbc.api.notify-url}")
-    private String notifyUrl;
-
-    /**
-     * 完整回调通知地址
-     */
-    @Value("${icbc.api.notify-url-method}")
-    private String notifyUrlMethod;
-
-    /**
-     * 微信APP编号
-     */
-    @Value("${icbc.wx-app-id}")
-    private String wxAppId;
-
-    /**
-     * 微信公众号APP编号
-     */
-    @Value("${icbc.wx-gzh-app-id}")
-    private String wxGzhAppId;
-
-    /**
-     * 订单超时时间,单位为分钟
-     */
-    @Value("${icbc.expire-time}")
-    private String expireTime;
-
-    private volatile static DefaultIcbcClient instance = null;
-
-    public static DefaultIcbcClient getInstance(IcbcConfig icbcConfig) {
-        if (instance == null) {
-            synchronized (IcbcConfig.class) {
-                if (instance == null) {
-                    instance = new DefaultIcbcClient(icbcConfig.appId, IcbcConstants.SIGN_TYPE_RSA2, icbcConfig.myPrivateKey, icbcConfig.apiGwPublicKey);
-                }
-            }
-        }
-        return instance;
-    }
-
-}
-
-
+package com.ruoyi.system.config;
+
+import com.icbc.api.DefaultIcbcClient;
+import com.icbc.api.IcbcConstants;
+import lombok.Data;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
+/**
+ * @description:
+ * @author: yangchuan
+ * @create: 2024-11-18 17:10
+ */
+//@Component
+@Data
+public class IcbcConfig {
+
+    /**
+     * 聚合支付B2C线上消费下单接口url (无界面)
+     */
+    @Value("${icbc.api.pay-url}")
+    private String apiPayUrl;
+
+    /**
+     * 订单拆分请求url
+     */
+    @Value("${icbc.api.suborder-url}")
+    private String apiSubOrderUrl;
+
+    /**
+     * 订单拆分前退款url
+     */
+    @Value("${icbc.api.refund-url}")
+    private String refundUrl;
+
+    /**
+     * 订单拆分后退款url
+     */
+    @Value("${icbc.api.sub-order-refund-url}")
+    private String subOrderRefundUrl;
+
+    /**
+     * 订单支付查询url
+     */
+    @Value("${icbc.api.order-pay-url}")
+    private String selectOrderPayUrl;
+
+    /**
+     * 订单退款查询url
+     */
+    @Value("${icbc.api.order-refund-url}")
+    private String selectOrderRefundUrl;
+
+
+    /**
+     * 我方私钥,用于签名请求
+     */
+    @Value("${icbc.keys.my-private-key}")
+    private String myPrivateKey;
+
+    /**
+     * 对方(即工行)网关公钥,用于验证返回的签名
+     */
+    @Value("${icbc.keys.api-gw-public-key}")
+    private String apiGwPublicKey;
+
+    /**
+     * APP编号
+     */
+    @Value("${icbc.app-id}")
+    private String appId;
+
+    /**
+     * 商户编号
+     */
+    @Value("${icbc.mer-id}")
+    private String merId;
+
+    /**
+     * 收单产品协议编号
+     */
+    @Value("${icbc.mer-prtcl-no}")
+    private String merPrtclNo;
+
+    /**
+     * 设备号
+     */
+    @Value("${icbc.decive-info}")
+    private String deciveInfo;
+
+    /**
+     * 完整回调通知地址
+     */
+    @Value("${icbc.api.notify-url}")
+    private String notifyUrl;
+
+    /**
+     * 完整回调通知地址
+     */
+    @Value("${icbc.api.notify-url-method}")
+    private String notifyUrlMethod;
+
+    /**
+     * 微信APP编号
+     */
+    @Value("${icbc.wx-app-id}")
+    private String wxAppId;
+
+    /**
+     * 微信公众号APP编号
+     */
+    @Value("${icbc.wx-gzh-app-id}")
+    private String wxGzhAppId;
+
+    /**
+     * 订单超时时间,单位为分钟
+     */
+    @Value("${icbc.expire-time}")
+    private String expireTime;
+
+    private volatile static DefaultIcbcClient instance = null;
+
+    public static DefaultIcbcClient getInstance(IcbcConfig icbcConfig) {
+        if (instance == null) {
+            synchronized (IcbcConfig.class) {
+                if (instance == null) {
+                    instance = new DefaultIcbcClient(icbcConfig.appId, IcbcConstants.SIGN_TYPE_RSA2, icbcConfig.myPrivateKey, icbcConfig.apiGwPublicKey);
+                }
+            }
+        }
+        return instance;
+    }
+
+}
+
+
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TPhysicalGoodsOrderMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TPhysicalGoodsOrderMapper.java
index 05231e5..2d12a71 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TPhysicalGoodsOrderMapper.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TPhysicalGoodsOrderMapper.java
@@ -6,6 +6,8 @@
 import com.ruoyi.system.query.BigGiftPackageQuery;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.List;
+
 /**
  * <p>
  * 实物商品订单 Mapper 接口
@@ -18,4 +20,7 @@
 
     Page<TPhysicalGoodsOrder> pageList(@Param("page") Page<TPhysicalGoodsOrder> page, @Param("query") BigGiftPackageQuery query);
 
+    List<TPhysicalGoodsOrder> export(@Param("query") BigGiftPackageQuery query);
+
+
 }
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TRefundApplicationMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TRefundApplicationMapper.java
index 2945b26..fc0c9c9 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TRefundApplicationMapper.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TRefundApplicationMapper.java
@@ -7,6 +7,8 @@
 import com.ruoyi.system.query.BigGiftPackageQuery;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.List;
+
 /**
  * <p>
  * 退款申请 Mapper 接口
@@ -19,4 +21,6 @@
 
     Page<TBigGiftPackageOrder> pageRefundList(@Param("page") Page<TBigGiftPackageOrder> page, @Param("query") BigGiftPackageQuery query);
 
+    List<TBigGiftPackageOrder> pageRefundExportList(@Param("query") BigGiftPackageQuery query);
+
 }
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/model/TBigGiftPackageOrder.java b/ruoyi-system/src/main/java/com/ruoyi/system/model/TBigGiftPackageOrder.java
index 6ade075..eb32f6b 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/model/TBigGiftPackageOrder.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/model/TBigGiftPackageOrder.java
@@ -1,6 +1,8 @@
 package com.ruoyi.system.model;
 
 import java.math.BigDecimal;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
@@ -34,6 +36,7 @@
 
     @ApiModelProperty(value = "订单编号")
     @TableField("code")
+    @Excel(name = "订单编号")
     private String code;
 
     @ApiModelProperty(value = "所属公司")
@@ -46,6 +49,7 @@
 
     @ApiModelProperty(value = "下单时间")
     @TableField("create_time")
+    @Excel(name = "下单时间", format = "yyyy-MM-dd HH:mm:ss")
     private LocalDateTime createTime;
 
     @ApiModelProperty(value = "大礼包id")
@@ -58,14 +62,17 @@
 
     @ApiModelProperty(value = "订单价格")
     @TableField("order_price")
+    @Excel(name = "订单价格")
     private BigDecimal orderPrice;
 
     @ApiModelProperty(value = "支付订金")
     @TableField("deposit")
+    @Excel(name = "定金")
     private BigDecimal deposit;
 
     @ApiModelProperty(value = "支付尾款")
     @TableField("final_payment")
+    @Excel(name = "尾款")
     private BigDecimal finalPayment;
 
     @ApiModelProperty(value = "支付金额")
@@ -90,7 +97,8 @@
 
     @ApiModelProperty(value = "订金付款方式(1=微信)")
     @TableField("deposit_payment_method")
-    private Integer depositPaymentMethod;
+    @Excel(name = "订金付款方式",replace = {"微信_1"})
+    private Integer depositPaymentMethod=1;
 
     @ApiModelProperty(value = "订金付款流水号")
     @TableField("deposit_payment_serial_number")
@@ -120,13 +128,17 @@
 
 
 
-    @ApiModelProperty(value = "用户手机号")
-    @TableField(exist = false)
-    private String phone;
 
     @ApiModelProperty(value = "下单用户")
     @TableField(exist = false)
+    @Excel(name = "下单用户")
     private String userName;
+
+
+    @ApiModelProperty(value = "用户手机号")
+    @TableField(exist = false)
+    @Excel(name = "用户手机号")
+    private String phone;
 
     @ApiModelProperty(value = "直接营销员")
     @TableField(exist = false)
@@ -142,10 +154,12 @@
 
     @ApiModelProperty(value = "商品名称")
     @TableField(exist = false)
+    @Excel(name = "商品名称")
     private String bigGiftPackageName;
 
     @ApiModelProperty(value = "审核状态1=待审核,2=审核通过,3=审核驳回")
     @TableField(exist = false)
+    @Excel(name = "审核状态",replace = {"待审核_1","已通过_2","已驳回_3"})
     private Integer auditStatus;
 
     @ApiModelProperty(value = "商品封面")
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/model/TPhysicalGoodsOrder.java b/ruoyi-system/src/main/java/com/ruoyi/system/model/TPhysicalGoodsOrder.java
index 6d11a9d..1e797ef 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/model/TPhysicalGoodsOrder.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/model/TPhysicalGoodsOrder.java
@@ -1,6 +1,8 @@
 package com.ruoyi.system.model;
 
 import java.math.BigDecimal;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
@@ -34,6 +36,7 @@
 
     @ApiModelProperty(value = "订单编号")
     @TableField("code")
+    @Excel(name = "订单编号")
     private String code;
 
     @ApiModelProperty(value = "所属公司")
@@ -46,6 +49,7 @@
 
     @ApiModelProperty(value = "下单时间")
     @TableField("create_time")
+    @Excel(name = "下单时间", format = "yyyy-MM-dd HH:mm:ss")
     private LocalDateTime createTime;
 
     @ApiModelProperty(value = "实物商品id")
@@ -58,6 +62,7 @@
 
     @ApiModelProperty(value = "订单价格")
     @TableField("order_price")
+    @Excel(name = "订单价格")
     private BigDecimal orderPrice;
 
     @ApiModelProperty(value = "支付金额")
@@ -66,6 +71,7 @@
 
     @ApiModelProperty(value = "订单状态(1=待付款,2=完成支付,3=确认收货,4=已退款)")
     @TableField("status")
+    @Excel(name = "订单状态", replace = "待付款_1,完成支付_2,确认收货_3,已退款_4")
     private Integer status;
 
     @ApiModelProperty(value = "确认收货时间")
@@ -78,7 +84,8 @@
 
     @ApiModelProperty(value = "付款方式(1=微信)")
     @TableField("payment_method")
-    private Integer paymentMethod;
+    @Excel(name = "支付方式", replace = "微信_1")
+    private Integer paymentMethod=1;
 
     @ApiModelProperty(value = "付款流水号")
     @TableField("payment_serial_number")
@@ -95,14 +102,17 @@
 
     @ApiModelProperty(value = "下单用户")
     @TableField(exist = false)
+    @Excel(name = "下单用户")
     private String userName;
 
     @ApiModelProperty(value = "下单用户手机号")
     @TableField(exist = false)
+    @Excel(name = "用户手机号")
     private String phone;
 
     @ApiModelProperty(value = "商品名称")
     @TableField(exist = false)
+    @Excel(name = "商品名称")
     private String physicalGoodsName;
 
     @ApiModelProperty(value = "商品封面")
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/TPhysicalGoodsOrderService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/TPhysicalGoodsOrderService.java
index 0fb9397..9cc13c1 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/TPhysicalGoodsOrderService.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/TPhysicalGoodsOrderService.java
@@ -5,6 +5,8 @@
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.ruoyi.system.query.BigGiftPackageQuery;
 
+import java.util.List;
+
 /**
  * <p>
  * 实物商品订单 服务类
@@ -18,4 +20,6 @@
     Page<TPhysicalGoodsOrder> pageList(BigGiftPackageQuery query);
 
 
+    List<TPhysicalGoodsOrder> export(BigGiftPackageQuery query);
+
 }
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/TRefundApplicationService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/TRefundApplicationService.java
index c1f4675..46fde1a 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/TRefundApplicationService.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/TRefundApplicationService.java
@@ -6,6 +6,8 @@
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.ruoyi.system.query.BigGiftPackageQuery;
 
+import java.util.List;
+
 /**
  * <p>
  * 退款申请 服务类
@@ -20,5 +22,7 @@
     Page<TBigGiftPackageOrder> pageRefundList(BigGiftPackageQuery query);
 
 
+    List<TBigGiftPackageOrder> pageRefundExportList(BigGiftPackageQuery query);
+
 
 }
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TPhysicalGoodsOrderServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TPhysicalGoodsOrderServiceImpl.java
index 815abde..d38ea76 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TPhysicalGoodsOrderServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TPhysicalGoodsOrderServiceImpl.java
@@ -8,6 +8,9 @@
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
 
+import java.util.Collections;
+import java.util.List;
+
 /**
  * <p>
  * 实物商品订单 服务实现类
@@ -24,4 +27,9 @@
         Page<TPhysicalGoodsOrder> page = new Page<>(query.getPageNum(), query.getPageSize());
         return this.baseMapper.pageList(page,query);
     }
+
+    @Override
+    public List<TPhysicalGoodsOrder> export(BigGiftPackageQuery query) {
+        return  this.baseMapper.export(query);
+    }
 }
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TRefundApplicationServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TRefundApplicationServiceImpl.java
index 300cb80..f8afec4 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TRefundApplicationServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TRefundApplicationServiceImpl.java
@@ -9,6 +9,9 @@
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
 
+import java.util.Collections;
+import java.util.List;
+
 /**
  * <p>
  * 退款申请 服务实现类
@@ -25,4 +28,9 @@
         Page<TBigGiftPackageOrder> page = new Page<>(query.getPageNum(), query.getPageSize());
         return this.baseMapper.pageRefundList(page, query);
     }
+
+    @Override
+    public List<TBigGiftPackageOrder> pageRefundExportList(BigGiftPackageQuery query) {
+        return  this.baseMapper.pageRefundExportList(query);
+    }
 }
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/utils/ICBCPayUtil.java b/ruoyi-system/src/main/java/com/ruoyi/system/utils/ICBCPayUtil.java
index d1692a2..635c267 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/utils/ICBCPayUtil.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/utils/ICBCPayUtil.java
@@ -1,80 +1,80 @@
-package com.ruoyi.system.utils;
-
-import com.alibaba.fastjson2.JSON;
-import com.alibaba.fastjson2.JSONObject;
-import com.icbc.api.DefaultIcbcClient;
-import com.icbc.api.IcbcApiException;
-import com.icbc.api.request.CardbusinessAggregatepayB2cOnlineConsumepurchaseRequestV1;
-import com.icbc.api.response.CardbusinessAggregatepayB2cOnlineConsumepurchaseResponseV1;
-import com.ruoyi.common.exception.ServiceException;
-import com.ruoyi.common.utils.DateUtils;
-import com.ruoyi.common.utils.WebUtils;
-import com.ruoyi.common.utils.ip.IpUtils;
-import com.ruoyi.system.config.IcbcConfig;
-import com.ruoyi.system.enums.ICBCRespOrderErrorEnum;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.math.BigDecimal;
-
-@Slf4j
-@Component
-public class ICBCPayUtil {
-
-    @Autowired
-    private IcbcConfig icbcConfig;
-
-    public JSONObject wechatPay(String outTradeNo, BigDecimal totalPrice, String goodsName,String openid){
-        CardbusinessAggregatepayB2cOnlineConsumepurchaseRequestV1.CardbusinessAggregatepayB2cOnlineConsumepurchaseRequestV1Biz bizContent = new
-                CardbusinessAggregatepayB2cOnlineConsumepurchaseRequestV1.CardbusinessAggregatepayB2cOnlineConsumepurchaseRequestV1Biz();
-        bizContent.setMer_id(icbcConfig.getMerId());
-        bizContent.setMer_prtcl_no(icbcConfig.getMerPrtclNo());
-        bizContent.setDecive_info(icbcConfig.getDeciveInfo());
-        bizContent.setOut_trade_no(outTradeNo);
-        bizContent.setOrig_date_time(DateUtils.getCurrentDateTimeWithT());
-        //交易币种,目前工行只支持使用人民币(001)支付
-        bizContent.setFee_type("001");
-        bizContent.setSpbill_create_ip(IpUtils.getIpAddr(WebUtils.request()));
-        //金额,单位分
-        bizContent.setTotal_fee(String.valueOf(totalPrice.multiply(new BigDecimal(100)).intValue()));
-        //支付成功后回调url
-        bizContent.setMer_url(icbcConfig.getNotifyUrl());
-        bizContent.setBody(goodsName);
-        //收单接入方式,5-APP,7-微信公众号,8-支付宝生活号,9-微信小程序
-        bizContent.setAccess_type("9");
-        //支付方式,9-微信;10-支付宝;
-        bizContent.setPay_mode("9");
-        //商户在微信开放平台注册的APPID,支付方式为微信时不能为空
-        bizContent.setShop_appid(icbcConfig.getWxAppId());
-        //第三方用户标识,商户在微信公众号内或微信小程序内接入时必送,即access_type为7或9时,上送用户在商户APPID下的唯一标识;商户通过支付宝生活号接入时不送
-        bizContent.setOpen_id(openid);
-        bizContent.setIcbc_appid(icbcConfig.getAppId());
-        bizContent.setExpire_time(icbcConfig.getExpireTime());
-        //通知类型,表示在交易处理完成后把交易结果通知商户的处理模式。取值“HS”:在交易完成后将通知信息,主动发送给商户,发送地址为notify_url指定地址; 取值“AG”:在交易完成后不通知商户。不送或送空,默认为"HS"
-        bizContent.setNotify_type("HS");
-        //结果发送类型,通知方式为HS时有效。取值“0”:无论支付成功或者失败,银行都向商户发送交易通知信息;取值“1”,银行只向商户发送交易成功的通知信息。默认是"0"
-        bizContent.setResult_type("0");
-        CardbusinessAggregatepayB2cOnlineConsumepurchaseRequestV1 request = new CardbusinessAggregatepayB2cOnlineConsumepurchaseRequestV1();
-        request.setServiceUrl(icbcConfig.getApiPayUrl());
-        request.setBizContent(bizContent);
-        DefaultIcbcClient client = IcbcConfig.getInstance(icbcConfig);
-        CardbusinessAggregatepayB2cOnlineConsumepurchaseResponseV1 response;
-        JSONObject responsePackage = new JSONObject();
-        try {
-            log.info("准备调用工行支付成功,请求参数:{}", JSON.toJSONString(request));
-            response = client.execute(request);
-            if (response.isSuccess()) {
-                log.info("调用工行支付成功,返回信息:{}", JSON.toJSONString(response));
-                responsePackage = JSONObject.parseObject(response.getWx_data_package());
-            } else {
-                log.info("调用工行支付失败,返回信息:{}", JSON.toJSONString(response));
-                throw new ServiceException(ICBCRespOrderErrorEnum.fromCode(String.valueOf(response.getReturnCode())).getErrorMsg());
-            }
-        } catch (IcbcApiException e) {
-            log.error(e.toString(), e);
-        }
-        return responsePackage;
-    }
-
-}
+//package com.ruoyi.system.utils;
+//
+//import com.alibaba.fastjson2.JSON;
+//import com.alibaba.fastjson2.JSONObject;
+//import com.icbc.api.DefaultIcbcClient;
+//import com.icbc.api.IcbcApiException;
+//import com.icbc.api.request.CardbusinessAggregatepayB2cOnlineConsumepurchaseRequestV1;
+//import com.icbc.api.response.CardbusinessAggregatepayB2cOnlineConsumepurchaseResponseV1;
+//import com.ruoyi.common.exception.ServiceException;
+//import com.ruoyi.common.utils.DateUtils;
+//import com.ruoyi.common.utils.WebUtils;
+//import com.ruoyi.common.utils.ip.IpUtils;
+//import com.ruoyi.system.config.IcbcConfig;
+//import com.ruoyi.system.enums.ICBCRespOrderErrorEnum;
+//import lombok.extern.slf4j.Slf4j;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.stereotype.Component;
+//
+//import java.math.BigDecimal;
+//
+//@Slf4j
+//@Component
+//public class ICBCPayUtil {
+//
+//    @Autowired
+//    private IcbcConfig icbcConfig;
+//
+//    public JSONObject wechatPay(String outTradeNo, BigDecimal totalPrice, String goodsName,String openid){
+//        CardbusinessAggregatepayB2cOnlineConsumepurchaseRequestV1.CardbusinessAggregatepayB2cOnlineConsumepurchaseRequestV1Biz bizContent = new
+//                CardbusinessAggregatepayB2cOnlineConsumepurchaseRequestV1.CardbusinessAggregatepayB2cOnlineConsumepurchaseRequestV1Biz();
+//        bizContent.setMer_id(icbcConfig.getMerId());
+//        bizContent.setMer_prtcl_no(icbcConfig.getMerPrtclNo());
+//        bizContent.setDecive_info(icbcConfig.getDeciveInfo());
+//        bizContent.setOut_trade_no(outTradeNo);
+//        bizContent.setOrig_date_time(DateUtils.getCurrentDateTimeWithT());
+//        //交易币种,目前工行只支持使用人民币(001)支付
+//        bizContent.setFee_type("001");
+//        bizContent.setSpbill_create_ip(IpUtils.getIpAddr(WebUtils.request()));
+//        //金额,单位分
+//        bizContent.setTotal_fee(String.valueOf(totalPrice.multiply(new BigDecimal(100)).intValue()));
+//        //支付成功后回调url
+//        bizContent.setMer_url(icbcConfig.getNotifyUrl());
+//        bizContent.setBody(goodsName);
+//        //收单接入方式,5-APP,7-微信公众号,8-支付宝生活号,9-微信小程序
+//        bizContent.setAccess_type("9");
+//        //支付方式,9-微信;10-支付宝;
+//        bizContent.setPay_mode("9");
+//        //商户在微信开放平台注册的APPID,支付方式为微信时不能为空
+//        bizContent.setShop_appid(icbcConfig.getWxAppId());
+//        //第三方用户标识,商户在微信公众号内或微信小程序内接入时必送,即access_type为7或9时,上送用户在商户APPID下的唯一标识;商户通过支付宝生活号接入时不送
+//        bizContent.setOpen_id(openid);
+//        bizContent.setIcbc_appid(icbcConfig.getAppId());
+//        bizContent.setExpire_time(icbcConfig.getExpireTime());
+//        //通知类型,表示在交易处理完成后把交易结果通知商户的处理模式。取值“HS”:在交易完成后将通知信息,主动发送给商户,发送地址为notify_url指定地址; 取值“AG”:在交易完成后不通知商户。不送或送空,默认为"HS"
+//        bizContent.setNotify_type("HS");
+//        //结果发送类型,通知方式为HS时有效。取值“0”:无论支付成功或者失败,银行都向商户发送交易通知信息;取值“1”,银行只向商户发送交易成功的通知信息。默认是"0"
+//        bizContent.setResult_type("0");
+//        CardbusinessAggregatepayB2cOnlineConsumepurchaseRequestV1 request = new CardbusinessAggregatepayB2cOnlineConsumepurchaseRequestV1();
+//        request.setServiceUrl(icbcConfig.getApiPayUrl());
+//        request.setBizContent(bizContent);
+//        DefaultIcbcClient client = IcbcConfig.getInstance(icbcConfig);
+//        CardbusinessAggregatepayB2cOnlineConsumepurchaseResponseV1 response;
+//        JSONObject responsePackage = new JSONObject();
+//        try {
+//            log.info("准备调用工行支付成功,请求参数:{}", JSON.toJSONString(request));
+//            response = client.execute(request);
+//            if (response.isSuccess()) {
+//                log.info("调用工行支付成功,返回信息:{}", JSON.toJSONString(response));
+//                responsePackage = JSONObject.parseObject(response.getWx_data_package());
+//            } else {
+//                log.info("调用工行支付失败,返回信息:{}", JSON.toJSONString(response));
+//                throw new ServiceException(ICBCRespOrderErrorEnum.fromCode(String.valueOf(response.getReturnCode())).getErrorMsg());
+//            }
+//        } catch (IcbcApiException e) {
+//            log.error(e.toString(), e);
+//        }
+//        return responsePackage;
+//    }
+//
+//}
diff --git a/ruoyi-system/src/main/resources/mapper/system/TPhysicalGoodsOrderMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TPhysicalGoodsOrderMapper.xml
index cf96302..4a40f42 100644
--- a/ruoyi-system/src/main/resources/mapper/system/TPhysicalGoodsOrderMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/TPhysicalGoodsOrderMapper.xml
@@ -38,5 +38,17 @@
         </if>
         order by t1.create_time desc
     </select>
+    <select id="export" resultType="com.ruoyi.system.model.TPhysicalGoodsOrder"
+            parameterType="com.ruoyi.system.query.BigGiftPackageQuery">
+        select t1.id,t1.code,t1.create_time as createTime,t1.order_price,t1.payment_price,t1.status,t1.del_flag,t1.remark,t2.name as userName,t2.phone,t3.name as physicalGoodsName
+        from t_physical_goods_order t1
+        left join t_app_user t2 on t1.app_user_id = t2.id
+        left join t_physical_goods t3 on t1.physical_goods_id = t3.id
+        where t1.del_flag = 0
+        <if test="query.name != null and query.name != ''">
+            and t3.name like concat('%',#{query.name},'%')
+        </if>
+        order by t1.create_time desc
+    </select>
 
 </mapper>
diff --git a/ruoyi-system/src/main/resources/mapper/system/TRefundApplicationMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TRefundApplicationMapper.xml
index fd37b6a..98578d7 100644
--- a/ruoyi-system/src/main/resources/mapper/system/TRefundApplicationMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/TRefundApplicationMapper.xml
@@ -30,5 +30,15 @@
         order by t1.applicant_time desc
 
     </select>
+    <select id="pageRefundExportList" resultType="com.ruoyi.system.model.TBigGiftPackageOrder"
+            parameterType="com.ruoyi.system.query.BigGiftPackageQuery">
+        select t1.id,t2.code,t2.create_time,t3.name userName,t3.phone,t2.order_price,t4.name bigGiftPackageName,t2.payment_type,t2.deposit,t2.final_payment,t1.status auditStatus from t_refund_application t1 left join t_big_gift_package_order t2 on t1.big_gift_package_order_id = t2.id
+        left join t_app_user t3 on t2.app_user_id = t3.id left join t_big_gift_package t4 on t2.big_gift_package_id = t4.id
+        where 1=1
+        <if test="query.name != null and query.name != ''">
+            and t4.name like concat('%',#{query.name},'%')
+        </if>
+        order by t1.applicant_time desc
+    </select>
 
 </mapper>

--
Gitblit v1.7.1