| | |
| | | package com.oying.modules.sh.rest; |
| | | |
| | | import com.oying.annotation.Log; |
| | | import com.oying.modules.sh.domain.OrderOperationLog; |
| | | import com.oying.modules.sh.service.OrderOperationLogService; |
| | | import com.oying.modules.sh.domain.dto.OrderOperationLogQueryCriteria; |
| | | import com.oying.utils.R; |
| | |
| | | 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.*; |
| | | |
| | |
| | | return new ResponseEntity<>(R.success(orderOperationLogService.queryAll(criteria, page)), HttpStatus.OK); |
| | | } |
| | | |
| | | @PostMapping |
| | | @Log("新增订单操作日志") |
| | | @ApiOperation("新增订单操作日志") |
| | | @PreAuthorize("@el.check('orderOperationLog:add')") |
| | | public ResponseEntity<Object> createOrderOperationLog(@Validated @RequestBody OrderOperationLog resources) { |
| | | orderOperationLogService.create(resources); |
| | | return new ResponseEntity<>(R.success(), HttpStatus.CREATED); |
| | | @GetMapping("getByOrderNum") |
| | | @ApiOperation("根据订单号查询订单操作日志") |
| | | @PreAuthorize("@el.check('orderOperationLog:list')") |
| | | public ResponseEntity<Object> queryOrderOperationLog(@RequestParam String orderNum) { |
| | | return new ResponseEntity<>(R.success(orderOperationLogService.getByOrderNum(orderNum)), HttpStatus.OK); |
| | | } |
| | | } |