completed group batch feature
This commit is contained in:
@@ -22,9 +22,17 @@ public class RecipientController {
|
||||
|
||||
private final RecipientService recipientService;
|
||||
|
||||
@GetMapping
|
||||
public ResponseEntity<List<Recipient>> getAllRecipients() {
|
||||
return ResponseEntity.ok(recipientService.getAllRecipients());
|
||||
@GetMapping("/search")
|
||||
public ResponseEntity<List<Recipient>> searchRecipients(
|
||||
@And({
|
||||
@Spec(path = "name", spec = Equal.class),
|
||||
@Spec(path = "email", spec = Equal.class),
|
||||
@Spec(path = "phoneNumber", spec = Equal.class),
|
||||
@Spec(path = "account", spec = Equal.class),
|
||||
@Spec(path = "latestProviderLabel", spec = Equal.class),
|
||||
@Spec(path = "userId", defaultVal = "null", spec = Equal.class)
|
||||
}) Specification<Recipient> specification) {
|
||||
return ResponseEntity.ok(recipientService.searchRecipients(specification));
|
||||
}
|
||||
|
||||
@GetMapping("/{account}/user/{userId}")
|
||||
@@ -57,17 +65,4 @@ public class RecipientController {
|
||||
}
|
||||
return ResponseEntity.notFound().build();
|
||||
}
|
||||
|
||||
@GetMapping("/search")
|
||||
public ResponseEntity<List<Recipient>> searchRecipients(
|
||||
@And({
|
||||
@Spec(path = "name", spec = Equal.class),
|
||||
@Spec(path = "email", spec = Equal.class),
|
||||
@Spec(path = "phoneNumber", spec = Equal.class),
|
||||
@Spec(path = "account", spec = Equal.class),
|
||||
@Spec(path = "latestProviderLabel", spec = Equal.class),
|
||||
@Spec(path = "userId", spec = Equal.class)
|
||||
}) Specification<Recipient> specification) {
|
||||
return ResponseEntity.ok(recipientService.searchRecipients(specification));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user