HwMeetingController.java 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. package com.ruoyi.system.controller;
  2. import cn.hutool.http.HttpStatus;
  3. import com.ruoyi.common.core.web.domain.AjaxResult;
  4. import com.ruoyi.system.remoteapi.service.center.middleground.RemoteMiddleGroundBaseService;
  5. import org.springframework.web.bind.annotation.GetMapping;
  6. import org.springframework.web.bind.annotation.PathVariable;
  7. import org.springframework.web.bind.annotation.RequestMapping;
  8. import org.springframework.web.bind.annotation.RestController;
  9. import javax.annotation.Resource;
  10. import java.io.UnsupportedEncodingException;
  11. @RestController
  12. @RequestMapping("/hwMeeting")
  13. public class HwMeetingController {
  14. @Resource
  15. public RemoteMiddleGroundBaseService remoteMiddleGroundBaseService;
  16. @RequestMapping("/joinConferences/{eventId}/{meetingSubject}/{userName}")
  17. public AjaxResult joinConferences(@PathVariable("eventId") String eventId, @PathVariable("meetingSubject") String meetingSubject, @PathVariable("userName") String userName) throws UnsupportedEncodingException {
  18. AjaxResult ajaxResult = remoteMiddleGroundBaseService.hasConferences(eventId,meetingSubject,userName);
  19. if(ajaxResult.get("code") != null && ajaxResult.get("code").equals(HttpStatus.HTTP_OK)){
  20. return AjaxResult.success(ajaxResult.get("data"));
  21. }
  22. return AjaxResult.error();
  23. }
  24. /**
  25. * 获取入会链接
  26. * */
  27. @GetMapping("/guestJoinUri/{eventId}")
  28. public AjaxResult guestJoinUri(@PathVariable(name = "eventId") String eventId){
  29. return remoteMiddleGroundBaseService.guestJoinUri(eventId);
  30. }
  31. }