CaseLiveController.java 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. package com.fdkankan.fusion.controller;
  2. import com.fdkankan.fusion.common.ResultData;
  3. import com.fdkankan.fusion.entity.CaseEntity;
  4. import com.fdkankan.fusion.entity.CaseLive;
  5. import com.fdkankan.fusion.service.ICaseLiveService;
  6. import org.apache.commons.lang3.StringUtils;
  7. import org.springframework.beans.factory.annotation.Autowired;
  8. import org.springframework.web.bind.annotation.*;
  9. /**
  10. * <p>
  11. * 前端控制器
  12. * </p>
  13. *
  14. * @author
  15. * @since 2023-08-10
  16. */
  17. @RestController
  18. @RequestMapping("/caseLive")
  19. public class CaseLiveController extends BaseController{
  20. @Autowired
  21. ICaseLiveService caseLiveService;
  22. @PostMapping("/getTakeLookRoom")
  23. public ResultData getTakeLookRoom(@RequestBody CaseLive caseLive){
  24. if (StringUtils.isNotBlank(caseLive.getNum())){
  25. return ResultData.ok(caseLiveService.getByNum(caseLive.getNum(),getUserName()));
  26. }
  27. if(caseLive.getCaseId() != null){
  28. return ResultData.ok(caseLiveService.getByCaseId(caseLive.getCaseId(),getUserName()));
  29. }
  30. return ResultData.ok();
  31. }
  32. }