Commit 10409a76 authored by Aaron Gutierrez's avatar Aaron Gutierrez

Corecciones bytebot

parent eee2dbe6
...@@ -57,7 +57,7 @@ public class BotSessionJDCBRepository { ...@@ -57,7 +57,7 @@ public class BotSessionJDCBRepository {
} }
} }
public Double getAvgFirstResponseTime(OffsetDateTime startDate, OffsetDateTime endDate) { public Object getAvgFirstResponseTime(OffsetDateTime startDate, OffsetDateTime endDate) {
SqlSession session = sqlSessionFactory.openSession(); SqlSession session = sqlSessionFactory.openSession();
try { try {
......
...@@ -221,7 +221,13 @@ public class MessageJDBCRepository { ...@@ -221,7 +221,13 @@ public class MessageJDBCRepository {
try { try {
Map<String, Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();
params.put("sentence", sentence); params.put("sentence", sentence);
return session.selectOne("com.bytesw.bytebot.dao.jdbc.MessageMapper.countCustomersBySentence", params); Object result = session.selectOne("com.bytesw.bytebot.dao.jdbc.MessageMapper.countCustomersBySentence", params);
if (result instanceof Double) {
return ((Double) result).intValue();
} else if (result instanceof Integer) {
return (Integer) result;
}
return 0;
} finally { } finally {
session.close(); session.close();
} }
......
...@@ -46,7 +46,13 @@ public class OperativeDashboardService extends DashboardService { ...@@ -46,7 +46,13 @@ public class OperativeDashboardService extends DashboardService {
int cantResponseMessages = responseJDBCRepository.countSessionInRange(startDate, endDate); int cantResponseMessages = responseJDBCRepository.countSessionInRange(startDate, endDate);
//Promedio primera respuesta en mili //Promedio primera respuesta en mili
Double avgFirstResponse = botSessionJDCBRepository.getAvgFirstResponseTime(startDate, endDate); Object avgFRObject = botSessionJDCBRepository.getAvgFirstResponseTime(startDate, endDate);
Double avgFirstResponse;
if (avgFRObject instanceof Long) {
avgFirstResponse = new Double((Long)avgFRObject);
} else {
avgFirstResponse = (Double) avgFRObject;
}
Double avgSessionsByCustomer = botSessionJDCBRepository.getAvgSessionByCustomerInRange(startDate, endDate); Double avgSessionsByCustomer = botSessionJDCBRepository.getAvgSessionByCustomerInRange(startDate, endDate);
Timestamp timestamp = botSessionJDCBRepository.getLastDateInRage(startDate, endDate); Timestamp timestamp = botSessionJDCBRepository.getLastDateInRage(startDate, endDate);
......
...@@ -4,7 +4,7 @@ server: ...@@ -4,7 +4,7 @@ server:
servlet.context-path: ${APPLICATION_PATH:/bytebot} servlet.context-path: ${APPLICATION_PATH:/bytebot}
port: ${APPLICATION_PORT:9077} port: ${APPLICATION_PORT:9077}
web: web:
static-content-location: file:/home/agutierrez/Documentos/Proyectos/BYTE_BOT/bytebot-workspace/dist/bytebot-html/ static-content-location: file:C:/Users/aaron/Documents/proyectos/BYTEBOT/bytebot-workspace/dist/bytebot-html/
#NOTA debe terminar con / #NOTA debe terminar con /
security: security:
...@@ -54,8 +54,8 @@ application: ...@@ -54,8 +54,8 @@ application:
services: services:
multi-tenant-conf: multi-tenant-conf:
exclude-service: /health exclude-service: /health
authorization-service.url: none authorization-service.url: http://192.168.27.96:7580
security: none # none, basic, oauth2sso security: oauth2sso # none, basic, oauth2sso
security.method: true security.method: true
security-exclude: /service/oauth/userinfo, /actuator/**, /mylogout, /login, /logout, /goodbye, /error, /anon, /cache.manifest, /favicon.ico, /service/file, /goodbye security-exclude: /service/oauth/userinfo, /actuator/**, /mylogout, /login, /logout, /goodbye, /error, /anon, /cache.manifest, /favicon.ico, /service/file, /goodbye
messaging: messaging:
...@@ -103,11 +103,11 @@ spring: ...@@ -103,11 +103,11 @@ spring:
datasource: datasource:
database-type: mysql database-type: mysql
schemaName: bbot_t186a1 schemaName: BYTEBOT_BASE
url: jdbc:postgresql://localhost:5432/bbot_t186a1?useSSL=false url: jdbc:mysql://192.168.27.96:3306/BYTEBOT_BASE?useSSL=false
driverClassName: 'org.postgresql.Driver' driverClassName: 'com.mysql.cj.jdbc.Driver'
username: postgres username: root
password: root password: byte2k20
minimum-idle: 10 minimum-idle: 10
maximum-pool-size: 10 maximum-pool-size: 10
validationQuery: SELECT 1 validationQuery: SELECT 1
...@@ -118,9 +118,9 @@ spring: ...@@ -118,9 +118,9 @@ spring:
id: T186A1 id: T186A1
servername: cdb.bytebot.t186a1 servername: cdb.bytebot.t186a1
datasource: datasource:
url: jdbc:postgresql://localhost:5432/bbot_t186a1?useSSL=false url: jdbc:mysql://192.168.27.96:3306/BYTEBOT_T186A1?useSSL=false
username: postgres username: root
password: root password: byte2k20
minimum-idle: 10 minimum-idle: 10
maximum-pool-size: 100 maximum-pool-size: 100
validationQuery: SELECT 1 validationQuery: SELECT 1
...@@ -132,16 +132,17 @@ spring: ...@@ -132,16 +132,17 @@ spring:
oauth2-client: oauth2-client:
clientId: xdf-client clientId: xdf-client
clientSecret: xdf-secret clientSecret: xdf-secret
accessTokenUri: http://cdb.bytebot.sso:8080/oauth/token accessTokenUri: http://192.168.27.96:8080/oauth/token
userAuthorizationUri: http://cdb.bytebot.sso:8080/oauth/authorize userAuthorizationUri: http://192.168.27.96:8080/oauth/authorize
oauth2-resource: oauth2-resource:
userInfoUri: http://cdb.bytebot.sso:8080/oauth/userinfo userInfoUri: http://192.168.27.96:8080/oauth/userinfo
logoutUri: http://cdb.bytebot.sso:8080/oauth/userlogout logoutUri: http://192.168.27.96:8080/oauth/userlogout
jpa: jpa:
open-in-view: false open-in-view: false
properties.hibernate: properties.hibernate:
dialect: org.hibernate.dialect.PostgreSQL9Dialect dialect: org.hibernate.dialect.MySQL5Dialect
format_sql: false format_sql: false
hbm2ddl.auto: none hbm2ddl.auto: none
jdbc: jdbc:
...@@ -149,17 +150,17 @@ spring: ...@@ -149,17 +150,17 @@ spring:
non_contextual_creation: true non_contextual_creation: true
show-sql: true show-sql: true
#session.store-type: jdbc #session.store-type: jdbc
activemq.broker-url: tcp://localhost:61616 activemq.broker-url: tcp://192.168.27.96:61616
batch: batch:
tenants: tenants:
- -
id: T186A1 id: T186A1
datasource: datasource:
jdbc-driver: org.postgresql.Driver jdbc-driver: com.mysql.cj.jdbc.Driver
username: postgres username: root
password: ByNV8alhJURethztAMOc password: byte2k20
jdbc-url: jdbc:postgresql://bytebothdi.crvfvdkyambz.us-east-1.rds.amazonaws.com:5432/bytebot_hdi_db_core jdbc-url: jdbc:mysql://192.168.27.96:3306/BYTEBOT_T186A1?useSSL=false
query: 'select * from events WHERE id > %d order by id asc' query: 'select * from events WHERE id > %d order by id asc'
logging.level.root: INFO logging.level.root: INFO
...@@ -182,4 +183,4 @@ logging.level.com.ulisesbocchio.jasyptspringboot: ERROR ...@@ -182,4 +183,4 @@ logging.level.com.ulisesbocchio.jasyptspringboot: ERROR
#logging.level.org.hibernate.type: TRACE #logging.level.org.hibernate.type: TRACE
#logging.level.net.sf.hibernate.type: TRACE #logging.level.net.sf.hibernate.type: TRACE
jasypt.encryptor.password: 179CD78D24F9BC63D6E677272D1A7 jasypt.encryptor.password: 179CD78D24F9BC63D6E677272D1A7
\ No newline at end of file
database-type-xdf=postgres database-type-xdf=mysql
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment