|
|
@@ -165,6 +165,27 @@ public class MeetingManage { |
|
|
|
} |
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public void convertToAppoint(Long meetingId) { |
|
|
|
String key = "CONVERT_TO_APPOINT:" + meetingId; |
|
|
|
if (!distributedLock.lock(key, RETRY_TIMES)) { |
|
|
|
throw BizException.wrap("已进行转换,请勿重复点击"); |
|
|
|
} |
|
|
|
try { |
|
|
|
Meeting meeting = meetingService.getById(meetingId); |
|
|
|
if (!MeetingStatusEnum.NORMAL.eq(meeting.getStatus())) { |
|
|
|
throw BizException.wrap("转换失败,请刷新后重试"); |
|
|
|
} |
|
|
|
expertInviteTask.cancelByMeetingId(meetingId); |
|
|
|
LambdaUpdateWrapper<Meeting> meetingUpdate = Wrappers.lambdaUpdate(Meeting.class) |
|
|
|
.set(Meeting::getInviteType, ExpertInviteTypeEnum.APPOINT.getCode()) |
|
|
|
.eq(Meeting::getId, meetingId); |
|
|
|
meetingService.update(meetingUpdate); |
|
|
|
} finally { |
|
|
|
distributedLock.releaseLock(key); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public void expertInviteByCreate(ExpertInviteReq req) { |
|
|
|
String key = INVITED_RULE_CREATE + req.getMeetingId(); |
|
|
|
if (!distributedLock.lock(key, RETRY_TIMES)) { |
|
|
|