xin
2025-07-02 84277cefdc270f88cd9f2ece3419a428495c7cf2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package com.oying.modules.sh.rest;
 
import com.oying.annotation.Log;
import com.oying.modules.sh.domain.OrderReturnProductSnapshot;
import com.oying.modules.sh.service.OrderReturnProductSnapshotService;
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/orderReturnProductSnapshot")
public class OrderReturnProductSnapshotController {
 
    private final OrderReturnProductSnapshotService orderReturnProductSnapshotService;
 
    @GetMapping
    @ApiOperation("查询退款订单商品快照")
    public ResponseEntity<Object> queryOrderReturnProductSnapshot(@RequestParam String returnNum) {
        return new ResponseEntity<>(R.success(orderReturnProductSnapshotService.queryOrderReturnProductSnapshot(returnNum)), HttpStatus.OK);
    }
 
    @PutMapping
    @Log("修改退款订单商品快照")
    @ApiOperation("修改退款订单商品快照")
    @PreAuthorize("@el.check('orderReturnProductSnapshot:edit')")
    public ResponseEntity<Object> updateOrderReturnProductSnapshot(@Validated @RequestBody OrderReturnProductSnapshot resources) {
        orderReturnProductSnapshotService.update(resources);
        return new ResponseEntity<>(R.success(), HttpStatus.NO_CONTENT);
    }
}