|
|
@@ -19,7 +19,6 @@ import com.cyksj.model.views.CorpKfDutyServicersStatusView;
|
|
|
import com.cyksj.service.corp.WxCorpOps;
|
|
|
import com.cyksj.service.corp.kf.CorpKfService;
|
|
|
import com.cyksj.service.mange.cms.service.CmsUserService;
|
|
|
-import com.google.common.collect.Lists;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
@@ -205,19 +204,10 @@ public class CorpKfServiceImpl implements CorpKfService {
|
|
|
@Override
|
|
|
public List<CorpKfDutyServicersStatusView> getDutyFollowByOpenKfId(long cmsUserId, String openKfId) throws Exception {
|
|
|
Boolean isRoot = cmsUserService.isRootRole(cmsUserId);
|
|
|
- DateTime now = DateTime.now();
|
|
|
- String thisHourDate = DateUtil.format(now, "HH:mm:ss");
|
|
|
- //星期天为1
|
|
|
- int dayOfWeek = DateUtil.dayOfWeek(now);
|
|
|
- //是否值班期
|
|
|
List<CorpKfAccountFollow> corpKfAccountFollows = corpKfAccountFollowMapper.selectList(Wrappers.lambdaQuery(CorpKfAccountFollow.class)
|
|
|
- .eq(CorpKfAccountFollow::getOpenKfId, openKfId)
|
|
|
- .le(CorpKfAccountFollow::getStartTime, thisHourDate)
|
|
|
- .ge(CorpKfAccountFollow::getEndTime, thisHourDate)
|
|
|
- .eq(CorpKfAccountFollow::getDutyWeek, dayOfWeek));
|
|
|
-
|
|
|
+ .eq(CorpKfAccountFollow::getOpenKfId, openKfId));
|
|
|
if (corpKfAccountFollows.isEmpty()) {
|
|
|
- return Lists.newArrayList();
|
|
|
+ return new ArrayList<>();
|
|
|
}
|
|
|
//目前时间段需要值班的客服
|
|
|
Set<String> thisHourDutyFollows = new HashSet<>();
|