From 6c823dd44dbde79f008001a2a11e7bf9bc6bf8cc Mon Sep 17 00:00:00 2001
From: cloudroam <cloudroam>
Date: 星期三, 04 十二月 2024 18:15:44 +0800
Subject: [PATCH] fix:合伙人列表操作日志
---
src/main/java/com/mzl/flower/web/payment/OrderController.java | 50 ++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 42 insertions(+), 8 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 5b60475..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,14 +4,17 @@
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.UserPaymentSybService;
+import com.mzl.flower.service.payment.UserPaymentV3Service;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
@@ -23,6 +26,7 @@
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
+import java.time.LocalDateTime;
import java.util.List;
@RestController
@@ -36,7 +40,7 @@
private OrderService orderService;
@Autowired
- private UserPaymentSybService paymentSybService;
+ private UserPaymentV3Service paymentV3Service;
@Autowired
private DeliveryOrderService deliveryOrderService;
@@ -71,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")
@@ -87,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")
@@ -171,21 +183,29 @@
}
@GetMapping(value = "/refund")
+ @OperationLog(value = "订单退款", type = "order_list")
@ApiImplicitParams({
@ApiImplicitParam(name = "id", value = "订单id", required = true, dataType = "String", paramType = "query"),
})
@ApiOperation(value = "退款")
- public ResponseEntity<ReturnDataDTO> refundOrder(String id) throws Exception {
+ public ResponseEntity<ReturnDataDTO> refundOrder(String id) {
orderService.refundCheckAdmin(id);
- paymentSybService.refundOrder(id);
- return returnData(R.SUCCESS.getCode(), null);
+ paymentV3Service.refundOrder(id);
+ 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")
@@ -193,4 +213,18 @@
public void exportOrderDetail(HttpServletResponse response, OrderQueryDTO queryOrderDTO) {
orderService.exportOrderDetail(response, queryOrderDTO);
}
+
+ @GetMapping("/time/now")
+ @ApiOperation(value = "订单导出")
+ public ResponseEntity<Long> getNowTime() {
+ return returnData(R.SUCCESS.getCode(),System.currentTimeMillis());
+ }
+
+ @GetMapping("/elk/date")
+ @ApiOperation(value = "订单日期刷新")
+ public ResponseEntity<Long> getElkDate() {
+ orderService.refreshDate();
+ return returnData(R.SUCCESS.getCode(),System.currentTimeMillis());
+ }
+
}
--
Gitblit v1.9.3