jiangping
2024-10-21 c5a0ff2661fe362dddbe88c6a28d19c48c24c39b
server/meeting/meeting_admin/src/main/java/com/doumee/api/business/MeetingController.java
@@ -7,6 +7,7 @@
import com.doumee.core.model.PageWrap;
import com.doumee.core.utils.DateUtil;
import com.doumee.core.utils.QrCodeUtils;
import com.doumee.dao.admin.request.BusinessOverDTO;
import com.doumee.dao.business.model.Bookings;
import com.doumee.dao.web.request.BookingsRequest;
import com.doumee.dao.web.request.MeetingPageRequest;
@@ -45,7 +46,6 @@
    @ApiOperation(value = "当月会议表", notes = "当月会议表")
    @GetMapping("/monthMeeting")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true),
            @ApiImplicitParam(paramType = "query", dataType = "String", name = "yearMonth", value = "年月  yyyy-MM", required = true)
    })
    public ApiResponse<List<MonthDataResponse>> monthDay(@RequestParam String yearMonth) {
@@ -66,9 +66,6 @@
    @ApiOperation("我的会议列表")
    @PostMapping("/myMeetingPage")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true),
    })
    public ApiResponse<IPage<MeetingListResponse>> myMeetingPage(@RequestBody PageWrap<MeetingPageRequest> pageWrap) {
        LoginUserInfo user = getLoginUser(null);
        pageWrap.getModel().setUserId(user.getId());
@@ -78,20 +75,18 @@
    @ApiOperation("会议详情")
    @GetMapping("/meetingDetail")
    @ApiImplicitParams({
//            @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true),
            @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "id", value = "会议主键", required = true),
    })
    public ApiResponse<MeetingDetailResponse> meetingDetail(@RequestParam Integer id) {
        return ApiResponse.success("查询成功", bookingsService.getMeetingDetail(id));
    }
//    @ApiOperation("会议详情")
//    @GetMapping("/meetingDetail")
//    @ApiImplicitParams({
//            @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "id", value = "会议主键", required = true),
//    })
//    public ApiResponse<MeetingDetailResponse> meetingDetail(@RequestParam Integer id) {
//        return ApiResponse.success("查询成功", bookingsService.getMeetingDetail(id));
//    }
    @ApiOperation("获取会议开门二维码")
    @GetMapping("/getQrCode")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true),
            @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "id", value = "会议主键", required = true),
    })
    public ApiResponse<String> getQrCode(@RequestParam Integer id) {
@@ -102,9 +97,7 @@
    @ApiOperation("获取会议开门二维码-图片流")
    @GetMapping("/getQrCodeImg")
    @ApiImplicitParams({
//            @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true),
            @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "id", value = "会议主键", required = true),
            @ApiImplicitParam(paramType = "query", dataType = "String", name = "token", value = "用户token值", required = true),
    })
    public void getQrCodeImg(@RequestParam Integer id,@RequestParam String token, HttpServletResponse response) throws  Exception {
        LoginUserInfo user = getLoginUser(null);
@@ -117,9 +110,6 @@
    @ApiOperation("会议预约")
    @PostMapping("/reservationMeeting")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true),
    })
    public ApiResponse<Integer> reservationMeeting(@RequestBody BookingsRequest bookingsRequest) {
        LoginUserInfo user = getLoginUser(null);
        bookingsRequest.setCreator(user.getId());
@@ -128,14 +118,21 @@
    }
    @ApiOperation("取消会议预约")
    @GetMapping("/reservationCancel")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true),
            @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "id", value = "会议主键", required = true),
    })
    public ApiResponse reservationCancel(@RequestParam Integer id) {
    @PostMapping("/reservationCancel")
    public ApiResponse reservationCancel(@RequestBody BusinessOverDTO businessOverDTO) {
        LoginUserInfo user = getLoginUser(null);
        bookingsService.reservationCancel(id,user.getId());
        businessOverDTO.setUserId(user.getId());
        bookingsService.reservationCancel(businessOverDTO);
        return ApiResponse.success("操作成功");
    }
    @ApiOperation("提前结束会议")
    @PostMapping("/reservationOver")
    public ApiResponse reservationOver(@RequestBody BusinessOverDTO businessOverDTO) {
        LoginUserInfo user = getLoginUser(null);
        businessOverDTO.setUserId(user.getId());
        bookingsService.reservationOver(businessOverDTO);
        return ApiResponse.success("操作成功");
    }