Bladeren bron

转换为指定抽取时增加抽取规则

master
WendyYang 1 jaar geleden
bovenliggende
commit
8abb66c2ec
1 gewijzigde bestanden met toevoegingen van 16 en 0 verwijderingen
  1. +16
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java

+ 16
- 0
pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java Bestand weergeven

@@ -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();


Laden…
Annuleren
Opslaan