Authored by Lixiaodi

商品批量导入

... ... @@ -878,46 +878,47 @@ public static void main(String[] args) {
item.setStorageId(s.getId());
}
Boolean userResp = null;
// 检查用户身份
try {
LOGGER.info("get user account info");
SellerReq req = new SellerReq();
req.setUid(uid);
Boolean userResp = serviceCaller.call("ufo-gateway.isNormalSuper", req, Boolean.class, 10);
userResp = serviceCaller.call("ufo-gateway.isNormalSuper", req, Boolean.class, 10);
LOGGER.info("get user account info result is {}", userResp);
if (userResp == null || !userResp) {
throw new PlatformException("uid:" + uid + "账号不是超级卖家或者余额不足!", 400);
}
} catch (Exception e) {
LOGGER.error("get user account info error", e);
throw new PlatformException("uid:" + uid + "账号信息获取出错!", 400);
}
if (userResp == null || !userResp) {
throw new PlatformException("uid:" + uid + "账号不是超级卖家或者余额不足!", 400);
}
// 获取地址信息
AddressInfo address = null;
try {
LOGGER.info("get user address info");
address = userProxyService.getAddressInfoNotHidden(uid);
if (address == null) {
throw new PlatformException("uid:" + uid + "获取地址信息出错!", 400);
}
} catch (Exception e) {
LOGGER.error("get user address info error", e);
throw new PlatformException("uid:" + uid + "获取地址信息出错!", 400);
}
if (address == null) {
throw new PlatformException("uid:" + uid + "获取地址信息出错!", 400);
}
AddressInfo addressHidden = null;
try {
LOGGER.info("get user hidden address info");
addressHidden = userProxyService.getHiddenAddressInfo(uid);
if (addressHidden == null) {
throw new PlatformException("uid:" + uid + "获取加密地址信息出错!", 400);
}
} catch (Exception e) {
LOGGER.error("get user hidden address info error", e);
throw new PlatformException("uid:" + uid + "获取加密地址信息出错!", 400);
}
if (addressHidden == null) {
throw new PlatformException("uid:" + uid + "获取加密地址信息出错!", 400);
}
LOGGER.info("增加事务记录");
ProductImportTran tran = new ProductImportTran();
... ...