| | |
| | | package com.ruoyi.promotion.controller.management; |
| | | |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.page.PageDTO; |
| | | import com.ruoyi.promotion.controller.management.dto.MgtPromotionWishListDTO; |
| | | import com.ruoyi.promotion.controller.management.dto.MgtPromotionWishListQuery; |
| | | import com.ruoyi.promotion.controller.management.vo.MgtPromotionWishListVO; |
| | | import com.ruoyi.promotion.service.IPromotionWishListService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | 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; |
| | | |
| | |
| | | @RestController |
| | | @RequestMapping("/mgt/promotion-wish-list") |
| | | @RequiredArgsConstructor |
| | | @Api(value = "管理后台-心愿求购管理相关接口", tags = "管理后台-心愿求购管理相关接口") |
| | | @Api(value = "管理后台-心愿求购管理相关接口", tags = "管理后台-心愿求购管理相关接口筛选条件为:用户发布") |
| | | public class MgtPromotionWishListController { |
| | | |
| | | private final IPromotionWishListService promotionWishListService; |
| | | |
| | | /** |
| | | * 获取心愿求购列表的分页数据 |
| | | * |
| | | * @param query 心愿求购管理查询对象 |
| | | * @return PageDTO<MgtPromotionWishListVO> |
| | | */ |
| | | @ApiOperation("获取心愿求购列表的分页数据") |
| | | @PostMapping("page") |
| | | public R<PageDTO<MgtPromotionWishListVO>> getPromotionWishListPage( |
| | | @Validated @RequestBody MgtPromotionWishListQuery query) { |
| | | return R.ok(promotionWishListService.getPromotionWishListPage(query)); |
| | | } |
| | | |
| | | /** |
| | | * 查看详情 |
| | | * |
| | | * @param id 心愿求购id |
| | | * @return MgtPromotionWishListVO |
| | | */ |
| | | @ApiOperation("查看详情") |
| | | @GetMapping("/detail/{id}") |
| | | public R<MgtPromotionWishListVO> getPromotionWishDetail( |
| | | @ApiParam(value = "心愿求购id", required = true) @PathVariable("id") Long id) { |
| | | return R.ok(promotionWishListService.getPromotionWishDetail(id)); |
| | | } |
| | | |
| | | /** |
| | | * 回复 |
| | | * |
| | | * @param dto 心愿求购数据传输对象 |
| | | */ |
| | | @ApiOperation("回复") |
| | | @PutMapping("/reply") |
| | | public R<?> reply(@Validated @RequestBody MgtPromotionWishListDTO dto) { |
| | | promotionWishListService.reply(dto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |