|
|
@@ -742,19 +742,19 @@ public class CorpServiceImpl implements CorpService {
|
|
|
//是否设置非值班提示
|
|
|
if (corpKfAccountSessionConfig != null && StrUtil.isNotEmpty(corpKfAccountSessionConfig.getNoDutyTips())) {
|
|
|
DateTime now = DateTime.now();
|
|
|
- int thisHour = DateUtil.hour(now, true);
|
|
|
+ String thisHourDate = DateUtil.format(now, "HH:mm:ss");
|
|
|
//0-6 0周一
|
|
|
int dayOfWeek = DateUtil.dayOfWeek(now);
|
|
|
//是否值班期
|
|
|
Integer dutyHourCount = corpKfAccountFollowMapper.selectCount(Wrappers.lambdaQuery(CorpKfAccountFollow.class)
|
|
|
.eq(CorpKfAccountFollow::getOpenKfId, openKfId)
|
|
|
- .le(CorpKfAccountFollow::getStartTime, thisHour)
|
|
|
- .ge(CorpKfAccountFollow::getEndTime, thisHour)
|
|
|
+ .le(CorpKfAccountFollow::getStartTime, thisHourDate)
|
|
|
+ .ge(CorpKfAccountFollow::getEndTime, thisHourDate)
|
|
|
.apply(" and JSON_CONTAINS(duty_week,'\"%s\"')", dayOfWeek));
|
|
|
//非值班时间 发送通知
|
|
|
if (dutyHourCount == 0) {
|
|
|
//非值班时间 移入等待池并发送进入等待池消息
|
|
|
- log.info("当前客服账号:{}处于非值班时间:{},将客服:{}移入等待池", openKfId, thisHour, event.getExternalUserId());
|
|
|
+ log.info("当前客服账号:{}处于非值班时间:{},将客服:{}移入等待池", openKfId, thisHourDate, event.getExternalUserId());
|
|
|
moveWaitingQueue(corpId, openKfId, event.getExternalUserId());
|
|
|
String queueTips = corpKfAccountSessionConfig.getQueueTips();
|
|
|
sendCorpKfTextTips(corpId, event.getExternalUserId(), openKfId, queueTips);
|