1
0
mirror of https://github.com/chatopera/cosin.git synced 2025-08-01 16:38:02 +08:00

Closed #77 优化java package目录结构

This commit is contained in:
Hai Liang Wang 2018-09-13 00:55:05 +08:00
parent eea1da55a5
commit a0d26b1dbf
448 changed files with 4616 additions and 4380 deletions

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.chatopera.cc.util.aggregation;
package com.chatopera.cc.aggregation;
import com.chatopera.cc.exception.CallOutRecordException;
import org.slf4j.Logger;

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.chatopera.cc.util.aggregation;
package com.chatopera.cc.aggregation;
import com.chatopera.cc.exception.CallOutRecordException;
import com.google.gson.JsonObject;

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.chatopera.cc.util.aggregation;
package com.chatopera.cc.aggregation;
import java.util.Date;

View File

@ -14,13 +14,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.chatopera.cc.app.service.quene;
package com.chatopera.cc.aggregation.filter;
import com.chatopera.cc.app.service.cache.CacheHelper;
import com.chatopera.cc.app.cache.CacheHelper;
import org.apache.commons.lang.StringUtils;
import com.hazelcast.mapreduce.KeyPredicate;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.app.model.UKefuCallOutNames;
@SuppressWarnings("deprecation")

View File

@ -14,9 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.chatopera.cc.app.service.quene;
package com.chatopera.cc.aggregation.filter;
import com.chatopera.cc.app.service.cache.CacheHelper;
import com.chatopera.cc.app.cache.CacheHelper;
import com.chatopera.cc.app.model.AgentStatus;
import org.apache.commons.lang.StringUtils;

View File

@ -14,9 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.chatopera.cc.app.service.quene;
package com.chatopera.cc.aggregation.filter;
import com.chatopera.cc.app.service.cache.CacheHelper;
import com.chatopera.cc.app.cache.CacheHelper;
import com.chatopera.cc.app.model.AgentStatus;
import org.apache.commons.lang.StringUtils;

View File

@ -14,9 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.chatopera.cc.app.service.quene;
package com.chatopera.cc.aggregation.filter;
import com.chatopera.cc.app.service.cache.CacheHelper;
import com.chatopera.cc.app.cache.CacheHelper;
import com.chatopera.cc.app.model.AgentUser;
import org.apache.commons.lang.StringUtils;

View File

@ -14,10 +14,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.chatopera.cc.app.service.quene;
package com.chatopera.cc.aggregation.filter;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.service.cache.CacheHelper;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.app.cache.CacheHelper;
import com.chatopera.cc.app.model.UKefuCallOutNames;
import org.apache.commons.lang.StringUtils;

View File

@ -16,6 +16,7 @@
*/
package com.chatopera.cc.app;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.util.mobile.MobileNumberUtils;
import com.chatopera.cc.app.config.StartedEventListener;
import org.slf4j.Logger;
@ -37,8 +38,8 @@ import javax.servlet.MultipartConfigElement;
import java.io.IOException;
@SpringBootApplication
@EnableJpaRepositories("com.chatopera.cc.app.service.repository")
@EnableElasticsearchRepositories("com.chatopera.cc.app.service.es")
@EnableJpaRepositories("com.chatopera.cc.app.persistence.repository")
@EnableElasticsearchRepositories("com.chatopera.cc.app.persistence.es")
@EnableAsync
public class Application {
private static final Logger logger = LoggerFactory.getLogger(Application.class);

View File

@ -14,18 +14,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.chatopera.cc.app.service.acd;
package com.chatopera.cc.app.algorithm;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.MainUtils;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.app.basic.MainUtils;
import com.chatopera.cc.app.im.client.NettyClients;
import com.chatopera.cc.app.im.router.OutMessageRouter;
import com.chatopera.cc.app.model.*;
import com.chatopera.cc.app.service.cache.CacheHelper;
import com.chatopera.cc.app.service.quene.AgentStatusBusyOrgiFilter;
import com.chatopera.cc.app.service.quene.AgentStatusOrgiFilter;
import com.chatopera.cc.app.service.quene.AgentUserOrgiFilter;
import com.chatopera.cc.app.service.repository.*;
import com.chatopera.cc.app.cache.CacheHelper;
import com.chatopera.cc.aggregation.filter.AgentStatusBusyOrgiFilter;
import com.chatopera.cc.aggregation.filter.AgentStatusOrgiFilter;
import com.chatopera.cc.aggregation.filter.AgentUserOrgiFilter;
import com.chatopera.cc.app.persistence.repository.*;
import com.chatopera.cc.util.WebIMReport;
import com.corundumstudio.socketio.SocketIONamespace;
import com.hazelcast.core.IMap;
@ -46,8 +46,8 @@ import java.util.concurrent.locks.Lock;
* Automatic Call Distribution
*/
@SuppressWarnings("deprecation")
public class ServiceQuene {
private final static Logger logger = LoggerFactory.getLogger(ServiceQuene.class);
public class AutomaticServiceDist {
private final static Logger logger = LoggerFactory.getLogger(AutomaticServiceDist.class);
/**
* 载入坐席 ACD策略配置
@ -193,7 +193,7 @@ public class ServiceQuene {
}
agentStatusList.addAll(((IMap<String, AgentUser>) CacheHelper.getAgentUserCacheBean().getCache()).values(pagingPredicate));
for (AgentUser agentUser : agentStatusList) {
SessionConfig sessionConfig = ServiceQuene.initSessionConfig(orgi);
SessionConfig sessionConfig = AutomaticServiceDist.initSessionConfig(orgi);
long maxusers = sessionConfig != null ? sessionConfig.getMaxuser() : MainContext.AGENT_STATUS_MAX_USER;
if (agentStatus != null && agentStatus.getUsers() < maxusers) { //坐席未达到最大咨询访客数量
CacheHelper.getAgentUserCacheBean().delete(agentUser.getUserid(), orgi); //从队列移除进入正在处理的队列 避免使用 分布式锁
@ -201,7 +201,7 @@ public class ServiceQuene {
AgentService agentService = processAgentService(agentStatus, agentUser, orgi);
MessageOutContent outMessage = new MessageOutContent();
outMessage.setMessage(ServiceQuene.getSuccessMessage(agentService, agentUser.getChannel(), orgi));
outMessage.setMessage(AutomaticServiceDist.getSuccessMessage(agentService, agentUser.getChannel(), orgi));
outMessage.setMessageType(MainContext.MediaTypeEnum.TEXT.toString());
outMessage.setCalltype(MainContext.CallTypeEnum.IN.toString());
outMessage.setNickName(agentStatus.getUsername());
@ -243,7 +243,7 @@ public class ServiceQuene {
AgentUserRepository agentUserRepository = MainContext.getContext().getBean(AgentUserRepository.class);
AgentUser agentUseDataBean = agentUserRepository.findByIdAndOrgi(agentUser.getId(), agentUser.getOrgi());
SessionConfig sessionConfig = ServiceQuene.initSessionConfig(orgi);
SessionConfig sessionConfig = AutomaticServiceDist.initSessionConfig(orgi);
if (agentUseDataBean != null) {
agentUseDataBean.setStatus(MainContext.AgentUserStatusEnum.END.toString());
if (agentUser.getServicetime() != null) {
@ -316,7 +316,7 @@ public class ServiceQuene {
router = (OutMessageRouter) MainContext.getContext().getBean(agentUser.getChannel());
if (router != null) {
MessageOutContent outMessage = new MessageOutContent();
outMessage.setMessage(ServiceQuene.getServiceFinishMessage(agentUser.getChannel(), orgi));
outMessage.setMessage(AutomaticServiceDist.getServiceFinishMessage(agentUser.getChannel(), orgi));
outMessage.setMessageType(MainContext.AgentUserStatusEnum.END.toString());
outMessage.setCalltype(MainContext.CallTypeEnum.IN.toString());
if (agentStatus != null) {
@ -367,7 +367,7 @@ public class ServiceQuene {
/**
* 坐席状态改变通知监测服务
*/
AgentReport agentReport = ServiceQuene.getAgentReport(orgi);
AgentReport agentReport = AutomaticServiceDist.getAgentReport(orgi);
AgentReportRepository agentReportRes = MainContext.getContext().getBean(AgentReportRepository.class);
if (agentReportRes != null) {
agentReport.setOrgi(orgi);
@ -825,10 +825,10 @@ public class ServiceQuene {
AgentStatusRepository agentStatusRes = MainContext.getContext().getBean(AgentStatusRepository.class);
List<AgentStatus> agentStatusList = agentStatusRes.findByAgentnoAndOrgi(userid, orgi);
for (AgentStatus agentStatus : agentStatusList) {
ServiceQuene.recordAgentStatus(agentStatus.getAgentno(), agentStatus.getUsername(), agentStatus.getAgentno(), agentStatus.getSkill(), isAdmin, agentStatus.getAgentno(), agentStatus.isBusy() ? MainContext.AgentStatusEnum.BUSY.toString() : MainContext.AgentStatusEnum.NOTREADY.toString(), MainContext.AgentStatusEnum.NOTREADY.toString(), MainContext.AgentWorkType.MEIDIACHAT.toString(), agentStatus.getOrgi(), agentStatus.getUpdatetime());
AutomaticServiceDist.recordAgentStatus(agentStatus.getAgentno(), agentStatus.getUsername(), agentStatus.getAgentno(), agentStatus.getSkill(), isAdmin, agentStatus.getAgentno(), agentStatus.isBusy() ? MainContext.AgentStatusEnum.BUSY.toString() : MainContext.AgentStatusEnum.NOTREADY.toString(), MainContext.AgentStatusEnum.NOTREADY.toString(), MainContext.AgentWorkType.MEIDIACHAT.toString(), agentStatus.getOrgi(), agentStatus.getUpdatetime());
agentStatusRes.delete(agentStatus);
}
CacheHelper.getAgentStatusCacheBean().delete(userid, orgi);
ServiceQuene.publishMessage(orgi, "agent", "leave", userid);
AutomaticServiceDist.publishMessage(orgi, "agent", "leave", userid);
}
}

View File

@ -15,11 +15,11 @@
* limitations under the License.
*/
package com.chatopera.cc.app;
package com.chatopera.cc.app.basic;
import com.chatopera.cc.util.DateConverter;
import com.chatopera.cc.app.service.resource.ActivityResource;
import com.chatopera.cc.app.service.resource.BatchResource;
import com.chatopera.cc.app.basic.resource.ActivityResource;
import com.chatopera.cc.app.basic.resource.BatchResource;
import com.chatopera.cc.app.model.Log;
import org.apache.commons.beanutils.ConvertUtils;
import org.springframework.context.ApplicationContext;
@ -508,9 +508,9 @@ public class MainContext {
}
public enum AiItemType {
public enum ChatbotItemType {
USERINPUT,
AIREPLY;
BOTREPLY;
public String toString() {
return super.toString().toLowerCase();
@ -728,8 +728,8 @@ public class MainContext {
AGENT("/im/agent"),
ENTIM("/im/ent"),
CHATBOT("/im/chatbot"),
CALLCENTER("/callcenter/event"),
CALLOUT("/callout/event");
CALLCENTER("/callcenter/exchange"),
CALLOUT("/callout/exchange");
private String namespace;

View File

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.chatopera.cc.app;
package com.chatopera.cc.app.basic;
import java.beans.BeanInfo;
import java.beans.Introspector;
@ -51,12 +51,12 @@ import javax.servlet.http.HttpServletResponse;
import com.chatopera.cc.util.*;
import com.chatopera.cc.util.asr.AsrResult;
import com.chatopera.cc.disruptor.chatbot.ChatbotEvent;
import com.chatopera.cc.disruptor.multiupdate.MultiUpdateEvent;
import com.chatopera.cc.disruptor.user.UserDataEvent;
import com.chatopera.cc.event.UserEvent;
import com.chatopera.cc.concurrent.chatbot.ChatbotEvent;
import com.chatopera.cc.concurrent.multiupdate.MultiUpdateEvent;
import com.chatopera.cc.concurrent.user.UserDataEvent;
import com.chatopera.cc.exchange.UserEvent;
import com.chatopera.cc.util.mail.MailSender;
import com.chatopera.cc.app.service.cache.CacheHelper;
import com.chatopera.cc.app.cache.CacheHelper;
import org.apache.commons.beanutils.BeanUtilsBean;
import org.apache.commons.beanutils.ConversionException;
import org.apache.commons.beanutils.ConvertUtils;
@ -89,14 +89,14 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.googlecode.aviator.AviatorEvaluator;
import com.lmax.disruptor.dsl.Disruptor;
import com.chatopera.cc.app.service.repository.AdTypeRepository;
import com.chatopera.cc.app.service.repository.AreaTypeRepository;
import com.chatopera.cc.app.service.repository.AttachmentRepository;
import com.chatopera.cc.app.service.repository.SecretRepository;
import com.chatopera.cc.app.service.repository.SystemConfigRepository;
import com.chatopera.cc.app.service.repository.SystemMessageRepository;
import com.chatopera.cc.app.service.repository.TablePropertiesRepository;
import com.chatopera.cc.app.service.repository.TemplateRepository;
import com.chatopera.cc.app.persistence.repository.AdTypeRepository;
import com.chatopera.cc.app.persistence.repository.AreaTypeRepository;
import com.chatopera.cc.app.persistence.repository.AttachmentRepository;
import com.chatopera.cc.app.persistence.repository.SecretRepository;
import com.chatopera.cc.app.persistence.repository.SystemConfigRepository;
import com.chatopera.cc.app.persistence.repository.SystemMessageRepository;
import com.chatopera.cc.app.persistence.repository.TablePropertiesRepository;
import com.chatopera.cc.app.persistence.repository.TemplateRepository;
import com.chatopera.cc.app.model.AdType;
import com.chatopera.cc.app.model.AttachmentFile;
import com.chatopera.cc.app.model.JobDetail;
@ -741,7 +741,7 @@ public class MainUtils {
strb.append(".").append(msgtype) ;
if(msgtype.equals("text")){
strb.append(".").append(msg) ;
}else if(msgtype.equals("event")){
}else if(msgtype.equals("exchange")){
strb.append(".").append(eventype.toLowerCase()) ;
if(!StringUtils.isBlank(eventkey)){
strb.append(".").append(eventkey) ;
@ -758,7 +758,7 @@ public class MainUtils {
strb.append(".").append(msgtype) ;
if(msgtype.equals("text")){
strb.append(".").append(msgtype) ;
}else if(msgtype.equals("event")){
}else if(msgtype.equals("exchange")){
strb.append(".").append(eventype.toLowerCase()) ;
}else{
strb.append(".").append(msgtype) ;

View File

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.chatopera.cc.app;
package com.chatopera.cc.app.basic;
public class Viewport {
private String page ;

View File

@ -14,15 +14,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.chatopera.cc.app.aop;
package com.chatopera.cc.app.basic.aop;
import java.util.List;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.MainUtils;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.app.basic.MainUtils;
import com.chatopera.cc.util.UKeFuList;
import com.chatopera.cc.disruptor.multiupdate.MultiUpdateEvent;
import com.chatopera.cc.app.service.hibernate.BaseService;
import com.chatopera.cc.concurrent.multiupdate.MultiUpdateEvent;
import com.chatopera.cc.app.persistence.hibernate.BaseService;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;

View File

@ -14,29 +14,29 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.chatopera.cc.app.service.resource;
package com.chatopera.cc.app.basic.resource;
import java.util.Date;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.app.model.JobDetail;
import com.chatopera.cc.app.MainUtils;
import com.chatopera.cc.app.basic.MainUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.data.domain.PageImpl;
import com.chatopera.cc.es.SearchTools;
import com.chatopera.cc.es.UKDataBean;
import com.chatopera.cc.app.service.impl.BatchDataProcess;
import com.chatopera.cc.app.service.impl.ESDataExchangeImpl;
import com.chatopera.cc.app.service.repository.CallAgentRepository;
import com.chatopera.cc.app.service.repository.UKefuCallOutFilterRepository;
import com.chatopera.cc.app.service.repository.UKefuCallOutTaskRepository;
import com.chatopera.cc.app.service.repository.FormFilterItemRepository;
import com.chatopera.cc.app.service.repository.FormFilterRepository;
import com.chatopera.cc.app.service.repository.JobDetailRepository;
import com.chatopera.cc.app.service.repository.MetadataRepository;
import com.chatopera.cc.util.es.SearchTools;
import com.chatopera.cc.util.es.UKDataBean;
import com.chatopera.cc.app.persistence.impl.BatchDataProcess;
import com.chatopera.cc.app.persistence.impl.ESDataExchangeImpl;
import com.chatopera.cc.app.persistence.repository.CallAgentRepository;
import com.chatopera.cc.app.persistence.repository.UKefuCallOutFilterRepository;
import com.chatopera.cc.app.persistence.repository.UKefuCallOutTaskRepository;
import com.chatopera.cc.app.persistence.repository.FormFilterItemRepository;
import com.chatopera.cc.app.persistence.repository.FormFilterRepository;
import com.chatopera.cc.app.persistence.repository.JobDetailRepository;
import com.chatopera.cc.app.persistence.repository.MetadataRepository;
import com.chatopera.cc.app.model.CallAgent;
import com.chatopera.cc.app.model.UKefuCallOutFilter;
import com.chatopera.cc.app.model.UKefuCallOutTask;

View File

@ -14,26 +14,26 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.chatopera.cc.app.service.resource;
package com.chatopera.cc.app.basic.resource;
import java.io.File;
import java.net.URL;
import java.util.Date;
import java.util.HashMap;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.service.impl.BatchDataProcess;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.app.persistence.impl.BatchDataProcess;
import com.chatopera.cc.app.model.JobDetail;
import com.chatopera.cc.app.MainUtils;
import com.chatopera.cc.app.basic.MainUtils;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import com.chatopera.cc.util.task.DSData;
import com.chatopera.cc.util.task.DSDataEvent;
import com.chatopera.cc.util.task.ExcelImportProecess;
import com.chatopera.cc.app.service.impl.ESDataExchangeImpl;
import com.chatopera.cc.app.service.repository.MetadataRepository;
import com.chatopera.cc.app.service.repository.ReporterRepository;
import com.chatopera.cc.concurrent.dsdata.DSData;
import com.chatopera.cc.concurrent.dsdata.DSDataEvent;
import com.chatopera.cc.concurrent.dsdata.ExcelImportProecess;
import com.chatopera.cc.app.persistence.impl.ESDataExchangeImpl;
import com.chatopera.cc.app.persistence.repository.MetadataRepository;
import com.chatopera.cc.app.persistence.repository.ReporterRepository;
import com.chatopera.cc.app.model.MetadataTable;
public class BatchResource extends Resource{

View File

@ -14,12 +14,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.chatopera.cc.app.service.resource;
package com.chatopera.cc.app.basic.resource;
import java.util.HashMap;
import java.util.Map;
import com.chatopera.cc.es.UKDataBean;
import com.chatopera.cc.util.es.UKDataBean;
import com.chatopera.cc.app.model.JobDetail;
public class OutputTextFormat {

View File

@ -14,12 +14,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.chatopera.cc.app.service.resource;
package com.chatopera.cc.app.basic.resource;
import java.lang.reflect.InvocationTargetException;
import java.util.logging.Logger;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.app.model.JobDetail;
/**

View File

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.chatopera.cc.app.service.cache;
package com.chatopera.cc.app.cache;
import java.util.Collection;
import java.util.concurrent.locks.Lock;

View File

@ -14,9 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.chatopera.cc.app.service.cache;
package com.chatopera.cc.app.cache;
import com.chatopera.cc.app.service.cache.hazelcast.HazlcastCacheHelper;
import com.chatopera.cc.app.cache.hazelcast.HazlcastCacheHelper;
public class CacheHelper {
private static CacheHelper instance = new CacheHelper();

View File

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.chatopera.cc.app.service.cache;
package com.chatopera.cc.app.cache;
public interface CacheInstance {

View File

@ -14,19 +14,19 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.chatopera.cc.app.service.cache.hazelcast;
package com.chatopera.cc.app.cache.hazelcast;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.service.cache.CacheBean;
import com.chatopera.cc.app.service.cache.CacheInstance;
import com.chatopera.cc.app.service.cache.hazelcast.impl.AgentStatusCache;
import com.chatopera.cc.app.service.cache.hazelcast.impl.AgentUserCache;
import com.chatopera.cc.app.service.cache.hazelcast.impl.ApiUserCache;
import com.chatopera.cc.app.service.cache.hazelcast.impl.CallCenterCache;
import com.chatopera.cc.app.service.cache.hazelcast.impl.JobCache;
import com.chatopera.cc.app.service.cache.hazelcast.impl.MultiCache;
import com.chatopera.cc.app.service.cache.hazelcast.impl.OnlineCache;
import com.chatopera.cc.app.service.cache.hazelcast.impl.SystemCache;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.app.cache.CacheBean;
import com.chatopera.cc.app.cache.CacheInstance;
import com.chatopera.cc.app.cache.hazelcast.impl.AgentStatusCache;
import com.chatopera.cc.app.cache.hazelcast.impl.AgentUserCache;
import com.chatopera.cc.app.cache.hazelcast.impl.ApiUserCache;
import com.chatopera.cc.app.cache.hazelcast.impl.CallCenterCache;
import com.chatopera.cc.app.cache.hazelcast.impl.JobCache;
import com.chatopera.cc.app.cache.hazelcast.impl.MultiCache;
import com.chatopera.cc.app.cache.hazelcast.impl.OnlineCache;
import com.chatopera.cc.app.cache.hazelcast.impl.SystemCache;
/**
* Hazlcast缓存处理实例类
* @author admin

View File

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.chatopera.cc.app.service.cache.hazelcast.impl;
package com.chatopera.cc.app.cache.hazelcast.impl;
import java.util.Collection;
import java.util.concurrent.locks.Lock;
@ -24,7 +24,7 @@ import org.springframework.stereotype.Service;
import com.hazelcast.com.eclipsesource.json.JsonObject;
import com.hazelcast.core.HazelcastInstance;
import com.chatopera.cc.app.service.cache.CacheBean;
import com.chatopera.cc.app.cache.CacheBean;
@Service("agentstatus_cache")
public class AgentStatusCache implements CacheBean{

View File

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.chatopera.cc.app.service.cache.hazelcast.impl;
package com.chatopera.cc.app.cache.hazelcast.impl;
import java.util.Collection;
import java.util.concurrent.locks.Lock;
@ -24,7 +24,7 @@ import org.springframework.stereotype.Service;
import com.hazelcast.com.eclipsesource.json.JsonObject;
import com.hazelcast.core.HazelcastInstance;
import com.chatopera.cc.app.service.cache.CacheBean;
import com.chatopera.cc.app.cache.CacheBean;
@Service("agentuser_cache")
public class AgentUserCache implements CacheBean{

View File

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.chatopera.cc.app.service.cache.hazelcast.impl;
package com.chatopera.cc.app.cache.hazelcast.impl;
import java.util.Collection;
import java.util.concurrent.locks.Lock;
@ -24,7 +24,7 @@ import org.springframework.stereotype.Service;
import com.hazelcast.com.eclipsesource.json.JsonObject;
import com.hazelcast.core.HazelcastInstance;
import com.chatopera.cc.app.service.cache.CacheBean;
import com.chatopera.cc.app.cache.CacheBean;
@Service("api_user_cache")
public class ApiUserCache implements CacheBean{

View File

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.chatopera.cc.app.service.cache.hazelcast.impl;
package com.chatopera.cc.app.cache.hazelcast.impl;
import java.util.Collection;
import java.util.concurrent.locks.Lock;
@ -24,7 +24,7 @@ import org.springframework.stereotype.Service;
import com.hazelcast.com.eclipsesource.json.JsonObject;
import com.hazelcast.core.HazelcastInstance;
import com.chatopera.cc.app.service.cache.CacheBean;
import com.chatopera.cc.app.cache.CacheBean;
@Service("callcenter_current_call")
public class CallCenterCache implements CacheBean{

View File

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.chatopera.cc.app.service.cache.hazelcast.impl;
package com.chatopera.cc.app.cache.hazelcast.impl;
import java.util.Collection;
import java.util.concurrent.locks.Lock;
@ -24,7 +24,7 @@ import org.springframework.stereotype.Service;
import com.hazelcast.com.eclipsesource.json.JsonObject;
import com.hazelcast.core.HazelcastInstance;
import com.chatopera.cc.app.service.cache.CacheBean;
import com.chatopera.cc.app.cache.CacheBean;
@Service("job_cache")
public class JobCache implements CacheBean{

View File

@ -14,12 +14,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.chatopera.cc.app.service.cache.hazelcast.impl;
package com.chatopera.cc.app.cache.hazelcast.impl;
import java.util.Collection;
import java.util.concurrent.locks.Lock;
import com.chatopera.cc.app.service.cache.CacheBean;
import com.chatopera.cc.app.cache.CacheBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

View File

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.chatopera.cc.app.service.cache.hazelcast.impl;
package com.chatopera.cc.app.cache.hazelcast.impl;
import java.util.Collection;
import java.util.concurrent.locks.Lock;
@ -24,7 +24,7 @@ import org.springframework.stereotype.Service;
import com.hazelcast.com.eclipsesource.json.JsonObject;
import com.hazelcast.core.HazelcastInstance;
import com.chatopera.cc.app.service.cache.CacheBean;
import com.chatopera.cc.app.cache.CacheBean;
@Service("online_cache")
public class OnlineCache implements CacheBean{

View File

@ -14,12 +14,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.chatopera.cc.app.service.cache.hazelcast.impl;
package com.chatopera.cc.app.cache.hazelcast.impl;
import java.util.Collection;
import java.util.concurrent.locks.Lock;
import com.chatopera.cc.app.service.cache.CacheBean;
import com.chatopera.cc.app.cache.CacheBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

View File

@ -27,12 +27,12 @@ import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.chatopera.cc.app.service.cache.CacheHelper;
import com.chatopera.cc.app.cache.CacheHelper;
import org.apache.commons.lang.StringUtils;
import org.springframework.http.HttpStatus;
import org.springframework.security.web.util.matcher.RequestMatcher;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.basic.MainContext;
public class ApiRequestMatchingFilter implements Filter {
private RequestMatcher[] ignoredRequests;

View File

@ -16,7 +16,7 @@
*/
package com.chatopera.cc.app.config;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.app.model.Favorites;
import com.chatopera.cc.app.model.WorkOrders;
import org.springframework.beans.factory.annotation.Autowired;

View File

@ -27,7 +27,7 @@ import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.app.model.User;
import org.apache.catalina.connector.ClientAbortException;
import org.springframework.security.web.util.matcher.RequestMatcher;

View File

@ -19,19 +19,19 @@ package com.chatopera.cc.app.config;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import com.chatopera.cc.disruptor.chatbot.ChatbotDisruptorExceptionHandler;
import com.chatopera.cc.disruptor.chatbot.ChatbotEventFactory;
import com.chatopera.cc.disruptor.multiupdate.MultiUpdateEventFactory;
import com.chatopera.cc.disruptor.multiupdate.MultiUpdateEventHandler;
import com.chatopera.cc.concurrent.chatbot.ChatbotDisruptorExceptionHandler;
import com.chatopera.cc.concurrent.chatbot.ChatbotEventFactory;
import com.chatopera.cc.concurrent.multiupdate.MultiUpdateEventFactory;
import com.chatopera.cc.concurrent.multiupdate.MultiUpdateEventHandler;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
import com.lmax.disruptor.SleepingWaitStrategy;
import com.lmax.disruptor.dsl.Disruptor;
import com.lmax.disruptor.dsl.ProducerType;
import com.chatopera.cc.disruptor.user.UserDataEvent;
import com.chatopera.cc.disruptor.user.UserDataEventFactory;
import com.chatopera.cc.disruptor.user.UserEventHandler;
import com.chatopera.cc.concurrent.user.UserDataEvent;
import com.chatopera.cc.concurrent.user.UserDataEventFactory;
import com.chatopera.cc.concurrent.user.UserEventHandler;
@Component
public class DisruptorConfigure {

View File

@ -25,7 +25,7 @@ import java.util.Properties;
import javax.annotation.PreDestroy;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.basic.MainContext;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
@ -35,7 +35,7 @@ import com.corundumstudio.socketio.Configuration;
import com.corundumstudio.socketio.HandshakeData;
import com.corundumstudio.socketio.SocketIOServer;
import com.corundumstudio.socketio.annotation.SpringAnnotationScanner;
import com.chatopera.cc.app.MainUtils;
import com.chatopera.cc.app.basic.MainUtils;
import com.chatopera.cc.exception.UCKeFuExceptionListener;
@org.springframework.context.annotation.Configuration

View File

@ -16,7 +16,7 @@
package com.chatopera.cc.app.config;
import com.chatopera.cc.util.Constants;
import com.chatopera.cc.app.service.task.CallOutWireTask;
import com.chatopera.cc.app.schedule.CallOutWireTask;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

View File

@ -20,22 +20,22 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.service.cache.CacheHelper;
import com.chatopera.cc.app.service.repository.GenerationRepository;
import com.chatopera.cc.app.service.repository.SysDicRepository;
import com.chatopera.cc.app.service.repository.SystemConfigRepository;
import com.chatopera.cc.app.service.repository.TablePropertiesRepository;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.app.cache.CacheHelper;
import com.chatopera.cc.app.persistence.repository.GenerationRepository;
import com.chatopera.cc.app.persistence.repository.SysDicRepository;
import com.chatopera.cc.app.persistence.repository.SystemConfigRepository;
import com.chatopera.cc.app.persistence.repository.TablePropertiesRepository;
import com.chatopera.cc.app.model.Generation;
import com.chatopera.cc.app.model.SysDic;
import com.chatopera.cc.app.MainUtils;
import com.chatopera.cc.app.basic.MainUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Component;
import com.chatopera.cc.app.service.repository.BlackListRepository;
import com.chatopera.cc.app.persistence.repository.BlackListRepository;
import com.chatopera.cc.app.model.BlackEntity;
import com.chatopera.cc.app.model.SystemConfig;

View File

@ -22,7 +22,7 @@ import java.io.IOException;
import java.security.NoSuchAlgorithmException;
import java.util.Properties;
import com.chatopera.cc.app.MainUtils;
import com.chatopera.cc.app.basic.MainUtils;
import org.apache.catalina.connector.Connector;
import org.apache.commons.lang3.StringUtils;
import org.apache.coyote.http11.Http11NioProtocol;

View File

@ -18,16 +18,15 @@ package com.chatopera.cc.app.handler;
import javax.servlet.http.HttpServletRequest;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.service.cache.CacheHelper;
import com.chatopera.cc.app.algorithm.AutomaticServiceDist;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.app.cache.CacheHelper;
import com.chatopera.cc.app.model.User;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import com.chatopera.cc.app.service.acd.ServiceQuene;
@Controller
public class ApplicationController extends Handler{
@ -35,7 +34,7 @@ public class ApplicationController extends Handler{
public ModelAndView admin(HttpServletRequest request) {
ModelAndView view = request(super.createRequestPageTempletResponse("/apps/index"));
User user = super.getUser(request) ;
view.addObject("agentStatusReport",ServiceQuene.getAgentReport(user.getOrgi())) ;
view.addObject("agentStatusReport", AutomaticServiceDist.getAgentReport(user.getOrgi())) ;
view.addObject("tenant",super.getTenant(request));
view.addObject("istenantshare",super.isEnabletneant());
if(super.isEnabletneant()) {

View File

@ -24,12 +24,12 @@ import java.text.ParseException;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.MainUtils;
import com.chatopera.cc.app.Viewport;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.app.basic.MainUtils;
import com.chatopera.cc.app.basic.Viewport;
import com.chatopera.cc.exception.CSKefuException;
import com.chatopera.cc.app.service.cache.CacheHelper;
import com.chatopera.cc.app.service.repository.TenantRepository;
import com.chatopera.cc.app.cache.CacheHelper;
import com.chatopera.cc.app.persistence.repository.TenantRepository;
import com.chatopera.cc.app.handler.api.rest.QueryParams;
import com.chatopera.cc.app.model.Tenant;
import com.chatopera.cc.app.model.User;

View File

@ -16,15 +16,15 @@
*/
package com.chatopera.cc.app.handler;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.MainUtils;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.app.basic.MainUtils;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.app.model.*;
import com.chatopera.cc.app.service.cache.CacheHelper;
import com.chatopera.cc.app.service.repository.OrganRepository;
import com.chatopera.cc.app.service.repository.RoleAuthRepository;
import com.chatopera.cc.app.service.repository.UserRepository;
import com.chatopera.cc.app.service.repository.UserRoleRepository;
import com.chatopera.cc.app.cache.CacheHelper;
import com.chatopera.cc.app.persistence.repository.OrganRepository;
import com.chatopera.cc.app.persistence.repository.RoleAuthRepository;
import com.chatopera.cc.app.persistence.repository.UserRepository;
import com.chatopera.cc.app.persistence.repository.UserRoleRepository;
import com.chatopera.cc.util.OnlineUserUtils;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;

View File

@ -23,14 +23,15 @@ import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.MainUtils;
import com.chatopera.cc.app.algorithm.AutomaticServiceDist;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.app.basic.MainUtils;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.app.im.client.NettyClients;
import com.chatopera.cc.app.service.cache.CacheHelper;
import com.chatopera.cc.app.service.repository.OnlineUserRepository;
import com.chatopera.cc.app.service.repository.SysDicRepository;
import com.chatopera.cc.app.service.repository.UserEventRepository;
import com.chatopera.cc.app.cache.CacheHelper;
import com.chatopera.cc.app.persistence.repository.OnlineUserRepository;
import com.chatopera.cc.app.persistence.repository.SysDicRepository;
import com.chatopera.cc.app.persistence.repository.UserEventRepository;
import com.chatopera.cc.util.OnlineUserUtils;
import com.chatopera.cc.app.model.SysDic;
import com.chatopera.cc.app.model.User;
@ -41,8 +42,7 @@ import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import com.chatopera.cc.app.service.acd.ServiceQuene;
import com.chatopera.cc.app.service.repository.UserRepository;
import com.chatopera.cc.app.persistence.repository.UserRepository;
import com.chatopera.cc.app.handler.Handler;
@Controller
@ -64,7 +64,7 @@ public class AdminController extends Handler{
public ModelAndView index(ModelMap map ,HttpServletRequest request) {
ModelAndView view = request(super.createRequestPageTempletResponse("redirect:/"));
User user = super.getUser(request) ;
view.addObject("agentStatusReport",ServiceQuene.getAgentReport(user.getOrgi())) ;
view.addObject("agentStatusReport", AutomaticServiceDist.getAgentReport(user.getOrgi())) ;
view.addObject("agentStatus", CacheHelper.getAgentStatusCacheBean().getCacheObject(user.getId(), user.getOrgi())) ;
return view;
@ -77,7 +77,7 @@ public class AdminController extends Handler{
map.put("chatClients", NettyClients.getInstance().size()) ;
map.put("systemCaches", CacheHelper.getSystemCacheBean().getSize()) ;
map.put("agentReport", ServiceQuene.getAgentReport(super.getOrgi(request))) ;
map.put("agentReport", AutomaticServiceDist.getAgentReport(super.getOrgi(request))) ;
map.put("webIMReport", MainUtils.getWebIMReport(userEventRes.findByOrgiAndCreatetimeRange(super.getOrgi(request), MainUtils.getStartTime() , MainUtils.getEndTime()))) ;
map.put("agents",getAgent(request).size()) ;
@ -144,7 +144,7 @@ public class AdminController extends Handler{
if(!StringUtils.isBlank(iconstr) && !StringUtils.isBlank(icontext)){
map.addAttribute("iconstr", iconstr.replaceAll(icontext, "&#x"+ MainUtils.string2HexString(icontext)+";")) ;
}
return request(super.createRequestPageTempletResponse("/admin/system/auth/event"));
return request(super.createRequestPageTempletResponse("/admin/system/auth/exchange"));
}
@RequestMapping("/admin/auth/save")

View File

@ -23,17 +23,17 @@ import java.util.Date;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import com.chatopera.cc.app.MainUtils;
import com.chatopera.cc.app.basic.MainUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.app.service.repository.AreaTypeRepository;
import com.chatopera.cc.app.service.repository.SysDicRepository;
import com.chatopera.cc.app.persistence.repository.AreaTypeRepository;
import com.chatopera.cc.app.persistence.repository.SysDicRepository;
import com.chatopera.cc.app.handler.Handler;
import com.chatopera.cc.app.model.AreaType;
import com.chatopera.cc.app.model.SysDic;

View File

@ -20,7 +20,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.app.service.repository.PbxHostRepository;
import com.chatopera.cc.app.persistence.repository.PbxHostRepository;
import com.chatopera.cc.app.handler.Handler;
import com.chatopera.cc.app.model.Acl;
import org.apache.commons.lang.StringUtils;
@ -30,7 +30,7 @@ import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import com.chatopera.cc.app.service.repository.AclRepository;
import com.chatopera.cc.app.persistence.repository.AclRepository;
@Controller
@RequestMapping("/admin/callcenter")

View File

@ -19,7 +19,7 @@ package com.chatopera.cc.app.handler.admin.callcenter;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.basic.MainContext;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@ -28,7 +28,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.app.service.repository.BlackListRepository;
import com.chatopera.cc.app.persistence.repository.BlackListRepository;
import com.chatopera.cc.app.handler.Handler;
import com.chatopera.cc.app.model.BlackEntity;

View File

@ -21,10 +21,10 @@ import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.util.extra.CallCenterInterface;
import com.chatopera.cc.app.service.repository.PbxHostRepository;
import com.chatopera.cc.exchange.CallCenterInterface;
import com.chatopera.cc.app.persistence.repository.PbxHostRepository;
import com.chatopera.cc.app.handler.Handler;
import com.chatopera.cc.app.model.PbxHost;
import org.apache.commons.lang.StringUtils;

View File

@ -23,9 +23,9 @@ import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.app.service.cache.CacheHelper;
import com.chatopera.cc.app.service.repository.PbxHostRepository;
import com.chatopera.cc.app.service.repository.ProductRepository;
import com.chatopera.cc.app.cache.CacheHelper;
import com.chatopera.cc.app.persistence.repository.PbxHostRepository;
import com.chatopera.cc.app.persistence.repository.ProductRepository;
import com.chatopera.cc.app.model.PbxHost;
import com.chatopera.cc.app.model.User;
import org.apache.commons.lang.StringUtils;
@ -36,12 +36,12 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import com.chatopera.cc.util.freeswitch.model.CallCenterAgent;
import com.chatopera.cc.app.service.impl.CallOutQuene;
import com.chatopera.cc.app.service.repository.ExtentionRepository;
import com.chatopera.cc.app.service.repository.MediaRepository;
import com.chatopera.cc.app.service.repository.QueSurveyProcessRepository;
import com.chatopera.cc.app.service.repository.ServiceAiRepository;
import com.chatopera.cc.app.service.repository.SipTrunkRepository;
import com.chatopera.cc.app.persistence.impl.CallOutQuene;
import com.chatopera.cc.app.persistence.repository.ExtentionRepository;
import com.chatopera.cc.app.persistence.repository.MediaRepository;
import com.chatopera.cc.app.persistence.repository.QueSurveyProcessRepository;
import com.chatopera.cc.app.persistence.repository.ServiceAiRepository;
import com.chatopera.cc.app.persistence.repository.SipTrunkRepository;
import com.chatopera.cc.app.handler.Handler;
import com.chatopera.cc.app.model.Extention;

View File

@ -20,7 +20,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.app.service.repository.PbxHostRepository;
import com.chatopera.cc.app.persistence.repository.PbxHostRepository;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@ -28,8 +28,8 @@ import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import com.chatopera.cc.app.service.repository.ExtentionRepository;
import com.chatopera.cc.app.service.repository.IvrMenuRepository;
import com.chatopera.cc.app.persistence.repository.ExtentionRepository;
import com.chatopera.cc.app.persistence.repository.IvrMenuRepository;
import com.chatopera.cc.app.handler.Handler;
import com.chatopera.cc.app.model.Extention;

View File

@ -34,9 +34,9 @@ import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.app.MainUtils;
import com.chatopera.cc.app.service.repository.MediaRepository;
import com.chatopera.cc.app.service.repository.PbxHostRepository;
import com.chatopera.cc.app.basic.MainUtils;
import com.chatopera.cc.app.persistence.repository.MediaRepository;
import com.chatopera.cc.app.persistence.repository.PbxHostRepository;
import com.chatopera.cc.app.handler.Handler;
import com.chatopera.cc.app.model.Media;

View File

@ -21,11 +21,11 @@ import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.util.extra.CallCenterInterface;
import com.chatopera.cc.app.service.repository.PbxHostRepository;
import com.chatopera.cc.app.service.repository.ServiceAiRepository;
import com.chatopera.cc.exchange.CallCenterInterface;
import com.chatopera.cc.app.persistence.repository.PbxHostRepository;
import com.chatopera.cc.app.persistence.repository.ServiceAiRepository;
import com.chatopera.cc.app.handler.Handler;
import com.chatopera.cc.app.model.PbxHost;
import org.apache.commons.lang.StringUtils;
@ -35,7 +35,7 @@ import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import com.chatopera.cc.app.service.repository.ExtentionRepository;
import com.chatopera.cc.app.persistence.repository.ExtentionRepository;
@Controller
@RequestMapping("/admin/callcenter")

View File

@ -22,7 +22,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.app.service.repository.PbxHostRepository;
import com.chatopera.cc.app.persistence.repository.PbxHostRepository;
import com.chatopera.cc.app.model.PbxHost;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -31,7 +31,7 @@ import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import com.chatopera.cc.app.service.repository.RouterRulesRepository;
import com.chatopera.cc.app.persistence.repository.RouterRulesRepository;
import com.chatopera.cc.app.handler.Handler;
import com.chatopera.cc.app.model.RouterRules;

View File

@ -20,8 +20,8 @@ import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.app.service.cache.CacheHelper;
import com.chatopera.cc.app.service.repository.PbxHostRepository;
import com.chatopera.cc.app.cache.CacheHelper;
import com.chatopera.cc.app.persistence.repository.PbxHostRepository;
import com.chatopera.cc.app.model.SipTrunk;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -30,7 +30,7 @@ import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import com.chatopera.cc.app.service.repository.SipTrunkRepository;
import com.chatopera.cc.app.persistence.repository.SipTrunkRepository;
import com.chatopera.cc.app.handler.Handler;
@Controller

View File

@ -23,10 +23,10 @@ import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.app.service.repository.CallCenterSkillRepository;
import com.chatopera.cc.app.service.repository.ExtentionRepository;
import com.chatopera.cc.app.service.repository.PbxHostRepository;
import com.chatopera.cc.app.service.repository.SkillExtentionRepository;
import com.chatopera.cc.app.persistence.repository.CallCenterSkillRepository;
import com.chatopera.cc.app.persistence.repository.ExtentionRepository;
import com.chatopera.cc.app.persistence.repository.PbxHostRepository;
import com.chatopera.cc.app.persistence.repository.SkillExtentionRepository;
import com.chatopera.cc.app.handler.Handler;
import com.chatopera.cc.app.model.CallCenterSkill;
import com.chatopera.cc.app.model.Extention;

View File

@ -15,13 +15,13 @@
*/
package com.chatopera.cc.app.handler.admin.channel;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.app.MainUtils;
import com.chatopera.cc.app.basic.MainUtils;
import com.chatopera.cc.exception.CSKefuException;
import com.chatopera.cc.app.service.repository.ConsultInviteRepository;
import com.chatopera.cc.app.service.repository.SNSAccountRepository;
import com.chatopera.cc.app.service.repository.SecretRepository;
import com.chatopera.cc.app.persistence.repository.ConsultInviteRepository;
import com.chatopera.cc.app.persistence.repository.SNSAccountRepository;
import com.chatopera.cc.app.persistence.repository.SecretRepository;
import com.chatopera.cc.app.handler.Handler;
import com.chatopera.cc.app.model.CousultInvite;
import com.chatopera.cc.app.model.SNSAccount;

View File

@ -16,14 +16,14 @@
*/
package com.chatopera.cc.app.handler.admin.channel;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.util.Base62;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.app.MainUtils;
import com.chatopera.cc.app.service.repository.ConsultInviteRepository;
import com.chatopera.cc.app.service.repository.OrganRepository;
import com.chatopera.cc.app.service.repository.SNSAccountRepository;
import com.chatopera.cc.app.service.repository.SecretRepository;
import com.chatopera.cc.app.basic.MainUtils;
import com.chatopera.cc.app.persistence.repository.ConsultInviteRepository;
import com.chatopera.cc.app.persistence.repository.OrganRepository;
import com.chatopera.cc.app.persistence.repository.SNSAccountRepository;
import com.chatopera.cc.app.persistence.repository.SecretRepository;
import com.chatopera.cc.app.handler.Handler;
import com.chatopera.cc.app.model.CousultInvite;
import com.chatopera.cc.app.model.SNSAccount;

View File

@ -25,7 +25,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.app.service.cache.CacheHelper;
import com.chatopera.cc.app.cache.CacheHelper;
import com.chatopera.cc.app.handler.Handler;
import com.chatopera.cc.app.model.CousultInvite;
import com.chatopera.cc.app.model.Organ;
@ -42,12 +42,12 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;
import com.chatopera.cc.app.service.repository.ConsultInviteRepository;
import com.chatopera.cc.app.service.repository.OrganRepository;
import com.chatopera.cc.app.service.repository.OrgiSkillRelRepository;
import com.chatopera.cc.app.service.repository.SNSAccountRepository;
import com.chatopera.cc.app.service.repository.ServiceAiRepository;
import com.chatopera.cc.app.service.repository.UserRepository;
import com.chatopera.cc.app.persistence.repository.ConsultInviteRepository;
import com.chatopera.cc.app.persistence.repository.OrganRepository;
import com.chatopera.cc.app.persistence.repository.OrgiSkillRelRepository;
import com.chatopera.cc.app.persistence.repository.SNSAccountRepository;
import com.chatopera.cc.app.persistence.repository.ServiceAiRepository;
import com.chatopera.cc.app.persistence.repository.UserRepository;
@Controller
@RequestMapping("/admin/webim")

View File

@ -28,14 +28,14 @@ import java.util.Properties;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.MainUtils;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.app.basic.MainUtils;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.app.service.cache.CacheHelper;
import com.chatopera.cc.app.service.repository.SecretRepository;
import com.chatopera.cc.app.service.repository.SystemConfigRepository;
import com.chatopera.cc.app.service.repository.SystemMessageRepository;
import com.chatopera.cc.app.service.repository.TemplateRepository;
import com.chatopera.cc.app.cache.CacheHelper;
import com.chatopera.cc.app.persistence.repository.SecretRepository;
import com.chatopera.cc.app.persistence.repository.SystemConfigRepository;
import com.chatopera.cc.app.persistence.repository.SystemMessageRepository;
import com.chatopera.cc.app.persistence.repository.TemplateRepository;
import com.chatopera.cc.app.model.Secret;
import com.chatopera.cc.app.model.SysDic;
import org.apache.commons.io.FileUtils;

View File

@ -23,9 +23,9 @@ import java.security.NoSuchAlgorithmException;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.app.service.repository.SystemMessageRepository;
import com.chatopera.cc.app.persistence.repository.SystemMessageRepository;
import com.chatopera.cc.app.handler.Handler;
import com.chatopera.cc.app.model.SystemMessage;
import com.chatopera.cc.app.model.UKeFuDic;
@ -37,7 +37,7 @@ import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import com.chatopera.cc.app.MainUtils;
import com.chatopera.cc.app.basic.MainUtils;
@Controller
@RequestMapping("/admin")

View File

@ -23,11 +23,11 @@ import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.app.service.cache.CacheHelper;
import com.chatopera.cc.app.service.repository.OrganRepository;
import com.chatopera.cc.app.service.repository.SysDicRepository;
import com.chatopera.cc.app.cache.CacheHelper;
import com.chatopera.cc.app.persistence.repository.OrganRepository;
import com.chatopera.cc.app.persistence.repository.SysDicRepository;
import com.chatopera.cc.util.OnlineUserUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -36,10 +36,10 @@ import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import com.chatopera.cc.app.service.repository.AreaTypeRepository;
import com.chatopera.cc.app.service.repository.OrganRoleRepository;
import com.chatopera.cc.app.service.repository.RoleRepository;
import com.chatopera.cc.app.service.repository.UserRepository;
import com.chatopera.cc.app.persistence.repository.AreaTypeRepository;
import com.chatopera.cc.app.persistence.repository.OrganRoleRepository;
import com.chatopera.cc.app.persistence.repository.RoleRepository;
import com.chatopera.cc.app.persistence.repository.UserRepository;
import com.chatopera.cc.app.handler.Handler;
import com.chatopera.cc.app.model.AgentStatus;
import com.chatopera.cc.app.model.Organ;

View File

@ -22,11 +22,11 @@ import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.app.service.repository.RoleAuthRepository;
import com.chatopera.cc.app.service.repository.SysDicRepository;
import com.chatopera.cc.app.service.repository.UserRoleRepository;
import com.chatopera.cc.app.persistence.repository.RoleAuthRepository;
import com.chatopera.cc.app.persistence.repository.SysDicRepository;
import com.chatopera.cc.app.persistence.repository.UserRoleRepository;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.PageRequest;
@ -35,8 +35,8 @@ import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import com.chatopera.cc.app.service.repository.RoleRepository;
import com.chatopera.cc.app.service.repository.UserRepository;
import com.chatopera.cc.app.persistence.repository.RoleRepository;
import com.chatopera.cc.app.persistence.repository.UserRepository;
import com.chatopera.cc.app.handler.Handler;
import com.chatopera.cc.app.model.Role;
import com.chatopera.cc.app.model.RoleAuth;

View File

@ -30,7 +30,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.app.service.repository.SkillRepository;
import com.chatopera.cc.app.persistence.repository.SkillRepository;
import com.chatopera.cc.app.handler.Handler;
import com.chatopera.cc.app.model.Skill;

View File

@ -31,7 +31,7 @@ import org.springframework.web.servlet.ModelAndView;
import com.google.gson.Gson;
import com.hazelcast.com.eclipsesource.json.JsonObject;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.app.service.cache.CacheHelper;
import com.chatopera.cc.app.cache.CacheHelper;
import com.chatopera.cc.app.handler.Handler;
@Controller

View File

@ -19,7 +19,7 @@ package com.chatopera.cc.app.handler.admin.system;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.basic.MainContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Sort.Direction;
@ -29,7 +29,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.app.service.repository.LogRepository;
import com.chatopera.cc.app.persistence.repository.LogRepository;
import com.chatopera.cc.app.handler.Handler;
@Controller

View File

@ -28,14 +28,14 @@ import javax.persistence.PersistenceContext;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.util.metadata.DatabaseMetaDataHandler;
import com.chatopera.cc.util.metadata.UKColumnMetadata;
import com.chatopera.cc.util.metadata.UKTableMetaData;
import com.chatopera.cc.app.service.hibernate.BaseService;
import com.chatopera.cc.app.service.repository.SysDicRepository;
import com.chatopera.cc.app.service.repository.TablePropertiesRepository;
import com.chatopera.cc.app.persistence.hibernate.BaseService;
import com.chatopera.cc.app.persistence.repository.SysDicRepository;
import com.chatopera.cc.app.persistence.repository.TablePropertiesRepository;
import com.chatopera.cc.app.model.SysDic;
import com.chatopera.cc.app.model.TableProperties;
import com.chatopera.cc.app.model.User;
@ -51,9 +51,9 @@ import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import com.chatopera.cc.app.MainUtils;
import com.chatopera.cc.app.basic.MainUtils;
import com.chatopera.cc.util.UKeFuList;
import com.chatopera.cc.app.service.repository.MetadataRepository;
import com.chatopera.cc.app.persistence.repository.MetadataRepository;
import com.chatopera.cc.app.handler.Handler;
import com.chatopera.cc.app.model.MetadataTable;
import com.chatopera.cc.app.model.UKeFuDic;

View File

@ -22,8 +22,8 @@ import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import com.chatopera.cc.app.service.cache.CacheHelper;
import com.chatopera.cc.app.service.repository.SysDicRepository;
import com.chatopera.cc.app.cache.CacheHelper;
import com.chatopera.cc.app.persistence.repository.SysDicRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Sort.Direction;

View File

@ -33,12 +33,12 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.app.MainUtils;
import com.chatopera.cc.app.service.cache.CacheHelper;
import com.chatopera.cc.app.service.repository.SysDicRepository;
import com.chatopera.cc.app.service.repository.TemplateRepository;
import com.chatopera.cc.app.basic.MainUtils;
import com.chatopera.cc.app.cache.CacheHelper;
import com.chatopera.cc.app.persistence.repository.SysDicRepository;
import com.chatopera.cc.app.persistence.repository.TemplateRepository;
import com.chatopera.cc.app.handler.Handler;
import com.chatopera.cc.app.model.SysDic;
import com.chatopera.cc.app.model.Template;

View File

@ -24,9 +24,10 @@ import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.service.cache.CacheHelper;
import com.chatopera.cc.app.service.repository.UserRoleRepository;
import com.chatopera.cc.app.algorithm.AutomaticServiceDist;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.app.cache.CacheHelper;
import com.chatopera.cc.app.persistence.repository.UserRoleRepository;
import com.chatopera.cc.app.model.AgentStatus;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -38,9 +39,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.app.MainUtils;
import com.chatopera.cc.app.service.acd.ServiceQuene;
import com.chatopera.cc.app.service.repository.UserRepository;
import com.chatopera.cc.app.basic.MainUtils;
import com.chatopera.cc.app.persistence.repository.UserRepository;
import com.chatopera.cc.util.OnlineUserUtils;
import com.chatopera.cc.app.handler.Handler;
import com.chatopera.cc.app.model.User;
@ -168,7 +168,7 @@ public class UsersController extends Handler{
//切换成非坐席 判断是否坐席 以及 是否有对话
if(!user.isAgent()) {
AgentStatus agentStatus = (AgentStatus) CacheHelper.getAgentStatusCacheBean().getCacheObject((super.getUser(request)).getId(), super.getOrgi(request));
if(!(agentStatus==null && ServiceQuene.getAgentUsers(super.getUser(request).getId(), super.getOrgi(request))==0)) {
if(!(agentStatus==null && AutomaticServiceDist.getAgentUsers(super.getUser(request).getId(), super.getOrgi(request))==0)) {
return request(super.createRequestPageTempletResponse("redirect:/admin/user/index.html?msg=t1"));
}
}

View File

@ -16,10 +16,10 @@
*/
package com.chatopera.cc.app.handler.api;
import com.chatopera.cc.app.MainUtils;
import com.chatopera.cc.app.basic.MainUtils;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.app.service.cache.CacheHelper;
import com.chatopera.cc.app.service.repository.UserRoleRepository;
import com.chatopera.cc.app.cache.CacheHelper;
import com.chatopera.cc.app.persistence.repository.UserRoleRepository;
import com.chatopera.cc.app.model.User;
import com.chatopera.cc.app.model.UserRole;
import io.swagger.annotations.Api;
@ -42,8 +42,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.service.repository.UserRepository;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.app.persistence.repository.UserRepository;
import com.chatopera.cc.app.handler.Handler;
@RestController

View File

@ -33,7 +33,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.app.service.repository.AgentUserRepository;
import com.chatopera.cc.app.persistence.repository.AgentUserRepository;
import com.chatopera.cc.util.RestResultType;
import com.chatopera.cc.app.handler.Handler;

View File

@ -16,13 +16,13 @@
*/
package com.chatopera.cc.app.handler.api.rest;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.util.Constants;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.util.aggregation.MathHelper;
import com.chatopera.cc.aggregation.MathHelper;
import com.chatopera.cc.exception.CallOutRecordException;
import com.chatopera.cc.app.model.*;
import com.chatopera.cc.app.service.repository.*;
import com.chatopera.cc.app.persistence.repository.*;
import com.chatopera.cc.app.handler.Handler;
import com.chatopera.cc.app.handler.api.request.RestUtils;
import com.google.gson.JsonArray;

View File

@ -15,18 +15,18 @@
*/
package com.chatopera.cc.app.handler.api.rest;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.util.Constants;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.util.aggregation.CallOutHangupAggsResult;
import com.chatopera.cc.util.aggregation.CallOutHangupAuditResult;
import com.chatopera.cc.util.aggregation.MathHelper;
import com.chatopera.cc.aggregation.CallOutHangupAggsResult;
import com.chatopera.cc.aggregation.CallOutHangupAuditResult;
import com.chatopera.cc.aggregation.MathHelper;
import com.chatopera.cc.exception.CallOutRecordException;
import com.chatopera.cc.app.service.repository.OrganRepository;
import com.chatopera.cc.app.service.repository.SNSAccountRepository;
import com.chatopera.cc.app.service.repository.StatusEventRepository;
import com.chatopera.cc.app.service.repository.UserRepository;
import com.chatopera.cc.app.service.storage.MinioService;
import com.chatopera.cc.app.persistence.repository.OrganRepository;
import com.chatopera.cc.app.persistence.repository.SNSAccountRepository;
import com.chatopera.cc.app.persistence.repository.StatusEventRepository;
import com.chatopera.cc.app.persistence.repository.UserRepository;
import com.chatopera.cc.app.persistence.storage.MinioService;
import com.chatopera.cc.app.handler.Handler;
import com.chatopera.cc.app.handler.api.request.RestUtils;
import com.chatopera.cc.app.model.Organ;

View File

@ -31,7 +31,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import com.chatopera.cc.app.service.repository.ChatMessageRepository;
import com.chatopera.cc.app.persistence.repository.ChatMessageRepository;
import com.chatopera.cc.util.RestResultType;
import com.chatopera.cc.app.handler.Handler;

View File

@ -16,12 +16,12 @@
package com.chatopera.cc.app.handler.api.rest;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.app.MainUtils;
import com.chatopera.cc.app.basic.MainUtils;
import com.chatopera.cc.exception.CallOutRecordException;
import com.chatopera.cc.app.model.*;
import com.chatopera.cc.app.service.repository.*;
import com.chatopera.cc.app.persistence.repository.*;
import com.chatopera.cc.util.OnlineUserUtils;
import com.chatopera.cc.util.ChatbotUtils;
import com.chatopera.cc.app.im.util.ChatbotUtils;
import com.chatopera.cc.app.handler.Handler;
import com.chatopera.cc.app.handler.api.request.RestUtils;
import com.chatopera.chatbot.ChatbotAPI;

View File

@ -15,15 +15,15 @@
*/
package com.chatopera.cc.app.handler.api.rest;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.util.Constants;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.exception.CSKefuRestException;
import com.chatopera.cc.util.json.GsonTools;
import com.chatopera.cc.app.service.es.ContactNotesRepository;
import com.chatopera.cc.app.service.es.ContactsRepository;
import com.chatopera.cc.app.service.repository.OrganRepository;
import com.chatopera.cc.app.service.repository.UserRepository;
import com.chatopera.cc.app.persistence.es.ContactNotesRepository;
import com.chatopera.cc.app.persistence.es.ContactsRepository;
import com.chatopera.cc.app.persistence.repository.OrganRepository;
import com.chatopera.cc.app.persistence.repository.UserRepository;
import com.chatopera.cc.app.handler.Handler;
import com.chatopera.cc.app.handler.api.request.RestUtils;
import com.chatopera.cc.app.model.ContactNotes;

View File

@ -16,13 +16,13 @@
package com.chatopera.cc.app.handler.api.rest;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.exception.CSKefuRestException;
import com.chatopera.cc.util.json.GsonTools;
import com.chatopera.cc.app.service.repository.TagRelationRepository;
import com.chatopera.cc.app.service.repository.TagRepository;
import com.chatopera.cc.app.service.repository.UserRepository;
import com.chatopera.cc.app.persistence.repository.TagRelationRepository;
import com.chatopera.cc.app.persistence.repository.TagRepository;
import com.chatopera.cc.app.persistence.repository.UserRepository;
import com.chatopera.cc.app.handler.Handler;
import com.chatopera.cc.app.handler.api.request.RestUtils;
import com.chatopera.cc.app.model.Tag;

View File

@ -17,7 +17,7 @@
package com.chatopera.cc.app.handler.api.rest;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.app.service.es.ContactsRepository;
import com.chatopera.cc.app.persistence.es.ContactsRepository;
import com.chatopera.cc.util.RestResult;
import com.chatopera.cc.util.RestResultType;
import com.chatopera.cc.app.handler.Handler;

View File

@ -15,13 +15,13 @@
*/
package com.chatopera.cc.app.handler.api.rest;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.util.Constants;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.exception.CallOutRuntimeException;
import com.chatopera.cc.app.service.repository.CallOutDialplanRepository;
import com.chatopera.cc.app.service.repository.UserRepository;
import com.chatopera.cc.app.service.task.CallOutPlanTask;
import com.chatopera.cc.app.persistence.repository.CallOutDialplanRepository;
import com.chatopera.cc.app.persistence.repository.UserRepository;
import com.chatopera.cc.app.schedule.CallOutPlanTask;
import com.chatopera.cc.app.handler.Handler;
import com.chatopera.cc.app.handler.api.request.RestUtils;
import com.chatopera.cc.app.model.CallOutDialplan;

View File

@ -25,7 +25,7 @@ import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root;
import javax.servlet.http.HttpServletRequest;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.util.RestResult;
import org.springframework.beans.factory.annotation.Autowired;
@ -39,7 +39,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.chatopera.cc.app.service.repository.AgentServiceRepository;
import com.chatopera.cc.app.persistence.repository.AgentServiceRepository;
import com.chatopera.cc.util.RestResultType;
import com.chatopera.cc.app.handler.Handler;
import com.chatopera.cc.app.model.AgentService;

View File

@ -16,7 +16,7 @@
*/
package com.chatopera.cc.app.handler.api.rest;
import com.chatopera.cc.app.service.repository.OnlineUserRepository;
import com.chatopera.cc.app.persistence.repository.OnlineUserRepository;
import com.chatopera.cc.util.RestResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -35,7 +35,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.util.RestResultType;
import com.chatopera.cc.app.handler.Handler;

View File

@ -17,7 +17,7 @@
package com.chatopera.cc.app.handler.api.rest;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.app.service.repository.OrganRepository;
import com.chatopera.cc.app.persistence.repository.OrganRepository;
import com.chatopera.cc.util.RestResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

View File

@ -26,9 +26,9 @@ import javax.persistence.criteria.Root;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.app.service.repository.AgentServiceRepository;
import com.chatopera.cc.app.persistence.repository.AgentServiceRepository;
import com.chatopera.cc.util.RestResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;

View File

@ -17,7 +17,7 @@
package com.chatopera.cc.app.handler.api.rest;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.app.service.es.QuickReplyRepository;
import com.chatopera.cc.app.persistence.es.QuickReplyRepository;
import com.chatopera.cc.util.RestResult;
import com.chatopera.cc.app.handler.Handler;
import com.chatopera.cc.app.model.QuickReply;

View File

@ -17,8 +17,8 @@
package com.chatopera.cc.app.handler.api.rest;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.app.service.es.QuickReplyRepository;
import com.chatopera.cc.app.service.repository.QuickTypeRepository;
import com.chatopera.cc.app.persistence.es.QuickReplyRepository;
import com.chatopera.cc.app.persistence.repository.QuickTypeRepository;
import com.chatopera.cc.util.RestResult;
import com.chatopera.cc.util.RestResultType;
import com.chatopera.cc.app.handler.Handler;

View File

@ -22,11 +22,12 @@ import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.algorithm.AutomaticServiceDist;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.app.service.cache.CacheHelper;
import com.chatopera.cc.app.service.repository.AgentStatusRepository;
import com.chatopera.cc.app.service.repository.OrganRepository;
import com.chatopera.cc.app.cache.CacheHelper;
import com.chatopera.cc.app.persistence.repository.AgentStatusRepository;
import com.chatopera.cc.app.persistence.repository.OrganRepository;
import com.chatopera.cc.util.RestResult;
import com.chatopera.cc.app.model.AgentStatus;
import com.chatopera.cc.app.model.User;
@ -38,8 +39,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import com.chatopera.cc.app.service.acd.ServiceQuene;
import com.chatopera.cc.app.service.repository.AgentUserRepository;
import com.chatopera.cc.app.persistence.repository.AgentUserRepository;
import com.chatopera.cc.util.RestResultType;
import com.chatopera.cc.app.handler.Handler;
import com.chatopera.cc.app.model.Organ;
@ -71,7 +71,7 @@ public class ApiServiceQueneController extends Handler{
@Menu(type = "apps" , subtype = "user" , access = true)
@ApiOperation("获取队列统计信息,包含当前队列服务中的访客数,排队人数,坐席数")
public ResponseEntity<RestResult> list(HttpServletRequest request) {
return new ResponseEntity<>(new RestResult(RestResultType.OK , ServiceQuene.getAgentReport(super.getOrgi(request))), HttpStatus.OK);
return new ResponseEntity<>(new RestResult(RestResultType.OK , AutomaticServiceDist.getAgentReport(super.getOrgi(request))), HttpStatus.OK);
}
/**
@ -104,7 +104,7 @@ public class ApiServiceQueneController extends Handler{
}
}
SessionConfig sessionConfig = ServiceQuene.initSessionConfig(super.getOrgi(request)) ;
SessionConfig sessionConfig = AutomaticServiceDist.initSessionConfig(super.getOrgi(request)) ;
agentStatus.setUsers(agentUserRepository.countByAgentnoAndStatusAndOrgi(user.getId(), MainContext.AgentUserStatusEnum.INSERVICE.toString(), super.getOrgi(request)));
@ -119,18 +119,18 @@ public class ApiServiceQueneController extends Handler{
/**
* 更新当前用户状态
*/
agentStatus.setUsers(ServiceQuene.getAgentUsers(agentStatus.getAgentno(), super.getOrgi(request)));
agentStatus.setUsers(AutomaticServiceDist.getAgentUsers(agentStatus.getAgentno(), super.getOrgi(request)));
agentStatus.setStatus(MainContext.AgentStatusEnum.READY.toString());
CacheHelper.getAgentStatusCacheBean().put(agentStatus.getAgentno(), agentStatus, super.getOrgi(request));
ServiceQuene.recordAgentStatus(agentStatus.getAgentno(),agentStatus.getUsername(),agentStatus.getAgentno(), agentStatus.getSkill(),"0".equals(super.getUser(request).getUsertype()), agentStatus.getAgentno(), MainContext.AgentStatusEnum.OFFLINE.toString(), MainContext.AgentStatusEnum.READY.toString(), MainContext.AgentWorkType.MEIDIACHAT.toString() , agentStatus.getOrgi() , null);
AutomaticServiceDist.recordAgentStatus(agentStatus.getAgentno(),agentStatus.getUsername(),agentStatus.getAgentno(), agentStatus.getSkill(),"0".equals(super.getUser(request).getUsertype()), agentStatus.getAgentno(), MainContext.AgentStatusEnum.OFFLINE.toString(), MainContext.AgentStatusEnum.READY.toString(), MainContext.AgentWorkType.MEIDIACHAT.toString() , agentStatus.getOrgi() , null);
ServiceQuene.allotAgent(agentStatus.getAgentno(), super.getOrgi(request));
AutomaticServiceDist.allotAgent(agentStatus.getAgentno(), super.getOrgi(request));
}
}else if(!StringUtils.isBlank(status)) {
if(status.equals(MainContext.AgentStatusEnum.NOTREADY.toString())) {
List<AgentStatus> agentStatusList = agentStatusRepository.findByAgentnoAndOrgi(user.getId() , super.getOrgi(request));
for(AgentStatus temp : agentStatusList){
ServiceQuene.recordAgentStatus(temp.getAgentno(),temp.getUsername(),temp.getAgentno(), temp.getSkill(),"0".equals(super.getUser(request).getUsertype()), temp.getAgentno(), temp.isBusy() ? MainContext.AgentStatusEnum.BUSY.toString(): MainContext.AgentStatusEnum.READY.toString(), MainContext.AgentStatusEnum.NOTREADY.toString(), MainContext.AgentWorkType.MEIDIACHAT.toString() , temp.getOrgi() , temp.getUpdatetime());
AutomaticServiceDist.recordAgentStatus(temp.getAgentno(),temp.getUsername(),temp.getAgentno(), temp.getSkill(),"0".equals(super.getUser(request).getUsertype()), temp.getAgentno(), temp.isBusy() ? MainContext.AgentStatusEnum.BUSY.toString(): MainContext.AgentStatusEnum.READY.toString(), MainContext.AgentStatusEnum.NOTREADY.toString(), MainContext.AgentWorkType.MEIDIACHAT.toString() , temp.getOrgi() , temp.getUpdatetime());
agentStatusRepository.delete(temp);
}
CacheHelper.getAgentStatusCacheBean().delete(super.getUser(request).getId(),super.getOrgi(request));
@ -139,7 +139,7 @@ public class ApiServiceQueneController extends Handler{
if(agentStatusList.size() > 0){
agentStatus = agentStatusList.get(0) ;
agentStatus.setBusy(true);
ServiceQuene.recordAgentStatus(agentStatus.getAgentno(),agentStatus.getUsername(), agentStatus.getAgentno(),agentStatus.getSkill(), "0".equals(super.getUser(request).getUsertype()),agentStatus.getAgentno(), MainContext.AgentStatusEnum.READY.toString(), MainContext.AgentStatusEnum.BUSY.toString(), MainContext.AgentWorkType.MEIDIACHAT.toString() , agentStatus.getOrgi() , agentStatus.getUpdatetime());
AutomaticServiceDist.recordAgentStatus(agentStatus.getAgentno(),agentStatus.getUsername(), agentStatus.getAgentno(),agentStatus.getSkill(), "0".equals(super.getUser(request).getUsertype()),agentStatus.getAgentno(), MainContext.AgentStatusEnum.READY.toString(), MainContext.AgentStatusEnum.BUSY.toString(), MainContext.AgentWorkType.MEIDIACHAT.toString() , agentStatus.getOrgi() , agentStatus.getUpdatetime());
agentStatus.setUpdatetime(new Date());
agentStatusRepository.save(agentStatus);
@ -150,15 +150,15 @@ public class ApiServiceQueneController extends Handler{
if(agentStatusList.size() > 0){
agentStatus = agentStatusList.get(0) ;
agentStatus.setBusy(false);
ServiceQuene.recordAgentStatus(agentStatus.getAgentno(),agentStatus.getUsername(), agentStatus.getAgentno(),agentStatus.getSkill(), "0".equals(super.getUser(request).getUsertype()),agentStatus.getAgentno(), MainContext.AgentStatusEnum.BUSY.toString(), MainContext.AgentStatusEnum.READY.toString(), MainContext.AgentWorkType.MEIDIACHAT.toString() , agentStatus.getOrgi() , agentStatus.getUpdatetime());
AutomaticServiceDist.recordAgentStatus(agentStatus.getAgentno(),agentStatus.getUsername(), agentStatus.getAgentno(),agentStatus.getSkill(), "0".equals(super.getUser(request).getUsertype()),agentStatus.getAgentno(), MainContext.AgentStatusEnum.BUSY.toString(), MainContext.AgentStatusEnum.READY.toString(), MainContext.AgentWorkType.MEIDIACHAT.toString() , agentStatus.getOrgi() , agentStatus.getUpdatetime());
agentStatus.setUpdatetime(new Date());
agentStatusRepository.save(agentStatus);
CacheHelper.getAgentStatusCacheBean().put(agentStatus.getAgentno(), agentStatus,super.getOrgi(request));
}
ServiceQuene.allotAgent(agentStatus.getAgentno(), super.getOrgi(request));
AutomaticServiceDist.allotAgent(agentStatus.getAgentno(), super.getOrgi(request));
}
ServiceQuene.publishMessage(super.getOrgi(request) , "agent" , "api" , super.getUser(request).getId());
AutomaticServiceDist.publishMessage(super.getOrgi(request) , "agent" , "api" , super.getUser(request).getId());
}
return new ResponseEntity<>(new RestResult(RestResultType.OK , agentStatus), HttpStatus.OK);
}

View File

@ -19,7 +19,7 @@ package com.chatopera.cc.app.handler.api.rest;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.exception.CSKefuRestException;
import com.chatopera.cc.util.json.GsonTools;
import com.chatopera.cc.app.service.repository.TagRepository;
import com.chatopera.cc.app.persistence.repository.TagRepository;
import com.chatopera.cc.app.handler.Handler;
import com.chatopera.cc.app.handler.api.request.RestUtils;
import com.chatopera.cc.app.model.Tag;

View File

@ -33,8 +33,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import com.chatopera.cc.app.MainUtils;
import com.chatopera.cc.app.service.repository.UserRepository;
import com.chatopera.cc.app.basic.MainUtils;
import com.chatopera.cc.app.persistence.repository.UserRepository;
import com.chatopera.cc.util.RestResultType;
import io.swagger.annotations.Api;

View File

@ -33,7 +33,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import com.chatopera.cc.app.service.repository.ConsultInviteRepository;
import com.chatopera.cc.app.persistence.repository.ConsultInviteRepository;
import com.chatopera.cc.util.RestResultType;
import com.chatopera.cc.app.handler.Handler;

View File

@ -16,9 +16,9 @@
*/
package com.chatopera.cc.app.handler.api.rest;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.app.service.repository.TagRepository;
import com.chatopera.cc.app.persistence.repository.TagRepository;
import com.chatopera.cc.util.RestResult;
import com.chatopera.cc.app.handler.Handler;
import io.swagger.annotations.Api;

View File

@ -23,12 +23,12 @@ import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.MainUtils;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.app.basic.MainUtils;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.app.service.acd.ServiceQuene;
import com.chatopera.cc.app.service.cache.CacheHelper;
import com.chatopera.cc.app.service.es.ContactsRepository;
import com.chatopera.cc.app.algorithm.AutomaticServiceDist;
import com.chatopera.cc.app.cache.CacheHelper;
import com.chatopera.cc.app.persistence.es.ContactsRepository;
import com.chatopera.cc.util.OnlineUserUtils;
import com.chatopera.cc.app.handler.Handler;
import org.apache.commons.lang.StringUtils;
@ -41,11 +41,11 @@ import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import com.chatopera.cc.app.service.repository.InviteRecordRepository;
import com.chatopera.cc.app.service.repository.OnlineUserRepository;
import com.chatopera.cc.app.service.repository.OrgiSkillRelRepository;
import com.chatopera.cc.app.service.repository.UserEventRepository;
import com.chatopera.cc.app.service.repository.UserRepository;
import com.chatopera.cc.app.persistence.repository.InviteRecordRepository;
import com.chatopera.cc.app.persistence.repository.OnlineUserRepository;
import com.chatopera.cc.app.persistence.repository.OrgiSkillRelRepository;
import com.chatopera.cc.app.persistence.repository.UserEventRepository;
import com.chatopera.cc.app.persistence.repository.UserRepository;
import com.chatopera.cc.app.model.AgentStatus;
import com.chatopera.cc.app.model.Contacts;
import com.chatopera.cc.app.model.InviteRecord;
@ -106,7 +106,7 @@ public class AppsController extends Handler {
}
private void aggValues(ModelMap map , HttpServletRequest request){
map.put("agentReport", ServiceQuene.getAgentReport(super.getOrgi(request))) ;
map.put("agentReport", AutomaticServiceDist.getAgentReport(super.getOrgi(request))) ;
map.put("webIMReport", MainUtils.getWebIMReport(userEventRes.findByOrgiAndCreatetimeRange(super.getOrgi(request), MainUtils.getStartTime() , MainUtils.getEndTime()))) ;
map.put("agents",getUsers(request).size()) ;
@ -197,7 +197,7 @@ public class AppsController extends Handler {
//切换成非坐席 判断是否坐席 以及 是否有对话
if(!user.isAgent()) {
AgentStatus agentStatus = (AgentStatus) CacheHelper.getAgentStatusCacheBean().getCacheObject((super.getUser(request)).getId(), super.getOrgi(request));
if(!(agentStatus==null && ServiceQuene.getAgentUsers(super.getUser(request).getId(), super.getOrgi(request))==0)) {
if(!(agentStatus==null && AutomaticServiceDist.getAgentUsers(super.getUser(request).getId(), super.getOrgi(request))==0)) {
if(StringUtils.isBlank(index)) {
return request(super.createRequestPageTempletResponse("redirect:/apps/content.html?msg=t1"));
}

View File

@ -28,19 +28,19 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.util.*;
import com.chatopera.cc.app.im.client.NettyClients;
import com.chatopera.cc.exception.CSKefuException;
import com.chatopera.cc.util.extra.DataExchangeInterface;
import com.chatopera.cc.exchange.DataExchangeInterface;
import com.chatopera.cc.util.mobile.MobileAddress;
import com.chatopera.cc.util.mobile.MobileNumberUtils;
import com.chatopera.cc.app.model.*;
import com.chatopera.cc.app.service.acd.ServiceQuene;
import com.chatopera.cc.app.service.cache.CacheHelper;
import com.chatopera.cc.app.service.es.ContactsRepository;
import com.chatopera.cc.app.service.es.QuickReplyRepository;
import com.chatopera.cc.app.service.repository.*;
import com.chatopera.cc.app.algorithm.AutomaticServiceDist;
import com.chatopera.cc.app.cache.CacheHelper;
import com.chatopera.cc.app.persistence.es.ContactsRepository;
import com.chatopera.cc.app.persistence.es.QuickReplyRepository;
import com.chatopera.cc.app.persistence.repository.*;
import com.chatopera.cc.app.im.router.OutMessageRouter;
import com.chatopera.cc.app.im.message.ChatMessage;
import org.apache.commons.io.FileUtils;
@ -62,7 +62,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;
import com.chatopera.cc.app.MainUtils;
import com.chatopera.cc.app.basic.MainUtils;
import com.chatopera.cc.app.handler.Handler;
import freemarker.template.TemplateException;
@ -195,7 +195,7 @@ public class AgentController extends Handler {
List<AgentUser> agentUserList = agentUserRepository.findByAgentnoAndOrgi(user.getId() , super.getOrgi(request) , defaultSort);
view.addObject("agentUserList", agentUserList) ;
SessionConfig sessionConfig = ServiceQuene.initSessionConfig(super.getOrgi(request)) ;
SessionConfig sessionConfig = AutomaticServiceDist.initSessionConfig(super.getOrgi(request)) ;
view.addObject("sessionConfig", sessionConfig) ;
if(sessionConfig.isOtherquickplay()) {
@ -403,7 +403,7 @@ public class AgentController extends Handler {
view.addObject("tagRelationList", tagRelationRes.findByUserid(agentUser.getUserid())) ;
}
SessionConfig sessionConfig = ServiceQuene.initSessionConfig(super.getOrgi(request)) ;
SessionConfig sessionConfig = AutomaticServiceDist.initSessionConfig(super.getOrgi(request)) ;
view.addObject("sessionConfig", sessionConfig) ;
if(sessionConfig.isOtherquickplay()) {
@ -424,7 +424,7 @@ public class AgentController extends Handler {
@RequestMapping("/other/topic")
@Menu(type = "apps", subtype = "othertopic")
public ModelAndView othertopic(ModelMap map ,HttpServletRequest request , String q) throws IOException, TemplateException {
SessionConfig sessionConfig = ServiceQuene.initSessionConfig(super.getOrgi(request)) ;
SessionConfig sessionConfig = AutomaticServiceDist.initSessionConfig(super.getOrgi(request)) ;
map.put("sessionConfig", sessionConfig) ;
if(sessionConfig.isOtherquickplay()) {
@ -437,7 +437,7 @@ public class AgentController extends Handler {
@RequestMapping("/other/topic/detail")
@Menu(type = "apps", subtype = "othertopicdetail")
public ModelAndView othertopicdetail(ModelMap map ,HttpServletRequest request , String id) throws IOException, TemplateException {
SessionConfig sessionConfig = ServiceQuene.initSessionConfig(super.getOrgi(request)) ;
SessionConfig sessionConfig = AutomaticServiceDist.initSessionConfig(super.getOrgi(request)) ;
map.put("sessionConfig", sessionConfig) ;
if(sessionConfig.isOtherquickplay()) {
@ -486,7 +486,7 @@ public class AgentController extends Handler {
}
}
agentStatus.setUpdatetime(new Date());
SessionConfig sessionConfig = ServiceQuene.initSessionConfig(super.getOrgi(request)) ;
SessionConfig sessionConfig = AutomaticServiceDist.initSessionConfig(super.getOrgi(request)) ;
agentStatus.setUsers(agentUserRepository.countByAgentnoAndStatusAndOrgi(user.getId(), MainContext.AgentUserStatusEnum.INSERVICE.toString(), super.getOrgi(request)));
@ -498,13 +498,13 @@ public class AgentController extends Handler {
/**
* 更新当前用户状态
*/
agentStatus.setUsers(ServiceQuene.getAgentUsers(agentStatus.getAgentno(), super.getOrgi(request)));
agentStatus.setUsers(AutomaticServiceDist.getAgentUsers(agentStatus.getAgentno(), super.getOrgi(request)));
agentStatus.setStatus(MainContext.AgentStatusEnum.READY.toString());
CacheHelper.getAgentStatusCacheBean().put(agentStatus.getAgentno(), agentStatus, super.getOrgi(request));
ServiceQuene.allotAgent(agentStatus.getAgentno(), super.getOrgi(request));
AutomaticServiceDist.allotAgent(agentStatus.getAgentno(), super.getOrgi(request));
ServiceQuene.recordAgentStatus(agentStatus.getAgentno(),agentStatus.getUsername(), agentStatus.getAgentno(), agentStatus.getSkill(), "0".equals(super.getUser(request).getUsertype()) ,agentStatus.getAgentno(), MainContext.AgentStatusEnum.OFFLINE.toString(), MainContext.AgentStatusEnum.READY.toString(), MainContext.AgentWorkType.MEIDIACHAT.toString() , agentStatus.getOrgi() , null);
AutomaticServiceDist.recordAgentStatus(agentStatus.getAgentno(),agentStatus.getUsername(), agentStatus.getAgentno(), agentStatus.getSkill(), "0".equals(super.getUser(request).getUsertype()) ,agentStatus.getAgentno(), MainContext.AgentStatusEnum.OFFLINE.toString(), MainContext.AgentStatusEnum.READY.toString(), MainContext.AgentWorkType.MEIDIACHAT.toString() , agentStatus.getOrgi() , null);
}
return request(super.createRequestPageTempletResponse("/public/success")) ;
@ -515,7 +515,7 @@ public class AgentController extends Handler {
public ModelAndView notready(HttpServletRequest request){
User user = super.getUser(request) ;
if(user!=null) {
ServiceQuene.deleteAgentStatus(user.getId(), user.getOrgi(), "0".equals(user.getUsertype()));
AutomaticServiceDist.deleteAgentStatus(user.getId(), user.getOrgi(), "0".equals(user.getUsertype()));
}
return request(super.createRequestPageTempletResponse("/public/success")) ;
}
@ -529,12 +529,12 @@ public class AgentController extends Handler {
if(agentStatusList.size() > 0){
agentStatus = agentStatusList.get(0) ;
agentStatus.setBusy(true);
ServiceQuene.recordAgentStatus(agentStatus.getAgentno(),agentStatus.getUsername(), agentStatus.getAgentno(), agentStatus.getSkill(), "0".equals(super.getUser(request).getUsertype()),agentStatus.getAgentno(), MainContext.AgentStatusEnum.READY.toString(), MainContext.AgentStatusEnum.BUSY.toString(), MainContext.AgentWorkType.MEIDIACHAT.toString() , agentStatus.getOrgi() , agentStatus.getUpdatetime());
AutomaticServiceDist.recordAgentStatus(agentStatus.getAgentno(),agentStatus.getUsername(), agentStatus.getAgentno(), agentStatus.getSkill(), "0".equals(super.getUser(request).getUsertype()),agentStatus.getAgentno(), MainContext.AgentStatusEnum.READY.toString(), MainContext.AgentStatusEnum.BUSY.toString(), MainContext.AgentWorkType.MEIDIACHAT.toString() , agentStatus.getOrgi() , agentStatus.getUpdatetime());
agentStatus.setUpdatetime(new Date());
agentStatusRepository.save(agentStatus);
CacheHelper.getAgentStatusCacheBean().put(agentStatus.getAgentno(), agentStatus, super.getOrgi(request));
}
ServiceQuene.publishMessage(super.getOrgi(request) , "agent" , "busy" , user.getId());
AutomaticServiceDist.publishMessage(super.getOrgi(request) , "agent" , "busy" , user.getId());
return request(super.createRequestPageTempletResponse("/public/success")) ;
}
@ -548,12 +548,12 @@ public class AgentController extends Handler {
if(agentStatusList.size() > 0){
agentStatus = agentStatusList.get(0) ;
agentStatus.setBusy(false);
ServiceQuene.recordAgentStatus(agentStatus.getAgentno(),agentStatus.getUsername(), agentStatus.getAgentno(), agentStatus.getSkill(),"0".equals(super.getUser(request).getUsertype()), agentStatus.getAgentno(), MainContext.AgentStatusEnum.BUSY.toString(), MainContext.AgentStatusEnum.READY.toString(), MainContext.AgentWorkType.MEIDIACHAT.toString() , agentStatus.getOrgi() , agentStatus.getUpdatetime());
AutomaticServiceDist.recordAgentStatus(agentStatus.getAgentno(),agentStatus.getUsername(), agentStatus.getAgentno(), agentStatus.getSkill(),"0".equals(super.getUser(request).getUsertype()), agentStatus.getAgentno(), MainContext.AgentStatusEnum.BUSY.toString(), MainContext.AgentStatusEnum.READY.toString(), MainContext.AgentWorkType.MEIDIACHAT.toString() , agentStatus.getOrgi() , agentStatus.getUpdatetime());
agentStatus.setUpdatetime(new Date());
agentStatusRepository.save(agentStatus);
CacheHelper.getAgentStatusCacheBean().put(agentStatus.getAgentno(), agentStatus,super.getOrgi(request));
ServiceQuene.allotAgent(agentStatus.getAgentno(), super.getOrgi(request));
AutomaticServiceDist.allotAgent(agentStatus.getAgentno(), super.getOrgi(request));
}
return request(super.createRequestPageTempletResponse("/public/success")) ;
}
@ -565,7 +565,7 @@ public class AgentController extends Handler {
List<AgentService> agentServiceList = new ArrayList<AgentService>();
for(AgentUser agentUser : agentUserList){
if(agentUser!=null && super.getUser(request).getId().equals(agentUser.getAgentno())){
ServiceQuene.deleteAgentUser(agentUser, super.getOrgi(request));
AutomaticServiceDist.deleteAgentUser(agentUser, super.getOrgi(request));
AgentService agentService = agentServiceRepository.findByIdAndOrgi(agentUser.getAgentserviceid(), super.getOrgi(request)) ;
if(agentService!=null){
agentService.setStatus(MainContext.AgentUserStatusEnum.END.toString());
@ -585,7 +585,7 @@ public class AgentController extends Handler {
throws Exception {
AgentUser agentUser = agentUserRepository.findByIdAndOrgi(userid, super.getOrgi(request));
if(agentUser!=null && super.getUser(request).getId().equals(agentUser.getAgentno())){
ServiceQuene.deleteAgentUser(agentUser, super.getOrgi(request));
AutomaticServiceDist.deleteAgentUser(agentUser, super.getOrgi(request));
if(!StringUtils.isBlank(agentUser.getAgentserviceid())){
AgentService agentService = agentServiceRepository.findByIdAndOrgi(agentUser.getAgentserviceid(), super.getOrgi(request)) ;
agentService.setStatus(MainContext.AgentUserStatusEnum.END.toString());
@ -974,7 +974,7 @@ public class AgentController extends Handler {
currentOrgan = skillList.get(0).getId();
}
}
List<AgentStatus> agentStatusList = ServiceQuene.getAgentStatus(null , super.getOrgi(request));
List<AgentStatus> agentStatusList = AutomaticServiceDist.getAgentStatus(null , super.getOrgi(request));
List<String> usersids = new ArrayList<String>();
if(!agentStatusList.isEmpty()) {
for(AgentStatus agentStatus:agentStatusList) {
@ -1007,7 +1007,7 @@ public class AgentController extends Handler {
public ModelAndView transferagent(ModelMap map , HttpServletRequest request , @Valid String organ){
if(!StringUtils.isBlank(organ)){
List<String> usersids = new ArrayList<String>();
List<AgentStatus> agentStatusList = ServiceQuene.getAgentStatus(organ , super.getOrgi(request));
List<AgentStatus> agentStatusList = AutomaticServiceDist.getAgentStatus(organ , super.getOrgi(request));
if(!agentStatusList.isEmpty()) {
for(AgentStatus agentStatus:agentStatusList) {
if(agentStatus!=null && !agentStatus.getAgentno().equals(super.getUser(request).getId())){
@ -1042,12 +1042,12 @@ public class AgentController extends Handler {
AgentStatus agentStatus = (AgentStatus) CacheHelper.getAgentStatusCacheBean().getCacheObject(super.getUser(request).getId(), super.getOrgi(request)) ;
if(agentStatus!=null){
ServiceQuene.updateAgentStatus(agentStatus, agentUser, super.getOrgi(request), false);
AutomaticServiceDist.updateAgentStatus(agentStatus, agentUser, super.getOrgi(request), false);
}
AgentStatus transAgentStatus = (AgentStatus) CacheHelper.getAgentStatusCacheBean().getCacheObject(agentno, super.getOrgi(request)) ;
if(transAgentStatus!=null){
ServiceQuene.updateAgentStatus(transAgentStatus, agentUser, super.getOrgi(request), true);
AutomaticServiceDist.updateAgentStatus(transAgentStatus, agentUser, super.getOrgi(request), true);
agentService.setAgentno(agentno);
agentService.setAgentusername(transAgentStatus.getUsername());
}

View File

@ -24,8 +24,8 @@ import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.app.service.repository.CallCenterSkillRepository;
import com.chatopera.cc.app.service.repository.PbxHostRepository;
import com.chatopera.cc.app.persistence.repository.CallCenterSkillRepository;
import com.chatopera.cc.app.persistence.repository.PbxHostRepository;
import com.chatopera.cc.app.model.Extention;
import com.chatopera.cc.app.model.PbxHost;
import com.chatopera.cc.app.model.Template;
@ -36,13 +36,13 @@ import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.MainUtils;
import com.chatopera.cc.app.service.repository.AclRepository;
import com.chatopera.cc.app.service.repository.ExtentionRepository;
import com.chatopera.cc.app.service.repository.RouterRulesRepository;
import com.chatopera.cc.app.service.repository.SipTrunkRepository;
import com.chatopera.cc.app.service.repository.SkillExtentionRepository;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.app.basic.MainUtils;
import com.chatopera.cc.app.persistence.repository.AclRepository;
import com.chatopera.cc.app.persistence.repository.ExtentionRepository;
import com.chatopera.cc.app.persistence.repository.RouterRulesRepository;
import com.chatopera.cc.app.persistence.repository.SipTrunkRepository;
import com.chatopera.cc.app.persistence.repository.SkillExtentionRepository;
import com.chatopera.cc.app.handler.Handler;
import com.chatopera.cc.app.model.SystemConfig;

View File

@ -24,10 +24,10 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.es.SearchTools;
import com.chatopera.cc.es.UKDataBean;
import com.chatopera.cc.app.service.cache.CacheHelper;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.util.es.SearchTools;
import com.chatopera.cc.util.es.UKDataBean;
import com.chatopera.cc.app.cache.CacheHelper;
import com.chatopera.cc.util.CallCenterUtils;
import com.chatopera.cc.app.model.User;
import org.apache.commons.lang3.StringUtils;
@ -40,10 +40,10 @@ import org.springframework.web.servlet.ModelAndView;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.util.freeswitch.model.CallCenterAgent;
import com.chatopera.cc.app.service.impl.CallOutQuene;
import com.chatopera.cc.app.service.repository.ExtentionRepository;
import com.chatopera.cc.app.service.repository.SipTrunkRepository;
import com.chatopera.cc.app.service.repository.UserRepository;
import com.chatopera.cc.app.persistence.impl.CallOutQuene;
import com.chatopera.cc.app.persistence.repository.ExtentionRepository;
import com.chatopera.cc.app.persistence.repository.SipTrunkRepository;
import com.chatopera.cc.app.persistence.repository.UserRepository;
import com.chatopera.cc.app.handler.Handler;
import com.chatopera.cc.app.model.SipTrunk;

View File

@ -16,11 +16,11 @@
package com.chatopera.cc.app.handler.apps.callout;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.app.service.task.CallOutSheetTask;
import com.chatopera.cc.app.schedule.CallOutSheetTask;
import com.chatopera.cc.exception.CallOutRuntimeException;
import com.chatopera.cc.app.service.repository.*;
import com.chatopera.cc.app.persistence.repository.*;
import com.chatopera.cc.app.handler.Handler;
import com.chatopera.cc.app.model.CallOutDialplan;
import com.chatopera.cc.app.model.CallOutLogDialPlan;

View File

@ -19,20 +19,20 @@ package com.chatopera.cc.app.handler.apps.contacts;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.util.PinYinTools;
import com.chatopera.cc.app.MainUtils;
import com.chatopera.cc.app.basic.MainUtils;
import com.chatopera.cc.exception.CSKefuException;
import com.chatopera.cc.util.task.DSData;
import com.chatopera.cc.util.task.DSDataEvent;
import com.chatopera.cc.util.task.ExcelImportProecess;
import com.chatopera.cc.util.task.export.ExcelExporterProcess;
import com.chatopera.cc.util.task.process.ContactsProcess;
import com.chatopera.cc.concurrent.dsdata.DSData;
import com.chatopera.cc.concurrent.dsdata.DSDataEvent;
import com.chatopera.cc.concurrent.dsdata.ExcelImportProecess;
import com.chatopera.cc.concurrent.dsdata.export.ExcelExporterProcess;
import com.chatopera.cc.concurrent.dsdata.process.ContactsProcess;
import com.chatopera.cc.app.model.Contacts;
import com.chatopera.cc.app.model.MetadataTable;
import com.chatopera.cc.app.model.PropertiesEvent;
import com.chatopera.cc.app.service.es.ContactsRepository;
import com.chatopera.cc.app.service.repository.MetadataRepository;
import com.chatopera.cc.app.service.repository.PropertiesEventRepository;
import com.chatopera.cc.app.service.repository.ReporterRepository;
import com.chatopera.cc.app.persistence.es.ContactsRepository;
import com.chatopera.cc.app.persistence.repository.MetadataRepository;
import com.chatopera.cc.app.persistence.repository.PropertiesEventRepository;
import com.chatopera.cc.app.persistence.repository.ReporterRepository;
import com.chatopera.cc.util.PropertiesEventUtils;
import com.chatopera.cc.app.handler.Handler;
import org.apache.commons.io.FileUtils;
@ -271,7 +271,7 @@ public class ContactsController extends Handler {
event.getDSData().setProcess(new ContactsProcess(contactsRes));
event.setOrgi(super.getOrgi(request));
/*if(!StringUtils.isBlank(ckind)){
event.getValues().put("ckind", ckind) ;
exchange.getValues().put("ckind", ckind) ;
}*/
event.getValues().put("creater", super.getUser(request).getId());
reporterRes.save(event.getDSData().getReport());

View File

@ -32,18 +32,18 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.MainUtils;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.app.basic.MainUtils;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.util.PinYinTools;
import com.chatopera.cc.exception.CSKefuException;
import com.chatopera.cc.util.task.DSData;
import com.chatopera.cc.util.task.ExcelImportProecess;
import com.chatopera.cc.util.task.export.ExcelExporterProcess;
import com.chatopera.cc.util.task.process.EntCustomerProcess;
import com.chatopera.cc.app.service.es.ContactsRepository;
import com.chatopera.cc.app.service.es.EntCustomerRepository;
import com.chatopera.cc.app.service.repository.PropertiesEventRepository;
import com.chatopera.cc.concurrent.dsdata.DSData;
import com.chatopera.cc.concurrent.dsdata.ExcelImportProecess;
import com.chatopera.cc.concurrent.dsdata.export.ExcelExporterProcess;
import com.chatopera.cc.concurrent.dsdata.process.EntCustomerProcess;
import com.chatopera.cc.app.persistence.es.ContactsRepository;
import com.chatopera.cc.app.persistence.es.EntCustomerRepository;
import com.chatopera.cc.app.persistence.repository.PropertiesEventRepository;
import com.chatopera.cc.util.PropertiesEventUtils;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang.StringUtils;
@ -59,9 +59,9 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;
import com.chatopera.cc.util.task.DSDataEvent;
import com.chatopera.cc.app.service.repository.MetadataRepository;
import com.chatopera.cc.app.service.repository.ReporterRepository;
import com.chatopera.cc.concurrent.dsdata.DSDataEvent;
import com.chatopera.cc.app.persistence.repository.MetadataRepository;
import com.chatopera.cc.app.persistence.repository.ReporterRepository;
import com.chatopera.cc.app.handler.Handler;
import com.chatopera.cc.app.model.CustomerGroupForm;
import com.chatopera.cc.app.model.EntCustomer;
@ -318,7 +318,7 @@ public class CustomerController extends Handler{
event.getDSData().setProcess(new EntCustomerProcess(entCustomerRes));
event.setOrgi(super.getOrgi(request));
/*if(!StringUtils.isBlank(ekind)){
event.getValues().put("ekind", ekind) ;
exchange.getValues().put("ekind", ekind) ;
}*/
event.getValues().put("creater", super.getUser(request).getId()) ;
reporterRes.save(event.getDSData().getReport()) ;

View File

@ -21,12 +21,12 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import com.chatopera.cc.app.MainUtils;
import com.chatopera.cc.app.basic.MainUtils;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.app.im.client.NettyClients;
import com.chatopera.cc.app.service.repository.IMGroupRepository;
import com.chatopera.cc.app.service.repository.IMGroupUserRepository;
import com.chatopera.cc.app.service.repository.OrganRepository;
import com.chatopera.cc.app.persistence.repository.IMGroupRepository;
import com.chatopera.cc.app.persistence.repository.IMGroupUserRepository;
import com.chatopera.cc.app.persistence.repository.OrganRepository;
import com.chatopera.cc.app.handler.Handler;
import com.chatopera.cc.app.model.IMGroupUser;
import com.chatopera.cc.app.model.RecentUser;
@ -39,9 +39,9 @@ import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import com.chatopera.cc.app.service.repository.ChatMessageRepository;
import com.chatopera.cc.app.service.repository.RecentUserRepository;
import com.chatopera.cc.app.service.repository.UserRepository;
import com.chatopera.cc.app.persistence.repository.ChatMessageRepository;
import com.chatopera.cc.app.persistence.repository.RecentUserRepository;
import com.chatopera.cc.app.persistence.repository.UserRepository;
import com.chatopera.cc.app.model.IMGroup;
@Controller

View File

@ -17,18 +17,16 @@
package com.chatopera.cc.app.handler.apps.internet;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.MainUtils;
import com.chatopera.cc.util.*;
import com.chatopera.cc.util.WebIMClient;
import com.chatopera.cc.app.model.*;
import com.chatopera.cc.app.service.acd.ServiceQuene;
import com.chatopera.cc.app.service.cache.CacheHelper;
import com.chatopera.cc.app.service.es.ContactsRepository;
import com.chatopera.cc.app.service.repository.*;
import com.chatopera.cc.util.MessageUtils;
import com.chatopera.cc.util.OnlineUserUtils;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.app.basic.MainUtils;
import com.chatopera.cc.app.handler.Handler;
import com.chatopera.cc.app.im.util.RichMediaUtils;
import com.chatopera.cc.app.model.*;
import com.chatopera.cc.app.algorithm.AutomaticServiceDist;
import com.chatopera.cc.app.cache.CacheHelper;
import com.chatopera.cc.app.persistence.es.ContactsRepository;
import com.chatopera.cc.app.persistence.repository.*;
import com.chatopera.cc.util.*;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
@ -356,7 +354,7 @@ public class IMController extends Handler {
}
String nickname = "Guest_" + userID;
boolean consult = true; //是否已收集用户信息
SessionConfig sessionConfig = ServiceQuene.initSessionConfig(orgi);
SessionConfig sessionConfig = AutomaticServiceDist.initSessionConfig(orgi);
map.addAttribute("sessionConfig", sessionConfig);
map.addAttribute("hostname", request.getServerName());
@ -407,7 +405,7 @@ public class IMController extends Handler {
map.addAttribute("aiid", invite.getAiid());
}
AgentReport report = ServiceQuene.getAgentReport(invite.getOrgi());
AgentReport report = AutomaticServiceDist.getAgentReport(invite.getOrgi());
if (report.getAgents() == 0 || (sessionConfig.isHourcheck() && !MainUtils.isInWorkingHours(sessionConfig.getWorkinghours()) && invite.isLeavemessage())) {
view = request(super.createRequestPageTempletResponse("/apps/im/leavemsg"));
@ -726,9 +724,7 @@ public class IMController extends Handler {
String thumbnailsFileName = "upload/" + fileid;
MainUtils.processImage(new File(path, thumbnailsFileName), imageFile);
upload = new UploadStatus("0", "/res/image.html?id=" + thumbnailsFileName);
String image = "/res/image.html?id=" + thumbnailsFileName;
if (request.getServerPort() == 80) {
image = "/res/image.html?id=" + thumbnailsFileName;
@ -737,15 +733,13 @@ public class IMController extends Handler {
}
if (paste == null) {
if (StringUtils.isNotBlank(channel)) {
MessageUtils.uploadImage(image, fileid, (int) imgFile.getSize(), imgFile.getName(), channel, userid, username, appid, orgi);
RichMediaUtils.uploadImageWithChannel(image, fileid, (int) imgFile.getSize(), imgFile.getName(), channel, userid, username, appid, orgi);
} else {
MessageUtils.uploadImage(image, fileid, (int) imgFile.getSize(), imgFile.getName(), userid);
RichMediaUtils.uploadImage(image, fileid, (int) imgFile.getSize(), imgFile.getName(), userid);
}
}
} else {
String id = processAttachmentFile(imgFile, request);
upload = new UploadStatus("0", "/res/file.html?id=" + id);
String file = "/res/file.html?id=" + id;
if (request.getServerPort() == 80) {
@ -755,9 +749,9 @@ public class IMController extends Handler {
}
File tempFile = new File(imgFile.getOriginalFilename());
if (StringUtils.isNotBlank(channel)) {
MessageUtils.uploadFile(file, (int) imgFile.getSize(), tempFile.getName(), channel, userid, username, appid, orgi, id);
RichMediaUtils.uploadFileWithChannel(file, (int) imgFile.getSize(), tempFile.getName(), channel, userid, username, appid, orgi, id);
} else {
MessageUtils.uploadFile(file, (int) imgFile.getSize(), tempFile.getName(), userid, id);
RichMediaUtils.uploadFile(file, (int) imgFile.getSize(), tempFile.getName(), userid, id);
}
}
} else {

View File

@ -23,7 +23,7 @@ import java.util.Date;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import com.chatopera.cc.app.MainUtils;
import com.chatopera.cc.app.basic.MainUtils;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.app.model.JobDetail;
import com.chatopera.cc.app.model.JobTask;
@ -34,7 +34,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.chatopera.cc.app.service.repository.JobDetailRepository;
import com.chatopera.cc.app.persistence.repository.JobDetailRepository;
import com.chatopera.cc.app.handler.Handler;

View File

@ -25,12 +25,12 @@ import java.util.Date;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.app.service.es.KbsTopicRepository;
import com.chatopera.cc.app.service.repository.AttachmentRepository;
import com.chatopera.cc.app.service.repository.KbsTypeRepository;
import com.chatopera.cc.app.service.repository.TagRepository;
import com.chatopera.cc.app.persistence.es.KbsTopicRepository;
import com.chatopera.cc.app.persistence.repository.AttachmentRepository;
import com.chatopera.cc.app.persistence.repository.KbsTypeRepository;
import com.chatopera.cc.app.persistence.repository.TagRepository;
import com.chatopera.cc.app.handler.Handler;
import com.chatopera.cc.app.model.AttachmentFile;
import com.chatopera.cc.app.model.KbsTopic;
@ -46,7 +46,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;
import com.chatopera.cc.app.MainUtils;
import com.chatopera.cc.app.basic.MainUtils;
@Controller
@RequestMapping({"/apps/kbs"})

View File

@ -30,15 +30,15 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import com.chatopera.cc.app.MainContext;
import com.chatopera.cc.app.MainUtils;
import com.chatopera.cc.app.basic.MainContext;
import com.chatopera.cc.app.basic.MainUtils;
import com.chatopera.cc.util.Menu;
import com.chatopera.cc.util.extra.DataExchangeInterface;
import com.chatopera.cc.util.task.DSData;
import com.chatopera.cc.util.task.ExcelImportProecess;
import com.chatopera.cc.util.task.export.ExcelExporterProcess;
import com.chatopera.cc.app.service.repository.SysDicRepository;
import com.chatopera.cc.app.service.repository.TopicItemRepository;
import com.chatopera.cc.exchange.DataExchangeInterface;
import com.chatopera.cc.concurrent.dsdata.DSData;
import com.chatopera.cc.concurrent.dsdata.ExcelImportProecess;
import com.chatopera.cc.concurrent.dsdata.export.ExcelExporterProcess;
import com.chatopera.cc.app.persistence.repository.SysDicRepository;
import com.chatopera.cc.app.persistence.repository.TopicItemRepository;
import com.chatopera.cc.util.OnlineUserUtils;
import com.chatopera.cc.app.model.KnowledgeType;
import com.chatopera.cc.app.model.SysDic;
@ -56,13 +56,13 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;
import com.chatopera.cc.util.task.DSDataEvent;
import com.chatopera.cc.util.task.process.TopicProcess;
import com.chatopera.cc.app.service.es.TopicRepository;
import com.chatopera.cc.app.service.repository.AreaTypeRepository;
import com.chatopera.cc.app.service.repository.KnowledgeTypeRepository;
import com.chatopera.cc.app.service.repository.MetadataRepository;
import com.chatopera.cc.app.service.repository.ReporterRepository;
import com.chatopera.cc.concurrent.dsdata.DSDataEvent;
import com.chatopera.cc.concurrent.dsdata.process.TopicProcess;
import com.chatopera.cc.app.persistence.es.TopicRepository;
import com.chatopera.cc.app.persistence.repository.AreaTypeRepository;
import com.chatopera.cc.app.persistence.repository.KnowledgeTypeRepository;
import com.chatopera.cc.app.persistence.repository.MetadataRepository;
import com.chatopera.cc.app.persistence.repository.ReporterRepository;
import com.chatopera.cc.app.handler.Handler;
import com.chatopera.cc.app.model.MetadataTable;
import com.chatopera.cc.app.model.UKeFuDic;

Some files were not shown because too many files have changed in this diff Show More