|
|
@@ -5,7 +5,10 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import com.goafanti.common.bo.Error;
|
|
|
import com.goafanti.common.bo.InputCallCompleter;
|
|
|
import com.goafanti.common.bo.Result;
|
|
|
-import com.goafanti.common.dao.*;
|
|
|
+import com.goafanti.common.dao.AdminMapper;
|
|
|
+import com.goafanti.common.dao.CallLogMapper;
|
|
|
+import com.goafanti.common.dao.OrganizationContactBookMapper;
|
|
|
+import com.goafanti.common.dao.UserMapper;
|
|
|
import com.goafanti.common.model.Admin;
|
|
|
import com.goafanti.common.model.CallLog;
|
|
|
import com.goafanti.common.model.OrganizationContactBook;
|
|
|
@@ -17,6 +20,7 @@ import com.goafanti.common.utils.StringUtils;
|
|
|
import com.goafanti.core.mybatis.BaseMybatisDao;
|
|
|
import com.goafanti.core.websocket.SystemWebSocketHandler;
|
|
|
import com.goafanti.customer.bo.InputCallNumber;
|
|
|
+import com.goafanti.customer.bo.InputUserCallList;
|
|
|
import com.goafanti.customer.service.UserOutboundService;
|
|
|
import org.apache.shiro.crypto.hash.SimpleHash;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
@@ -28,7 +32,7 @@ import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
@Service("userOutboundService")
|
|
|
-public class UserOutboundServiceImpl extends BaseMybatisDao<UserArchivesMapper> implements UserOutboundService {
|
|
|
+public class UserOutboundServiceImpl extends BaseMybatisDao<CallLogMapper> implements UserOutboundService {
|
|
|
static final String customer="C322";
|
|
|
static final String seq="20241101";
|
|
|
static final String pwd="084332D02CCF7B42461F34155AC8754F";
|
|
|
@@ -175,6 +179,7 @@ public class UserOutboundServiceImpl extends BaseMybatisDao<UserArchivesMapper>
|
|
|
callLog.setStatus(0);
|
|
|
callLog.setRemarks(callResultMsg);
|
|
|
callLogMapper.insert(callLog);
|
|
|
+ pushCountUser(uid);
|
|
|
//需要关闭客户呼叫中
|
|
|
try {
|
|
|
systemWebSocketHandler.sendMessageToUser(admin.getId(), new TextMessage("callCompleted"));
|
|
|
@@ -184,6 +189,23 @@ public class UserOutboundServiceImpl extends BaseMybatisDao<UserArchivesMapper>
|
|
|
return 1;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 客户通话时长统计
|
|
|
+ * @param uid
|
|
|
+ */
|
|
|
+ private void pushCountUser(String uid) {
|
|
|
+ CallLog callLog=new CallLog();
|
|
|
+ callLog.setUid(uid);
|
|
|
+ List<CallLog> callLogList = callLogMapper.findCallLogList(callLog);
|
|
|
+ int count=0;
|
|
|
+ int duration=0;
|
|
|
+ for (CallLog log : callLogList) {
|
|
|
+ count++;
|
|
|
+ duration+=log.getDuration();
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public Object agentList() {
|
|
|
return adminMapper.agentList();
|
|
|
@@ -193,4 +215,11 @@ public class UserOutboundServiceImpl extends BaseMybatisDao<UserArchivesMapper>
|
|
|
public Object getDefaultMobile(String uid) {
|
|
|
return organizationContactBookMapper.getMajor(uid,null);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Object userCallList(InputUserCallList in) {
|
|
|
+ CallLog select=new CallLog();
|
|
|
+ select.setUid(in.getUid());
|
|
|
+ return findPage("findCallLogList","findCallLogCount",select,in.getPageNo(),in.getPageSize());
|
|
|
+ }
|
|
|
}
|