|
|
@@ -716,6 +716,7 @@ public class MeetingManage { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public void expertRemove(ExpertRemoveReq req) { |
|
|
|
String key = "EXPERT_REMOVE:" + req.getExpertMeetingId(); |
|
|
|
if (!distributedLock.lock(key, RETRY_TIMES)) { |
|
|
@@ -736,6 +737,10 @@ public class MeetingManage { |
|
|
|
if (!NOTICING.eq(expert.getStatus())) { |
|
|
|
throw BizException.wrap("已确认过的专家不允许移除!"); |
|
|
|
} |
|
|
|
LambdaUpdateWrapper<Meeting> mUpdate = Wrappers.lambdaUpdate(Meeting.class) |
|
|
|
.set(Meeting::getConfirmedRoster, false) |
|
|
|
.eq(Meeting::getId, req.getMeetingId()); |
|
|
|
meetingService.update(mUpdate); |
|
|
|
meetingExpertService.removeById(req.getExpertMeetingId()); |
|
|
|
} finally { |
|
|
|
distributedLock.releaseLock(key); |
|
|
@@ -791,7 +796,8 @@ public class MeetingManage { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public void confirmedRoster(Long meetingId) { |
|
|
|
public void confirmedRoster(ConfirmedRosterReq req) { |
|
|
|
Long meetingId = req.getMeetingId(); |
|
|
|
String key = "MEETING_RESEND_SMS:" + meetingId; |
|
|
|
if (!distributedLock.lock(key, RETRY_TIMES)) { |
|
|
|
throw BizException.wrap("请刷新后重试!"); |
|
|
@@ -809,6 +815,17 @@ public class MeetingManage { |
|
|
|
meetingService.update(update); |
|
|
|
} |
|
|
|
List<MeetingExpert> experts = meetingExpertService.listAgreedExperts(meetingId); |
|
|
|
List<MeetingExpert> expertNoticing = experts.stream() |
|
|
|
.filter(w -> meeting.getConfirmedRoster() || !w.getConfirmedRoster()) |
|
|
|
.collect(Collectors.toList()); |
|
|
|
if (expertNoticing.isEmpty()) { |
|
|
|
return; |
|
|
|
} |
|
|
|
List<Long> currConfirmedMeIds = CollUtils.fieldList(expertNoticing, MeetingExpert::getId); |
|
|
|
LambdaUpdateWrapper<MeetingExpert> meUpdate = Wrappers.lambdaUpdate(MeetingExpert.class) |
|
|
|
.in(MeetingExpert::getId, currConfirmedMeIds) |
|
|
|
.set(MeetingExpert::getConfirmedRoster, Boolean.TRUE); |
|
|
|
meetingExpertService.update(meUpdate); |
|
|
|
// TODO 发送会议通知 |
|
|
|
} finally { |
|
|
|
distributedLock.releaseLock(key); |
|
|
|