From c1d20b425b10e8ba59f102dd1ab413055883eed0 Mon Sep 17 00:00:00 2001 From: 彭雪彬 <1724387007@qq.com> Date: Mon, 14 Jul 2025 16:57:11 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/xin' into pxb --- oying-system/src/main/java/com/oying/modules/sh/rest/OrderProductSnapshotController.java | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 42 insertions(+), 0 deletions(-) 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 new file mode 100644 index 0000000..4530653 --- /dev/null +++ b/oying-system/src/main/java/com/oying/modules/sh/rest/OrderProductSnapshotController.java @@ -0,0 +1,42 @@ +package com.oying.modules.sh.rest; + +import com.oying.annotation.Log; +import com.oying.modules.sh.domain.OrderProductSnapshot; +import com.oying.modules.sh.service.OrderProductSnapshotService; +import com.oying.utils.R; +import lombok.RequiredArgsConstructor; + +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import io.swagger.annotations.*; + +/** + * @author lixin + * @date 2025-06-11 + **/ +@RestController +@RequiredArgsConstructor +@Api(tags = "SH:订单商品快照") +@RequestMapping("/api/orderProductSnapshot") +public class OrderProductSnapshotController { + + private final OrderProductSnapshotService orderProductSnapshotService; + + @GetMapping + @ApiOperation("根据订单号查询订单商品快照") + public ResponseEntity<Object> queryOrderProductSnapshot(@RequestParam String orderNum) { + return new ResponseEntity<>(R.success(orderProductSnapshotService.queryOrderProductSnapshot(orderNum)), HttpStatus.OK); + } + + @PutMapping + @Log("修改订单商品快照") + @ApiOperation("修改订单商品快照") + @PreAuthorize("@el.check('orderProductSnapshot:edit')") + public ResponseEntity<Object> updateOrderProductSnapshot(@Validated @RequestBody OrderProductSnapshot resources) { + orderProductSnapshotService.update(resources); + return new ResponseEntity<>(HttpStatus.NO_CONTENT); + } +} -- Gitblit v1.9.3