| | |
| | | package com.ruoyi.promotion.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.security.annotation.InnerAuth; |
| | | import com.ruoyi.promotion.service.IPromotionVideoService; |
| | | import java.util.List; |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.ruoyi.system.api.domain.PromotionVideo; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | |
| | | @RequestMapping("/promotion-video") |
| | | public class PromotionVideoController { |
| | | |
| | | @Resource |
| | | private IPromotionVideoService iPromotionVideoService; |
| | | |
| | | @PostMapping("/getPromotionVideoList") |
| | | @InnerAuth |
| | | public R<List<PromotionVideo>> getPromotionVideoList() { |
| | | List<PromotionVideo> list = iPromotionVideoService.list(new LambdaQueryWrapper<PromotionVideo>().eq(PromotionVideo::getDelFlag,0)); |
| | | return R.ok(list); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/getPromotionVideoOne") |
| | | @ResponseBody |
| | | @InnerAuth |
| | | public R<PromotionVideo> getPromotionVideoOne(@RequestBody Long promotionVideoId) { |
| | | PromotionVideo promotionVideoOne=iPromotionVideoService.getById(promotionVideoId); |
| | | return R.ok(promotionVideoOne); |
| | | |
| | | } |
| | | |
| | | } |