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
142501b7
Commit
142501b7
authored
Dec 14, 2021
by
Roberto Loayza Miljanovich
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_marcos' into 'developer'
Dev marcos See merge request ByteBot/web/bytebot-service!15
parents
a78ad984
1b9ba02e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
7 deletions
+6
-7
AgentBean.java
src/main/java/com/bytesw/bytebot/bean/AgentBean.java
+3
-0
AgentController.java
...n/java/com/bytesw/bytebot/controller/AgentController.java
+0
-3
Agent.java
src/main/java/com/bytesw/bytebot/model/Agent.java
+1
-3
AgentRepository.java
...n/java/com/bytesw/bytebot/repository/AgentRepository.java
+0
-1
AgentService.java
src/main/java/com/bytesw/bytebot/service/AgentService.java
+2
-0
No files found.
src/main/java/com/bytesw/bytebot/bean/AgentBean.java
View file @
142501b7
...
...
@@ -56,6 +56,9 @@ public class AgentBean {
@Expose
private
String
type
;
@Expose
private
int
period
;
@Expose
private
List
<
DeploymentChannelBean
>
deploymentChannels
;
...
...
src/main/java/com/bytesw/bytebot/controller/AgentController.java
View file @
142501b7
package
com
.
bytesw
.
bytebot
.
controller
;
import
com.bytesw.bytebot.bean.AgentBean
;
import
com.bytesw.bytebot.controller.bean.ResponseController
;
import
com.bytesw.bytebot.http.FileValidationResponse
;
...
...
@@ -24,8 +23,6 @@ import org.springframework.security.access.prepost.PreAuthorize;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletRequest
;
@Log4j2
@RestController
@RequestMapping
(
"/service/agent"
)
...
...
src/main/java/com/bytesw/bytebot/model/Agent.java
View file @
142501b7
...
...
@@ -3,11 +3,9 @@ package com.bytesw.bytebot.model;
import
com.bytesw.bytebot.model.converters.AgentStatusConverter
;
import
com.bytesw.bytebot.model.converters.AgentTypeConverter
;
import
com.bytesw.bytebot.model.converters.LanguageConverter
;
import
com.bytesw.bytebot.model.converters.StatusConverter
;
import
com.bytesw.bytebot.model.enums.AgentStatusEnum
;
import
com.bytesw.bytebot.model.enums.AgentTypeEnum
;
import
com.bytesw.bytebot.model.enums.LanguageEnum
;
import
com.bytesw.bytebot.model.enums.StatusEnum
;
import
lombok.*
;
import
org.hibernate.annotations.Type
;
...
...
@@ -45,7 +43,7 @@ public class Agent implements Serializable {
private
String
timezone
;
@Column
(
name
=
"agen_delete_sensible_period"
)
private
String
period
;
private
int
period
;
@Lob
@Type
(
type
=
"org.hibernate.type.TextType"
)
...
...
src/main/java/com/bytesw/bytebot/repository/AgentRepository.java
View file @
142501b7
...
...
@@ -2,7 +2,6 @@ package com.bytesw.bytebot.repository;
import
com.bytesw.bytebot.model.Agent
;
import
com.bytesw.bytebot.model.enums.AgentStatusEnum
;
import
com.bytesw.bytebot.bean.AgentBean
;
import
org.springframework.data.jpa.repository.JpaSpecificationExecutor
;
import
org.springframework.data.repository.CrudRepository
;
...
...
src/main/java/com/bytesw/bytebot/service/AgentService.java
View file @
142501b7
...
...
@@ -142,6 +142,7 @@ public class AgentService extends CustomPaginationService<Agent> {
agentBD
.
setVersion
(
agent
.
getVersion
());
agentBD
.
setType
(
AgentTypeEnum
.
fromString
(
agent
.
getType
()));
agentBD
.
setAvatar
(
agent
.
getAvatar
());
agentBD
.
setPeriod
(
agent
.
getPeriod
());
if
(
agent
.
getCountryId
()
!=
null
)
{
Optional
<
Country
>
countryFound
=
countryRepository
.
findById
(
agent
.
getCountryId
());
...
...
@@ -360,6 +361,7 @@ public class AgentService extends CustomPaginationService<Agent> {
bean
.
setType
(
agent
.
getType
().
getName
());
bean
.
setStatus
(
agent
.
getStatus
().
getName
());
bean
.
setAvatar
(
agent
.
getAvatar
());
bean
.
setPeriod
(
agent
.
getPeriod
());
if
(
agent
.
getCountry
()
!=
null
)
{
bean
.
setCountryName
(
agent
.
getCountry
().
getName
());
...
...
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