Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
Student-Marks-Microservice
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
Vishal Vaddadhi
Student-Marks-Microservice
Commits
7b88c4f1
Commit
7b88c4f1
authored
Apr 02, 2021
by
Shanelle Valencia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Work on update
parent
bf9b8aae
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
5 deletions
+17
-5
StudentMarksController.java
...vices/MarksService/controller/StudentMarksController.java
+14
-0
StudentService.java
.../StudentServices/MarksService/service/StudentService.java
+3
-5
No files found.
src/main/java/com/StudentServices/MarksService/controller/StudentMarksController.java
View file @
7b88c4f1
package
com
.
StudentServices
.
MarksService
.
controller
;
import
com.StudentServices.MarksService.model.StudentMarks
;
import
com.StudentServices.MarksService.service.StudentService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.context.config.ConfigDataResourceNotFoundException
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -82,6 +84,18 @@ public class StudentMarksController {
@GetMapping
(
"/studentmarks/{id}"
)
public
ResponseEntity
<
StudentMarks
>
getEmployeeById
(
@PathVariable
(
value
=
"emailAddress"
)
String
emailAddressId
)
throws
ResourceNotFoundException
{
StudentMarks
studentMarks
=
studentService
.
.
orElseThrow
(()
->
new
ResourceNotFoundException
(
"Employee by Id Not Found"
+
employeeId
));
return
ResponseEntity
.
ok
().
body
(
employee
);
}
@PutMapping
(
"/studentmarks/update/{id}"
)
public
ResponseEntity
<
StudentMarks
>
updateStudentMarks
(
@PathVariable
=
"emailAddress"
)
String
emailAddressId
)
throws
ConfigDataResourceNotFoundException
{
StudentMarks
studentMarks
=
studentService
.
}
...
...
src/main/java/com/StudentServices/MarksService/service/StudentService.java
View file @
7b88c4f1
...
...
@@ -25,12 +25,10 @@ public class StudentService {
public
void
addStudent
(
StudentMarks
studentMarks
)
{
}
public
StudentMarks
getStudentById
(
String
ID
)
{
return
null
;
}
public
void
updateStudent
(
StudentMarks
studentMarks
)
{
public
void
updateStudent
(
StudentMarks
studentMarks
,
StudentMarks
studentMarksDetails
)
{
studentMarks
.
setMarks
(
studentMarksDetails
.
getMarks
());
studentRepository
.
save
(
studentMarks
);
}
public
void
deleteStudent
(
StudentMarks
StudentMarks
)
{
...
...
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