| | |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.ruoyi.auction.service.IAuctionGoodsService; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.security.annotation.InnerAuth; |
| | | import com.ruoyi.system.api.domain.AuctionGoods; |
| | | import com.ruoyi.system.api.domain.dto.MemberAuctionSalesroomBondDTO; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | |
| | | private final IAuctionGoodsService auctionGoodsService; |
| | | |
| | | @PutMapping("/auction-goods/end/{id}") |
| | | @InnerAuth |
| | | @PostMapping("/getAuctionGoodsOne") |
| | | public R<AuctionGoods> getAuctionGoodsOne(@RequestBody MemberAuctionSalesroomBondDTO memberAuctionSalesroomBondDTO) { |
| | | AuctionGoods auctionGoods=auctionGoodsService.getById(memberAuctionSalesroomBondDTO.getAuctionGoodsId()); |
| | | return R.ok(auctionGoods); |
| | | |
| | | } |
| | | |
| | | @PutMapping("/end/{id}") |
| | | R<?> endAuctionGoods(@PathVariable("id") Long id) { |
| | | try { |
| | | auctionGoodsService.endAuctionGoods(id); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @PutMapping("/auction-goods/start/{id}") |
| | | @PutMapping("/start/{id}") |
| | | R<?> startAuctionGoods(@PathVariable("id") Long id) { |
| | | try { |
| | | auctionGoodsService.startAuctionGoods(id); |