|
|
@ -1,6 +1,5 @@
|
|
|
|
package com.ruoyi.flyingbook.strategy.operate;
|
|
|
|
package com.ruoyi.flyingbook.strategy.operate;
|
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.io.unit.DataUnit;
|
|
|
|
|
|
|
|
import com.lark.oapi.service.calendar.v4.model.*;
|
|
|
|
import com.lark.oapi.service.calendar.v4.model.*;
|
|
|
|
import com.lark.oapi.service.task.v1.model.*;
|
|
|
|
import com.lark.oapi.service.task.v1.model.*;
|
|
|
|
import com.ruoyi.common.enums.*;
|
|
|
|
import com.ruoyi.common.enums.*;
|
|
|
@ -20,10 +19,9 @@ import org.apache.commons.lang3.StringUtils;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
|
|
|
|
|
|
import java.time.Instant;
|
|
|
|
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
import java.time.ZoneOffset;
|
|
|
|
|
|
|
|
import java.util.*;
|
|
|
|
import java.util.*;
|
|
|
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -79,10 +77,13 @@ public class LarkTaskCallbackOperate extends LarkAbstract {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
String operator = collaborators[0].getId();
|
|
|
|
String operator = collaborators[0].getId();
|
|
|
|
Follower[] followers = task.getFollowers();
|
|
|
|
Follower[] followers = task.getFollowers();
|
|
|
|
String[] followerIds = new String[collaborators.length];
|
|
|
|
String[] followerIds = null;
|
|
|
|
|
|
|
|
if (followers != null){
|
|
|
|
|
|
|
|
followerIds = new String[followers.length];
|
|
|
|
for (int i = 0; i < followers.length; i++) {
|
|
|
|
for (int i = 0; i < followers.length; i++) {
|
|
|
|
followerIds[i] = followers[i].getId();
|
|
|
|
followerIds[i] = followers[i].getId();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
//待绑定日程用户
|
|
|
|
//待绑定日程用户
|
|
|
|
String[] taskFollowerArray = getArrayIntersection(collaboratorIds, followerIds);
|
|
|
|
String[] taskFollowerArray = getArrayIntersection(collaboratorIds, followerIds);
|
|
|
|
//待解除绑定日程用户
|
|
|
|
//待解除绑定日程用户
|
|
|
@ -200,6 +201,7 @@ public class LarkTaskCallbackOperate extends LarkAbstract {
|
|
|
|
Set<String> collaboratorIdSet = collaboratorIds != null ? new HashSet<String>(Arrays.asList(collaboratorIds)) : new HashSet<String>();
|
|
|
|
Set<String> collaboratorIdSet = collaboratorIds != null ? new HashSet<String>(Arrays.asList(collaboratorIds)) : new HashSet<String>();
|
|
|
|
Set<String> followerIdSet = followerIds != null ? new HashSet<String>(Arrays.asList(followerIds)) : new HashSet<String>();
|
|
|
|
Set<String> followerIdSet = followerIds != null ? new HashSet<String>(Arrays.asList(followerIds)) : new HashSet<String>();
|
|
|
|
collaboratorIdSet.addAll(followerIdSet);
|
|
|
|
collaboratorIdSet.addAll(followerIdSet);
|
|
|
|
|
|
|
|
collaboratorIdSet = collaboratorIdSet.stream().filter(Objects::nonNull).collect(Collectors.toSet());
|
|
|
|
return collaboratorIdSet.toArray(new String[collaboratorIdSet.size()]);
|
|
|
|
return collaboratorIdSet.toArray(new String[collaboratorIdSet.size()]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|