mirror of
https://github.com/chatopera/cosin.git
synced 2025-07-24 08:31:45 +08:00
Fix chats audit, transfer agent and rename packages
This commit is contained in:
parent
961f7bbda7
commit
0329af2540
@ -14,17 +14,14 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.chatopera.cc.aop;
|
package com.chatopera.cc.aspect;
|
||||||
|
|
||||||
import com.chatopera.cc.basic.MainContext;
|
import com.chatopera.cc.basic.MainContext;
|
||||||
import com.chatopera.cc.cache.Cache;
|
import com.chatopera.cc.cache.Cache;
|
||||||
import com.chatopera.cc.cache.RedisCommand;
|
import com.chatopera.cc.cache.RedisCommand;
|
||||||
import com.chatopera.cc.cache.RedisKey;
|
import com.chatopera.cc.cache.RedisKey;
|
||||||
import com.chatopera.cc.exception.CSKefuCacheException;
|
|
||||||
import com.chatopera.cc.model.AgentUser;
|
import com.chatopera.cc.model.AgentUser;
|
||||||
import com.chatopera.cc.model.AgentUserAudit;
|
|
||||||
import com.chatopera.cc.proxy.AgentAuditProxy;
|
import com.chatopera.cc.proxy.AgentAuditProxy;
|
||||||
import com.chatopera.cc.proxy.AgentUserProxy;
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.aspectj.lang.JoinPoint;
|
import org.aspectj.lang.JoinPoint;
|
||||||
import org.aspectj.lang.ProceedingJoinPoint;
|
import org.aspectj.lang.ProceedingJoinPoint;
|
||||||
@ -41,7 +38,6 @@ import java.lang.annotation.ElementType;
|
|||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
import java.lang.annotation.RetentionPolicy;
|
import java.lang.annotation.RetentionPolicy;
|
||||||
import java.lang.annotation.Target;
|
import java.lang.annotation.Target;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
@Aspect
|
@Aspect
|
||||||
@ -59,7 +55,7 @@ public class AgentUserAspect {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private AgentAuditProxy agentAuditProxy;
|
private AgentAuditProxy agentAuditProxy;
|
||||||
|
|
||||||
@Before("execution(* com.chatopera.cc.persistence.repository.AgentUserRepository.save(..))")
|
@After("execution(* com.chatopera.cc.persistence.repository.AgentUserRepository.save(..))")
|
||||||
public void save(final JoinPoint joinPoint) {
|
public void save(final JoinPoint joinPoint) {
|
||||||
final AgentUser agentUser = (AgentUser) joinPoint.getArgs()[0];
|
final AgentUser agentUser = (AgentUser) joinPoint.getArgs()[0];
|
||||||
logger.info(
|
logger.info(
|
||||||
@ -72,18 +68,8 @@ public class AgentUserAspect {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 从缓存恢复之前的AgentUser
|
// 更新坐席监控信息
|
||||||
final Optional<AgentUser> opt = cache.findOneAgentUserByUserIdAndOrgi(
|
|
||||||
agentUser.getUserid(), agentUser.getOrgi());
|
|
||||||
if (opt.isPresent()) {
|
|
||||||
if (!StringUtils.equals(opt.get().getAgentno(), agentUser.getAgentno())) {
|
|
||||||
// 发生了转接
|
|
||||||
agentAuditProxy.updateAgentUserAudits(agentUser);
|
agentAuditProxy.updateAgentUserAudits(agentUser);
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// 新建AgentUser
|
|
||||||
agentAuditProxy.updateAgentUserAudits(agentUser);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 同步缓存
|
// 同步缓存
|
||||||
cache.putAgentUserByOrgi(agentUser, agentUser.getOrgi());
|
cache.putAgentUserByOrgi(agentUser, agentUser.getOrgi());
|
@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.chatopera.cc.aop;
|
package com.chatopera.cc.aspect;
|
||||||
|
|
||||||
import com.chatopera.cc.cache.Cache;
|
import com.chatopera.cc.cache.Cache;
|
||||||
import com.chatopera.cc.model.BlackEntity;
|
import com.chatopera.cc.model.BlackEntity;
|
@ -13,14 +13,13 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.aop;
|
package com.chatopera.cc.aspect;
|
||||||
|
|
||||||
import com.chatopera.cc.basic.MainContext;
|
import com.chatopera.cc.basic.MainContext;
|
||||||
import com.chatopera.cc.cache.Cache;
|
import com.chatopera.cc.cache.Cache;
|
||||||
import com.chatopera.cc.model.OnlineUser;
|
import com.chatopera.cc.model.OnlineUser;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.aspectj.lang.JoinPoint;
|
import org.aspectj.lang.JoinPoint;
|
||||||
import org.aspectj.lang.annotation.After;
|
|
||||||
import org.aspectj.lang.annotation.Aspect;
|
import org.aspectj.lang.annotation.Aspect;
|
||||||
import org.aspectj.lang.annotation.Before;
|
import org.aspectj.lang.annotation.Before;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
@ -14,7 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.aop;
|
package com.chatopera.cc.aspect;
|
||||||
|
|
||||||
import com.chatopera.cc.model.ESBean;
|
import com.chatopera.cc.model.ESBean;
|
||||||
import com.chatopera.cc.persistence.hibernate.BaseService;
|
import com.chatopera.cc.persistence.hibernate.BaseService;
|
@ -1,3 +1,18 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2019 Chatopera Inc, <https://www.chatopera.com>
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
package com.chatopera.cc.basic.auth;
|
package com.chatopera.cc.basic.auth;
|
||||||
|
|
||||||
import org.springframework.data.redis.connection.DefaultStringRedisConnection;
|
import org.springframework.data.redis.connection.DefaultStringRedisConnection;
|
||||||
@ -7,6 +22,9 @@ import org.springframework.data.redis.core.RedisTemplate;
|
|||||||
import org.springframework.data.redis.serializer.RedisSerializer;
|
import org.springframework.data.redis.serializer.RedisSerializer;
|
||||||
import org.springframework.data.redis.serializer.StringRedisSerializer;
|
import org.springframework.data.redis.serializer.StringRedisSerializer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 存储Auth Token的Redis连接
|
||||||
|
*/
|
||||||
public class AuthRedisTemplate extends RedisTemplate<String, String> {
|
public class AuthRedisTemplate extends RedisTemplate<String, String> {
|
||||||
public AuthRedisTemplate() {
|
public AuthRedisTemplate() {
|
||||||
RedisSerializer<String> stringSerializer = new StringRedisSerializer();
|
RedisSerializer<String> stringSerializer = new StringRedisSerializer();
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
package com.chatopera.cc.cache;
|
package com.chatopera.cc.cache;
|
||||||
|
|
||||||
import com.chatopera.cc.aop.AgentUserAspect;
|
import com.chatopera.cc.aspect.AgentUserAspect;
|
||||||
import com.chatopera.cc.basic.MainContext;
|
import com.chatopera.cc.basic.MainContext;
|
||||||
import com.chatopera.cc.exception.CSKefuCacheException;
|
import com.chatopera.cc.exception.CSKefuCacheException;
|
||||||
import com.chatopera.cc.model.*;
|
import com.chatopera.cc.model.*;
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler;
|
package com.chatopera.cc.controller;
|
||||||
|
|
||||||
import com.chatopera.cc.acd.AutomaticServiceDist;
|
import com.chatopera.cc.acd.AutomaticServiceDist;
|
||||||
import com.chatopera.cc.basic.MainContext;
|
import com.chatopera.cc.basic.MainContext;
|
@ -14,7 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler;
|
package com.chatopera.cc.controller;
|
||||||
|
|
||||||
import com.chatopera.cc.basic.Constants;
|
import com.chatopera.cc.basic.Constants;
|
||||||
import com.chatopera.cc.basic.MainContext;
|
import com.chatopera.cc.basic.MainContext;
|
||||||
@ -23,7 +23,7 @@ import com.chatopera.cc.basic.Viewport;
|
|||||||
import com.chatopera.cc.basic.auth.AuthToken;
|
import com.chatopera.cc.basic.auth.AuthToken;
|
||||||
import com.chatopera.cc.cache.Cache;
|
import com.chatopera.cc.cache.Cache;
|
||||||
import com.chatopera.cc.exception.CSKefuException;
|
import com.chatopera.cc.exception.CSKefuException;
|
||||||
import com.chatopera.cc.handler.api.QueryParams;
|
import com.chatopera.cc.controller.api.QueryParams;
|
||||||
import com.chatopera.cc.model.StreamingFile;
|
import com.chatopera.cc.model.StreamingFile;
|
||||||
import com.chatopera.cc.model.SystemConfig;
|
import com.chatopera.cc.model.SystemConfig;
|
||||||
import com.chatopera.cc.model.Tenant;
|
import com.chatopera.cc.model.Tenant;
|
@ -14,7 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler;
|
package com.chatopera.cc.controller;
|
||||||
|
|
||||||
import com.chatopera.cc.acd.AutomaticServiceDist;
|
import com.chatopera.cc.acd.AutomaticServiceDist;
|
||||||
import com.chatopera.cc.basic.Constants;
|
import com.chatopera.cc.basic.Constants;
|
@ -14,13 +14,13 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.admin;
|
package com.chatopera.cc.controller.admin;
|
||||||
|
|
||||||
import com.chatopera.cc.acd.AutomaticServiceDist;
|
import com.chatopera.cc.acd.AutomaticServiceDist;
|
||||||
import com.chatopera.cc.basic.MainContext;
|
import com.chatopera.cc.basic.MainContext;
|
||||||
import com.chatopera.cc.basic.MainUtils;
|
import com.chatopera.cc.basic.MainUtils;
|
||||||
import com.chatopera.cc.cache.Cache;
|
import com.chatopera.cc.cache.Cache;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.socketio.client.NettyClients;
|
import com.chatopera.cc.socketio.client.NettyClients;
|
||||||
import com.chatopera.cc.model.SysDic;
|
import com.chatopera.cc.model.SysDic;
|
||||||
import com.chatopera.cc.model.User;
|
import com.chatopera.cc.model.User;
|
@ -14,7 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.admin;
|
package com.chatopera.cc.controller.admin;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -31,7 +31,7 @@ import org.springframework.web.servlet.ModelAndView;
|
|||||||
|
|
||||||
import com.chatopera.cc.util.Menu;
|
import com.chatopera.cc.util.Menu;
|
||||||
import com.chatopera.cc.persistence.repository.SkillRepository;
|
import com.chatopera.cc.persistence.repository.SkillRepository;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.Skill;
|
import com.chatopera.cc.model.Skill;
|
||||||
|
|
||||||
/**
|
/**
|
@ -14,7 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.admin;
|
package com.chatopera.cc.controller.admin;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@ -33,7 +33,7 @@ import org.springframework.web.servlet.ModelAndView;
|
|||||||
import com.chatopera.cc.util.Menu;
|
import com.chatopera.cc.util.Menu;
|
||||||
import com.chatopera.cc.persistence.repository.AreaTypeRepository;
|
import com.chatopera.cc.persistence.repository.AreaTypeRepository;
|
||||||
import com.chatopera.cc.persistence.repository.SysDicRepository;
|
import com.chatopera.cc.persistence.repository.SysDicRepository;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.AreaType;
|
import com.chatopera.cc.model.AreaType;
|
||||||
import com.chatopera.cc.model.SysDic;
|
import com.chatopera.cc.model.SysDic;
|
||||||
import com.chatopera.cc.model.Dict;
|
import com.chatopera.cc.model.Dict;
|
@ -14,11 +14,11 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.admin;
|
package com.chatopera.cc.controller.admin;
|
||||||
|
|
||||||
import com.chatopera.cc.basic.MainContext;
|
import com.chatopera.cc.basic.MainContext;
|
||||||
import com.chatopera.cc.cache.Cache;
|
import com.chatopera.cc.cache.Cache;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.*;
|
import com.chatopera.cc.model.*;
|
||||||
import com.chatopera.cc.persistence.repository.*;
|
import com.chatopera.cc.persistence.repository.*;
|
||||||
import com.chatopera.cc.basic.Constants;
|
import com.chatopera.cc.basic.Constants;
|
@ -14,10 +14,10 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.admin;
|
package com.chatopera.cc.controller.admin;
|
||||||
|
|
||||||
import com.chatopera.cc.basic.MainContext;
|
import com.chatopera.cc.basic.MainContext;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.*;
|
import com.chatopera.cc.model.*;
|
||||||
import com.chatopera.cc.persistence.repository.*;
|
import com.chatopera.cc.persistence.repository.*;
|
||||||
import com.chatopera.cc.basic.Constants;
|
import com.chatopera.cc.basic.Constants;
|
@ -14,22 +14,15 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.admin;
|
package com.chatopera.cc.controller.admin;
|
||||||
|
|
||||||
import com.chatopera.cc.basic.Constants;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.basic.MainContext;
|
|
||||||
import com.chatopera.cc.basic.MainUtils;
|
|
||||||
import com.chatopera.cc.cache.Cache;
|
|
||||||
import com.chatopera.cc.handler.Handler;
|
|
||||||
import com.chatopera.cc.model.AgentStatus;
|
|
||||||
import com.chatopera.cc.model.User;
|
import com.chatopera.cc.model.User;
|
||||||
import com.chatopera.cc.model.UserRole;
|
import com.chatopera.cc.model.UserRole;
|
||||||
import com.chatopera.cc.persistence.repository.UserRepository;
|
import com.chatopera.cc.persistence.repository.UserRepository;
|
||||||
import com.chatopera.cc.persistence.repository.UserRoleRepository;
|
import com.chatopera.cc.persistence.repository.UserRoleRepository;
|
||||||
import com.chatopera.cc.proxy.OnlineUserProxy;
|
import com.chatopera.cc.proxy.OnlineUserProxy;
|
||||||
import com.chatopera.cc.proxy.UserProxy;
|
|
||||||
import com.chatopera.cc.util.Menu;
|
import com.chatopera.cc.util.Menu;
|
||||||
import org.apache.commons.lang.StringUtils;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -43,7 +36,6 @@ import org.springframework.web.servlet.ModelAndView;
|
|||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
@ -14,14 +14,14 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.admin.callcenter;
|
package com.chatopera.cc.controller.admin.callcenter;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
import com.chatopera.cc.util.Menu;
|
import com.chatopera.cc.util.Menu;
|
||||||
import com.chatopera.cc.persistence.repository.PbxHostRepository;
|
import com.chatopera.cc.persistence.repository.PbxHostRepository;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.Acl;
|
import com.chatopera.cc.model.Acl;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
@ -14,7 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.admin.callcenter;
|
package com.chatopera.cc.controller.admin.callcenter;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
@ -29,7 +29,7 @@ import org.springframework.web.servlet.ModelAndView;
|
|||||||
|
|
||||||
import com.chatopera.cc.util.Menu;
|
import com.chatopera.cc.util.Menu;
|
||||||
import com.chatopera.cc.persistence.repository.BlackListRepository;
|
import com.chatopera.cc.persistence.repository.BlackListRepository;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.BlackEntity;
|
import com.chatopera.cc.model.BlackEntity;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
@ -14,7 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.admin.callcenter;
|
package com.chatopera.cc.controller.admin.callcenter;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ import com.chatopera.cc.basic.MainContext;
|
|||||||
import com.chatopera.cc.util.Menu;
|
import com.chatopera.cc.util.Menu;
|
||||||
import com.chatopera.cc.persistence.interfaces.CallCenterInterface;
|
import com.chatopera.cc.persistence.interfaces.CallCenterInterface;
|
||||||
import com.chatopera.cc.persistence.repository.PbxHostRepository;
|
import com.chatopera.cc.persistence.repository.PbxHostRepository;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.PbxHost;
|
import com.chatopera.cc.model.PbxHost;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
@ -14,10 +14,10 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.admin.callcenter;
|
package com.chatopera.cc.controller.admin.callcenter;
|
||||||
|
|
||||||
import com.chatopera.cc.cache.Cache;
|
import com.chatopera.cc.cache.Cache;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.Extention;
|
import com.chatopera.cc.model.Extention;
|
||||||
import com.chatopera.cc.model.PbxHost;
|
import com.chatopera.cc.model.PbxHost;
|
||||||
import com.chatopera.cc.model.User;
|
import com.chatopera.cc.model.User;
|
@ -14,7 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.admin.callcenter;
|
package com.chatopera.cc.controller.admin.callcenter;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
@ -30,7 +30,7 @@ import org.springframework.web.servlet.ModelAndView;
|
|||||||
|
|
||||||
import com.chatopera.cc.persistence.repository.ExtentionRepository;
|
import com.chatopera.cc.persistence.repository.ExtentionRepository;
|
||||||
import com.chatopera.cc.persistence.repository.IvrMenuRepository;
|
import com.chatopera.cc.persistence.repository.IvrMenuRepository;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.Extention;
|
import com.chatopera.cc.model.Extention;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
@ -14,7 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.admin.callcenter;
|
package com.chatopera.cc.controller.admin.callcenter;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -37,7 +37,7 @@ import com.chatopera.cc.util.Menu;
|
|||||||
import com.chatopera.cc.basic.MainUtils;
|
import com.chatopera.cc.basic.MainUtils;
|
||||||
import com.chatopera.cc.persistence.repository.MediaRepository;
|
import com.chatopera.cc.persistence.repository.MediaRepository;
|
||||||
import com.chatopera.cc.persistence.repository.PbxHostRepository;
|
import com.chatopera.cc.persistence.repository.PbxHostRepository;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.Media;
|
import com.chatopera.cc.model.Media;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
@ -14,7 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.admin.callcenter;
|
package com.chatopera.cc.controller.admin.callcenter;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -27,7 +27,7 @@ import com.chatopera.cc.util.Menu;
|
|||||||
import com.chatopera.cc.persistence.interfaces.CallCenterInterface;
|
import com.chatopera.cc.persistence.interfaces.CallCenterInterface;
|
||||||
import com.chatopera.cc.persistence.repository.PbxHostRepository;
|
import com.chatopera.cc.persistence.repository.PbxHostRepository;
|
||||||
import com.chatopera.cc.persistence.repository.ServiceAiRepository;
|
import com.chatopera.cc.persistence.repository.ServiceAiRepository;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.PbxHost;
|
import com.chatopera.cc.model.PbxHost;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
@ -14,7 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.admin.callcenter;
|
package com.chatopera.cc.controller.admin.callcenter;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
import com.chatopera.cc.persistence.repository.RouterRulesRepository;
|
import com.chatopera.cc.persistence.repository.RouterRulesRepository;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.RouterRules;
|
import com.chatopera.cc.model.RouterRules;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
@ -14,10 +14,10 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.admin.callcenter;
|
package com.chatopera.cc.controller.admin.callcenter;
|
||||||
|
|
||||||
import com.chatopera.cc.cache.Cache;
|
import com.chatopera.cc.cache.Cache;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.SipTrunk;
|
import com.chatopera.cc.model.SipTrunk;
|
||||||
import com.chatopera.cc.persistence.repository.PbxHostRepository;
|
import com.chatopera.cc.persistence.repository.PbxHostRepository;
|
||||||
import com.chatopera.cc.persistence.repository.SipTrunkRepository;
|
import com.chatopera.cc.persistence.repository.SipTrunkRepository;
|
@ -14,7 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.admin.callcenter;
|
package com.chatopera.cc.controller.admin.callcenter;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -27,7 +27,7 @@ import com.chatopera.cc.persistence.repository.CallCenterSkillRepository;
|
|||||||
import com.chatopera.cc.persistence.repository.ExtentionRepository;
|
import com.chatopera.cc.persistence.repository.ExtentionRepository;
|
||||||
import com.chatopera.cc.persistence.repository.PbxHostRepository;
|
import com.chatopera.cc.persistence.repository.PbxHostRepository;
|
||||||
import com.chatopera.cc.persistence.repository.SkillExtentionRepository;
|
import com.chatopera.cc.persistence.repository.SkillExtentionRepository;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.CallCenterSkill;
|
import com.chatopera.cc.model.CallCenterSkill;
|
||||||
import com.chatopera.cc.model.Extention;
|
import com.chatopera.cc.model.Extention;
|
||||||
import com.chatopera.cc.model.PbxHost;
|
import com.chatopera.cc.model.PbxHost;
|
@ -14,7 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.admin.channel;
|
package com.chatopera.cc.controller.admin.channel;
|
||||||
|
|
||||||
import com.chatopera.cc.basic.MainContext;
|
import com.chatopera.cc.basic.MainContext;
|
||||||
import com.chatopera.cc.util.Base62;
|
import com.chatopera.cc.util.Base62;
|
||||||
@ -23,7 +23,7 @@ import com.chatopera.cc.basic.MainUtils;
|
|||||||
import com.chatopera.cc.persistence.repository.ConsultInviteRepository;
|
import com.chatopera.cc.persistence.repository.ConsultInviteRepository;
|
||||||
import com.chatopera.cc.persistence.repository.SNSAccountRepository;
|
import com.chatopera.cc.persistence.repository.SNSAccountRepository;
|
||||||
import com.chatopera.cc.persistence.repository.SecretRepository;
|
import com.chatopera.cc.persistence.repository.SecretRepository;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.CousultInvite;
|
import com.chatopera.cc.model.CousultInvite;
|
||||||
import com.chatopera.cc.model.SNSAccount;
|
import com.chatopera.cc.model.SNSAccount;
|
||||||
import com.chatopera.cc.model.Secret;
|
import com.chatopera.cc.model.Secret;
|
@ -14,10 +14,10 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.admin.channel;
|
package com.chatopera.cc.controller.admin.channel;
|
||||||
|
|
||||||
import com.chatopera.cc.cache.Cache;
|
import com.chatopera.cc.cache.Cache;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.CousultInvite;
|
import com.chatopera.cc.model.CousultInvite;
|
||||||
import com.chatopera.cc.model.Organ;
|
import com.chatopera.cc.model.Organ;
|
||||||
import com.chatopera.cc.model.OrgiSkillRel;
|
import com.chatopera.cc.model.OrgiSkillRel;
|
@ -14,11 +14,11 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.admin.config;
|
package com.chatopera.cc.controller.admin.config;
|
||||||
|
|
||||||
import com.chatopera.cc.basic.MainContext;
|
import com.chatopera.cc.basic.MainContext;
|
||||||
import com.chatopera.cc.basic.MainUtils;
|
import com.chatopera.cc.basic.MainUtils;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.Secret;
|
import com.chatopera.cc.model.Secret;
|
||||||
import com.chatopera.cc.model.SysDic;
|
import com.chatopera.cc.model.SysDic;
|
||||||
import com.chatopera.cc.model.SystemConfig;
|
import com.chatopera.cc.model.SystemConfig;
|
@ -14,7 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.admin.config;
|
package com.chatopera.cc.controller.admin.config;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.NoSuchAlgorithmException;
|
||||||
@ -25,7 +25,7 @@ import javax.validation.Valid;
|
|||||||
import com.chatopera.cc.basic.MainContext;
|
import com.chatopera.cc.basic.MainContext;
|
||||||
import com.chatopera.cc.util.Menu;
|
import com.chatopera.cc.util.Menu;
|
||||||
import com.chatopera.cc.persistence.repository.SystemMessageRepository;
|
import com.chatopera.cc.persistence.repository.SystemMessageRepository;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.SystemMessage;
|
import com.chatopera.cc.model.SystemMessage;
|
||||||
import com.chatopera.cc.model.Dict;
|
import com.chatopera.cc.model.Dict;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
@ -14,7 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.admin.system;
|
package com.chatopera.cc.controller.admin.system;
|
||||||
|
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@ -54,7 +54,7 @@ import org.springframework.web.servlet.ModelAndView;
|
|||||||
import com.chatopera.cc.basic.MainUtils;
|
import com.chatopera.cc.basic.MainUtils;
|
||||||
import com.chatopera.cc.util.CskefuList;
|
import com.chatopera.cc.util.CskefuList;
|
||||||
import com.chatopera.cc.persistence.repository.MetadataRepository;
|
import com.chatopera.cc.persistence.repository.MetadataRepository;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.MetadataTable;
|
import com.chatopera.cc.model.MetadataTable;
|
||||||
import com.chatopera.cc.model.Dict;
|
import com.chatopera.cc.model.Dict;
|
||||||
|
|
@ -14,10 +14,10 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.admin.system;
|
package com.chatopera.cc.controller.admin.system;
|
||||||
|
|
||||||
import com.chatopera.cc.cache.Cache;
|
import com.chatopera.cc.cache.Cache;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.SysDic;
|
import com.chatopera.cc.model.SysDic;
|
||||||
import com.chatopera.cc.persistence.repository.SysDicRepository;
|
import com.chatopera.cc.persistence.repository.SysDicRepository;
|
||||||
import com.chatopera.cc.util.Menu;
|
import com.chatopera.cc.util.Menu;
|
@ -14,11 +14,11 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.admin.system;
|
package com.chatopera.cc.controller.admin.system;
|
||||||
|
|
||||||
import com.chatopera.cc.basic.MainUtils;
|
import com.chatopera.cc.basic.MainUtils;
|
||||||
import com.chatopera.cc.cache.Cache;
|
import com.chatopera.cc.cache.Cache;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.SysDic;
|
import com.chatopera.cc.model.SysDic;
|
||||||
import com.chatopera.cc.model.Template;
|
import com.chatopera.cc.model.Template;
|
||||||
import com.chatopera.cc.model.Dict;
|
import com.chatopera.cc.model.Dict;
|
@ -14,15 +14,15 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.api;
|
package com.chatopera.cc.controller.api;
|
||||||
|
|
||||||
import com.chatopera.cc.acd.AutomaticServiceDist;
|
import com.chatopera.cc.acd.AutomaticServiceDist;
|
||||||
import com.chatopera.cc.basic.MainContext.*;
|
import com.chatopera.cc.basic.MainContext.*;
|
||||||
import com.chatopera.cc.basic.MainUtils;
|
import com.chatopera.cc.basic.MainUtils;
|
||||||
import com.chatopera.cc.cache.Cache;
|
import com.chatopera.cc.cache.Cache;
|
||||||
import com.chatopera.cc.exception.CSKefuException;
|
import com.chatopera.cc.exception.CSKefuException;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.handler.api.request.RestUtils;
|
import com.chatopera.cc.controller.api.request.RestUtils;
|
||||||
import com.chatopera.cc.model.*;
|
import com.chatopera.cc.model.*;
|
||||||
import com.chatopera.cc.peer.PeerSyncIM;
|
import com.chatopera.cc.peer.PeerSyncIM;
|
||||||
import com.chatopera.cc.persistence.repository.AgentServiceRepository;
|
import com.chatopera.cc.persistence.repository.AgentServiceRepository;
|
||||||
@ -167,6 +167,9 @@ public class ApiAgentUserController extends Handler {
|
|||||||
// 当前访客的ID
|
// 当前访客的ID
|
||||||
final String userId = agentUser.getUserid();
|
final String userId = agentUser.getUserid();
|
||||||
|
|
||||||
|
logger.info("[transout] agentuserid {} \n target agent id {}, \n current agent id {}, onlineuserid {}", agentUserId, transAgentId, currentAgentno, userId);
|
||||||
|
|
||||||
|
|
||||||
// 检查权限
|
// 检查权限
|
||||||
if ((!logined.isAdmin()) && (!StringUtils.equals(
|
if ((!logined.isAdmin()) && (!StringUtils.equals(
|
||||||
agentUser.getAgentno(),
|
agentUser.getAgentno(),
|
@ -8,12 +8,12 @@
|
|||||||
* publish, or display any part, in any form, or by any means. Reverse engineering, disassembly,
|
* publish, or display any part, in any form, or by any means. Reverse engineering, disassembly,
|
||||||
* or decompilation of this software, unless required by law for interoperability, is prohibited.
|
* or decompilation of this software, unless required by law for interoperability, is prohibited.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.api;
|
package com.chatopera.cc.controller.api;
|
||||||
|
|
||||||
import com.chatopera.cc.basic.MainContext;
|
import com.chatopera.cc.basic.MainContext;
|
||||||
import com.chatopera.cc.cache.Cache;
|
import com.chatopera.cc.cache.Cache;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.handler.api.request.RestUtils;
|
import com.chatopera.cc.controller.api.request.RestUtils;
|
||||||
import com.chatopera.cc.model.InviteRecord;
|
import com.chatopera.cc.model.InviteRecord;
|
||||||
import com.chatopera.cc.model.OnlineUser;
|
import com.chatopera.cc.model.OnlineUser;
|
||||||
import com.chatopera.cc.persistence.repository.InviteRecordRepository;
|
import com.chatopera.cc.persistence.repository.InviteRecordRepository;
|
@ -14,9 +14,9 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.api;
|
package com.chatopera.cc.controller.api;
|
||||||
|
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.persistence.repository.ChatMessageRepository;
|
import com.chatopera.cc.persistence.repository.ChatMessageRepository;
|
||||||
import com.chatopera.cc.util.Menu;
|
import com.chatopera.cc.util.Menu;
|
||||||
import com.chatopera.cc.util.RestResult;
|
import com.chatopera.cc.util.RestResult;
|
@ -13,12 +13,12 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.api;
|
package com.chatopera.cc.controller.api;
|
||||||
|
|
||||||
import com.chatopera.cc.basic.MainContext;
|
import com.chatopera.cc.basic.MainContext;
|
||||||
import com.chatopera.cc.basic.MainUtils;
|
import com.chatopera.cc.basic.MainUtils;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.handler.api.request.RestUtils;
|
import com.chatopera.cc.controller.api.request.RestUtils;
|
||||||
import com.chatopera.cc.model.*;
|
import com.chatopera.cc.model.*;
|
||||||
import com.chatopera.cc.persistence.es.ContactNotesRepository;
|
import com.chatopera.cc.persistence.es.ContactNotesRepository;
|
||||||
import com.chatopera.cc.persistence.es.ContactsRepository;
|
import com.chatopera.cc.persistence.es.ContactsRepository;
|
@ -14,11 +14,11 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.chatopera.cc.handler.api;
|
package com.chatopera.cc.controller.api;
|
||||||
|
|
||||||
import com.chatopera.cc.basic.MainContext;
|
import com.chatopera.cc.basic.MainContext;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.handler.api.request.RestUtils;
|
import com.chatopera.cc.controller.api.request.RestUtils;
|
||||||
import com.chatopera.cc.model.Tag;
|
import com.chatopera.cc.model.Tag;
|
||||||
import com.chatopera.cc.model.TagRelation;
|
import com.chatopera.cc.model.TagRelation;
|
||||||
import com.chatopera.cc.persistence.repository.TagRelationRepository;
|
import com.chatopera.cc.persistence.repository.TagRelationRepository;
|
@ -14,15 +14,16 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.api;
|
package com.chatopera.cc.controller.api;
|
||||||
|
|
||||||
import com.chatopera.cc.basic.MainContext;
|
import com.chatopera.cc.basic.MainContext;
|
||||||
import com.chatopera.cc.exception.CSKefuException;
|
import com.chatopera.cc.exception.CSKefuException;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.handler.api.request.RestUtils;
|
import com.chatopera.cc.controller.api.request.RestUtils;
|
||||||
import com.chatopera.cc.model.*;
|
import com.chatopera.cc.model.*;
|
||||||
import com.chatopera.cc.persistence.es.ContactsRepository;
|
import com.chatopera.cc.persistence.es.ContactsRepository;
|
||||||
import com.chatopera.cc.persistence.repository.SNSAccountRepository;
|
import com.chatopera.cc.persistence.repository.SNSAccountRepository;
|
||||||
|
import com.chatopera.cc.proxy.AgentUserProxy;
|
||||||
import com.chatopera.cc.proxy.ContactsProxy;
|
import com.chatopera.cc.proxy.ContactsProxy;
|
||||||
import com.chatopera.cc.util.Menu;
|
import com.chatopera.cc.util.Menu;
|
||||||
import com.chatopera.cc.util.RestResult;
|
import com.chatopera.cc.util.RestResult;
|
||||||
@ -69,7 +70,7 @@ public class ApiContactsController extends Handler {
|
|||||||
private ContactsProxy contactsProxy;
|
private ContactsProxy contactsProxy;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SNSAccountRepository snsAccountRes;
|
private AgentUserProxy agentUserProxy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 返回用户列表,支持分页,分页参数为 p=1&ps=50,默认分页尺寸为 20条每页
|
* 返回用户列表,支持分页,分页参数为 p=1&ps=50,默认分页尺寸为 20条每页
|
||||||
@ -167,7 +168,10 @@ public class ApiContactsController extends Handler {
|
|||||||
// 查找立即触达的渠道
|
// 查找立即触达的渠道
|
||||||
json = approach(j, logined);
|
json = approach(j, logined);
|
||||||
break;
|
break;
|
||||||
|
case "proactive":
|
||||||
|
// 与联系开始聊天
|
||||||
|
json = proactive(j, logined);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
json.addProperty(RestUtils.RESP_KEY_RC, RestUtils.RESP_RC_FAIL_2);
|
json.addProperty(RestUtils.RESP_KEY_RC, RestUtils.RESP_RC_FAIL_2);
|
||||||
json.addProperty(RestUtils.RESP_KEY_ERROR, "不合法的操作。");
|
json.addProperty(RestUtils.RESP_KEY_ERROR, "不合法的操作。");
|
||||||
@ -177,6 +181,40 @@ public class ApiContactsController extends Handler {
|
|||||||
return new ResponseEntity<String>(json.toString(), headers, HttpStatus.OK);
|
return new ResponseEntity<String>(json.toString(), headers, HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主动与联系人聊天
|
||||||
|
*
|
||||||
|
* @param payload
|
||||||
|
* @param logined
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private JsonObject proactive(final JsonObject payload, User logined) {
|
||||||
|
JsonObject resp = new JsonObject();
|
||||||
|
|
||||||
|
final String channels = payload.has("channels") ? payload.get("channels").getAsString() : null;
|
||||||
|
final String contactid = payload.has("contactid") ? payload.get("contactid").getAsString() : null;
|
||||||
|
|
||||||
|
if (StringUtils.isBlank(channels) || StringUtils.isBlank(contactid)) {
|
||||||
|
resp.addProperty(RestUtils.RESP_KEY_RC, RestUtils.RESP_RC_FAIL_3);
|
||||||
|
resp.addProperty(RestUtils.RESP_KEY_ERROR, "Invalid params.");
|
||||||
|
return resp;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
AgentUser agentUser = agentUserProxy.figureAgentUserBeforeChatWithContactInfo(channels, contactid, logined);
|
||||||
|
resp.addProperty(RestUtils.RESP_KEY_RC, RestUtils.RESP_RC_SUCC);
|
||||||
|
JsonObject data = new JsonObject();
|
||||||
|
data.addProperty("agentuserid", agentUser.getId());
|
||||||
|
resp.add(RestUtils.RESP_KEY_DATA, data);
|
||||||
|
} catch (CSKefuException e) {
|
||||||
|
resp.addProperty(RestUtils.RESP_KEY_RC, RestUtils.RESP_RC_FAIL_4);
|
||||||
|
resp.addProperty(RestUtils.RESP_KEY_ERROR, "Can not create agent user.");
|
||||||
|
return resp;
|
||||||
|
}
|
||||||
|
|
||||||
|
return resp;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据联系人信息查找立即触达的渠道
|
* 根据联系人信息查找立即触达的渠道
|
||||||
*
|
*
|
@ -14,10 +14,10 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.api;
|
package com.chatopera.cc.controller.api;
|
||||||
|
|
||||||
import com.chatopera.cc.basic.MainContext;
|
import com.chatopera.cc.basic.MainContext;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.AgentService;
|
import com.chatopera.cc.model.AgentService;
|
||||||
import com.chatopera.cc.persistence.repository.AgentServiceRepository;
|
import com.chatopera.cc.persistence.repository.AgentServiceRepository;
|
||||||
import com.chatopera.cc.util.Menu;
|
import com.chatopera.cc.util.Menu;
|
@ -14,10 +14,10 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.api;
|
package com.chatopera.cc.controller.api;
|
||||||
|
|
||||||
import com.chatopera.cc.basic.MainContext;
|
import com.chatopera.cc.basic.MainContext;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.OnlineUser;
|
import com.chatopera.cc.model.OnlineUser;
|
||||||
import com.chatopera.cc.persistence.repository.OnlineUserRepository;
|
import com.chatopera.cc.persistence.repository.OnlineUserRepository;
|
||||||
import com.chatopera.cc.util.Menu;
|
import com.chatopera.cc.util.Menu;
|
@ -14,9 +14,9 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.api;
|
package com.chatopera.cc.controller.api;
|
||||||
|
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.Organ;
|
import com.chatopera.cc.model.Organ;
|
||||||
import com.chatopera.cc.persistence.repository.OrganRepository;
|
import com.chatopera.cc.persistence.repository.OrganRepository;
|
||||||
import com.chatopera.cc.util.Menu;
|
import com.chatopera.cc.util.Menu;
|
@ -14,10 +14,10 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.api;
|
package com.chatopera.cc.controller.api;
|
||||||
|
|
||||||
import com.chatopera.cc.basic.MainContext;
|
import com.chatopera.cc.basic.MainContext;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.AgentService;
|
import com.chatopera.cc.model.AgentService;
|
||||||
import com.chatopera.cc.persistence.repository.AgentServiceRepository;
|
import com.chatopera.cc.persistence.repository.AgentServiceRepository;
|
||||||
import com.chatopera.cc.util.Menu;
|
import com.chatopera.cc.util.Menu;
|
@ -14,9 +14,9 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.api;
|
package com.chatopera.cc.controller.api;
|
||||||
|
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.QuickReply;
|
import com.chatopera.cc.model.QuickReply;
|
||||||
import com.chatopera.cc.persistence.es.QuickReplyRepository;
|
import com.chatopera.cc.persistence.es.QuickReplyRepository;
|
||||||
import com.chatopera.cc.util.Menu;
|
import com.chatopera.cc.util.Menu;
|
@ -14,9 +14,9 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.api;
|
package com.chatopera.cc.controller.api;
|
||||||
|
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.QuickType;
|
import com.chatopera.cc.model.QuickType;
|
||||||
import com.chatopera.cc.persistence.es.QuickReplyRepository;
|
import com.chatopera.cc.persistence.es.QuickReplyRepository;
|
||||||
import com.chatopera.cc.persistence.repository.QuickTypeRepository;
|
import com.chatopera.cc.persistence.repository.QuickTypeRepository;
|
@ -14,12 +14,12 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.api;
|
package com.chatopera.cc.controller.api;
|
||||||
|
|
||||||
import com.chatopera.cc.acd.AutomaticServiceDist;
|
import com.chatopera.cc.acd.AutomaticServiceDist;
|
||||||
import com.chatopera.cc.basic.MainContext;
|
import com.chatopera.cc.basic.MainContext;
|
||||||
import com.chatopera.cc.cache.Cache;
|
import com.chatopera.cc.cache.Cache;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.AgentStatus;
|
import com.chatopera.cc.model.AgentStatus;
|
||||||
import com.chatopera.cc.model.SessionConfig;
|
import com.chatopera.cc.model.SessionConfig;
|
||||||
import com.chatopera.cc.model.User;
|
import com.chatopera.cc.model.User;
|
@ -14,11 +14,11 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.api;
|
package com.chatopera.cc.controller.api;
|
||||||
|
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.handler.admin.system.SysDicController;
|
import com.chatopera.cc.controller.admin.system.SysDicController;
|
||||||
import com.chatopera.cc.handler.api.request.RestUtils;
|
import com.chatopera.cc.controller.api.request.RestUtils;
|
||||||
import com.chatopera.cc.model.Dict;
|
import com.chatopera.cc.model.Dict;
|
||||||
import com.chatopera.cc.model.SysDic;
|
import com.chatopera.cc.model.SysDic;
|
||||||
import com.chatopera.cc.model.User;
|
import com.chatopera.cc.model.User;
|
@ -14,10 +14,10 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.chatopera.cc.handler.api;
|
package com.chatopera.cc.controller.api;
|
||||||
|
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.handler.api.request.RestUtils;
|
import com.chatopera.cc.controller.api.request.RestUtils;
|
||||||
import com.chatopera.cc.model.Tag;
|
import com.chatopera.cc.model.Tag;
|
||||||
import com.chatopera.cc.persistence.repository.TagRepository;
|
import com.chatopera.cc.persistence.repository.TagRepository;
|
||||||
import com.chatopera.cc.exception.CSKefuRestException;
|
import com.chatopera.cc.exception.CSKefuRestException;
|
@ -14,13 +14,13 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.api;
|
package com.chatopera.cc.controller.api;
|
||||||
|
|
||||||
import com.chatopera.cc.basic.MainContext;
|
import com.chatopera.cc.basic.MainContext;
|
||||||
import com.chatopera.cc.basic.MainUtils;
|
import com.chatopera.cc.basic.MainUtils;
|
||||||
import com.chatopera.cc.cache.Cache;
|
import com.chatopera.cc.cache.Cache;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.handler.api.request.RestUtils;
|
import com.chatopera.cc.controller.api.request.RestUtils;
|
||||||
import com.chatopera.cc.model.AgentStatus;
|
import com.chatopera.cc.model.AgentStatus;
|
||||||
import com.chatopera.cc.model.OrganUser;
|
import com.chatopera.cc.model.OrganUser;
|
||||||
import com.chatopera.cc.model.User;
|
import com.chatopera.cc.model.User;
|
||||||
@ -174,7 +174,7 @@ public class ApiUserController extends Handler {
|
|||||||
case "update":
|
case "update":
|
||||||
json = update(request, j);
|
json = update(request, j);
|
||||||
break;
|
break;
|
||||||
case "findByOrgan":
|
case "findbyorgan":
|
||||||
json = findByOrgan(j);
|
json = findByOrgan(j);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
@ -14,9 +14,9 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.api;
|
package com.chatopera.cc.controller.api;
|
||||||
|
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.CousultInvite;
|
import com.chatopera.cc.model.CousultInvite;
|
||||||
import com.chatopera.cc.persistence.repository.ConsultInviteRepository;
|
import com.chatopera.cc.persistence.repository.ConsultInviteRepository;
|
||||||
import com.chatopera.cc.util.Menu;
|
import com.chatopera.cc.util.Menu;
|
@ -14,12 +14,12 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.chatopera.cc.handler.api;
|
package com.chatopera.cc.controller.api;
|
||||||
|
|
||||||
import com.chatopera.cc.basic.Constants;
|
import com.chatopera.cc.basic.Constants;
|
||||||
import com.chatopera.cc.basic.MainUtils;
|
import com.chatopera.cc.basic.MainUtils;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.handler.api.request.RestUtils;
|
import com.chatopera.cc.controller.api.request.RestUtils;
|
||||||
import com.chatopera.cc.model.Contacts;
|
import com.chatopera.cc.model.Contacts;
|
||||||
import com.chatopera.cc.model.User;
|
import com.chatopera.cc.model.User;
|
||||||
import com.chatopera.cc.persistence.es.ContactsRepository;
|
import com.chatopera.cc.persistence.es.ContactsRepository;
|
@ -14,7 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.api;
|
package com.chatopera.cc.controller.api;
|
||||||
|
|
||||||
public class QueryParams {
|
public class QueryParams {
|
||||||
private String begin ;
|
private String begin ;
|
@ -14,7 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.api;
|
package com.chatopera.cc.controller.api;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
@ -14,10 +14,10 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.api;
|
package com.chatopera.cc.controller.api;
|
||||||
|
|
||||||
import com.chatopera.cc.basic.MainContext;
|
import com.chatopera.cc.basic.MainContext;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.persistence.repository.TagRepository;
|
import com.chatopera.cc.persistence.repository.TagRepository;
|
||||||
import com.chatopera.cc.util.Menu;
|
import com.chatopera.cc.util.Menu;
|
||||||
import com.chatopera.cc.util.RestResult;
|
import com.chatopera.cc.util.RestResult;
|
@ -14,12 +14,12 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.api.auth;
|
package com.chatopera.cc.controller.api.auth;
|
||||||
|
|
||||||
import com.chatopera.cc.basic.MainUtils;
|
import com.chatopera.cc.basic.MainUtils;
|
||||||
import com.chatopera.cc.basic.auth.AuthToken;
|
import com.chatopera.cc.basic.auth.AuthToken;
|
||||||
import com.chatopera.cc.cache.Cache;
|
import com.chatopera.cc.cache.Cache;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.User;
|
import com.chatopera.cc.model.User;
|
||||||
import com.chatopera.cc.model.UserRole;
|
import com.chatopera.cc.model.UserRole;
|
||||||
import com.chatopera.cc.persistence.repository.UserRepository;
|
import com.chatopera.cc.persistence.repository.UserRepository;
|
@ -14,9 +14,9 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.api.auth;
|
package com.chatopera.cc.controller.api.auth;
|
||||||
|
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.util.Menu;
|
import com.chatopera.cc.util.Menu;
|
||||||
import com.chatopera.cc.util.RestResult;
|
import com.chatopera.cc.util.RestResult;
|
||||||
import com.chatopera.cc.util.RestResultType;
|
import com.chatopera.cc.util.RestResultType;
|
@ -14,7 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.api.request;
|
package com.chatopera.cc.controller.api.request;
|
||||||
|
|
||||||
public class QueryParams {
|
public class QueryParams {
|
||||||
private String begin ;
|
private String begin ;
|
@ -14,7 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.api.request;
|
package com.chatopera.cc.controller.api.request;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
@ -14,7 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.api.request;
|
package com.chatopera.cc.controller.api.request;
|
||||||
|
|
||||||
import org.springframework.http.HttpHeaders;
|
import org.springframework.http.HttpHeaders;
|
||||||
|
|
@ -14,25 +14,25 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.chatopera.cc.handler.apps;
|
package com.chatopera.cc.controller.apps;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.chatopera.cc.acd.AutomaticServiceDist;
|
import com.chatopera.cc.acd.AutomaticServiceDist;
|
||||||
|
import com.chatopera.cc.activemq.BrokerPublisher;
|
||||||
|
import com.chatopera.cc.basic.Constants;
|
||||||
import com.chatopera.cc.basic.MainUtils;
|
import com.chatopera.cc.basic.MainUtils;
|
||||||
import com.chatopera.cc.cache.Cache;
|
import com.chatopera.cc.cache.Cache;
|
||||||
import com.chatopera.cc.exception.CSKefuException;
|
import com.chatopera.cc.exception.CSKefuException;
|
||||||
import com.chatopera.cc.model.*;
|
import com.chatopera.cc.model.*;
|
||||||
import com.chatopera.cc.peer.PeerSyncIM;
|
import com.chatopera.cc.peer.PeerSyncIM;
|
||||||
import com.chatopera.cc.proxy.AgentServiceProxy;
|
import com.chatopera.cc.proxy.*;
|
||||||
import com.chatopera.cc.basic.MainContext;
|
import com.chatopera.cc.basic.MainContext;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.AgentUser;
|
import com.chatopera.cc.model.AgentUser;
|
||||||
import com.chatopera.cc.model.Organ;
|
import com.chatopera.cc.model.Organ;
|
||||||
import com.chatopera.cc.model.User;
|
import com.chatopera.cc.model.User;
|
||||||
import com.chatopera.cc.persistence.es.QuickReplyRepository;
|
import com.chatopera.cc.persistence.es.QuickReplyRepository;
|
||||||
import com.chatopera.cc.persistence.repository.*;
|
import com.chatopera.cc.persistence.repository.*;
|
||||||
import com.chatopera.cc.proxy.AgentUserProxy;
|
|
||||||
import com.chatopera.cc.proxy.OnlineUserProxy;
|
|
||||||
import com.chatopera.cc.proxy.UserProxy;
|
|
||||||
import com.chatopera.cc.socketio.message.Message;
|
import com.chatopera.cc.socketio.message.Message;
|
||||||
import com.chatopera.cc.util.Menu;
|
import com.chatopera.cc.util.Menu;
|
||||||
import freemarker.template.TemplateException;
|
import freemarker.template.TemplateException;
|
||||||
@ -111,6 +111,12 @@ public class AgentAuditController extends Handler {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private TagRelationRepository tagRelationRes;
|
private TagRelationRepository tagRelationRes;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BlackEntityProxy blackEntityProxy;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BrokerPublisher brokerPublisher;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private AgentServiceProxy agentServiceProxy;
|
private AgentServiceProxy agentServiceProxy;
|
||||||
|
|
||||||
@ -311,16 +317,15 @@ public class AgentAuditController extends Handler {
|
|||||||
}
|
}
|
||||||
view.addObject("onlineUser", onlineUser);
|
view.addObject("onlineUser", onlineUser);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
view.addObject("serviceCount", Integer
|
view.addObject("serviceCount", Integer
|
||||||
.valueOf(this.agentServiceRes
|
.valueOf(this.agentServiceRes
|
||||||
.countByUseridAndOrgiAndStatus(agentUser
|
.countByUseridAndOrgiAndStatus(agentUser
|
||||||
.getUserid(), orgi,
|
.getUserid(), orgi,
|
||||||
MainContext.AgentUserStatusEnum.END
|
MainContext.AgentUserStatusEnum.END
|
||||||
.toString()
|
.toString())));
|
||||||
)));
|
view.addObject("tagRelationList", tagRelationRes.findByUserid(agentUser.getUserid()));
|
||||||
}
|
}
|
||||||
|
|
||||||
SessionConfig sessionConfig = AutomaticServiceDist.initSessionConfig(super.getOrgi(request));
|
SessionConfig sessionConfig = AutomaticServiceDist.initSessionConfig(super.getOrgi(request));
|
||||||
|
|
||||||
view.addObject("sessionConfig", sessionConfig);
|
view.addObject("sessionConfig", sessionConfig);
|
||||||
@ -329,7 +334,6 @@ public class AgentAuditController extends Handler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
view.addObject("tags", tagRes.findByOrgiAndTagtype(orgi, MainContext.ModelType.USER.toString()));
|
view.addObject("tags", tagRes.findByOrgiAndTagtype(orgi, MainContext.ModelType.USER.toString()));
|
||||||
}
|
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -560,4 +564,88 @@ public class AgentAuditController extends Handler {
|
|||||||
return request(super.createRequestPageTempletResponse("redirect:/apps/cca/index.html"));
|
return request(super.createRequestPageTempletResponse("redirect:/apps/cca/index.html"));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结束对话
|
||||||
|
* 如果当前对话属于登录用户或登录用户为超级用户,则可以结束这个对话
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@RequestMapping({"/end"})
|
||||||
|
@Menu(type = "apps", subtype = "agent")
|
||||||
|
public ModelAndView end(HttpServletRequest request, @Valid String id) {
|
||||||
|
final String orgi = super.getOrgi(request);
|
||||||
|
final User logined = super.getUser(request);
|
||||||
|
|
||||||
|
final AgentUser agentUser = agentUserRes.findByIdAndOrgi(id, orgi);
|
||||||
|
|
||||||
|
if (agentUser != null) {
|
||||||
|
if ((StringUtils.equals(
|
||||||
|
logined.getId(), agentUser.getAgentno()) || logined.isAdmin())) {
|
||||||
|
// 删除访客-坐席关联关系,包括缓存
|
||||||
|
try {
|
||||||
|
AutomaticServiceDist.deleteAgentUser(agentUser, orgi);
|
||||||
|
} catch (CSKefuException e) {
|
||||||
|
// 未能删除成功
|
||||||
|
logger.error("[end]", e);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
logger.info("[end] Permission not fulfill.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return request(super.createRequestPageTempletResponse("redirect:/apps/cca/index.html"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping({"/blacklist/add"})
|
||||||
|
@Menu(type = "apps", subtype = "blacklist")
|
||||||
|
public ModelAndView blacklistadd(ModelMap map, HttpServletRequest request, @Valid String agentuserid, @Valid String agentserviceid, @Valid String userid)
|
||||||
|
throws Exception {
|
||||||
|
map.addAttribute("agentuserid", agentuserid);
|
||||||
|
map.addAttribute("agentserviceid", agentserviceid);
|
||||||
|
map.addAttribute("userid", userid);
|
||||||
|
map.addAttribute("agentUser", agentUserRes.findByIdAndOrgi(userid, super.getOrgi(request)));
|
||||||
|
return request(super.createRequestPageTempletResponse("/apps/cca/blacklistadd"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping({"/blacklist/save"})
|
||||||
|
@Menu(type = "apps", subtype = "blacklist")
|
||||||
|
public ModelAndView blacklist(
|
||||||
|
HttpServletRequest request,
|
||||||
|
@Valid String agentuserid,
|
||||||
|
@Valid String agentserviceid,
|
||||||
|
@Valid String userid,
|
||||||
|
@Valid BlackEntity blackEntity)
|
||||||
|
throws Exception {
|
||||||
|
logger.info("[blacklist] userid {}", userid);
|
||||||
|
final User logined = super.getUser(request);
|
||||||
|
final String orgi = logined.getOrgi();
|
||||||
|
|
||||||
|
if (StringUtils.isBlank(userid)) {
|
||||||
|
throw new CSKefuException("Invalid userid");
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 添加黑名单
|
||||||
|
* 一定时间后触发函数
|
||||||
|
*/
|
||||||
|
JSONObject payload = new JSONObject();
|
||||||
|
|
||||||
|
int timeSeconds = blackEntity.getControltime() * 3600;
|
||||||
|
payload.put("userId", userid);
|
||||||
|
payload.put("orgi", orgi);
|
||||||
|
|
||||||
|
// 更新或创建黑名单
|
||||||
|
blackEntityProxy.updateOrCreateBlackEntity(blackEntity, logined, userid, orgi, agentserviceid, agentuserid);
|
||||||
|
|
||||||
|
// 创建定时任务 取消拉黑
|
||||||
|
brokerPublisher.send(
|
||||||
|
Constants.WEBIM_SOCKETIO_ONLINE_USER_BLACKLIST, payload.toJSONString(), false, timeSeconds);
|
||||||
|
|
||||||
|
return end(request, agentuserid);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -14,7 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.apps;
|
package com.chatopera.cc.controller.apps;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.chatopera.cc.acd.AutomaticServiceDist;
|
import com.chatopera.cc.acd.AutomaticServiceDist;
|
||||||
@ -24,7 +24,7 @@
|
|||||||
import com.chatopera.cc.basic.MainUtils;
|
import com.chatopera.cc.basic.MainUtils;
|
||||||
import com.chatopera.cc.cache.Cache;
|
import com.chatopera.cc.cache.Cache;
|
||||||
import com.chatopera.cc.exception.CSKefuException;
|
import com.chatopera.cc.exception.CSKefuException;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.*;
|
import com.chatopera.cc.model.*;
|
||||||
import com.chatopera.cc.peer.PeerSyncIM;
|
import com.chatopera.cc.peer.PeerSyncIM;
|
||||||
import com.chatopera.cc.persistence.blob.JpaBlobHelper;
|
import com.chatopera.cc.persistence.blob.JpaBlobHelper;
|
||||||
@ -1115,14 +1115,14 @@
|
|||||||
final List<Organ> skillGroups = OnlineUserProxy.organ(orgi, true);
|
final List<Organ> skillGroups = OnlineUserProxy.organ(orgi, true);
|
||||||
|
|
||||||
// DEBUG
|
// DEBUG
|
||||||
// StringBuffer sb = new StringBuffer();
|
StringBuffer sb = new StringBuffer();
|
||||||
// for(final Organ organ: skillGroups){
|
for (final Organ organ : skillGroups) {
|
||||||
// sb.append(organ.getId());
|
sb.append(organ.getId());
|
||||||
// sb.append(":");
|
sb.append(":");
|
||||||
// sb.append(organ.getName());
|
sb.append(organ.getName());
|
||||||
// sb.append("\t");
|
sb.append("\t");
|
||||||
// }
|
}
|
||||||
// logger.info("[transfer] skillGroups {}", sb.toString());
|
logger.info("[transfer] skillGroups {}", sb.toString());
|
||||||
|
|
||||||
|
|
||||||
// 选择当前用户的默认技能组
|
// 选择当前用户的默认技能组
|
||||||
@ -1134,7 +1134,7 @@
|
|||||||
currentOrgan = skillGroups.get(0).getId();
|
currentOrgan = skillGroups.get(0).getId();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// logger.info("[transfer] set current organ as {}", currentOrgan);
|
logger.info("[transfer] set current organ as {}", currentOrgan);
|
||||||
|
|
||||||
|
|
||||||
// 列出所有在线的坐席,排除本身
|
// 列出所有在线的坐席,排除本身
|
||||||
@ -1149,7 +1149,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// logger.info("[transfer] get all userids except mine, {}", StringUtils.join(userids, "\t"));
|
logger.info("[transfer] get all userids except mine, {}", StringUtils.join(userids, "\t"));
|
||||||
|
|
||||||
final List<User> userList = userRes.findAll(userids);
|
final List<User> userList = userRes.findAll(userids);
|
||||||
for (final User o : userList) {
|
for (final User o : userList) {
|
@ -15,12 +15,12 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.chatopera.cc.handler.apps;
|
package com.chatopera.cc.controller.apps;
|
||||||
|
|
||||||
import com.chatopera.cc.acd.AutomaticServiceDist;
|
import com.chatopera.cc.acd.AutomaticServiceDist;
|
||||||
import com.chatopera.cc.basic.MainContext;
|
import com.chatopera.cc.basic.MainContext;
|
||||||
import com.chatopera.cc.cache.Cache;
|
import com.chatopera.cc.cache.Cache;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.Quality;
|
import com.chatopera.cc.model.Quality;
|
||||||
import com.chatopera.cc.model.QualityRequest;
|
import com.chatopera.cc.model.QualityRequest;
|
||||||
import com.chatopera.cc.model.SessionConfig;
|
import com.chatopera.cc.model.SessionConfig;
|
@ -14,13 +14,13 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.apps;
|
package com.chatopera.cc.controller.apps;
|
||||||
|
|
||||||
import com.chatopera.cc.acd.AutomaticServiceDist;
|
import com.chatopera.cc.acd.AutomaticServiceDist;
|
||||||
import com.chatopera.cc.basic.MainContext;
|
import com.chatopera.cc.basic.MainContext;
|
||||||
import com.chatopera.cc.basic.MainUtils;
|
import com.chatopera.cc.basic.MainUtils;
|
||||||
import com.chatopera.cc.cache.Cache;
|
import com.chatopera.cc.cache.Cache;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.*;
|
import com.chatopera.cc.model.*;
|
||||||
import com.chatopera.cc.persistence.repository.*;
|
import com.chatopera.cc.persistence.repository.*;
|
||||||
import com.chatopera.cc.basic.Constants;
|
import com.chatopera.cc.basic.Constants;
|
@ -14,13 +14,13 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.apps;
|
package com.chatopera.cc.controller.apps;
|
||||||
|
|
||||||
import com.chatopera.cc.acd.AutomaticServiceDist;
|
import com.chatopera.cc.acd.AutomaticServiceDist;
|
||||||
import com.chatopera.cc.basic.MainContext;
|
import com.chatopera.cc.basic.MainContext;
|
||||||
import com.chatopera.cc.basic.MainUtils;
|
import com.chatopera.cc.basic.MainUtils;
|
||||||
import com.chatopera.cc.cache.Cache;
|
import com.chatopera.cc.cache.Cache;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.*;
|
import com.chatopera.cc.model.*;
|
||||||
import com.chatopera.cc.persistence.es.ContactsRepository;
|
import com.chatopera.cc.persistence.es.ContactsRepository;
|
||||||
import com.chatopera.cc.persistence.repository.OnlineUserRepository;
|
import com.chatopera.cc.persistence.repository.OnlineUserRepository;
|
||||||
@ -230,6 +230,8 @@ public class AppsController extends Handler {
|
|||||||
public ModelAndView profile(ModelMap map, HttpServletRequest request, @Valid User user, @Valid String index) {
|
public ModelAndView profile(ModelMap map, HttpServletRequest request, @Valid User user, @Valid String index) {
|
||||||
User tempUser = userRes.getOne(user.getId());
|
User tempUser = userRes.getOne(user.getId());
|
||||||
final User logined = super.getUser(request);
|
final User logined = super.getUser(request);
|
||||||
|
// 用户名不可修改
|
||||||
|
user.setUsername(logined.getUsername());
|
||||||
|
|
||||||
if (tempUser != null) {
|
if (tempUser != null) {
|
||||||
String msg = userProxy.validUserUpdate(user, tempUser);
|
String msg = userProxy.validUserUpdate(user, tempUser);
|
@ -14,11 +14,11 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.apps;
|
package com.chatopera.cc.controller.apps;
|
||||||
|
|
||||||
import com.chatopera.cc.basic.MainUtils;
|
import com.chatopera.cc.basic.MainUtils;
|
||||||
import com.chatopera.cc.exception.CSKefuException;
|
import com.chatopera.cc.exception.CSKefuException;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.Contacts;
|
import com.chatopera.cc.model.Contacts;
|
||||||
import com.chatopera.cc.model.MetadataTable;
|
import com.chatopera.cc.model.MetadataTable;
|
||||||
import com.chatopera.cc.model.PropertiesEvent;
|
import com.chatopera.cc.model.PropertiesEvent;
|
@ -15,11 +15,11 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.chatopera.cc.handler.apps;
|
package com.chatopera.cc.controller.apps;
|
||||||
|
|
||||||
import com.chatopera.cc.basic.MainContext;
|
import com.chatopera.cc.basic.MainContext;
|
||||||
import com.chatopera.cc.basic.MainUtils;
|
import com.chatopera.cc.basic.MainUtils;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.*;
|
import com.chatopera.cc.model.*;
|
||||||
import com.chatopera.cc.persistence.es.ContactsRepository;
|
import com.chatopera.cc.persistence.es.ContactsRepository;
|
||||||
import com.chatopera.cc.persistence.es.EntCustomerRepository;
|
import com.chatopera.cc.persistence.es.EntCustomerRepository;
|
@ -15,12 +15,12 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.chatopera.cc.handler.apps;
|
package com.chatopera.cc.controller.apps;
|
||||||
|
|
||||||
import com.chatopera.cc.basic.Constants;
|
import com.chatopera.cc.basic.Constants;
|
||||||
import com.chatopera.cc.basic.MainContext;
|
import com.chatopera.cc.basic.MainContext;
|
||||||
import com.chatopera.cc.basic.MainUtils;
|
import com.chatopera.cc.basic.MainUtils;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.*;
|
import com.chatopera.cc.model.*;
|
||||||
import com.chatopera.cc.peer.PeerSyncEntIM;
|
import com.chatopera.cc.peer.PeerSyncEntIM;
|
||||||
import com.chatopera.cc.persistence.blob.JpaBlobHelper;
|
import com.chatopera.cc.persistence.blob.JpaBlobHelper;
|
@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.chatopera.cc.handler.apps;
|
package com.chatopera.cc.controller.apps;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ import com.chatopera.cc.persistence.repository.ExtentionRepository;
|
|||||||
import com.chatopera.cc.persistence.repository.RouterRulesRepository;
|
import com.chatopera.cc.persistence.repository.RouterRulesRepository;
|
||||||
import com.chatopera.cc.persistence.repository.SipTrunkRepository;
|
import com.chatopera.cc.persistence.repository.SipTrunkRepository;
|
||||||
import com.chatopera.cc.persistence.repository.SkillExtentionRepository;
|
import com.chatopera.cc.persistence.repository.SkillExtentionRepository;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.SystemConfig;
|
import com.chatopera.cc.model.SystemConfig;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.chatopera.cc.handler.apps;
|
package com.chatopera.cc.controller.apps;
|
||||||
|
|
||||||
import com.chatopera.cc.proxy.OnlineUserProxy;
|
import com.chatopera.cc.proxy.OnlineUserProxy;
|
||||||
import com.chatopera.cc.acd.AutomaticServiceDist;
|
import com.chatopera.cc.acd.AutomaticServiceDist;
|
||||||
@ -23,7 +23,7 @@ import com.chatopera.cc.basic.Constants;
|
|||||||
import com.chatopera.cc.basic.MainContext;
|
import com.chatopera.cc.basic.MainContext;
|
||||||
import com.chatopera.cc.basic.MainUtils;
|
import com.chatopera.cc.basic.MainUtils;
|
||||||
import com.chatopera.cc.cache.Cache;
|
import com.chatopera.cc.cache.Cache;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.socketio.util.RichMediaUtils;
|
import com.chatopera.cc.socketio.util.RichMediaUtils;
|
||||||
import com.chatopera.cc.model.*;
|
import com.chatopera.cc.model.*;
|
||||||
import com.chatopera.cc.persistence.blob.JpaBlobHelper;
|
import com.chatopera.cc.persistence.blob.JpaBlobHelper;
|
@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.chatopera.cc.handler.apps;
|
package com.chatopera.cc.controller.apps;
|
||||||
|
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@ -35,7 +35,7 @@ import org.springframework.web.servlet.ModelAndView;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.chatopera.cc.persistence.repository.JobDetailRepository;
|
import com.chatopera.cc.persistence.repository.JobDetailRepository;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
|
|
||||||
|
|
||||||
@Controller
|
@Controller
|
@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.chatopera.cc.handler.apps;
|
package com.chatopera.cc.controller.apps;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -30,7 +30,7 @@ import com.chatopera.cc.persistence.es.KbsTopicRepository;
|
|||||||
import com.chatopera.cc.persistence.repository.AttachmentRepository;
|
import com.chatopera.cc.persistence.repository.AttachmentRepository;
|
||||||
import com.chatopera.cc.persistence.repository.KbsTypeRepository;
|
import com.chatopera.cc.persistence.repository.KbsTypeRepository;
|
||||||
import com.chatopera.cc.persistence.repository.TagRepository;
|
import com.chatopera.cc.persistence.repository.TagRepository;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.AttachmentFile;
|
import com.chatopera.cc.model.AttachmentFile;
|
||||||
import com.chatopera.cc.model.KbsTopic;
|
import com.chatopera.cc.model.KbsTopic;
|
||||||
import com.chatopera.cc.model.KbsType;
|
import com.chatopera.cc.model.KbsType;
|
@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.chatopera.cc.handler.apps;
|
package com.chatopera.cc.controller.apps;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
import com.chatopera.cc.util.Menu;
|
import com.chatopera.cc.util.Menu;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/message")
|
@RequestMapping("/message")
|
@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.chatopera.cc.handler.apps;
|
package com.chatopera.cc.controller.apps;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.NoSuchAlgorithmException;
|
||||||
@ -26,7 +26,7 @@ import javax.validation.Valid;
|
|||||||
import com.chatopera.cc.basic.MainUtils;
|
import com.chatopera.cc.basic.MainUtils;
|
||||||
import com.chatopera.cc.util.Menu;
|
import com.chatopera.cc.util.Menu;
|
||||||
import com.chatopera.cc.persistence.repository.OrganizationRepository;
|
import com.chatopera.cc.persistence.repository.OrganizationRepository;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.Organization;
|
import com.chatopera.cc.model.Organization;
|
||||||
import com.chatopera.cc.model.User;
|
import com.chatopera.cc.model.User;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
@ -14,7 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.apps;
|
package com.chatopera.cc.controller.apps;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -42,7 +42,7 @@ import com.chatopera.cc.persistence.es.QuickReplyRepository;
|
|||||||
import com.chatopera.cc.persistence.repository.MetadataRepository;
|
import com.chatopera.cc.persistence.repository.MetadataRepository;
|
||||||
import com.chatopera.cc.persistence.repository.QuickTypeRepository;
|
import com.chatopera.cc.persistence.repository.QuickTypeRepository;
|
||||||
import com.chatopera.cc.persistence.repository.ReporterRepository;
|
import com.chatopera.cc.persistence.repository.ReporterRepository;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.MetadataTable;
|
import com.chatopera.cc.model.MetadataTable;
|
||||||
import com.chatopera.cc.model.QuickReply;
|
import com.chatopera.cc.model.QuickReply;
|
||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
@ -15,10 +15,10 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.chatopera.cc.handler.apps;
|
package com.chatopera.cc.controller.apps;
|
||||||
|
|
||||||
import com.chatopera.cc.cache.Cache;
|
import com.chatopera.cc.cache.Cache;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.SipTrunk;
|
import com.chatopera.cc.model.SipTrunk;
|
||||||
import com.chatopera.cc.model.User;
|
import com.chatopera.cc.model.User;
|
||||||
import com.chatopera.cc.proxy.CallcenterOutboundProxy;
|
import com.chatopera.cc.proxy.CallcenterOutboundProxy;
|
@ -14,11 +14,11 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.apps;
|
package com.chatopera.cc.controller.apps;
|
||||||
|
|
||||||
import com.chatopera.cc.basic.MainContext;
|
import com.chatopera.cc.basic.MainContext;
|
||||||
import com.chatopera.cc.cache.Cache;
|
import com.chatopera.cc.cache.Cache;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.*;
|
import com.chatopera.cc.model.*;
|
||||||
import com.chatopera.cc.persistence.repository.*;
|
import com.chatopera.cc.persistence.repository.*;
|
||||||
import com.chatopera.cc.proxy.OnlineUserProxy;
|
import com.chatopera.cc.proxy.OnlineUserProxy;
|
@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.chatopera.cc.handler.apps;
|
package com.chatopera.cc.controller.apps;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -64,7 +64,7 @@ import com.chatopera.cc.persistence.repository.AreaTypeRepository;
|
|||||||
import com.chatopera.cc.persistence.repository.KnowledgeTypeRepository;
|
import com.chatopera.cc.persistence.repository.KnowledgeTypeRepository;
|
||||||
import com.chatopera.cc.persistence.repository.MetadataRepository;
|
import com.chatopera.cc.persistence.repository.MetadataRepository;
|
||||||
import com.chatopera.cc.persistence.repository.ReporterRepository;
|
import com.chatopera.cc.persistence.repository.ReporterRepository;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.MetadataTable;
|
import com.chatopera.cc.model.MetadataTable;
|
||||||
import com.chatopera.cc.model.Dict;
|
import com.chatopera.cc.model.Dict;
|
||||||
|
|
@ -14,7 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.apps.report;
|
package com.chatopera.cc.controller.apps.report;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -41,7 +41,7 @@ import com.chatopera.cc.persistence.repository.CubeTypeRepository;
|
|||||||
import com.chatopera.cc.persistence.repository.DimensionRepository;
|
import com.chatopera.cc.persistence.repository.DimensionRepository;
|
||||||
import com.chatopera.cc.persistence.repository.MetadataRepository;
|
import com.chatopera.cc.persistence.repository.MetadataRepository;
|
||||||
import com.chatopera.cc.persistence.repository.PublishedCubeRepository;
|
import com.chatopera.cc.persistence.repository.PublishedCubeRepository;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.Cube;
|
import com.chatopera.cc.model.Cube;
|
||||||
import com.chatopera.cc.model.CubeMeasure;
|
import com.chatopera.cc.model.CubeMeasure;
|
||||||
import com.chatopera.cc.model.CubeMetadata;
|
import com.chatopera.cc.model.CubeMetadata;
|
@ -14,7 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.apps.report;
|
package com.chatopera.cc.controller.apps.report;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ import org.springframework.web.servlet.ModelAndView;
|
|||||||
import com.chatopera.cc.util.Menu;
|
import com.chatopera.cc.util.Menu;
|
||||||
import com.chatopera.cc.persistence.repository.CubeLevelRepository;
|
import com.chatopera.cc.persistence.repository.CubeLevelRepository;
|
||||||
import com.chatopera.cc.persistence.repository.TablePropertiesRepository;
|
import com.chatopera.cc.persistence.repository.TablePropertiesRepository;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.CubeLevel;
|
import com.chatopera.cc.model.CubeLevel;
|
||||||
import com.chatopera.cc.model.CubeMetadata;
|
import com.chatopera.cc.model.CubeMetadata;
|
||||||
|
|
@ -14,7 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.apps.report;
|
package com.chatopera.cc.controller.apps.report;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ import org.springframework.ui.ModelMap;
|
|||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.CubeMeasure;
|
import com.chatopera.cc.model.CubeMeasure;
|
||||||
import com.chatopera.cc.model.CubeMetadata;
|
import com.chatopera.cc.model.CubeMetadata;
|
||||||
|
|
@ -14,7 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.apps.report;
|
package com.chatopera.cc.controller.apps.report;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -34,7 +34,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
import com.chatopera.cc.persistence.repository.CubeLevelRepository;
|
import com.chatopera.cc.persistence.repository.CubeLevelRepository;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.CubeLevel;
|
import com.chatopera.cc.model.CubeLevel;
|
||||||
import com.chatopera.cc.model.CubeMetadata;
|
import com.chatopera.cc.model.CubeMetadata;
|
||||||
|
|
@ -14,7 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.apps.report;
|
package com.chatopera.cc.controller.apps.report;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -56,7 +56,7 @@ import com.chatopera.cc.persistence.repository.DataDicRepository;
|
|||||||
import com.chatopera.cc.persistence.repository.MetadataRepository;
|
import com.chatopera.cc.persistence.repository.MetadataRepository;
|
||||||
import com.chatopera.cc.persistence.repository.ReportCubeService;
|
import com.chatopera.cc.persistence.repository.ReportCubeService;
|
||||||
import com.chatopera.cc.persistence.repository.ReportRepository;
|
import com.chatopera.cc.persistence.repository.ReportRepository;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.DataDic;
|
import com.chatopera.cc.model.DataDic;
|
||||||
import com.chatopera.cc.model.MetadataTable;
|
import com.chatopera.cc.model.MetadataTable;
|
||||||
import com.chatopera.cc.model.PublishedReport;
|
import com.chatopera.cc.model.PublishedReport;
|
@ -14,7 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.apps.report;
|
package com.chatopera.cc.controller.apps.report;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@ -51,7 +51,7 @@ import com.chatopera.cc.persistence.repository.ReportRepository;
|
|||||||
import com.chatopera.cc.persistence.repository.SysDicRepository;
|
import com.chatopera.cc.persistence.repository.SysDicRepository;
|
||||||
import com.chatopera.cc.persistence.repository.TablePropertiesRepository;
|
import com.chatopera.cc.persistence.repository.TablePropertiesRepository;
|
||||||
import com.chatopera.cc.persistence.repository.TemplateRepository;
|
import com.chatopera.cc.persistence.repository.TemplateRepository;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.ChartProperties;
|
import com.chatopera.cc.model.ChartProperties;
|
||||||
import com.chatopera.cc.model.ColumnProperties;
|
import com.chatopera.cc.model.ColumnProperties;
|
||||||
import com.chatopera.cc.model.Cube;
|
import com.chatopera.cc.model.Cube;
|
@ -14,7 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.apps.report;
|
package com.chatopera.cc.controller.apps.report;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -37,7 +37,7 @@ import org.springframework.web.servlet.ModelAndView;
|
|||||||
import com.chatopera.cc.util.Menu;
|
import com.chatopera.cc.util.Menu;
|
||||||
import com.chatopera.cc.persistence.repository.DataDicRepository;
|
import com.chatopera.cc.persistence.repository.DataDicRepository;
|
||||||
import com.chatopera.cc.persistence.repository.ReportCubeService;
|
import com.chatopera.cc.persistence.repository.ReportCubeService;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.PublishedReport;
|
import com.chatopera.cc.model.PublishedReport;
|
||||||
import com.chatopera.cc.model.ReportFilter;
|
import com.chatopera.cc.model.ReportFilter;
|
||||||
|
|
@ -14,7 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.apps.service;
|
package com.chatopera.cc.controller.apps.service;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
@ -54,7 +54,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
import com.chatopera.cc.persistence.repository.MetadataRepository;
|
import com.chatopera.cc.persistence.repository.MetadataRepository;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.AgentService;
|
import com.chatopera.cc.model.AgentService;
|
||||||
import com.chatopera.cc.model.Contacts;
|
import com.chatopera.cc.model.Contacts;
|
||||||
import com.chatopera.cc.model.MetadataTable;
|
import com.chatopera.cc.model.MetadataTable;
|
@ -14,17 +14,16 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.apps.service;
|
package com.chatopera.cc.controller.apps.service;
|
||||||
|
|
||||||
import com.chatopera.cc.acd.AutomaticServiceDist;
|
import com.chatopera.cc.acd.AutomaticServiceDist;
|
||||||
import com.chatopera.cc.basic.MainContext;
|
import com.chatopera.cc.basic.MainContext;
|
||||||
import com.chatopera.cc.basic.MainUtils;
|
import com.chatopera.cc.basic.MainUtils;
|
||||||
import com.chatopera.cc.cache.Cache;
|
import com.chatopera.cc.cache.Cache;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.*;
|
import com.chatopera.cc.model.*;
|
||||||
import com.chatopera.cc.peer.PeerSyncIM;
|
import com.chatopera.cc.peer.PeerSyncIM;
|
||||||
import com.chatopera.cc.persistence.repository.*;
|
import com.chatopera.cc.persistence.repository.*;
|
||||||
import com.chatopera.cc.proxy.AgentAuditProxy;
|
|
||||||
import com.chatopera.cc.proxy.OnlineUserProxy;
|
import com.chatopera.cc.proxy.OnlineUserProxy;
|
||||||
import com.chatopera.cc.proxy.UserProxy;
|
import com.chatopera.cc.proxy.UserProxy;
|
||||||
import com.chatopera.cc.socketio.message.Message;
|
import com.chatopera.cc.socketio.message.Message;
|
@ -14,7 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.apps.service;
|
package com.chatopera.cc.controller.apps.service;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
@ -29,7 +29,7 @@ import org.springframework.ui.ModelMap;
|
|||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.AgentService;
|
import com.chatopera.cc.model.AgentService;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
@ -14,12 +14,12 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.apps.service;
|
package com.chatopera.cc.controller.apps.service;
|
||||||
|
|
||||||
import com.chatopera.cc.basic.MainContext;
|
import com.chatopera.cc.basic.MainContext;
|
||||||
import com.chatopera.cc.basic.MainUtils;
|
import com.chatopera.cc.basic.MainUtils;
|
||||||
import com.chatopera.cc.cache.Cache;
|
import com.chatopera.cc.cache.Cache;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.*;
|
import com.chatopera.cc.model.*;
|
||||||
import com.chatopera.cc.persistence.es.ContactsRepository;
|
import com.chatopera.cc.persistence.es.ContactsRepository;
|
||||||
import com.chatopera.cc.persistence.repository.*;
|
import com.chatopera.cc.persistence.repository.*;
|
@ -14,7 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.apps.service;
|
package com.chatopera.cc.controller.apps.service;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
@ -52,7 +52,7 @@ import com.chatopera.cc.persistence.repository.AgentServiceRepository;
|
|||||||
import com.chatopera.cc.persistence.repository.MetadataRepository;
|
import com.chatopera.cc.persistence.repository.MetadataRepository;
|
||||||
import com.chatopera.cc.persistence.repository.ServiceSummaryRepository;
|
import com.chatopera.cc.persistence.repository.ServiceSummaryRepository;
|
||||||
import com.chatopera.cc.persistence.repository.TagRepository;
|
import com.chatopera.cc.persistence.repository.TagRepository;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.AgentService;
|
import com.chatopera.cc.model.AgentService;
|
||||||
import com.chatopera.cc.model.AgentServiceSummary;
|
import com.chatopera.cc.model.AgentServiceSummary;
|
||||||
import com.chatopera.cc.model.Contacts;
|
import com.chatopera.cc.model.Contacts;
|
@ -14,10 +14,10 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.apps.service;
|
package com.chatopera.cc.controller.apps.service;
|
||||||
|
|
||||||
import com.chatopera.cc.basic.MainUtils;
|
import com.chatopera.cc.basic.MainUtils;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.Dict;
|
import com.chatopera.cc.model.Dict;
|
||||||
import com.chatopera.cc.model.SysDic;
|
import com.chatopera.cc.model.SysDic;
|
||||||
import com.chatopera.cc.persistence.repository.CubeService;
|
import com.chatopera.cc.persistence.repository.CubeService;
|
@ -14,7 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.resource;
|
package com.chatopera.cc.controller.resource;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -31,7 +31,7 @@ import com.chatopera.cc.basic.Constants;
|
|||||||
import com.chatopera.cc.util.Menu;
|
import com.chatopera.cc.util.Menu;
|
||||||
import com.chatopera.cc.persistence.repository.UserRepository;
|
import com.chatopera.cc.persistence.repository.UserRepository;
|
||||||
import com.chatopera.cc.util.CallCenterUtils;
|
import com.chatopera.cc.util.CallCenterUtils;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.User;
|
import com.chatopera.cc.model.User;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.data.jpa.domain.Specification;
|
import org.springframework.data.jpa.domain.Specification;
|
@ -14,7 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.resource;
|
package com.chatopera.cc.controller.resource;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
@ -28,7 +28,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
import com.chatopera.cc.persistence.es.ContactsRepository;
|
import com.chatopera.cc.persistence.es.ContactsRepository;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
public class ContactsResourceController extends Handler{
|
public class ContactsResourceController extends Handler{
|
@ -14,7 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.resource;
|
package com.chatopera.cc.controller.resource;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ import org.springframework.stereotype.Controller;
|
|||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
public class CssResourceController extends Handler{
|
public class CssResourceController extends Handler{
|
@ -14,10 +14,10 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.resource;
|
package com.chatopera.cc.controller.resource;
|
||||||
|
|
||||||
import com.chatopera.cc.basic.MainUtils;
|
import com.chatopera.cc.basic.MainUtils;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.AttachmentFile;
|
import com.chatopera.cc.model.AttachmentFile;
|
||||||
import com.chatopera.cc.model.StreamingFile;
|
import com.chatopera.cc.model.StreamingFile;
|
||||||
import com.chatopera.cc.model.UploadStatus;
|
import com.chatopera.cc.model.UploadStatus;
|
@ -14,7 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.resource;
|
package com.chatopera.cc.controller.resource;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ import org.springframework.ui.ModelMap;
|
|||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
|
|
||||||
import freemarker.template.TemplateException;
|
import freemarker.template.TemplateException;
|
||||||
|
|
@ -14,7 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.resource;
|
package com.chatopera.cc.controller.resource;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -30,7 +30,7 @@ import org.springframework.ui.ModelMap;
|
|||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.Dict;
|
import com.chatopera.cc.model.Dict;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
@ -14,9 +14,9 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.chatopera.cc.handler.resource;
|
package com.chatopera.cc.controller.resource;
|
||||||
|
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.Organ;
|
import com.chatopera.cc.model.Organ;
|
||||||
import com.chatopera.cc.model.OrgiSkillRel;
|
import com.chatopera.cc.model.OrgiSkillRel;
|
||||||
import com.chatopera.cc.model.User;
|
import com.chatopera.cc.model.User;
|
@ -18,7 +18,7 @@ package com.chatopera.cc.interceptor;
|
|||||||
|
|
||||||
import com.chatopera.cc.basic.MainContext;
|
import com.chatopera.cc.basic.MainContext;
|
||||||
import com.chatopera.cc.basic.MainUtils;
|
import com.chatopera.cc.basic.MainUtils;
|
||||||
import com.chatopera.cc.handler.Handler;
|
import com.chatopera.cc.controller.Handler;
|
||||||
import com.chatopera.cc.model.RequestLog;
|
import com.chatopera.cc.model.RequestLog;
|
||||||
import com.chatopera.cc.model.User;
|
import com.chatopera.cc.model.User;
|
||||||
import com.chatopera.cc.persistence.repository.RequestLogRepository;
|
import com.chatopera.cc.persistence.repository.RequestLogRepository;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.chatopera.cc.proxy;
|
package com.chatopera.cc.proxy;
|
||||||
|
|
||||||
import com.chatopera.cc.handler.admin.OrganController;
|
import com.chatopera.cc.controller.admin.OrganController;
|
||||||
import com.chatopera.cc.model.Organ;
|
import com.chatopera.cc.model.Organ;
|
||||||
import com.chatopera.cc.model.User;
|
import com.chatopera.cc.model.User;
|
||||||
import com.chatopera.cc.persistence.repository.OrganRepository;
|
import com.chatopera.cc.persistence.repository.OrganRepository;
|
||||||
|
@ -277,15 +277,11 @@ public class AgentEventHandler {
|
|||||||
AgentUser agentUser = MainContext.getCache().findOneAgentUserByUserIdAndOrgi(
|
AgentUser agentUser = MainContext.getCache().findOneAgentUserByUserIdAndOrgi(
|
||||||
received.getTouser(), received.getOrgi()).orElseGet(null);
|
received.getTouser(), received.getOrgi()).orElseGet(null);
|
||||||
|
|
||||||
AgentStatus agentStatus = MainContext.getCache().findOneAgentStatusByAgentnoAndOrig(
|
|
||||||
agentno, received.getOrgi());
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断用户在线状态,如果用户在线则通过webim发送
|
* 判断用户在线状态,如果用户在线则通过webim发送
|
||||||
* 检查收发双方的信息匹配
|
* 检查收发双方的信息匹配
|
||||||
*/
|
*/
|
||||||
if (agentStatus != null &&
|
if (agentUser != null &&
|
||||||
agentUser != null &&
|
|
||||||
agentno != null &&
|
agentno != null &&
|
||||||
StringUtils.equals(agentno, agentUser.getAgentno()) &&
|
StringUtils.equals(agentno, agentUser.getAgentno()) &&
|
||||||
!StringUtils.equals(agentUser.getStatus(), MainContext.AgentUserStatusEnum.END.toString())) {
|
!StringUtils.equals(agentUser.getStatus(), MainContext.AgentUserStatusEnum.END.toString())) {
|
||||||
|
@ -19,8 +19,8 @@
|
|||||||
<#list skillGroups as skill>
|
<#list skillGroups as skill>
|
||||||
<#if user.affiliates?seq_contains(skill.id)>
|
<#if user.affiliates?seq_contains(skill.id)>
|
||||||
<#assign agentNum = 0 >
|
<#assign agentNum = 0 >
|
||||||
<#if userList??><#list userList as agent><#if agent.affiliates?seq_contains(skill.id)><#assign agentNum = agentNum + 1 ></#if></#list></#if>
|
<#if userList??><#list userList as agent><#if agent.skills[skill.id]??><#assign agentNum = agentNum + 1 ></#if></#list></#if>
|
||||||
<li title="${skill.name!''}(${agentNum!''})" class="uk_role <#if skill.id == currentorgan>this</#if>" style="margin:0px;padding:7px 0 7px 20px;display: inline-block;max-width: 100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" onclick="$('.uk_role.this').removeClass('this');$(this).addClass('this');"><a
|
<li title="${skill.name!''}(${agentNum!''})" class="uk_role <#if skill.id == currentorgan>this</#if>" style="margin:0px;padding:7px 0 7px 20px;max-width: 100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" onclick="$('.uk_role.this').removeClass('this');$(this).addClass('this');"><a
|
||||||
href="/agent/transfer/agent.html?organ=${skill.id!''}" data-toggle="load" data-target="#skillAgentList">
|
href="/agent/transfer/agent.html?organ=${skill.id!''}" data-toggle="load" data-target="#skillAgentList">
|
||||||
<i class="kfont" style="margin-top: 3px;float: left"></i>
|
<i class="kfont" style="margin-top: 3px;float: left"></i>
|
||||||
<span style="max-width: 120px;text-overflow: ellipsis;white-space: nowrap; overflow: hidden;float: left;margin: 0 3px">${skill.name!''}</span>(${agentNum!''})
|
<span style="max-width: 120px;text-overflow: ellipsis;white-space: nowrap; overflow: hidden;float: left;margin: 0 3px">${skill.name!''}</span>(${agentNum!''})
|
||||||
@ -33,7 +33,7 @@
|
|||||||
<#list skillGroups as skill>
|
<#list skillGroups as skill>
|
||||||
<#if !user.affiliates?seq_contains(skill.id)>
|
<#if !user.affiliates?seq_contains(skill.id)>
|
||||||
<#assign agentNum = 0 >
|
<#assign agentNum = 0 >
|
||||||
<#if userList??><#list userList as agent><#if agent.affiliates?seq_contains(skill.id)><#assign agentNum = agentNum + 1 ></#if></#list></#if>
|
<#if userList??><#list userList as agent><#if agent.skills[skill.id]??><#assign agentNum = agentNum + 1 ></#if></#list></#if>
|
||||||
<li title="${skill.name!''}(${agentNum!''})" class="uk_role <#if skill.id == currentorgan>this</#if>" style="margin:0px;padding:7px 0 7px 20px;" onclick="$('.uk_role.this').removeClass('this');$(this).addClass('this');"><a
|
<li title="${skill.name!''}(${agentNum!''})" class="uk_role <#if skill.id == currentorgan>this</#if>" style="margin:0px;padding:7px 0 7px 20px;" onclick="$('.uk_role.this').removeClass('this');$(this).addClass('this');"><a
|
||||||
href="/agent/transfer/agent.html?organ=${skill.id!''}" data-toggle="load" data-target="#skillAgentList">
|
href="/agent/transfer/agent.html?organ=${skill.id!''}" data-toggle="load" data-target="#skillAgentList">
|
||||||
<i style="margin-top: 3px;float: left" class="kfont"></i><span style="max-width: 120px;text-overflow: ellipsis;white-space: nowrap; overflow: hidden;float: left;margin: 0 3px">${skill.name!''}</span>(${agentNum!''})
|
<i style="margin-top: 3px;float: left" class="kfont"></i><span style="max-width: 120px;text-overflow: ellipsis;white-space: nowrap; overflow: hidden;float: left;margin: 0 3px">${skill.name!''}</span>(${agentNum!''})
|
||||||
@ -71,26 +71,12 @@
|
|||||||
<div class="layui-form-button">
|
<div class="layui-form-button">
|
||||||
<div class="layui-button-block">
|
<div class="layui-button-block">
|
||||||
<button class="layui-btn" lay-submit lay-filter="contactsForm">转接</button>
|
<button class="layui-btn" lay-submit lay-filter="contactsForm">转接</button>
|
||||||
<button type="button" class="layui-btn layui-btn-primary" onclick="closedPage()">关闭</button>
|
<button type="button" class="layui-btn layui-btn-primary" onclick="closeTransferOutDialogue()">关闭</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
function closedPage(){
|
|
||||||
layer.closeAll("page")
|
|
||||||
}
|
|
||||||
|
|
||||||
$('.ukefu-agentstatus td:not(:last-child)').on("click" , function(){
|
|
||||||
$('.ctxid').prop("checked" , false);
|
|
||||||
if($(this).parent().find("input").prop("checked")){
|
|
||||||
$(this).parent().find("input").prop("checked" , false);
|
|
||||||
}else{
|
|
||||||
$(this).parent().find("input").prop("checked" , true);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 转接访客坐席
|
* 转接访客坐席
|
||||||
* @param agentUserId
|
* @param agentUserId
|
||||||
@ -98,7 +84,7 @@
|
|||||||
* @param agentUserServiceId
|
* @param agentUserServiceId
|
||||||
* @param memo
|
* @param memo
|
||||||
*/
|
*/
|
||||||
function submitTransAgentUserOut(agentUserId, targetAgentno, agentUserServiceId, memo) {
|
function submitTransAgentUserOutByAgent(agentUserId, targetAgentno, agentUserServiceId, memo) {
|
||||||
restApiRequest({
|
restApiRequest({
|
||||||
silent: true,
|
silent: true,
|
||||||
path: 'agentuser',
|
path: 'agentuser',
|
||||||
@ -113,6 +99,7 @@
|
|||||||
if(result.rc === 0){
|
if(result.rc === 0){
|
||||||
// 转接成功
|
// 转接成功
|
||||||
top.layer.msg('转接已完成',{icon: 1, time: 1000})
|
top.layer.msg('转接已完成',{icon: 1, time: 1000})
|
||||||
|
closeTransferOutDialogue();
|
||||||
// 进行显示调整!
|
// 进行显示调整!
|
||||||
if(multiMediaDialogWin.$("#chat_users li").length>1){
|
if(multiMediaDialogWin.$("#chat_users li").length>1){
|
||||||
multiMediaDialogWin.$("li[remove-id="+agentUserId+"]").remove();
|
multiMediaDialogWin.$("li[remove-id="+agentUserId+"]").remove();
|
||||||
@ -138,22 +125,31 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
$(function(){
|
function closeTransferOutDialogue(){
|
||||||
$('#selfTransAgentUserForm').on('submit', function(e){
|
layer.closeAll("page")
|
||||||
e.preventDefault(); //prevent form from submitting
|
|
||||||
var data = $("#selfTransAgentUserForm :input").serializeArray();
|
|
||||||
var params = {};
|
|
||||||
for(var index = 0; index < data.length; index++){
|
|
||||||
params[data[index]['name']] = data[index]["value"];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$('.ukefu-agentstatus td:not(:last-child)').on("click" , function(){
|
||||||
|
$('.ctxid').prop("checked" , false);
|
||||||
|
if($(this).parent().find("input").prop("checked")){
|
||||||
|
$(this).parent().find("input").prop("checked" , false);
|
||||||
|
}else{
|
||||||
|
$(this).parent().find("input").prop("checked" , true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
layui.use('form', function() {
|
||||||
|
var form = layui.form();
|
||||||
|
// form.render(); //更新全部
|
||||||
|
form.on('submit(contactsForm)', function(data){
|
||||||
|
console.log("contactForm", data.field)
|
||||||
// 验证数据的完整,以下为必填
|
// 验证数据的完整,以下为必填
|
||||||
if(params["userid"] && params["agentuserid"] && params["agentserviceid"] && params["agentno"]){
|
if(data.field["userid"] && data.field["agentuserid"] && data.field["agentserviceid"] && data.field["agentno"]){
|
||||||
submitTransAgentUserOut(params["agentuserid"], params["agentno"], params["agentserviceid"], params["memo"]);
|
submitTransAgentUserOutByAgent(data.field["agentuserid"], data.field["agentno"], data.field["agentserviceid"], data.field["memo"]);
|
||||||
} else {
|
} else {
|
||||||
top.layer.msg('未选择合理的转接信息!',{icon: 2, time: 3000});
|
top.layer.msg('未选择合理的转接信息!',{icon: 2, time: 3000});
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
});
|
});
|
||||||
});
|
})
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user