package cn.flightfeather.supervision.lightshare.web
|
|
|
import cn.flightfeather.supervision.domain.entity.MeetingInfo
|
import cn.flightfeather.supervision.domain.entity.Participant
|
import cn.flightfeather.supervision.lightshare.service.MeetingInfoService
|
import cn.flightfeather.supervision.lightshare.vo.MeetingMaterialVo
|
import cn.flightfeather.supervision.lightshare.vo.UserStatusVo
|
import cn.flightfeather.supervision.websocket.Processor
|
import io.swagger.annotations.Api
|
import org.springframework.web.bind.annotation.*
|
import org.springframework.web.multipart.MultipartFile
|
import javax.servlet.http.HttpServletResponse
|
|
@Api(tags = ["在线会议API接口"])
|
@RestController
|
@RequestMapping("/meeting")
|
class MeetingInfoController(val meetingInfoService: MeetingInfoService) {
|
|
/*****************************会议********************************************/
|
@GetMapping("/info/{userId}")
|
fun getMeetingInfo(
|
@PathVariable userId: String,
|
@RequestParam(value = "status") status: Int,
|
@RequestParam(value = "page") page: Int,
|
@RequestParam(value = "per_page") perPage: Int,
|
response: HttpServletResponse
|
) = meetingInfoService.getMeetingInfo(userId, status, page, perPage, response)
|
|
@GetMapping("/info/meetingId/{userId}")
|
fun getMeetingInfoById(
|
@PathVariable userId: String,
|
@RequestParam(value = "meetingId") meetingId: String
|
) = meetingInfoService.getMeetingInfoById(userId, meetingId)
|
|
@PostMapping("/info/{userId}")
|
fun addMeetingInfo(
|
@PathVariable userId: String,
|
@RequestBody meetingInfo: MeetingInfo
|
) = meetingInfoService.addMeetingInfo(userId, meetingInfo)
|
|
@PutMapping("/info/{userId}")
|
fun updateMeeting(
|
@PathVariable userId: String,
|
@RequestBody meetingInfo: MeetingInfo
|
) = meetingInfoService.updateMeetingInfo(userId, meetingInfo)
|
|
@PostMapping("/delete/{userId}")
|
fun deleteMeeting(
|
@PathVariable userId: String,
|
@RequestParam(value = "meetingId") meetingId: String
|
) = meetingInfoService.deleteMeetingInfo(userId, meetingId)
|
|
@GetMapping("/registerStatus/{userId}")
|
fun getMeetingRegisterStatus(
|
@PathVariable userId: String,
|
@RequestParam("meetingId") meetingId: String,
|
@RequestParam("roomId") roomId: String?
|
) = meetingInfoService.getMeetingRegisterStatus(userId, meetingId, roomId)
|
|
@GetMapping("/registerRecord/{userId}")
|
fun getMeetingRegisterRecord(
|
@PathVariable userId: String,
|
@RequestParam("meetingId") meetingId: String,
|
@RequestParam("roomId") roomId: String?
|
) = meetingInfoService.getMeetingRegisterRecord(userId, meetingId, roomId)
|
|
@PostMapping("/register/{userId}")
|
fun meetingRegister(
|
@PathVariable userId: String,
|
@RequestParam("meetingId") meetingId: String,
|
@RequestParam("roomId") roomId: String?
|
) = meetingInfoService.meetingRegister(userId, meetingId, roomId)
|
|
@GetMapping("/room/{userId}")
|
fun getMeetingRoom(
|
@PathVariable userId: String,
|
@RequestParam("meetingId") meetingId: String
|
) = meetingInfoService.getMeetingRoom(userId, meetingId)
|
|
/*****************************参会人员********************************************/
|
@PostMapping("/participant/{userId}")
|
fun addParticipant(
|
@PathVariable userId: String,
|
@RequestBody participantList: List<Participant>
|
) = meetingInfoService.addParticipant(userId, participantList)
|
|
@PostMapping("/participant/{userId}/delete")
|
fun deleteParticipant(
|
@PathVariable userId: String,
|
@RequestParam(value = "meetingId") meetingId: String,
|
@RequestBody participantList: List<Participant>
|
) = meetingInfoService.deleteParticipant(userId, meetingId, participantList)
|
|
@GetMapping("/participant/{userId}")
|
fun getParticipant(
|
@PathVariable userId: String,
|
@RequestParam("meetingId") meetingId: String,
|
@RequestParam("roomId") roomId: String?,
|
@RequestParam("participantType") participantType: Int
|
) = meetingInfoService.getParticipant(userId, meetingId, roomId, participantType)
|
|
@GetMapping("/participant/{userId}/onlineCount")
|
fun getOnlineUsers(
|
@PathVariable userId: String,
|
@RequestParam("meetingId") meetingId: String,
|
@RequestParam("roomId") roomId: String
|
) = meetingInfoService.getOnlineUsers(userId, meetingId, roomId)
|
|
@PostMapping("/participant/{userId}/setMute")
|
fun setMuteStatus(
|
@PathVariable userId: String,
|
@RequestParam("meetingId") meetingId: String,
|
@RequestParam("roomId") roomId: String,
|
@RequestBody userStatusList: List<UserStatusVo>
|
) = meetingInfoService.setMuteStatus(userId, meetingId, roomId, userStatusList)
|
|
/*****************************会议文件********************************************/
|
@PostMapping("/uploadFile/{userId}")
|
fun uploadFiles(
|
@PathVariable userId: String,
|
@RequestParam("meetingId") meetingId: String,
|
@RequestParam("roomId") roomId: String,
|
@RequestParam("documentType") documentType: Int,
|
@RequestParam("params") msgVo: String,
|
@RequestPart("files") files: Array<MultipartFile>
|
) = meetingInfoService.uploadFile(userId, meetingId, roomId, msgVo, files, documentType)
|
|
@GetMapping("/material/{userId}")
|
fun getMeetingMaterials(
|
@PathVariable userId: String,
|
@RequestParam("meetingId") meetingId: String,
|
@RequestParam("mediaType") mediaType: Int,
|
@RequestParam(value = "page") page: Int,
|
@RequestParam(value = "per_page") perPage: Int,
|
response: HttpServletResponse
|
) = meetingInfoService.getMeetingMaterials(userId, meetingId, mediaType, page, perPage, response)
|
|
@PostMapping("/material/sign/{userId}")
|
fun updateSignState(
|
@PathVariable userId: String,
|
@RequestBody signStateList: List<MeetingMaterialVo>
|
) = meetingInfoService.updateSignState(userId, signStateList)
|
|
@GetMapping("/count/material/{userId}")
|
fun getMaterialCount(
|
@PathVariable userId: String,
|
@RequestParam("meetingId") meetingId: String,
|
@RequestParam("mediaType") mediaType: Int,
|
@RequestParam("meetingFileType") meetingFileType: Int
|
) = meetingInfoService.getMaterialCount(userId, meetingId, mediaType, meetingFileType)
|
|
@PostMapping("/material/delete/{userId}")
|
fun deleteFiles(
|
@PathVariable userId: String,
|
@RequestParam("meetingId") meetingId: String,
|
@RequestBody fileList: List<MeetingMaterialVo>
|
) = meetingInfoService.deleteFiles(userId, meetingId, fileList)
|
|
@GetMapping("/count/all/material/{userId}")
|
fun getAllMaterialSignStatus(
|
@PathVariable userId: String,
|
@RequestParam("meetingId") meetingId: String
|
) = meetingInfoService.getAllMaterialSignStatus(userId, meetingId)
|
|
/*****************************会议聊天记录********************************************/
|
@GetMapping("/comment/{userId}")
|
fun getMeetingRecords(
|
@PathVariable userId: String,
|
@RequestParam("meetingId") meetingId: String,
|
@RequestParam("roomId") roomId: String,
|
@RequestParam(value = "page") page: Int,
|
@RequestParam(value = "per_page") perPage: Int,
|
response: HttpServletResponse
|
) = meetingInfoService.getMeetingRecords(userId, meetingId, roomId, page, perPage, response)
|
|
/*****************************会议推送通知********************************************/
|
@PostMapping("/push/{userId}")
|
fun pushMeetingInfo(
|
@PathVariable userId: String,
|
@RequestParam("meetingId") meetingId: String,
|
@RequestParam("roomId") roomId: String?,
|
@RequestParam("title") title: String,
|
@RequestParam("body") body: String
|
) = meetingInfoService.pushMeetingInfo(userId, meetingId, roomId, title, body)
|
}
|