WebVideoController.java 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. package com.crm.custom.controller;
  2. import com.crm.custom.service.WebVideoFeignService;
  3. import com.crm.login.rely.backend.controller.BaseLoginController;
  4. import com.crm.rely.backend.core.dto.base.BaseResultDto;
  5. import com.crm.rely.backend.core.entity.base.SingleLongEntity;
  6. import com.crm.rely.backend.model.entity.custom.video.record.CustomVideoRecordAddEntity;
  7. import com.crm.rely.backend.model.entity.web.video.WebVideoSearchListEntity;
  8. import org.springframework.beans.factory.annotation.Autowired;
  9. import org.springframework.validation.annotation.Validated;
  10. import org.springframework.web.bind.annotation.PostMapping;
  11. import org.springframework.web.bind.annotation.RequestBody;
  12. import org.springframework.web.bind.annotation.RequestMapping;
  13. import org.springframework.web.bind.annotation.RestController;
  14. /**
  15. * @author: houn
  16. */
  17. @RestController
  18. @RequestMapping("/web/video")
  19. public class WebVideoController extends BaseLoginController {
  20. @Autowired
  21. private WebVideoFeignService feignService;
  22. /**
  23. * @param entity
  24. * @return
  25. * @throws Exception
  26. */
  27. @PostMapping("/list")
  28. public BaseResultDto list(@RequestBody @Validated WebVideoSearchListEntity entity) throws Exception {
  29. return feignService.customList(entity);
  30. }
  31. @PostMapping("/single")
  32. public BaseResultDto single(@RequestBody @Validated SingleLongEntity entity) throws Exception {
  33. return feignService.customSingle(entity);
  34. }
  35. @PostMapping("/read")
  36. public BaseResultDto read(@RequestBody @Validated CustomVideoRecordAddEntity entity) throws Exception {
  37. return feignService.customRead(entity);
  38. }
  39. }