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);
|
}
|
}
|