修改
This commit is contained in:
@@ -64,7 +64,12 @@ public class OrderMasterDataGuard {
|
||||
}
|
||||
}
|
||||
private PartnerClient.Partner loadPartner(long tenantId,long id) {
|
||||
var response=partners.active(token,tenantId,id);
|
||||
ApiResponse<PartnerClient.Partner> response;
|
||||
try {
|
||||
response=partners.active(token,tenantId,id);
|
||||
} catch (FeignException.NotFound exception) {
|
||||
throw new BizException(ResultCode.NOT_FOUND,"\u672a\u7ed1\u5b9a\u53ef\u7528\u5f80\u6765\u5ba2\u6237");
|
||||
}
|
||||
requireSuccessful(response,"往来单位");
|
||||
if (response.data()==null) throw unavailable("往来单位");
|
||||
var value=response.data();
|
||||
@@ -78,7 +83,12 @@ public class OrderMasterDataGuard {
|
||||
return value;
|
||||
}
|
||||
private WarehouseClient.Detail loadWarehouse(long tenantId,long id,String name) {
|
||||
var response=warehouses.active(token,tenantId,id);
|
||||
ApiResponse<WarehouseClient.Detail> response;
|
||||
try {
|
||||
response=warehouses.active(token,tenantId,id);
|
||||
} catch (FeignException.NotFound exception) {
|
||||
throw new BizException(ResultCode.NOT_FOUND,"\u6536\u8d27\u4ed3\u5e93\u4e0d\u5b58\u5728\u6216\u5df2\u505c\u7528");
|
||||
}
|
||||
requireSuccessful(response,name);
|
||||
if (response.data()==null || response.data().warehouse()==null) throw unavailable(name);
|
||||
var value=response.data();
|
||||
|
||||
Reference in New Issue
Block a user