From 2432594a4d11b47a503795349defa31872f85789 Mon Sep 17 00:00:00 2001
From: cloudroam <cloudroam>
Date: 星期三, 04 十二月 2024 12:33:39 +0800
Subject: [PATCH] 操作日志
---
src/main/java/com/mzl/flower/web/payment/OrderController.java | 27 +++++++++++++++++++++++----
1 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/src/main/java/com/mzl/flower/web/payment/OrderController.java b/src/main/java/com/mzl/flower/web/payment/OrderController.java
index 476248d..fb13881 100644
--- a/src/main/java/com/mzl/flower/web/payment/OrderController.java
+++ b/src/main/java/com/mzl/flower/web/payment/OrderController.java
@@ -4,11 +4,14 @@
import com.mzl.flower.base.BaseController;
import com.mzl.flower.base.R;
import com.mzl.flower.base.ReturnDataDTO;
+import com.mzl.flower.base.annotation.OperationLog;
import com.mzl.flower.constant.Constants;
import com.mzl.flower.dto.request.payment.OrderAddressUpdateDTO;
import com.mzl.flower.dto.request.payment.OrderDeliveryNoDTO;
import com.mzl.flower.dto.request.payment.OrderQueryDTO;
import com.mzl.flower.dto.response.payment.*;
+import com.mzl.flower.entity.log.OperationRecord;
+import com.mzl.flower.entity.payment.Order;
import com.mzl.flower.service.payment.DeliveryOrderService;
import com.mzl.flower.service.payment.OrderService;
import com.mzl.flower.service.payment.UserPaymentV3Service;
@@ -72,10 +75,14 @@
}
@PostMapping("/list/send")
+ @OperationLog(value = "发货", type = "order_list")
@ApiOperation(value = "没有合伙人的花店上传快递号发货")
public ResponseEntity<ReturnDataDTO> saveDeliveryNo(@RequestBody OrderDeliveryNoDTO dto) {
orderService.saveDeliveryNo(dto);
- return returnData(R.SUCCESS.getCode(), null);
+ Order orderInfoById = orderService.getOrderInfoById(dto.getId());
+ String content = "订单发货id:【" + dto.getId() + "】,订单号:【" + orderInfoById.getOrderNo() + "】,快递号:【" + dto.getDeliveryNo() + "】";
+ OperationRecord operationRecord = getOperationRecord(content);
+ return returnData(R.SUCCESS.getCode(), null, operationRecord);
}
@GetMapping("/list/abnormal/details")
@@ -88,10 +95,14 @@
}
@GetMapping("/list/abnormal/process")
+ @OperationLog(value = "异常订单处理", type = "order_list")
@ApiOperation(value = "异常订单处理(不管有没有退款金额,建议都要处理)")
public ResponseEntity<ReturnDataDTO> processLevelDown(String id) throws Exception {
orderService.processAbnormalOrder(id);
- return returnData(R.SUCCESS.getCode(), null);
+ Order orderInfoById = orderService.getOrderInfoById(id);
+ String content = "订单退款id:【" + id + "】,订单号:【" + orderInfoById.getOrderNo() + "】操作退款,降级打款记录id:【" + orderInfoById.getTransferId() + "】";
+ OperationRecord operationRecord = getOperationRecord(content);
+ return returnData(R.SUCCESS.getCode(), null, operationRecord);
}
@GetMapping("/list/check/info/reduce")
@@ -172,6 +183,7 @@
}
@GetMapping(value = "/refund")
+ @OperationLog(value = "订单退款", type = "order_list")
@ApiImplicitParams({
@ApiImplicitParam(name = "id", value = "订单id", required = true, dataType = "String", paramType = "query"),
})
@@ -179,14 +191,21 @@
public ResponseEntity<ReturnDataDTO> refundOrder(String id) {
orderService.refundCheckAdmin(id);
paymentV3Service.refundOrder(id);
- return returnData(R.SUCCESS.getCode(), null);
+ Order orderInfoById = orderService.getOrderInfoById(id);
+ String content = "订单退款id:【" + id + "】,订单号:【" + orderInfoById.getOrderNo() + "】操作退款";
+ OperationRecord operationRecord = getOperationRecord(content);
+ return returnData(R.SUCCESS.getCode(), null, operationRecord);
}
@PostMapping("/page/update")
+ @OperationLog(value = "订单修改", type = "order_list")
@ApiOperation(value = "订单修改", notes = "订单修改")
public ResponseEntity<ReturnDataDTO> operationUpdate(@Validated @RequestBody OrderAddressUpdateDTO dto) {
orderService.operationUpdate(dto);
- return returnData(R.SUCCESS.getCode(),null);
+ Order orderInfoById = orderService.getOrderInfoById(dto.getId());
+ String content = "订单修改id:【" + dto.getId() + "】,订单号:【" + orderInfoById.getOrderNo() + "】,地区:【" + dto.getCustomerProvince() + dto.getCustomerCity() + dto.getCustomerRegion() + "】,详细地址:【" + dto.getCustomerAddress() + "】,联系方式:【" + dto.getCustomerTel() + "】";
+ OperationRecord operationRecord = getOperationRecord(content);
+ return returnData(R.SUCCESS.getCode(), null, operationRecord);
}
@GetMapping("/list/export")
--
Gitblit v1.9.3