From 23bd719cebe5feeff4e48fde925b0b39755eea93 Mon Sep 17 00:00:00 2001 From: feiyu02 <risaku@163.com> Date: 星期二, 15 十一月 2022 10:59:50 +0800 Subject: [PATCH] 2022.11.15 --- src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MeetingInfoController.kt | 172 ++++++++++++++++++++++++++++++++------------------------ 1 files changed, 98 insertions(+), 74 deletions(-) diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MeetingInfoController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MeetingInfoController.kt index cef639c..f5f57a0 100644 --- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MeetingInfoController.kt +++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MeetingInfoController.kt @@ -8,6 +8,8 @@ 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 @@ -18,169 +20,191 @@ 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 = "浼氳瀹d", 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 = "浼氳瀹d", 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 = "浼氳瀹d", 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("浼氳瀹d") @RequestParam("roomId") roomId: String?, + @ApiParam(value = "鍙備細浜哄憳绫诲瀷", name = "0:涓绘寔浜�,1:浼氳鍢夊,2:浼佷笟浠h〃,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("浼氳瀹d") @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("浼氳瀹d") @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("浼氳瀹d") @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("浼氳瀹d") @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("浼氳瀹d") @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("浼氳瀹d") @RequestParam("roomId") roomId: String?, + @ApiParam("閫氱煡鏍囬") @RequestParam("title") title: String, + @ApiParam("閫氱煡鍐呭") @RequestParam("body") body: String ) = meetingInfoService.pushMeetingInfo(userId, meetingId, roomId, title, body) } \ No newline at end of file -- Gitblit v1.9.3