| | |
| | | |
| | | import com.ycl.annotation.LogSave; |
| | | import com.ycl.api.CommonResult; |
| | | import com.ycl.bo.AdminUserDetails; |
| | | import com.ycl.controller.BaseController; |
| | | import com.ycl.entity.resources.VideoResources; |
| | | import com.ycl.service.resources.IVideoResourcesService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.core.context.SecurityContextHolder; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | |
| | | |
| | | @GetMapping("/query") |
| | | @ApiOperation("查询") |
| | | public CommonResult search(@RequestParam(required = false) Integer type, |
| | | @LogSave(operationType = "视频资源管理", contain = "修改图片") |
| | | public CommonResult search(@RequestParam(required = false) String type, |
| | | @RequestParam(required = false) String startTime, |
| | | @RequestParam(required = false) String endTime, |
| | | @RequestParam Long size, |
| | |
| | | @ApiOperation("添加") |
| | | @LogSave(operationType = "视频管理", contain = "添加视频") |
| | | public CommonResult add(@RequestBody VideoResources videoResources) { |
| | | AdminUserDetails user = (AdminUserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal(); |
| | | videoResources.setCreateUser(user.getUserId()); |
| | | return CommonResult.success(iVideoResourcesService.save(videoResources)); |
| | | } |
| | | |
| | |
| | | public CommonResult delete(@RequestParam List<Integer> ids) { |
| | | return CommonResult.success(iVideoResourcesService.removeBatchByIds(ids)); |
| | | } |
| | | } |
| | | } |