|
|
@@ -5,6 +5,7 @@ import cn.hutool.core.collection.CollUtil; |
|
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
import cn.hutool.crypto.SecureUtil; |
|
|
|
import cn.hutool.json.JSONUtil; |
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
|
|
@@ -198,11 +199,26 @@ public class MeetingManage { |
|
|
|
.set(Meeting::getInviteType, ExpertInviteTypeEnum.APPOINT.getCode()) |
|
|
|
.eq(Meeting::getId, meetingId); |
|
|
|
meetingService.update(meetingUpdate); |
|
|
|
saveAppointRuleByConvertFromRandomRule(meetingId); |
|
|
|
} finally { |
|
|
|
distributedLock.releaseLock(key); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private void saveAppointRuleByConvertFromRandomRule(Long meetingId) { |
|
|
|
AppointInviteRuleDTO rule = new AppointInviteRuleDTO(); |
|
|
|
rule.setInviteDesc("转为指定抽取"); |
|
|
|
rule.setExpertIdList(Collections.emptyList()); |
|
|
|
rule.setInviteType(ExpertInviteTypeEnum.APPOINT.getCode()); |
|
|
|
rule.setCount(0); |
|
|
|
ExpertInviteRule inviteRule = new ExpertInviteRule(); |
|
|
|
inviteRule.setMeetingId(meetingId); |
|
|
|
inviteRule.setInviteType(rule.getInviteType()); |
|
|
|
inviteRule.setInviteCount(0); |
|
|
|
inviteRule.setInviteRule(JSONUtil.toJsonStr(rule)); |
|
|
|
inviteRuleService.save(inviteRule); |
|
|
|
} |
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public void expertInviteByCreate(ExpertInviteReq req) { |
|
|
|
String key = INVITED_RULE_CREATE + req.getMeetingId(); |
|
|
|