From 7ffdcc19d603d132c159c9eac4a2a1b57ec82970 Mon Sep 17 00:00:00 2001
From: xin <1099200748@qq.com>
Date: Wed, 02 Jul 2025 23:03:28 +0800
Subject: [PATCH] 订单、退单状态信息
---
oying-system/src/main/java/com/oying/modules/sh/domain/dto/OrderReturnQueryCriteria.java | 3 +
oying-system/src/main/resources/mapper/sh/OrderMapper.xml | 7 +++
.idea/inspectionProfiles/Project_Default.xml | 33 ++++++++++++++++
oying-system/src/main/java/com/oying/modules/sh/domain/Order.java | 8 ++++
oying-system/src/main/resources/mapper/sh/OrderReturnMapper.xml | 7 +++
oying-system/src/main/java/com/oying/modules/sh/rest/OrderController.java | 1
oying-system/src/main/java/com/oying/modules/sh/domain/dto/OrderQueryCriteria.java | 3 +
oying-system/src/main/java/com/oying/modules/sh/domain/OrderReturn.java | 8 ++++
oying-system/src/main/java/com/oying/modules/sh/domain/OrderOperationLog.java | 14 ++++--
oying-system/src/main/resources/mapper/sh/OrderOperationLogMapper.xml | 7 ++-
10 files changed, 79 insertions(+), 12 deletions(-)
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
index bb2cb60..bb8a245 100644
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -6,8 +6,39 @@
<language minSize="96" name="Java" />
</Languages>
</inspection_tool>
+ <inspection_tool class="HttpUrlsUsage" enabled="true" level="WEAK WARNING" enabled_by_default="true">
+ <option name="ignoredUrls">
+ <list>
+ <option value="http://0.0.0.0" />
+ <option value="http://127.0.0.1" />
+ <option value="http://activemq.apache.org/schema/" />
+ <option value="http://cxf.apache.org/schemas/" />
+ <option value="http://java.sun.com/" />
+ <option value="http://javafx.com/fxml" />
+ <option value="http://javafx.com/javafx/" />
+ <option value="http://json-schema.org/draft" />
+ <option value="http://localhost" />
+ <option value="http://maven.apache.org/POM/" />
+ <option value="http://maven.apache.org/xsd/" />
+ <option value="http://mini.cqliyan.cn" />
+ <option value="http://primefaces.org/ui" />
+ <option value="http://schema.cloudfoundry.org/spring/" />
+ <option value="http://schemas.xmlsoap.org/" />
+ <option value="http://tiles.apache.org/" />
+ <option value="http://www.ibm.com/webservices/xsd" />
+ <option value="http://www.jboss.com/xml/ns/" />
+ <option value="http://www.jboss.org/j2ee/schema/" />
+ <option value="http://www.springframework.org/schema/" />
+ <option value="http://www.springframework.org/security/tags" />
+ <option value="http://www.springframework.org/tags" />
+ <option value="http://www.thymeleaf.org" />
+ <option value="http://www.w3.org/" />
+ <option value="http://xmlns.jcp.org/" />
+ </list>
+ </option>
+ </inspection_tool>
<inspection_tool class="JavadocDeclaration" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ADDITIONAL_TAGS" value="date,description" />
</inspection_tool>
</profile>
-</component>
\ No newline at end of file
+</component>
diff --git a/oying-system/src/main/java/com/oying/modules/sh/domain/Order.java b/oying-system/src/main/java/com/oying/modules/sh/domain/Order.java
index 0023918..2f71e99 100644
--- a/oying-system/src/main/java/com/oying/modules/sh/domain/Order.java
+++ b/oying-system/src/main/java/com/oying/modules/sh/domain/Order.java
@@ -33,6 +33,14 @@
private String orderNum;
@NotNull
+ @ApiModelProperty(value = "订单状态")
+ private Integer orderStatus = 0;
+
+ @NotBlank
+ @ApiModelProperty(value = "订单状态描述")
+ private String orderStatusDescribe;
+
+ @NotNull
@ApiModelProperty(value = "用户id")
private Long userId;
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 ea36f06..78ff273 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
@@ -25,17 +25,21 @@
@ApiModelProperty(value = "主键")
private Long logId;
- @NotNull
- @ApiModelProperty(value = "用户id")
- private Long userId;
+ @NotBlank
+ @ApiModelProperty(value = "用户账号")
+ private String username;
@NotBlank
@ApiModelProperty(value = "用户类型")
private String userType;
- @NotBlank
+ @NotNull
@ApiModelProperty(value = "用户操作")
- private String operation;
+ private Integer operation = 0;
+
+ @NotBlank
+ @ApiModelProperty(value = "用户操作描述")
+ private String operationDescribe = "提交订单";
@NotBlank
@ApiModelProperty(value = "备注")
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 ffed8c7..45414ad 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
@@ -33,6 +33,14 @@
@ApiModelProperty(value = "退单号")
private String returnNum;
+ @NotNull
+ @ApiModelProperty(value = "退单状态")
+ private Integer returnStatus = 0;
+
+ @NotBlank
+ @ApiModelProperty(value = "退单状态描述")
+ private String returnStatusDescribe;
+
@NotBlank
@ApiModelProperty(value = "订单号")
private String orderNum;
diff --git a/oying-system/src/main/java/com/oying/modules/sh/domain/dto/OrderQueryCriteria.java b/oying-system/src/main/java/com/oying/modules/sh/domain/dto/OrderQueryCriteria.java
index 42b5519..cb32e5d 100644
--- a/oying-system/src/main/java/com/oying/modules/sh/domain/dto/OrderQueryCriteria.java
+++ b/oying-system/src/main/java/com/oying/modules/sh/domain/dto/OrderQueryCriteria.java
@@ -18,6 +18,9 @@
@ApiModelProperty(value = "每页数据量", example = "10")
private Integer size = 10;
+ @ApiModelProperty(value = "订单状态")
+ private Integer orderStatus;
+
@ApiModelProperty(value = "订单号")
private String orderNum;
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 4438780..4b98305 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
@@ -21,6 +21,9 @@
@ApiModelProperty(value = "退单号")
private String returnNum;
+ @ApiModelProperty(value = "订单状态")
+ private Integer returnStatus;
+
@ApiModelProperty(value = "订单号")
private String orderNum;
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 bd51dfc..22d967a 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
@@ -75,7 +75,6 @@
@DeleteMapping
@Log("删除订单信息")
@ApiOperation("删除订单信息")
- @PreAuthorize("@el.check('order:del')")
public ResponseEntity<Object> deleteOrder(@ApiParam(value = "传ID数组[]") @RequestBody List<Long> ids) {
orderService.deleteAll(ids);
return new ResponseEntity<>(R.success(), HttpStatus.OK);
diff --git a/oying-system/src/main/resources/mapper/sh/OrderMapper.xml b/oying-system/src/main/resources/mapper/sh/OrderMapper.xml
index 427731f..6a09cbc 100644
--- a/oying-system/src/main/resources/mapper/sh/OrderMapper.xml
+++ b/oying-system/src/main/resources/mapper/sh/OrderMapper.xml
@@ -4,6 +4,8 @@
<resultMap id="BaseResultMap" type="com.oying.modules.sh.domain.Order">
<id column="order_id" property="orderId"/>
<result column="order_num" property="orderNum"/>
+ <result column="order_status" property="orderStatus"/>
+ <result column="order_status_describe" property="orderStatusDescribe"/>
<result column="user_id" property="userId"/>
<result column="store_id" property="storeId"/>
<result column="store_name" property="storeName"/>
@@ -31,7 +33,7 @@
</resultMap>
<sql id="Base_Column_List">
- order_id, order_num, user_id, store_id, store_name, store_logo, order_describe, original_price, paid_price, actually_pay_price, pay_state, pay_message, pay_type, pay_time, expire_time, openid, app_id, timestamp, nonce_str, package_val, sign_type, pay_sign, create_by, create_time, update_by, update_time
+ order_id, order_num, order_status, order_status_describe, user_id, store_id, store_name, store_logo, order_describe, original_price, paid_price, actually_pay_price, pay_state, pay_message, pay_type, pay_time, expire_time, openid, app_id, timestamp, nonce_str, package_val, sign_type, pay_sign, create_by, create_time, update_by, update_time
</sql>
<select id="findAll" resultMap="BaseResultMap">
@@ -42,6 +44,9 @@
<if test="criteria.orderNum != null">
and order_num like concat('%',#{criteria.orderNum},'%')
</if>
+ <if test="criteria.orderStatus != null">
+ and order_status = #{criteria.orderStatus}
+ </if>
<if test="criteria.userId != null">
and user_id = #{criteria.userId}
</if>
diff --git a/oying-system/src/main/resources/mapper/sh/OrderOperationLogMapper.xml b/oying-system/src/main/resources/mapper/sh/OrderOperationLogMapper.xml
index 1611552..a72896c 100644
--- a/oying-system/src/main/resources/mapper/sh/OrderOperationLogMapper.xml
+++ b/oying-system/src/main/resources/mapper/sh/OrderOperationLogMapper.xml
@@ -3,9 +3,10 @@
<mapper namespace="com.oying.modules.sh.mapper.OrderOperationLogMapper">
<resultMap id="BaseResultMap" type="com.oying.modules.sh.domain.OrderOperationLog">
<id column="log_id" property="logId"/>
- <result column="user_id" property="userId"/>
+ <result column="username" property="username"/>
<result column="user_type" property="userType"/>
<result column="operation" property="operation"/>
+ <result column="operation_describe" property="operationDescribe"/>
<result column="remark" property="remark"/>
<result column="snapshot_data" property="snapshotData"/>
<result column="operation_time" property="operationTime"/>
@@ -13,7 +14,7 @@
</resultMap>
<sql id="Base_Column_List">
- log_id, user_id, user_type, operation, remark, snapshot_data, operation_time, order_num
+ log_id, username, user_type, operation, operation_describe, remark, snapshot_data, operation_time, order_num
</sql>
<select id="findAll" resultMap="BaseResultMap">
@@ -36,4 +37,4 @@
</where>
order by log_id desc
</select>
-</mapper>
\ No newline at end of file
+</mapper>
diff --git a/oying-system/src/main/resources/mapper/sh/OrderReturnMapper.xml b/oying-system/src/main/resources/mapper/sh/OrderReturnMapper.xml
index 2826d0b..83e3b73 100644
--- a/oying-system/src/main/resources/mapper/sh/OrderReturnMapper.xml
+++ b/oying-system/src/main/resources/mapper/sh/OrderReturnMapper.xml
@@ -4,6 +4,8 @@
<resultMap id="BaseResultMap" type="com.oying.modules.sh.domain.OrderReturn">
<id column="return_id" property="returnId"/>
<result column="return_num" property="returnNum"/>
+ <result column="return_status" property="returnStatus"/>
+ <result column="return_status_describe" property="returnStatusDescribe"/>
<result column="order_num" property="orderNum"/>
<result column="user_id" property="userId"/>
<result column="store_id" property="storeId"/>
@@ -30,7 +32,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, remark, photos, audit_status, audit_user, audit_time, audit_message, create_by, create_time, update_by, update_time
+ return_id, return_num, return_status, return_status_describe, 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">
@@ -41,6 +43,9 @@
<if test="criteria.returnNum != null">
and return_num like concat('%',#{criteria.returnNum},'%')
</if>
+ <if test="criteria.returnStatus != null">
+ and return_status = #{criteria.returnStatus}
+ </if>
<if test="criteria.orderNum != null">
and order_num like concat('%',#{criteria.orderNum},'%')
</if>
--
Gitblit v1.9.3