-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProblemController.java
More file actions
49 lines (33 loc) · 1.61 KB
/
Copy pathProblemController.java
File metadata and controls
49 lines (33 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package com.test.GraphImpl.Controller;
import java.util.List;
import java.util.logging.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import com.test.GraphImpl.Service.ProblemService;
import com.test.GraphImpl.bean.Graph;
import com.test.GraphImpl.bean.Vertex;
@RestController
public class ProblemController {
private static final Logger LOGGER =Logger.getLogger(ProblemController.class.getName());
@Autowired
private ProblemService problemService;
@PostMapping(value = "/inventorFundsHold")
public ResponseEntity<?> addingInventorFundsHold(@RequestBody Graph bean, HttpHeaders headers) throws Exception{
LOGGER.info("addingInventorFundsHold has called");
Graph response = problemService.addingInventorFundsHold(bean, headers);
return new ResponseEntity<>(response,HttpStatus.OK);
}
@GetMapping(value = "/inventorFundsHold")
public ResponseEntity<?> getInventorFundsHold(@PathVariable String investor)throws Exception{
LOGGER.info("getInventorFundsHold has called");
Vertex vertex = problemService.getInventorFundsHold(investor);
return new ResponseEntity<>(vertex,HttpStatus.OK);
}
}