Authored by Lixiaodi

香港价格

@@ -1185,13 +1185,17 @@ public class ProductServiceImpl implements IProductService, ApplicationContextAw @@ -1185,13 +1185,17 @@ public class ProductServiceImpl implements IProductService, ApplicationContextAw
1185 batchReq.setProductList(batchBo); 1185 batchReq.setProductList(batchBo);
1186 batchReq.setTaskId(tran.getId()); 1186 batchReq.setTaskId(tran.getId());
1187 batchBo.forEach(b -> b.setTranId(tran.getId())); 1187 batchBo.forEach(b -> b.setTranId(tran.getId()));
1188 - 1188 + ApiResponse response = null;
1189 try { 1189 try {
1190 LOGGER.info("batch import send taskId={}, batchId={}", tran.getId(), (i + 1)); 1190 LOGGER.info("batch import send taskId={}, batchId={}", tran.getId(), (i + 1));
1191 - serviceCaller.call("ufo-gateway.batchImportPrds", batchReq, Void.class, 10); 1191 + response = serviceCaller.call("ufo-gateway.batchImportPrds", batchReq, ApiResponse.class, 10);
1192 LOGGER.info("batch import send success taskId={}, batchId={}", tran.getId(), (i + 1)); 1192 LOGGER.info("batch import send success taskId={}, batchId={}", tran.getId(), (i + 1));
1193 } catch (Exception e) { 1193 } catch (Exception e) {
1194 - LOGGER.info("batch import send failed taskId={}, batchId={}", tran.getId(), (i + 1)); 1194 + LOGGER.info("batch import send failed taskId={}, batchId={}, err={}", tran.getId(), (i + 1), e);
  1195 + }
  1196 + if (response != null && response.getCode() != 200) {
  1197 + LOGGER.info("batch import send failed broke taskId={}, batchId={}, resp={}", tran.getId(), (i + 1), response);
  1198 + throw new PlatformException("导入出错:" + response.getMessage(), response.getCode());
1195 } 1199 }
1196 } 1200 }
1197 LOGGER.info("batch import over taskId={}", tran.getId()); 1201 LOGGER.info("batch import over taskId={}", tran.getId());