| | |
| | | import cn.flightfeather.supervision.lightshare.vo.UserStatusVo |
| | | import cn.flightfeather.supervision.websocket.Processor |
| | | import io.swagger.annotations.Api |
| | | import io.swagger.annotations.ApiOperation |
| | | import io.swagger.annotations.ApiParam |
| | | import org.springframework.web.bind.annotation.* |
| | | import org.springframework.web.multipart.MultipartFile |
| | | import javax.servlet.http.HttpServletResponse |
| | |
| | | class MeetingInfoController(val meetingInfoService: MeetingInfoService) { |
| | | |
| | | /*****************************会议********************************************/ |
| | | @ApiOperation(value = "获取用户的会议信息") |
| | | @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 |
| | | @ApiParam("用户id") @PathVariable userId: String, |
| | | @ApiParam(value = "查询类型", allowableValues = "1,2,3,4,5") @RequestParam(value = "status") status: Int, |
| | | @ApiParam("页码") @RequestParam(value = "page") page: Int, |
| | | @ApiParam("单页数据量") @RequestParam(value = "per_page") perPage: Int, |
| | | response: HttpServletResponse |
| | | ) = meetingInfoService.getMeetingInfo(userId, status, page, perPage, response) |
| | | |
| | | @ApiOperation(value = "根据id查找会议信息") |
| | | @GetMapping("/info/meetingId/{userId}") |
| | | fun getMeetingInfoById( |
| | | @PathVariable userId: String, |
| | | @RequestParam(value = "meetingId") meetingId: String |
| | | @ApiParam("用户id") @PathVariable userId: String, |
| | | @ApiParam("会议id") @RequestParam(value = "meetingId") meetingId: String |
| | | ) = meetingInfoService.getMeetingInfoById(userId, meetingId) |
| | | |
| | | @ApiOperation(value = "上传会议信息") |
| | | @PostMapping("/info/{userId}") |
| | | fun addMeetingInfo( |
| | | @PathVariable userId: String, |
| | | @RequestBody meetingInfo: MeetingInfo |
| | | @ApiParam("用户id") @PathVariable userId: String, |
| | | @ApiParam("会议信息") @RequestBody meetingInfo: MeetingInfo |
| | | ) = meetingInfoService.addMeetingInfo(userId, meetingInfo) |
| | | |
| | | @ApiOperation(value = "更新会议信息") |
| | | @PutMapping("/info/{userId}") |
| | | fun updateMeeting( |
| | | @PathVariable userId: String, |
| | | @RequestBody meetingInfo: MeetingInfo |
| | | @ApiParam("用户id") @PathVariable userId: String, |
| | | @ApiParam("会议信息") @RequestBody meetingInfo: MeetingInfo |
| | | ) = meetingInfoService.updateMeetingInfo(userId, meetingInfo) |
| | | |
| | | @ApiOperation(value = "删除会议") |
| | | @PostMapping("/delete/{userId}") |
| | | fun deleteMeeting( |
| | | @PathVariable userId: String, |
| | | @RequestParam(value = "meetingId") meetingId: String |
| | | @ApiParam("用户id") @PathVariable userId: String, |
| | | @ApiParam("会议id") @RequestParam(value = "meetingId") meetingId: String |
| | | ) = meetingInfoService.deleteMeetingInfo(userId, meetingId) |
| | | |
| | | @ApiOperation(value = "获取用户会议签到状态") |
| | | @GetMapping("/registerStatus/{userId}") |
| | | fun getMeetingRegisterStatus( |
| | | @PathVariable userId: String, |
| | | @RequestParam("meetingId") meetingId: String, |
| | | @RequestParam("roomId") roomId: String? |
| | | @ApiParam("用户id") @PathVariable userId: String, |
| | | @ApiParam("会议id") @RequestParam("meetingId") meetingId: String, |
| | | @ApiParam(value = "会议室id", required = false) @RequestParam("roomId") roomId: String? |
| | | ) = meetingInfoService.getMeetingRegisterStatus(userId, meetingId, roomId) |
| | | |
| | | @ApiOperation(value = "获取会议签到记录") |
| | | @GetMapping("/registerRecord/{userId}") |
| | | fun getMeetingRegisterRecord( |
| | | @PathVariable userId: String, |
| | | @RequestParam("meetingId") meetingId: String, |
| | | @RequestParam("roomId") roomId: String? |
| | | @ApiParam("用户id") @PathVariable userId: String, |
| | | @ApiParam("会议id") @RequestParam("meetingId") meetingId: String, |
| | | @ApiParam(value = "会议室id", required = false) @RequestParam("roomId") roomId: String? |
| | | ) = meetingInfoService.getMeetingRegisterRecord(userId, meetingId, roomId) |
| | | |
| | | @ApiOperation(value = "会议签到") |
| | | @PostMapping("/register/{userId}") |
| | | fun meetingRegister( |
| | | @PathVariable userId: String, |
| | | @RequestParam("meetingId") meetingId: String, |
| | | @RequestParam("roomId") roomId: String? |
| | | @ApiParam("用户id") @PathVariable userId: String, |
| | | @ApiParam("会议id") @RequestParam("meetingId") meetingId: String, |
| | | @ApiParam(value = "会议室id", required = false) @RequestParam("roomId") roomId: String? |
| | | ) = meetingInfoService.meetingRegister(userId, meetingId, roomId) |
| | | |
| | | @ApiOperation(value = "获取会议的会议室") |
| | | @GetMapping("/room/{userId}") |
| | | fun getMeetingRoom( |
| | | @PathVariable userId: String, |
| | | @RequestParam("meetingId") meetingId: String |
| | | @ApiParam("用户id") @PathVariable userId: String, |
| | | @ApiParam("会议id") @RequestParam("meetingId") meetingId: String |
| | | ) = meetingInfoService.getMeetingRoom(userId, meetingId) |
| | | |
| | | /*****************************参会人员********************************************/ |
| | | @ApiOperation(value = "添加会议参会人员") |
| | | @PostMapping("/participant/{userId}") |
| | | fun addParticipant( |
| | | @PathVariable userId: String, |
| | | @RequestBody participantList: List<Participant> |
| | | @ApiParam("用户id") @PathVariable userId: String, |
| | | @ApiParam("参会人员列表") @RequestBody participantList: List<Participant> |
| | | ) = meetingInfoService.addParticipant(userId, participantList) |
| | | |
| | | @ApiOperation(value = "删除会议参会人员") |
| | | @PostMapping("/participant/{userId}/delete") |
| | | fun deleteParticipant( |
| | | @PathVariable userId: String, |
| | | @RequestParam(value = "meetingId") meetingId: String, |
| | | @RequestBody participantList: List<Participant> |
| | | @ApiParam("用户id") @PathVariable userId: String, |
| | | @ApiParam("会议id") @RequestParam(value = "meetingId") meetingId: String, |
| | | @ApiParam("待删除参会人员列表") @RequestBody participantList: List<Participant> |
| | | ) = meetingInfoService.deleteParticipant(userId, meetingId, participantList) |
| | | |
| | | @ApiOperation(value = "获取会议的参会人员") |
| | | @GetMapping("/participant/{userId}") |
| | | fun getParticipant( |
| | | @PathVariable userId: String, |
| | | @RequestParam("meetingId") meetingId: String, |
| | | @RequestParam("roomId") roomId: String?, |
| | | @RequestParam("participantType") participantType: Int |
| | | @ApiParam("用户id") @PathVariable userId: String, |
| | | @ApiParam("会议id") @RequestParam("meetingId") meetingId: String, |
| | | @ApiParam("会议室id") @RequestParam("roomId") roomId: String?, |
| | | @ApiParam(value = "参会人员类型", name = "0:主持人,1:会议嘉宾,2:企业代表,3:一般与会人,99:其他,-1:全部", allowableValues = "0,1,2,3,99,-1") @RequestParam("participantType") participantType: Int |
| | | ) = meetingInfoService.getParticipant(userId, meetingId, roomId, participantType) |
| | | |
| | | @ApiOperation(value = "获取会议在线人员") |
| | | @GetMapping("/participant/{userId}/onlineCount") |
| | | fun getOnlineUsers( |
| | | @PathVariable userId: String, |
| | | @RequestParam("meetingId") meetingId: String, |
| | | @RequestParam("roomId") roomId: String |
| | | @ApiParam("用户id") @PathVariable userId: String, |
| | | @ApiParam("会议id") @RequestParam("meetingId") meetingId: String, |
| | | @ApiParam("会议室id") @RequestParam("roomId") roomId: String |
| | | ) = meetingInfoService.getOnlineUsers(userId, meetingId, roomId) |
| | | |
| | | @ApiOperation(value = "设置用户的禁言状态") |
| | | @PostMapping("/participant/{userId}/setMute") |
| | | fun setMuteStatus( |
| | | @PathVariable userId: String, |
| | | @RequestParam("meetingId") meetingId: String, |
| | | @RequestParam("roomId") roomId: String, |
| | | @RequestBody userStatusList: List<UserStatusVo> |
| | | @ApiParam("用户id") @PathVariable userId: String, |
| | | @ApiParam("会议id") @RequestParam("meetingId") meetingId: String, |
| | | @ApiParam("会议室id") @RequestParam("roomId") roomId: String, |
| | | @ApiParam("用户状态") @RequestBody userStatusList: List<UserStatusVo> |
| | | ) = meetingInfoService.setMuteStatus(userId, meetingId, roomId, userStatusList) |
| | | |
| | | /*****************************会议文件********************************************/ |
| | | @ApiOperation(value = "上传会议文件") |
| | | @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> |
| | | @ApiParam("用户id") @PathVariable userId: String, |
| | | @ApiParam("会议id") @RequestParam("meetingId") meetingId: String, |
| | | @ApiParam("会议室id") @RequestParam("roomId") roomId: String, |
| | | @ApiParam("文件类型") @RequestParam("documentType") documentType: Int, |
| | | @ApiParam("文件信息") @RequestParam("params") msgVo: String, |
| | | @ApiParam("文件") @RequestPart("files") files: Array<MultipartFile> |
| | | ) = meetingInfoService.uploadFile(userId, meetingId, roomId, msgVo, files, documentType) |
| | | |
| | | @ApiOperation(value = "获取会议室文件") |
| | | @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 |
| | | @ApiParam("用户id") @PathVariable userId: String, |
| | | @ApiParam("会议id") @RequestParam("meetingId") meetingId: String, |
| | | @ApiParam("会议室id") @RequestParam("mediaType") mediaType: Int, |
| | | @ApiParam("页码") @RequestParam(value = "page") page: Int, |
| | | @ApiParam("单页数据量") @RequestParam(value = "per_page") perPage: Int, |
| | | response: HttpServletResponse |
| | | ) = meetingInfoService.getMeetingMaterials(userId, meetingId, mediaType, page, perPage, response) |
| | | |
| | | @ApiOperation(value = "更新会议文件签收状态") |
| | | @PostMapping("/material/sign/{userId}") |
| | | fun updateSignState( |
| | | @PathVariable userId: String, |
| | | @RequestBody signStateList: List<MeetingMaterialVo> |
| | | @ApiParam("用户id") @PathVariable userId: String, |
| | | @ApiParam("会议文件签收状态") @RequestBody signStateList: List<MeetingMaterialVo> |
| | | ) = meetingInfoService.updateSignState(userId, signStateList) |
| | | |
| | | @ApiOperation(value = "获取会议文件数量") |
| | | @GetMapping("/count/material/{userId}") |
| | | fun getMaterialCount( |
| | | @PathVariable userId: String, |
| | | @RequestParam("meetingId") meetingId: String, |
| | | @RequestParam("mediaType") mediaType: Int, |
| | | @RequestParam("meetingFileType") meetingFileType: Int |
| | | @ApiParam("用户id") @PathVariable userId: String, |
| | | @ApiParam("会议id") @RequestParam("meetingId") meetingId: String, |
| | | @ApiParam("多媒体文件类型") @RequestParam("mediaType") mediaType: Int, |
| | | @ApiParam("会议文件类型") @RequestParam("meetingFileType") meetingFileType: Int |
| | | ) = meetingInfoService.getMaterialCount(userId, meetingId, mediaType, meetingFileType) |
| | | |
| | | @ApiOperation(value = "删除会议文件") |
| | | @PostMapping("/material/delete/{userId}") |
| | | fun deleteFiles( |
| | | @PathVariable userId: String, |
| | | @RequestParam("meetingId") meetingId: String, |
| | | @RequestBody fileList: List<MeetingMaterialVo> |
| | | @ApiParam("用户id") @PathVariable userId: String, |
| | | @ApiParam("会议id") @RequestParam("meetingId") meetingId: String, |
| | | @ApiParam("待删除会议文件") @RequestBody fileList: List<MeetingMaterialVo> |
| | | ) = meetingInfoService.deleteFiles(userId, meetingId, fileList) |
| | | |
| | | @ApiOperation(value = "获取会议所有文件签收状态") |
| | | @GetMapping("/count/all/material/{userId}") |
| | | fun getAllMaterialSignStatus( |
| | | @PathVariable userId: String, |
| | | @RequestParam("meetingId") meetingId: String |
| | | @ApiParam("用户id") @PathVariable userId: String, |
| | | @ApiParam("会议id") @RequestParam("meetingId") meetingId: String |
| | | ) = meetingInfoService.getAllMaterialSignStatus(userId, meetingId) |
| | | |
| | | /*****************************会议聊天记录********************************************/ |
| | | @ApiOperation(value = "获取会议聊天记录") |
| | | @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 |
| | | @ApiParam("用户id") @PathVariable userId: String, |
| | | @ApiParam("会议id") @RequestParam("meetingId") meetingId: String, |
| | | @ApiParam("会议室id") @RequestParam("roomId") roomId: String, |
| | | @ApiParam("页码") @RequestParam(value = "page") page: Int, |
| | | @ApiParam("单页数据量") @RequestParam(value = "per_page") perPage: Int, |
| | | response: HttpServletResponse |
| | | ) = meetingInfoService.getMeetingRecords(userId, meetingId, roomId, page, perPage, response) |
| | | |
| | | /*****************************会议推送通知********************************************/ |
| | | @ApiOperation(value = "推送会议通知") |
| | | @PostMapping("/push/{userId}") |
| | | fun pushMeetingInfo( |
| | | @PathVariable userId: String, |
| | | @RequestParam("meetingId") meetingId: String, |
| | | @RequestParam("roomId") roomId: String?, |
| | | @RequestParam("title") title: String, |
| | | @RequestParam("body") body: String |
| | | @ApiParam("用户id") @PathVariable userId: String, |
| | | @ApiParam("会议id") @RequestParam("meetingId") meetingId: String, |
| | | @ApiParam("会议室id") @RequestParam("roomId") roomId: String?, |
| | | @ApiParam("通知标题") @RequestParam("title") title: String, |
| | | @ApiParam("通知内容") @RequestParam("body") body: String |
| | | ) = meetingInfoService.pushMeetingInfo(userId, meetingId, roomId, title, body) |
| | | } |