Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
ejercicio2-framework-back
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Josue
ejercicio2-framework-back
Commits
10409a76
Commit
10409a76
authored
Aug 26, 2021
by
Aaron Gutierrez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Corecciones bytebot
parent
eee2dbe6
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
26 deletions
+39
-26
BotSessionJDCBRepository.java
...ava/com/bytesw/bytebot/jdbc/BotSessionJDCBRepository.java
+1
-1
MessageJDBCRepository.java
...n/java/com/bytesw/bytebot/jdbc/MessageJDBCRepository.java
+7
-1
OperativeDashboardService.java
.../bytebot/service/dashboard/OperativeDashboardService.java
+7
-1
application.yml
src/main/resources/application.yml
+23
-22
mybatis.properties
src/main/resources/mybatis.properties
+1
-1
No files found.
src/main/java/com/bytesw/bytebot/jdbc/BotSessionJDCBRepository.java
View file @
10409a76
...
@@ -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
{
...
...
src/main/java/com/bytesw/bytebot/jdbc/MessageJDBCRepository.java
View file @
10409a76
...
@@ -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
();
}
}
...
...
src/main/java/com/bytesw/bytebot/service/dashboard/OperativeDashboardService.java
View file @
10409a76
...
@@ -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
);
...
...
src/main/resources/application.yml
View file @
10409a76
...
@@ -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/BYTE
BOT/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_t186a
1?useSSL=false
url
:
jdbc:
mysql://192.168.27.96:3306/BYTEBOT_T186A
1?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.
PostgreSQL9
Dialect
dialect
:
org.hibernate.dialect.
MySQL5
Dialect
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_cor
e
jdbc-url
:
jdbc:
mysql://192.168.27.96:3306/BYTEBOT_T186A1?useSSL=fals
e
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
src/main/resources/mybatis.properties
View file @
10409a76
database-type-xdf
=
postgres
database-type-xdf
=
mysql
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment