Gitlab - Argos ALM by PALO IT
Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
poc-measure-internal-rest
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Eder Yair Ramon Martinez
poc-measure-internal-rest
Commits
09360a7a
Commit
09360a7a
authored
Jul 27, 2023
by
Eder Yair Ramon Martinez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
get mapping change
parent
4f9855a6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
src/main/java/com/br/cardif/pocmeasureinternalrest/in/controller/MeasureController.java
...cmeasureinternalrest/in/controller/MeasureController.java
+3
-3
src/main/java/com/br/cardif/pocmeasureinternalrest/in/controller/service/MeasureService.java
...ureinternalrest/in/controller/service/MeasureService.java
+2
-2
src/main/java/com/br/cardif/pocmeasureinternalrest/out/mongo/adapter/MeasureMongoAdapter.java
...reinternalrest/out/mongo/adapter/MeasureMongoAdapter.java
+2
-2
No files found.
src/main/java/com/br/cardif/pocmeasureinternalrest/in/controller/MeasureController.java
View file @
09360a7a
...
@@ -41,10 +41,10 @@ public class MeasureController {
...
@@ -41,10 +41,10 @@ public class MeasureController {
@GetMapping
(
"/{
i
d}"
)
@GetMapping
(
"/{
deviceI
d}"
)
public
MeasureResponse
findById
(
@PathVariable
String
i
d
)
{
public
MeasureResponse
findById
(
@PathVariable
String
deviceI
d
)
{
MeasureDTO
resultDTO
=
service
.
getMeasure
(
i
d
);
MeasureDTO
resultDTO
=
service
.
getMeasure
(
deviceI
d
);
log
.
info
(
"Result Get DTO : [{}]"
,
resultDTO
);
log
.
info
(
"Result Get DTO : [{}]"
,
resultDTO
);
...
...
src/main/java/com/br/cardif/pocmeasureinternalrest/in/controller/service/MeasureService.java
View file @
09360a7a
...
@@ -22,8 +22,8 @@ public class MeasureService {
...
@@ -22,8 +22,8 @@ public class MeasureService {
return
mapper
.
dtoFromDocument
(
documentResult
);
return
mapper
.
dtoFromDocument
(
documentResult
);
}
}
public
MeasureDTO
getMeasure
(
String
i
d
){
public
MeasureDTO
getMeasure
(
String
deviceI
d
){
MeasureDocument
document
=
measureMongoAdapter
.
findById
(
i
d
);
MeasureDocument
document
=
measureMongoAdapter
.
findById
(
deviceI
d
);
return
mapper
.
dtoFromDocument
(
document
);
return
mapper
.
dtoFromDocument
(
document
);
}
}
}
}
src/main/java/com/br/cardif/pocmeasureinternalrest/out/mongo/adapter/MeasureMongoAdapter.java
View file @
09360a7a
...
@@ -19,8 +19,8 @@ public class MeasureMongoAdapter {
...
@@ -19,8 +19,8 @@ public class MeasureMongoAdapter {
return
repository
.
save
(
measure
);
return
repository
.
save
(
measure
);
}
}
public
MeasureDocument
findById
(
String
i
d
)
{
public
MeasureDocument
findById
(
String
deviceI
d
)
{
return
repository
.
findById
(
i
d
).
orElseThrow
(()
->
new
HttpClientErrorException
(
HttpStatus
.
NOT_FOUND
));
return
repository
.
findById
(
deviceI
d
).
orElseThrow
(()
->
new
HttpClientErrorException
(
HttpStatus
.
NOT_FOUND
));
}
}
...
...
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