浏览代码

抽取任务修改

master
WendyYang 1年前
父节点
当前提交
5c498c3f47
共有 2 个文件被更改,包括 6 次插入6 次删除
  1. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java
  2. +5
    -5
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/task/ExpertInviteTask.java

+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java 查看文件

@@ -209,7 +209,7 @@ public class MeetingManage {
Assert.isTrue(checkCount >= inviteCount, "可供抽取的专家数量不足");
}
expertInviteManage.expertInviteByMeetingCreate(meeting, randomRules, avoidInfo);
expertInviteTask.addInviteExpertTaskByMeetingCreate(meeting.getId(), 5);
expertInviteTask.addInviteTaskByMeetingCreate(meeting.getId(), 5);
LambdaUpdateWrapper<Meeting> update = Wrappers.lambdaUpdate(Meeting.class);
update.set(Meeting::getInviteStatus, false);
update.eq(Meeting::getId, meeting.getId());


+ 5
- 5
pmapi/src/main/java/com/ningdatech/pmapi/meeting/task/ExpertInviteTask.java 查看文件

@@ -109,7 +109,7 @@ public class ExpertInviteTask {
return;
}
for (InviteCacheDTO cache : caches.values()) {
addInviteExpertTask(cache.getMeetingId(), true, properties.getInviteDelay(), cache.getInvitedRefused());
addInviteTask(cache.getMeetingId(), true, properties.getInviteDelay(), cache.getInvitedRefused());
}
}

@@ -156,7 +156,7 @@ public class ExpertInviteTask {
tmpInvitedRefused = invitedRefused[0];
}
if (!INVITE_MAP.containsKey(meetingId)) {
addInviteExpertTask(meetingId, false, properties.getInviteDelay(), tmpInvitedRefused);
addInviteTask(meetingId, false, properties.getInviteDelay(), tmpInvitedRefused);
log.info("重置会议的随机抽取状态:{}", meetingId);
LambdaUpdateWrapper<Meeting> update = Wrappers.lambdaUpdate(Meeting.class);
update.set(Meeting::getInviteStatus, false);
@@ -176,7 +176,7 @@ public class ExpertInviteTask {
* @param invitedRefused 是否可以邀请被拒绝的专家
* @author WendyYang
**/
public void addInviteExpertTask(Long meetingId, boolean checked, int delayedMinutes, boolean invitedRefused) {
public void addInviteTask(Long meetingId, boolean checked, int delayedMinutes, boolean invitedRefused) {
if (checked && !inviteCountCheck(meetingId)) {
// 如果抽取数量满足直接返回
return;
@@ -201,9 +201,9 @@ public class ExpertInviteTask {
* @param delayedMinutes 延迟时间
* @author WendyYang
**/
public void addInviteExpertTaskByMeetingCreate(Long meetingId, int delayedMinutes) {
public void addInviteTaskByMeetingCreate(Long meetingId, int delayedMinutes) {
Assert.isTrue(properties.getEnable(), "随机邀请已关闭");
addInviteExpertTask(meetingId, false, delayedMinutes, false);
addInviteTask(meetingId, false, delayedMinutes, false);
InviteCacheDTO cacheVal = InviteCacheDTO.of(meetingId, false);
cachePlusOps.hSet(getCacheKey(meetingId), cacheVal);
}


正在加载...
取消
保存