Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
21_22-J 39 - backend service-plant-threat-identifier
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
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
Imalka L.A.
21_22-J 39 - backend service-plant-threat-identifier
Commits
ecc06cce
Commit
ecc06cce
authored
May 05, 2022
by
Imalka L.A.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add disease desc for response
parent
7dc6fa7b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
3 deletions
+12
-3
src/main/java/com/ceyloneagro/ceyloneagrobackendservice/dto/response/SolutionsResponse.java
...oneagrobackendservice/dto/response/SolutionsResponse.java
+4
-1
src/main/java/com/ceyloneagro/ceyloneagrobackendservice/repository/domain/SolutionList.java
...oneagrobackendservice/repository/domain/SolutionList.java
+4
-1
src/main/java/com/ceyloneagro/ceyloneagrobackendservice/service/impl/SolutionServiceImpl.java
...eagrobackendservice/service/impl/SolutionServiceImpl.java
+4
-1
No files found.
src/main/java/com/ceyloneagro/ceyloneagrobackendservice/dto/response/SolutionsResponse.java
View file @
ecc06cce
...
@@ -10,6 +10,9 @@ public class SolutionsResponse<T> {
...
@@ -10,6 +10,9 @@ public class SolutionsResponse<T> {
@JsonProperty
(
"disease"
)
@JsonProperty
(
"disease"
)
private
String
disease
;
private
String
disease
;
@JsonProperty
(
"diseaseDescription"
)
private
String
diseaseDescription
;
@JsonProperty
(
"solution"
)
@JsonProperty
(
"solution"
)
private
T
solution
;
private
T
solution
;
...
...
src/main/java/com/ceyloneagro/ceyloneagrobackendservice/repository/domain/SolutionList.java
View file @
ecc06cce
...
@@ -27,10 +27,13 @@ import javax.persistence.*;
...
@@ -27,10 +27,13 @@ import javax.persistence.*;
@Column
(
name
=
"disease_name"
,
length
=
100
,
nullable
=
false
,
updatable
=
true
)
@Column
(
name
=
"disease_name"
,
length
=
100
,
nullable
=
false
,
updatable
=
true
)
private
String
diseaseName
;
private
String
diseaseName
;
@Column
(
name
=
"disease_description"
,
length
=
1000
,
nullable
=
false
,
updatable
=
true
)
private
String
diseaseDescription
;
@Column
(
name
=
"solution"
,
length
=
100
,
nullable
=
false
,
unique
=
true
,
updatable
=
true
)
@Column
(
name
=
"solution"
,
length
=
100
,
nullable
=
false
,
unique
=
true
,
updatable
=
true
)
private
String
solution
;
private
String
solution
;
@Column
(
name
=
"solution_description"
,
length
=
100
,
nullable
=
false
,
unique
=
true
,
updatable
=
true
)
@Column
(
name
=
"solution_description"
,
length
=
100
0
,
nullable
=
false
,
unique
=
true
,
updatable
=
true
)
private
String
solutionDescription
;
private
String
solutionDescription
;
@Column
(
name
=
"solution_type"
,
length
=
100
,
nullable
=
false
,
updatable
=
true
)
@Column
(
name
=
"solution_type"
,
length
=
100
,
nullable
=
false
,
updatable
=
true
)
...
...
src/main/java/com/ceyloneagro/ceyloneagrobackendservice/service/impl/SolutionServiceImpl.java
View file @
ecc06cce
...
@@ -30,6 +30,7 @@ public class SolutionServiceImpl implements SolutionService {
...
@@ -30,6 +30,7 @@ public class SolutionServiceImpl implements SolutionService {
List
<
SolutionResponse
>
solutionResponse
=
new
ArrayList
<>();
List
<
SolutionResponse
>
solutionResponse
=
new
ArrayList
<>();
SolutionsResponse
returnValue
=
new
SolutionsResponse
();
SolutionsResponse
returnValue
=
new
SolutionsResponse
();
String
diseaseDescription
=
null
;
if
(
page
>
0
)
if
(
page
>
0
)
page
=
page
-
1
;
page
=
page
-
1
;
...
@@ -41,9 +42,11 @@ public class SolutionServiceImpl implements SolutionService {
...
@@ -41,9 +42,11 @@ public class SolutionServiceImpl implements SolutionService {
for
(
SolutionList
entity
:
resource
)
{
for
(
SolutionList
entity
:
resource
)
{
solutionResponse
.
add
(
mapper
.
map
(
entity
,
SolutionResponse
.
class
));
solutionResponse
.
add
(
mapper
.
map
(
entity
,
SolutionResponse
.
class
));
returnValue
.
setDisease
(
entity
.
getDiseaseName
());
returnValue
.
setDiseaseDescription
(
entity
.
getDiseaseDescription
());
}
}
returnValue
.
setDisease
(
disease
);
returnValue
.
setSolution
(
solutionResponse
);
returnValue
.
setSolution
(
solutionResponse
);
returnValue
.
setCurrentPage
(
resourcePage
.
getNumber
()
+
1
);
returnValue
.
setCurrentPage
(
resourcePage
.
getNumber
()
+
1
);
returnValue
.
setTotalItems
(
resourcePage
.
getTotalElements
());
returnValue
.
setTotalItems
(
resourcePage
.
getTotalElements
());
...
...
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