| | |
| | | import com.doumee.core.utils.*; |
| | | import com.doumee.core.wx.MeetConstants; |
| | | import com.doumee.core.wx.SendWxMessage; |
| | | import com.doumee.core.wx.WxPlatNotice; |
| | | import com.doumee.dao.admin.request.BusinessOverDTO; |
| | | import com.doumee.dao.admin.request.QrOpenDoorDto; |
| | | import com.doumee.dao.admin.response.DevWgResponseParam; |
| | |
| | | if(Constants.equalsInteger(bookings.getJoinNotice(),Constants.ZERO)){ |
| | | this.sendNotice(bookings, MeetConstants.TWO); |
| | | } |
| | | //发送微信订阅通知 |
| | | // sendWxMessage.bookingsReservation(systemUserMapper.selectById(bookings.getCreator()), bookings, roomsMapper.selectById(bookings.getRoomId())); |
| | | SystemUser systemUser = systemUserMapper.selectById(bookings.getUserId()); |
| | | this.sendWxNotice(bookings,Objects.isNull(systemUser)||StringUtils.isBlank(systemUser.getOpenid())?null:systemUser.getOpenid(),Constants.ZERO); |
| | | |
| | | return bookings.getId(); |
| | | } |
| | |
| | | updateProjectRel(bookings, user); |
| | | handleFile(bookings, user); |
| | | //发送会议通知 |
| | | if(Constants.equalsInteger(bookings.getJoinNotice(),Constants.ZERO)){ |
| | | this.sendNotice(bookings, MeetConstants.TWO); |
| | | } |
| | | SystemUser systemUser = systemUserMapper.selectById(bookings.getUserId()); |
| | | this.sendWxNotice(bookings,Objects.isNull(systemUser)||StringUtils.isBlank(systemUser.getOpenid())?null:systemUser.getOpenid(),Constants.ZERO); |
| | | } |
| | | |
| | | @Override |
| | |
| | | bookings.setEditor(user.getId()); |
| | | bookingsMapper.updateById(bookings); |
| | | //取消会议 发送取消通知 |
| | | if(Constants.equalsInteger(bookings.getJoinNotice(),Constants.ZERO)){ |
| | | this.sendNotice(bookings, 3); |
| | | //发送微信订阅通知 |
| | | sendWxMessage.bookingsCancel(systemUserMapper.selectById(bookings.getCreator()), bookings, roomsMapper.selectById(bookings.getRoomId())); |
| | | } |
| | | SystemUser systemUser = systemUserMapper.selectById(bookings.getUserId()); |
| | | this.sendWxNotice(bookings,Objects.isNull(systemUser)||StringUtils.isBlank(systemUser.getOpenid())?null:systemUser.getOpenid(),Constants.ONE); |
| | | |
| | | } |
| | | |
| | |
| | | String avatarPath = systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_RESOURCE_PATH).getCode() |
| | | +systemDictDataBiz.queryByCode(Constants.FTP,Constants.MEMBER_IMG).getCode(); |
| | | userResponseList.forEach(i -> { |
| | | if(StringUtils.isNotBlank(i.getAvatar())){ |
| | | if(StringUtils.isNotBlank(i.getAvatar()) && !i.getAvatar().startsWith("HKIMG") ){ |
| | | i.setAvatar(avatarPath+i.getAvatar()); |
| | | }else{ |
| | | i.setAvatar(null); |
| | | } |
| | | }); |
| | | meetingDetailResponse.setUserResponseList(userResponseList); |
| | |
| | | bookings.setEditor(businessOverDTO.getUserId()); |
| | | bookingsMapper.updateById(bookings); |
| | | //取消会议 发送取消通知 |
| | | if(Constants.equalsInteger(bookings.getJoinNotice(),Constants.ZERO)){ |
| | | this.sendNotice(bookings, 3); |
| | | //发送微信订阅通知 |
| | | // sendWxMessage.bookingsCancel(systemUserMapper.selectById(bookings.getCreator()), bookings, roomsMapper.selectById(bookings.getRoomId())); |
| | | } |
| | | SystemUser systemUser = systemUserMapper.selectById(bookings.getUserId()); |
| | | this.sendWxNotice(bookings,Objects.isNull(systemUser)||StringUtils.isBlank(systemUser.getOpenid())?null:systemUser.getOpenid(),Constants.ONE); |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | bookings.setEditDate(new Date()); |
| | | bookingsMapper.updateById(bookings); |
| | | this.sendNotice(bookings, MeetConstants.ONE); |
| | | |
| | | //发送微信通知 |
| | | // sendWxMessage.bookingsStart(systemUserMapper.selectById(bookings.getCreator()), bookings, roomsMapper.selectById(bookings.getRoomId())); |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | @Async |
| | | public void sendWxNotice(Bookings bookings,String openid, Integer sendType) { |
| | | try{ |
| | | List<UserRel> userRelList = userRelMapper.selectJoinList(UserRel.class,new MPJLambdaWrapper<UserRel>() |
| | | .selectAll(UserRel.class) |
| | | .selectAs(SystemUser::getRealname,UserRel::getRealName) |
| | | .selectAs(SystemUser::getMobile,UserRel::getUserPhone) |
| | | .selectAs(SystemUser::getOpenid,UserRel::getOpenid) |
| | | .leftJoin(SystemUser.class,SystemUser::getId,UserRel::getUserId) |
| | | .eq(UserRel::getObjType, MeetConstants.ONE) |
| | | .eq(UserRel::getObjId, bookings.getId()) |
| | | .eq(UserRel::getIsdeleted, MeetConstants.ZERO) |
| | | .isNotNull(SystemUser::getOpenid) |
| | | ); |
| | | List<String> openIdList = userRelList.stream().map(i->i.getOpenid()).collect(Collectors.toList()); |
| | | if(StringUtils.isNotBlank(openid)){ |
| | | openIdList.add(openid); |
| | | } |
| | | Set<String> openIds = new HashSet<String>(openIdList); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(openIds)){ |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | if(Constants.equalsInteger(sendType,Constants.ZERO)){ |
| | | wxPlatNotice.sendMeetingBookTemplateNotice(bookings,"CuoDoxOl6SFwi4NhNgOQgKSJVjDD4VCIaPYlnbv_zdY", |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM, Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(),openIds); |
| | | }else{ |
| | | |
| | | wxPlatNotice.sendMeetingBookCancelTemplateNotice(bookings,"CiB6vCT2InovAoQfudY-lvzLSV0-3lfz3a5GsSFCzd8", |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM, Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(),openIds); |
| | | } |
| | | } |
| | | }catch (Exception e){ |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public List<Bookings> getMyJoinBookingMeet(Integer userId, Integer roomId, LocalDateTime startTime, LocalDateTime endTime) { |
| | | DateTimeFormatter fmt = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |