From 84277cefdc270f88cd9f2ece3419a428495c7cf2 Mon Sep 17 00:00:00 2001
From: xin <1099200748@qq.com>
Date: Wed, 02 Jul 2025 15:50:17 +0800
Subject: [PATCH] 订单信息、退款订单信息

---
 oying-system/src/main/java/com/oying/modules/sh/domain/dto/OrderReturnQueryCriteria.java                |    3 
 .idea/inspectionProfiles/Project_Default.xml                                                            |    2 
 oying-system/src/main/java/com/oying/modules/sh/rest/OrderOperationLogController.java                   |   20 --
 oying-system/src/main/java/com/oying/modules/sh/mapper/OrderProductSnapshotMapper.java                  |    2 
 oying-system/src/main/java/com/oying/modules/sh/mapper/OrderReturnProductSnapshotMapper.java            |    2 
 oying-system/src/main/java/com/oying/modules/sh/rest/OrderController.java                               |   36 ++-
 oying-system/src/main/java/com/oying/modules/sh/domain/request/SubmitOrder.java                         |   33 ++++
 oying-system/src/main/resources/mapper/sh/OrderProductSnapshotMapper.xml                                |    9 +
 oying-common/src/main/java/com/oying/utils/enums/StatusEnum.java                                        |   35 ++++
 oying-system/src/main/java/com/oying/modules/sh/domain/request/ProductOrder.java                        |   20 ++
 oying-system/src/main/java/com/oying/modules/sh/service/impl/OrderReturnProductSnapshotServiceImpl.java |   12 +
 oying-system/src/main/java/com/oying/modules/sh/service/impl/OrderServiceImpl.java                      |   19 +
 oying-system/src/main/java/com/oying/modules/sh/service/OrderReturnProductSnapshotService.java          |    6 
 oying-system/src/main/java/com/oying/modules/sh/service/OrderService.java                               |   69 +++++---
 oying-common/src/main/java/com/oying/utils/ConstantsKey.java                                            |    3 
 oying-system/src/main/java/com/oying/modules/sh/rest/OrderReturnProductSnapshotController.java          |   39 ----
 oying-system/src/main/resources/mapper/sh/OrderReturnProductSnapshotMapper.xml                          |    9 +
 oying-common/src/main/java/com/oying/utils/enums/ReturnAuditEnum.java                                   |   41 +++++
 oying-system/src/main/java/com/oying/modules/sh/domain/dto/OrderOperationLogQueryCriteria.java          |    2 
 oying-system/src/main/java/com/oying/modules/sh/domain/OrderReturn.java                                 |   11 +
 oying-system/src/main/java/com/oying/modules/sh/domain/request/GeneratorOrder.java                      |   22 ++
 oying-common/src/main/java/com/oying/utils/enums/PayTypeEnum.java                                       |   10 
 oying-system/src/main/java/com/oying/modules/sh/domain/OrderOperationLog.java                           |    2 
 oying-system/src/main/java/com/oying/modules/sh/rest/OrderProductSnapshotController.java                |   40 ----
 oying-system/src/main/java/com/oying/modules/sh/service/impl/OrderProductSnapshotServiceImpl.java       |   12 +
 /dev/null                                                                                               |    7 
 oying-system/src/main/resources/mapper/sh/OrderReturnMapper.xml                                         |    5 
 oying-system/src/main/java/com/oying/modules/sh/service/impl/OrderReturnServiceImpl.java                |    6 
 oying-system/src/main/java/com/oying/modules/sh/service/OrderProductSnapshotService.java                |    2 
 29 files changed, 312 insertions(+), 167 deletions(-)

diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
index 6861e12..bb2cb60 100644
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -3,7 +3,7 @@
     <option name="myName" value="Project Default" />
     <inspection_tool class="DuplicatedCode" enabled="true" level="WEAK WARNING" enabled_by_default="true">
       <Languages>
-        <language minSize="87" name="Java" />
+        <language minSize="96" name="Java" />
       </Languages>
     </inspection_tool>
     <inspection_tool class="JavadocDeclaration" enabled="true" level="WARNING" enabled_by_default="true">
diff --git a/.idea/sqldialects.xml b/.idea/sqldialects.xml
deleted file mode 100644
index 539d872..0000000
--- a/.idea/sqldialects.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="SqlDialectMappings">
-    <file url="file://$PROJECT_DIR$" dialect="MySQL" />
-    <file url="PROJECT" dialect="MySQL" />
-  </component>
-</project>
\ No newline at end of file
diff --git a/oying-common/src/main/java/com/oying/utils/ConstantsKey.java b/oying-common/src/main/java/com/oying/utils/ConstantsKey.java
index abfe332..19d5a03 100644
--- a/oying-common/src/main/java/com/oying/utils/ConstantsKey.java
+++ b/oying-common/src/main/java/com/oying/utils/ConstantsKey.java
@@ -9,6 +9,9 @@
     String SUPPLIER = "SUPPLIER";
     String AGENT = "AGENT";
 
+    // 退货类型状态 启用
+    String RETURN_REASON_STATUS = "1";
+
     // 用户角色字典key
     String USER_TYPE_BUYER = "USER_TYPE_BUYER";
 }
diff --git a/oying-common/src/main/java/com/oying/utils/enums/PayTypeEnum.java b/oying-common/src/main/java/com/oying/utils/enums/PayTypeEnum.java
index 640c57a..cdca695 100644
--- a/oying-common/src/main/java/com/oying/utils/enums/PayTypeEnum.java
+++ b/oying-common/src/main/java/com/oying/utils/enums/PayTypeEnum.java
@@ -12,8 +12,10 @@
 @AllArgsConstructor
 public enum PayTypeEnum {
 
-    /* 通过邮箱重置密码 */
-    HWC("HWC", "汇旺财");
+    /* 支付类型 汇旺财 */
+    HWC("HWC", "汇旺财"),
+
+    UNKNOWN("UNKNOWN", "暂未开放");
 
     private final String key;
     private final String value;
@@ -24,7 +26,7 @@
                 return value;
             }
         }
-        return null;
+        return UNKNOWN;
     }
 
     public static String getValue(String val) {
@@ -33,6 +35,6 @@
                 return value.getValue();
             }
         }
-        return null;
+        return UNKNOWN.getValue();
     }
 }
diff --git a/oying-common/src/main/java/com/oying/utils/enums/ReturnAuditEnum.java b/oying-common/src/main/java/com/oying/utils/enums/ReturnAuditEnum.java
new file mode 100644
index 0000000..335a7cd
--- /dev/null
+++ b/oying-common/src/main/java/com/oying/utils/enums/ReturnAuditEnum.java
@@ -0,0 +1,41 @@
+package com.oying.utils.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * @author xin
+ * @description
+ * @date 2025/7/1 17:32
+ */
+@Getter
+@AllArgsConstructor
+public enum ReturnAuditEnum {
+
+    ZERO(0, "申请"),
+    ONE(1, "通过"),
+    TWO(2, "拒绝"),
+    THREE(3, "未知");
+
+    private final Integer key;
+
+    private final String value;
+
+    public static ReturnAuditEnum find(Integer val) {
+        for (ReturnAuditEnum value : ReturnAuditEnum.values()) {
+            if (val.equals(value.getKey())) {
+                return value;
+            }
+        }
+        return THREE;
+    }
+
+    public static String getValue(Integer val) {
+        for (ReturnAuditEnum value : ReturnAuditEnum.values()) {
+            if (val.equals(value.getKey())) {
+                return value.getValue();
+            }
+        }
+        return THREE.getValue();
+    }
+}
diff --git a/oying-common/src/main/java/com/oying/utils/enums/StatusEnum.java b/oying-common/src/main/java/com/oying/utils/enums/StatusEnum.java
new file mode 100644
index 0000000..f4bcd2e
--- /dev/null
+++ b/oying-common/src/main/java/com/oying/utils/enums/StatusEnum.java
@@ -0,0 +1,35 @@
+package com.oying.utils.enums;
+
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+@Getter
+@AllArgsConstructor
+public enum StatusEnum {
+    ZERO("0", "停用"),
+    ONE("1", "通过"),
+    THREE("2", "未知");
+
+    private final String key;
+
+    private final String value;
+
+    public static StatusEnum find(String val) {
+        for (StatusEnum value : StatusEnum.values()) {
+            if (val.equals(value.getKey())) {
+                return value;
+            }
+        }
+        return THREE;
+    }
+
+    public static String getValue(String val) {
+        for (StatusEnum value : StatusEnum.values()) {
+            if (val.equals(value.getKey())) {
+                return value.getValue();
+            }
+        }
+        return THREE.getValue();
+    }
+}
diff --git a/oying-system/src/main/java/com/oying/modules/sh/domain/OrderOperationLog.java b/oying-system/src/main/java/com/oying/modules/sh/domain/OrderOperationLog.java
index 9ba5ccd..ea36f06 100644
--- a/oying-system/src/main/java/com/oying/modules/sh/domain/OrderOperationLog.java
+++ b/oying-system/src/main/java/com/oying/modules/sh/domain/OrderOperationLog.java
@@ -51,7 +51,7 @@
 
     @NotNull
     @ApiModelProperty(value = "订单号")
-    private Long orderNum;
+    private String orderNum;
 
     public void copy(OrderOperationLog source){
         BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
diff --git a/oying-system/src/main/java/com/oying/modules/sh/domain/OrderReturn.java b/oying-system/src/main/java/com/oying/modules/sh/domain/OrderReturn.java
index e742359..ffed8c7 100644
--- a/oying-system/src/main/java/com/oying/modules/sh/domain/OrderReturn.java
+++ b/oying-system/src/main/java/com/oying/modules/sh/domain/OrderReturn.java
@@ -74,12 +74,21 @@
     @ApiModelProperty(value = "退款成功时间")
     private String successTime;
 
-    @ApiModelProperty(value = "退款渠道ORIGINAL: 原路退款BALANCE: 退回到余额OTHER_BALANCE: 原账户异常退到其他余额账户OTHER_BANKCARD: 原银行卡异常退到其他银行卡")
+    @ApiModelProperty(value = "退款渠道")
     private String channel;
 
     @ApiModelProperty(value = "退款原因")
     private String reason;
 
+    @ApiModelProperty(value = "备注")
+    private String remark;
+
+    @ApiModelProperty(value = "图片")
+    private String photos;
+
+    @ApiModelProperty(value = "审核状态")
+    private Integer auditStatus;
+
     @ApiModelProperty(value = "审核人")
     private String auditUser;
 
diff --git a/oying-system/src/main/java/com/oying/modules/sh/domain/dto/OrderOperationLogQueryCriteria.java b/oying-system/src/main/java/com/oying/modules/sh/domain/dto/OrderOperationLogQueryCriteria.java
index d0b8f3e..1b3517c 100644
--- a/oying-system/src/main/java/com/oying/modules/sh/domain/dto/OrderOperationLogQueryCriteria.java
+++ b/oying-system/src/main/java/com/oying/modules/sh/domain/dto/OrderOperationLogQueryCriteria.java
@@ -25,6 +25,6 @@
     private String userType;
 
     @ApiModelProperty(value = "订单号")
-    private Long orderNum;
+    private String orderNum;
     private List<Timestamp> operationTime;
 }
diff --git a/oying-system/src/main/java/com/oying/modules/sh/domain/dto/OrderReturnQueryCriteria.java b/oying-system/src/main/java/com/oying/modules/sh/domain/dto/OrderReturnQueryCriteria.java
index a3eb539..4438780 100644
--- a/oying-system/src/main/java/com/oying/modules/sh/domain/dto/OrderReturnQueryCriteria.java
+++ b/oying-system/src/main/java/com/oying/modules/sh/domain/dto/OrderReturnQueryCriteria.java
@@ -33,6 +33,9 @@
     @ApiModelProperty(value = "退款状态")
     private String refundStatus;
 
+    @ApiModelProperty(value = "审核状态")
+    private String auditStatus;
+
     @ApiModelProperty(value = "审核人")
     private String auditUser;
     private List<String> successTime;
diff --git a/oying-system/src/main/java/com/oying/modules/sh/domain/request/GeneratorOrder.java b/oying-system/src/main/java/com/oying/modules/sh/domain/request/GeneratorOrder.java
new file mode 100644
index 0000000..4c82727
--- /dev/null
+++ b/oying-system/src/main/java/com/oying/modules/sh/domain/request/GeneratorOrder.java
@@ -0,0 +1,22 @@
+package com.oying.modules.sh.domain.request;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @author xin
+ * @description
+ * @date 2025/7/1 23:46
+ */
+@Getter
+@Setter
+public class GeneratorOrder {
+
+    @ApiModelProperty(value = "门店ID")
+    private String storeId;
+    @ApiModelProperty(value = "商品&数量")
+    private List<ProductOrder> products;
+}
diff --git a/oying-system/src/main/java/com/oying/modules/sh/domain/request/ProductOrder.java b/oying-system/src/main/java/com/oying/modules/sh/domain/request/ProductOrder.java
new file mode 100644
index 0000000..11dd5e9
--- /dev/null
+++ b/oying-system/src/main/java/com/oying/modules/sh/domain/request/ProductOrder.java
@@ -0,0 +1,20 @@
+package com.oying.modules.sh.domain.request;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @author xin
+ * @description
+ * @date 2025/7/2 00:01
+ */
+@Getter
+@Setter
+public class ProductOrder {
+
+    @ApiModelProperty(value = "商品ID")
+    private String productId;
+    @ApiModelProperty(value = "数量")
+    private Integer productCount;
+}
diff --git a/oying-system/src/main/java/com/oying/modules/sh/domain/request/SubmitOrder.java b/oying-system/src/main/java/com/oying/modules/sh/domain/request/SubmitOrder.java
new file mode 100644
index 0000000..54dfd5a
--- /dev/null
+++ b/oying-system/src/main/java/com/oying/modules/sh/domain/request/SubmitOrder.java
@@ -0,0 +1,33 @@
+package com.oying.modules.sh.domain.request;
+
+import com.oying.utils.enums.PayTypeEnum;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.sql.Timestamp;
+import java.util.List;
+
+/**
+ * @author xin
+ * @description
+ * @date 2025/7/1 23:58
+ */
+@Getter
+@Setter
+public class SubmitOrder {
+
+    @ApiModelProperty(value = "地址ID")
+    private Long addressId;
+    @ApiModelProperty(value = "送达时间")
+    private Timestamp dateTime;
+    @ApiModelProperty(value = "门店ID")
+    private String storeId;
+    @ApiModelProperty(value = "商品&数量")
+    private List<ProductOrder> products;
+    @ApiModelProperty(value = "备注")
+    private String remark;
+    @ApiModelProperty(value = "支付类型")
+    private PayTypeEnum payType;
+
+}
diff --git a/oying-system/src/main/java/com/oying/modules/sh/mapper/OrderProductSnapshotMapper.java b/oying-system/src/main/java/com/oying/modules/sh/mapper/OrderProductSnapshotMapper.java
index 6f49164..778f2bc 100644
--- a/oying-system/src/main/java/com/oying/modules/sh/mapper/OrderProductSnapshotMapper.java
+++ b/oying-system/src/main/java/com/oying/modules/sh/mapper/OrderProductSnapshotMapper.java
@@ -19,4 +19,6 @@
     IPage<OrderProductSnapshot> findAll(@Param("criteria") OrderProductSnapshotQueryCriteria criteria, Page<Object> page);
 
     List<OrderProductSnapshot> findAll(@Param("criteria") OrderProductSnapshotQueryCriteria criteria);
+
+    List<OrderProductSnapshot> queryOrderProductSnapshot(String orderNum);
 }
diff --git a/oying-system/src/main/java/com/oying/modules/sh/mapper/OrderReturnProductSnapshotMapper.java b/oying-system/src/main/java/com/oying/modules/sh/mapper/OrderReturnProductSnapshotMapper.java
index 39d8a69..b64f9bc 100644
--- a/oying-system/src/main/java/com/oying/modules/sh/mapper/OrderReturnProductSnapshotMapper.java
+++ b/oying-system/src/main/java/com/oying/modules/sh/mapper/OrderReturnProductSnapshotMapper.java
@@ -19,4 +19,6 @@
     IPage<OrderReturnProductSnapshot> findAll(@Param("criteria") OrderReturnProductSnapshotQueryCriteria criteria, Page<Object> page);
 
     List<OrderReturnProductSnapshot> findAll(@Param("criteria") OrderReturnProductSnapshotQueryCriteria criteria);
+
+    List<OrderReturnProductSnapshot> queryOrderReturnProductSnapshot(String returnNum);
 }
diff --git a/oying-system/src/main/java/com/oying/modules/sh/rest/OrderController.java b/oying-system/src/main/java/com/oying/modules/sh/rest/OrderController.java
index 3ea87e2..bd51dfc 100644
--- a/oying-system/src/main/java/com/oying/modules/sh/rest/OrderController.java
+++ b/oying-system/src/main/java/com/oying/modules/sh/rest/OrderController.java
@@ -1,10 +1,12 @@
 package com.oying.modules.sh.rest;
 
 import com.oying.annotation.Log;
-import com.oying.modules.sh.domain.Order;
+import com.oying.modules.sh.domain.request.GeneratorOrder;
+import com.oying.modules.sh.domain.request.SubmitOrder;
 import com.oying.modules.sh.service.OrderService;
 import com.oying.modules.sh.domain.dto.OrderQueryCriteria;
 import com.oying.utils.R;
+import com.oying.utils.SecurityUtils;
 import lombok.RequiredArgsConstructor;
 
 import java.util.List;
@@ -48,22 +50,26 @@
         return new ResponseEntity<>(R.success(orderService.queryAll(criteria, page)), HttpStatus.OK);
     }
 
-    @PostMapping
-    @Log("新增订单信息")
-    @ApiOperation("新增订单信息")
-    @PreAuthorize("@el.check('order:add')")
-    public ResponseEntity<Object> createOrder(@Validated @RequestBody Order resources) {
-        orderService.create(resources);
-        return new ResponseEntity<>(R.success(), HttpStatus.CREATED);
+    @GetMapping("mini")
+    @ApiOperation("小程序:查询订单信息")
+    public ResponseEntity<Object> miniQueryOrder(OrderQueryCriteria criteria) {
+        Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize());
+        criteria.setUserId(SecurityUtils.getCurrentUserId());
+        return new ResponseEntity<>(R.success(orderService.queryAll(criteria, page)), HttpStatus.OK);
     }
 
-    @PutMapping
-    @Log("修改订单信息")
-    @ApiOperation("修改订单信息")
-    @PreAuthorize("@el.check('order:edit')")
-    public ResponseEntity<Object> updateOrder(@Validated @RequestBody Order resources) {
-        orderService.update(resources);
-        return new ResponseEntity<>(R.success(), HttpStatus.NO_CONTENT);
+    @PostMapping("generator")
+    @Log("小程序:生成确认订单")
+    @ApiOperation("小程序:生成确认订单")
+    public ResponseEntity<Object> generatorOrder(@Validated @RequestBody GeneratorOrder generator) {
+        return new ResponseEntity<>(R.success(orderService.generatorOrder(generator)), HttpStatus.CREATED);
+    }
+
+    @PostMapping("submit")
+    @Log("小程序:提交订单")
+    @ApiOperation("小程序:提交订单")
+    public ResponseEntity<Object> submitOrder(@Validated @RequestBody SubmitOrder submit) {
+        return new ResponseEntity<>(R.success(orderService.submitOrder(submit)), HttpStatus.CREATED);
     }
 
     @DeleteMapping
diff --git a/oying-system/src/main/java/com/oying/modules/sh/rest/OrderOperationLogController.java b/oying-system/src/main/java/com/oying/modules/sh/rest/OrderOperationLogController.java
index c69c043..0d43c87 100644
--- a/oying-system/src/main/java/com/oying/modules/sh/rest/OrderOperationLogController.java
+++ b/oying-system/src/main/java/com/oying/modules/sh/rest/OrderOperationLogController.java
@@ -7,8 +7,6 @@
 import com.oying.utils.R;
 import lombok.RequiredArgsConstructor;
 
-import java.util.List;
-
 import org.springframework.http.HttpStatus;
 import org.springframework.http.ResponseEntity;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -55,23 +53,5 @@
     public ResponseEntity<Object> createOrderOperationLog(@Validated @RequestBody OrderOperationLog resources) {
         orderOperationLogService.create(resources);
         return new ResponseEntity<>(R.success(), HttpStatus.CREATED);
-    }
-
-    @PutMapping
-    @Log("修改订单操作日志")
-    @ApiOperation("修改订单操作日志")
-    @PreAuthorize("@el.check('orderOperationLog:edit')")
-    public ResponseEntity<Object> updateOrderOperationLog(@Validated @RequestBody OrderOperationLog resources) {
-        orderOperationLogService.update(resources);
-        return new ResponseEntity<>(R.success(), HttpStatus.NO_CONTENT);
-    }
-
-    @DeleteMapping
-    @Log("删除订单操作日志")
-    @ApiOperation("删除订单操作日志")
-    @PreAuthorize("@el.check('orderOperationLog:del')")
-    public ResponseEntity<Object> deleteOrderOperationLog(@ApiParam(value = "传ID数组[]") @RequestBody List<Long> ids) {
-        orderOperationLogService.deleteAll(ids);
-        return new ResponseEntity<>(R.success(), HttpStatus.OK);
     }
 }
diff --git a/oying-system/src/main/java/com/oying/modules/sh/rest/OrderProductSnapshotController.java b/oying-system/src/main/java/com/oying/modules/sh/rest/OrderProductSnapshotController.java
index 24bdc0d..972139c 100644
--- a/oying-system/src/main/java/com/oying/modules/sh/rest/OrderProductSnapshotController.java
+++ b/oying-system/src/main/java/com/oying/modules/sh/rest/OrderProductSnapshotController.java
@@ -3,10 +3,8 @@
 import com.oying.annotation.Log;
 import com.oying.modules.sh.domain.OrderProductSnapshot;
 import com.oying.modules.sh.service.OrderProductSnapshotService;
-import com.oying.modules.sh.domain.dto.OrderProductSnapshotQueryCriteria;
+import com.oying.utils.R;
 import lombok.RequiredArgsConstructor;
-
-import java.util.List;
 
 import org.springframework.http.HttpStatus;
 import org.springframework.http.ResponseEntity;
@@ -14,11 +12,6 @@
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 import io.swagger.annotations.*;
-
-import java.io.IOException;
-import javax.servlet.http.HttpServletResponse;
-
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 
 /**
  * @author lixin
@@ -32,28 +25,10 @@
 
     private final OrderProductSnapshotService orderProductSnapshotService;
 
-    @ApiOperation("导出数据")
-    @GetMapping(value = "/download")
-    @PreAuthorize("@el.check('orderProductSnapshot:list')")
-    public void exportOrderProductSnapshot(HttpServletResponse response, OrderProductSnapshotQueryCriteria criteria) throws IOException {
-        orderProductSnapshotService.download(orderProductSnapshotService.queryAll(criteria), response);
-    }
-
     @GetMapping
     @ApiOperation("查询订单商品快照")
-    @PreAuthorize("@el.check('orderProductSnapshot:list')")
-    public ResponseEntity<Object> queryOrderProductSnapshot(OrderProductSnapshotQueryCriteria criteria) {
-        Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize());
-        return new ResponseEntity<>(orderProductSnapshotService.queryAll(criteria, page), HttpStatus.OK);
-    }
-
-    @PostMapping
-    @Log("新增订单商品快照")
-    @ApiOperation("新增订单商品快照")
-    @PreAuthorize("@el.check('orderProductSnapshot:add')")
-    public ResponseEntity<Object> createOrderProductSnapshot(@Validated @RequestBody OrderProductSnapshot resources) {
-        orderProductSnapshotService.create(resources);
-        return new ResponseEntity<>(HttpStatus.CREATED);
+    public ResponseEntity<Object> queryOrderProductSnapshot(@RequestParam String orderNum) {
+        return new ResponseEntity<>(R.success(orderProductSnapshotService.queryOrderProductSnapshot(orderNum)), HttpStatus.OK);
     }
 
     @PutMapping
@@ -63,14 +38,5 @@
     public ResponseEntity<Object> updateOrderProductSnapshot(@Validated @RequestBody OrderProductSnapshot resources) {
         orderProductSnapshotService.update(resources);
         return new ResponseEntity<>(HttpStatus.NO_CONTENT);
-    }
-
-    @DeleteMapping
-    @Log("删除订单商品快照")
-    @ApiOperation("删除订单商品快照")
-    @PreAuthorize("@el.check('orderProductSnapshot:del')")
-    public ResponseEntity<Object> deleteOrderProductSnapshot(@ApiParam(value = "传ID数组[]") @RequestBody List<Long> ids) {
-        orderProductSnapshotService.deleteAll(ids);
-        return new ResponseEntity<>(HttpStatus.OK);
     }
 }
diff --git a/oying-system/src/main/java/com/oying/modules/sh/rest/OrderReturnProductSnapshotController.java b/oying-system/src/main/java/com/oying/modules/sh/rest/OrderReturnProductSnapshotController.java
index b54edc3..f28ef5c 100644
--- a/oying-system/src/main/java/com/oying/modules/sh/rest/OrderReturnProductSnapshotController.java
+++ b/oying-system/src/main/java/com/oying/modules/sh/rest/OrderReturnProductSnapshotController.java
@@ -3,11 +3,8 @@
 import com.oying.annotation.Log;
 import com.oying.modules.sh.domain.OrderReturnProductSnapshot;
 import com.oying.modules.sh.service.OrderReturnProductSnapshotService;
-import com.oying.modules.sh.domain.dto.OrderReturnProductSnapshotQueryCriteria;
 import com.oying.utils.R;
 import lombok.RequiredArgsConstructor;
-
-import java.util.List;
 
 import org.springframework.http.HttpStatus;
 import org.springframework.http.ResponseEntity;
@@ -15,11 +12,6 @@
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 import io.swagger.annotations.*;
-
-import java.io.IOException;
-import javax.servlet.http.HttpServletResponse;
-
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 
 /**
  * @author lixin
@@ -33,28 +25,10 @@
 
     private final OrderReturnProductSnapshotService orderReturnProductSnapshotService;
 
-    @ApiOperation("导出数据")
-    @GetMapping(value = "/download")
-    @PreAuthorize("@el.check('orderReturnProductSnapshot:list')")
-    public void exportOrderReturnProductSnapshot(HttpServletResponse response, OrderReturnProductSnapshotQueryCriteria criteria) throws IOException {
-        orderReturnProductSnapshotService.download(orderReturnProductSnapshotService.queryAll(criteria), response);
-    }
-
     @GetMapping
     @ApiOperation("查询退款订单商品快照")
-    @PreAuthorize("@el.check('orderReturnProductSnapshot:list')")
-    public ResponseEntity<Object> queryOrderReturnProductSnapshot(OrderReturnProductSnapshotQueryCriteria criteria) {
-        Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize());
-        return new ResponseEntity<>(R.success(orderReturnProductSnapshotService.queryAll(criteria, page)), HttpStatus.OK);
-    }
-
-    @PostMapping
-    @Log("新增退款订单商品快照")
-    @ApiOperation("新增退款订单商品快照")
-    @PreAuthorize("@el.check('orderReturnProductSnapshot:add')")
-    public ResponseEntity<Object> createOrderReturnProductSnapshot(@Validated @RequestBody OrderReturnProductSnapshot resources) {
-        orderReturnProductSnapshotService.create(resources);
-        return new ResponseEntity<>(R.success(), HttpStatus.CREATED);
+    public ResponseEntity<Object> queryOrderReturnProductSnapshot(@RequestParam String returnNum) {
+        return new ResponseEntity<>(R.success(orderReturnProductSnapshotService.queryOrderReturnProductSnapshot(returnNum)), HttpStatus.OK);
     }
 
     @PutMapping
@@ -64,14 +38,5 @@
     public ResponseEntity<Object> updateOrderReturnProductSnapshot(@Validated @RequestBody OrderReturnProductSnapshot resources) {
         orderReturnProductSnapshotService.update(resources);
         return new ResponseEntity<>(R.success(), HttpStatus.NO_CONTENT);
-    }
-
-    @DeleteMapping
-    @Log("删除退款订单商品快照")
-    @ApiOperation("删除退款订单商品快照")
-    @PreAuthorize("@el.check('orderReturnProductSnapshot:del')")
-    public ResponseEntity<Object> deleteOrderReturnProductSnapshot(@ApiParam(value = "传ID数组[]") @RequestBody List<Long> ids) {
-        orderReturnProductSnapshotService.deleteAll(ids);
-        return new ResponseEntity<>(R.success(), HttpStatus.OK);
     }
 }
diff --git a/oying-system/src/main/java/com/oying/modules/sh/service/OrderProductSnapshotService.java b/oying-system/src/main/java/com/oying/modules/sh/service/OrderProductSnapshotService.java
index 257ad0d..ad39390 100644
--- a/oying-system/src/main/java/com/oying/modules/sh/service/OrderProductSnapshotService.java
+++ b/oying-system/src/main/java/com/oying/modules/sh/service/OrderProductSnapshotService.java
@@ -31,6 +31,8 @@
     */
     List<OrderProductSnapshot> queryAll(OrderProductSnapshotQueryCriteria criteria);
 
+    List<OrderProductSnapshot> queryOrderProductSnapshot(String orderNum);
+
     /**
     * 创建
     * @param resources /
diff --git a/oying-system/src/main/java/com/oying/modules/sh/service/OrderReturnProductSnapshotService.java b/oying-system/src/main/java/com/oying/modules/sh/service/OrderReturnProductSnapshotService.java
index e53cfa6..b068eb9 100644
--- a/oying-system/src/main/java/com/oying/modules/sh/service/OrderReturnProductSnapshotService.java
+++ b/oying-system/src/main/java/com/oying/modules/sh/service/OrderReturnProductSnapshotService.java
@@ -32,6 +32,12 @@
     List<OrderReturnProductSnapshot> queryAll(OrderReturnProductSnapshotQueryCriteria criteria);
 
     /**
+     * 查询订单数据不分页
+     * @return List<OrderReturnProductSnapshotDto>
+     */
+    List<OrderReturnProductSnapshot> queryOrderReturnProductSnapshot(String returnNum);
+
+    /**
     * 创建
     * @param resources /
     */
diff --git a/oying-system/src/main/java/com/oying/modules/sh/service/OrderService.java b/oying-system/src/main/java/com/oying/modules/sh/service/OrderService.java
index d40a98b..5939ab6 100644
--- a/oying-system/src/main/java/com/oying/modules/sh/service/OrderService.java
+++ b/oying-system/src/main/java/com/oying/modules/sh/service/OrderService.java
@@ -2,58 +2,73 @@
 
 import com.oying.modules.sh.domain.Order;
 import com.oying.modules.sh.domain.dto.OrderQueryCriteria;
+
 import java.util.List;
 import java.io.IOException;
+import java.util.Map;
 import javax.servlet.http.HttpServletResponse;
+
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.oying.modules.sh.domain.request.GeneratorOrder;
+import com.oying.modules.sh.domain.request.SubmitOrder;
 import com.oying.utils.PageResult;
 
 /**
-* @description 服务接口
-* @author lixin
-* @date 2025-06-11
-**/
+ * @author lixin
+ * @description 服务接口
+ * @date 2025-06-11
+ **/
 public interface OrderService extends IService<Order> {
 
     /**
-    * 查询数据分页
-    * @param criteria 条件
-    * @param page 分页参数
-    * @return PageResult
-    */
+     * 查询数据分页
+     *
+     * @param criteria 条件
+     * @param page     分页参数
+     * @return PageResult
+     */
     PageResult<Order> queryAll(OrderQueryCriteria criteria, Page<Object> page);
 
     /**
-    * 查询所有数据不分页
-    * @param criteria 条件参数
-    * @return List<OrderDto>
-    */
+     * 查询所有数据不分页
+     *
+     * @param criteria 条件参数
+     * @return List<OrderDto>
+     */
     List<Order> queryAll(OrderQueryCriteria criteria);
 
+    Map<String, Object> generatorOrder(GeneratorOrder generator);
+
+    Order submitOrder(SubmitOrder submit);
+
     /**
-    * 创建
-    * @param resources /
-    */
+     * 创建
+     *
+     * @param resources /
+     */
     void create(Order resources);
 
     /**
-    * 编辑
-    * @param resources /
-    */
+     * 编辑
+     *
+     * @param resources /
+     */
     void update(Order resources);
 
     /**
-    * 多选删除
-    * @param ids /
-    */
+     * 多选删除
+     *
+     * @param ids /
+     */
     void deleteAll(List<Long> ids);
 
     /**
-    * 导出数据
-    * @param all 待导出的数据
-    * @param response /
-    * @throws IOException /
-    */
+     * 导出数据
+     *
+     * @param all      待导出的数据
+     * @param response /
+     * @throws IOException /
+     */
     void download(List<Order> all, HttpServletResponse response) throws IOException;
 }
diff --git a/oying-system/src/main/java/com/oying/modules/sh/service/impl/OrderProductSnapshotServiceImpl.java b/oying-system/src/main/java/com/oying/modules/sh/service/impl/OrderProductSnapshotServiceImpl.java
index c75fece..57bf32f 100644
--- a/oying-system/src/main/java/com/oying/modules/sh/service/impl/OrderProductSnapshotServiceImpl.java
+++ b/oying-system/src/main/java/com/oying/modules/sh/service/impl/OrderProductSnapshotServiceImpl.java
@@ -11,12 +11,11 @@
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import com.oying.utils.PageUtil;
-import java.util.List;
-import java.util.Map;
+
+import java.util.*;
 import java.io.IOException;
 import javax.servlet.http.HttpServletResponse;
-import java.util.ArrayList;
-import java.util.LinkedHashMap;
+
 import com.oying.utils.PageResult;
 
 /**
@@ -41,6 +40,11 @@
     }
 
     @Override
+    public List<OrderProductSnapshot> queryOrderProductSnapshot(String orderNum) {
+        return orderProductSnapshotMapper.queryOrderProductSnapshot(orderNum);
+    }
+
+    @Override
     @Transactional(rollbackFor = Exception.class)
     public void create(OrderProductSnapshot resources) {
         orderProductSnapshotMapper.insert(resources);
diff --git a/oying-system/src/main/java/com/oying/modules/sh/service/impl/OrderReturnProductSnapshotServiceImpl.java b/oying-system/src/main/java/com/oying/modules/sh/service/impl/OrderReturnProductSnapshotServiceImpl.java
index b7cc458..2945531 100644
--- a/oying-system/src/main/java/com/oying/modules/sh/service/impl/OrderReturnProductSnapshotServiceImpl.java
+++ b/oying-system/src/main/java/com/oying/modules/sh/service/impl/OrderReturnProductSnapshotServiceImpl.java
@@ -11,12 +11,11 @@
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import com.oying.utils.PageUtil;
-import java.util.List;
-import java.util.Map;
+
+import java.util.*;
 import java.io.IOException;
 import javax.servlet.http.HttpServletResponse;
-import java.util.ArrayList;
-import java.util.LinkedHashMap;
+
 import com.oying.utils.PageResult;
 
 /**
@@ -41,6 +40,11 @@
     }
 
     @Override
+    public List<OrderReturnProductSnapshot> queryOrderReturnProductSnapshot(String returnNum) {
+        return orderReturnProductSnapshotMapper.queryOrderReturnProductSnapshot(returnNum);
+    }
+
+    @Override
     @Transactional(rollbackFor = Exception.class)
     public void create(OrderReturnProductSnapshot resources) {
         orderReturnProductSnapshotMapper.insert(resources);
diff --git a/oying-system/src/main/java/com/oying/modules/sh/service/impl/OrderReturnServiceImpl.java b/oying-system/src/main/java/com/oying/modules/sh/service/impl/OrderReturnServiceImpl.java
index e78b192..b362171 100644
--- a/oying-system/src/main/java/com/oying/modules/sh/service/impl/OrderReturnServiceImpl.java
+++ b/oying-system/src/main/java/com/oying/modules/sh/service/impl/OrderReturnServiceImpl.java
@@ -2,6 +2,7 @@
 
 import com.oying.modules.sh.domain.OrderReturn;
 import com.oying.utils.FileUtil;
+import com.oying.utils.enums.ReturnAuditEnum;
 import lombok.RequiredArgsConstructor;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -75,8 +76,11 @@
             map.put("退款价格", orderReturn.getRefundPrice());
             map.put("退款状态", orderReturn.getRefundStatus());
             map.put("退款成功时间", orderReturn.getSuccessTime());
-            map.put("退款渠道ORIGINAL: 原路退款BALANCE: 退回到余额OTHER_BALANCE: 原账户异常退到其他余额账户OTHER_BANKCARD: 原银行卡异常退到其他银行卡", orderReturn.getChannel());
+            map.put("退款渠道", orderReturn.getChannel());
             map.put("退款原因", orderReturn.getReason());
+            map.put("备注", orderReturn.getRemark());
+            map.put("图片", orderReturn.getPhotos());
+            map.put("审核状态", ReturnAuditEnum.getValue(orderReturn.getAuditStatus()));
             map.put("审核人", orderReturn.getAuditUser());
             map.put("审核时间", orderReturn.getAuditTime());
             map.put("审核信息", orderReturn.getAuditMessage());
diff --git a/oying-system/src/main/java/com/oying/modules/sh/service/impl/OrderServiceImpl.java b/oying-system/src/main/java/com/oying/modules/sh/service/impl/OrderServiceImpl.java
index 1938466..79ddf58 100644
--- a/oying-system/src/main/java/com/oying/modules/sh/service/impl/OrderServiceImpl.java
+++ b/oying-system/src/main/java/com/oying/modules/sh/service/impl/OrderServiceImpl.java
@@ -1,6 +1,8 @@
 package com.oying.modules.sh.service.impl;
 
 import com.oying.modules.sh.domain.Order;
+import com.oying.modules.sh.domain.request.GeneratorOrder;
+import com.oying.modules.sh.domain.request.SubmitOrder;
 import com.oying.utils.FileUtil;
 import lombok.RequiredArgsConstructor;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -11,12 +13,11 @@
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import com.oying.utils.PageUtil;
-import java.util.List;
-import java.util.Map;
+
+import java.util.*;
 import java.io.IOException;
 import javax.servlet.http.HttpServletResponse;
-import java.util.ArrayList;
-import java.util.LinkedHashMap;
+
 import com.oying.utils.PageResult;
 
 /**
@@ -41,6 +42,16 @@
     }
 
     @Override
+    public Order submitOrder(SubmitOrder submit) {
+        return null;
+    }
+
+    @Override
+    public Map<String, Object> generatorOrder(GeneratorOrder generator) {
+        return Collections.emptyMap();
+    }
+
+    @Override
     @Transactional(rollbackFor = Exception.class)
     public void create(Order resources) {
         orderMapper.insert(resources);
diff --git a/oying-system/src/main/resources/mapper/sh/OrderProductSnapshotMapper.xml b/oying-system/src/main/resources/mapper/sh/OrderProductSnapshotMapper.xml
index 12840c1..2a02a3e 100644
--- a/oying-system/src/main/resources/mapper/sh/OrderProductSnapshotMapper.xml
+++ b/oying-system/src/main/resources/mapper/sh/OrderProductSnapshotMapper.xml
@@ -57,4 +57,11 @@
         </where>
         order by snapshot_id desc
     </select>
-</mapper>
\ No newline at end of file
+    <select id="queryOrderProductSnapshot" resultMap="BaseResultMap">
+        select
+        <include refid="Base_Column_List"/>
+        from sh_order_product_snapshot
+        where order_num = #{orderNum}
+        order by snapshot_id desc
+    </select>
+</mapper>
diff --git a/oying-system/src/main/resources/mapper/sh/OrderReturnMapper.xml b/oying-system/src/main/resources/mapper/sh/OrderReturnMapper.xml
index 0c0e5af..2826d0b 100644
--- a/oying-system/src/main/resources/mapper/sh/OrderReturnMapper.xml
+++ b/oying-system/src/main/resources/mapper/sh/OrderReturnMapper.xml
@@ -17,6 +17,9 @@
         <result column="success_time" property="successTime"/>
         <result column="channel" property="channel"/>
         <result column="reason" property="reason"/>
+        <result column="remark" property="remark"/>
+        <result column="photos" property="photos"/>
+        <result column="audit_status" property="auditStatus"/>
         <result column="audit_user" property="auditUser"/>
         <result column="audit_time" property="auditTime"/>
         <result column="audit_message" property="auditMessage"/>
@@ -27,7 +30,7 @@
     </resultMap>
 
     <sql id="Base_Column_List">
-        return_id, return_num, order_num, user_id, store_id, store_name, store_logo, original_price, paid_price, actually_pay_price, refund_price, refund_status, success_time, channel, reason, audit_user, audit_time, audit_message, create_by, create_time, update_by, update_time
+        return_id, return_num, order_num, user_id, store_id, store_name, store_logo, original_price, paid_price, actually_pay_price, refund_price, refund_status, success_time, channel, reason, remark, photos, audit_status, audit_user, audit_time, audit_message, create_by, create_time, update_by, update_time
     </sql>
 
     <select id="findAll" resultMap="BaseResultMap">
diff --git a/oying-system/src/main/resources/mapper/sh/OrderReturnProductSnapshotMapper.xml b/oying-system/src/main/resources/mapper/sh/OrderReturnProductSnapshotMapper.xml
index affc62c..2e11a0c 100644
--- a/oying-system/src/main/resources/mapper/sh/OrderReturnProductSnapshotMapper.xml
+++ b/oying-system/src/main/resources/mapper/sh/OrderReturnProductSnapshotMapper.xml
@@ -53,4 +53,11 @@
         </where>
         order by snapshot_id desc
     </select>
-</mapper>
\ No newline at end of file
+    <select id="queryOrderReturnProductSnapshot" resultMap="BaseResultMap">
+        select
+        <include refid="Base_Column_List"/>
+        from sh_order_return_product_snapshot
+        where return_num = #{returnNum}
+        order by snapshot_id desc
+    </select>
+</mapper>

--
Gitblit v1.9.3