同步接口修改抛出异常
This commit is contained in:
parent
4fe1eb411b
commit
d1408e39d9
|
@ -79,7 +79,9 @@ public class LegEventHandler implements LegEventService{
|
|||
));
|
||||
//保存routeOrder的状态
|
||||
routeRepository.save(routeOrder);
|
||||
syncAdapter.of(supplierName).syncSupplierOrder(routeOrder.reloadStatus());
|
||||
if (!syncAdapter.of(supplierName).syncSupplierOrder(routeOrder.reloadStatus())) {
|
||||
throw new CommandException("订单提交失败");
|
||||
}
|
||||
} else {
|
||||
throw new CommandException("订单未提交审批");
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ public class CTripOrderSyncAdapter implements SupplierOrderSync {
|
|||
private OrderDomainService orderDomainService;
|
||||
|
||||
@Override
|
||||
public void syncSupplierOrder(RouteOrder order) {
|
||||
public boolean syncSupplierOrder(RouteOrder order) {
|
||||
System.out.println("开始同步协程订单");
|
||||
User currentUser = BaseContext.getCurrentUser();
|
||||
ApproveOrderNo approveOrderNo = order.getApproveOrderNo();
|
||||
|
@ -63,5 +63,6 @@ public class CTripOrderSyncAdapter implements SupplierOrderSync {
|
|||
ApprovalRequest approvalRequestParam = ApprovalRequest.buildApproval(String.valueOf(currentUser.getEmployeeNo()), approveOrderNo.getActualOrderNo(), rankInfo)
|
||||
.withHotel(hotelList);
|
||||
approvalRequest.approval(approvalRequestParam);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ public class LYOrderSyncAdapter implements SupplierOrderSync {
|
|||
private LocationRepository locationRepository;
|
||||
|
||||
@Override
|
||||
public void syncSupplierOrder(RouteOrder order) {
|
||||
public boolean syncSupplierOrder(RouteOrder order) {
|
||||
String supplierOrderSyncUrl = Constant.L_Y_BASE_URL + Constant.L_Y_ORDER_PATH;//请求地址
|
||||
//1.设置订单参数
|
||||
SupplierOrderParam param = new SupplierOrderParam();//参数
|
||||
|
|
|
@ -5,5 +5,5 @@ import com.chint.domain.aggregates.order.RouteOrder;
|
|||
import com.chint.domain.factoriy.order.RouteOrderFactory;
|
||||
|
||||
public interface SupplierOrderSync {
|
||||
void syncSupplierOrder(RouteOrder order);
|
||||
boolean syncSupplierOrder(RouteOrder order);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue