贴标申请,仓储转运
This commit is contained in:
+5
-2
@@ -15,9 +15,12 @@ public class FleetCustomerDirectory {
|
||||
this.client = client; this.token = token;
|
||||
}
|
||||
public List<Customer> options(String keyword) { return load(keyword, null); }
|
||||
public Customer required(long id) {
|
||||
var customer = load(null, id).stream().filter(row -> row.id().equals(Long.toString(id))).findFirst()
|
||||
public Customer find(String id) {
|
||||
return load(null, Long.parseLong(id)).stream().filter(row -> row.id().equals(id)).findFirst()
|
||||
.orElseThrow(() -> new ResponseStatusException(HttpStatus.BAD_REQUEST, "请选择有效客户"));
|
||||
}
|
||||
public Customer required(long id) {
|
||||
var customer = find(Long.toString(id));
|
||||
try {
|
||||
var result = client.eligibility(token, id);
|
||||
if (result == null || !result.successful() || result.data() == null) throw unavailable();
|
||||
|
||||
Reference in New Issue
Block a user