...
|
...
|
@@ -13,6 +13,8 @@ import java.util.Map; |
|
|
import java.util.Set;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.yohobuy.ufo.model.order.bo.SellerBo;
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.apache.commons.collections.map.HashedMap;
|
...
|
...
|
@@ -53,7 +55,6 @@ import com.yoho.ufo.dal.model.ProductLimitSale; |
|
|
import com.yoho.ufo.dal.model.ProductSales;
|
|
|
import com.yoho.ufo.dal.model.Storage;
|
|
|
import com.yoho.ufo.dal.model.StoragePrice;
|
|
|
import com.yoho.ufo.event.model.StorageNumEvent;
|
|
|
import com.yoho.ufo.exception.CommonException;
|
|
|
import com.yoho.ufo.exception.PlatformException;
|
|
|
import com.yoho.ufo.model.brand.Brand;
|
...
|
...
|
@@ -62,7 +63,6 @@ import com.yoho.ufo.model.commoditybasicrole.category.ProductSort; |
|
|
import com.yoho.ufo.model.commoditybasicrole.color.ProductColor;
|
|
|
import com.yoho.ufo.model.commoditybasicrole.size.Size;
|
|
|
import com.yoho.ufo.service.IProductService;
|
|
|
import com.yoho.ufo.service.UserProxyService;
|
|
|
import com.yoho.ufo.util.CollectionUtil;
|
|
|
import com.yoho.ufo.util.DateUtil;
|
|
|
import com.yoho.ufo.util.ImagesConstant;
|
...
|
...
|
@@ -930,7 +930,7 @@ public class ProductServiceImpl implements IProductService, ApplicationContextAw |
|
|
}
|
|
|
return new ApiResponse<>(200, "查询成功", item);
|
|
|
}
|
|
|
|
|
|
private static final int HK_AREA_CODE = 852;
|
|
|
@Override
|
|
|
public ApiResponse<Integer> batchImportFromXls(MultipartFile file, Integer editUid) throws Exception {
|
|
|
LOGGER.info("用户{}开始导入商品数据!", editUid);
|
...
|
...
|
@@ -1127,8 +1127,11 @@ public class ProductServiceImpl implements IProductService, ApplicationContextAw |
|
|
AddressInfo addressHidden = null;
|
|
|
if(userResp.isLargeSettlementSuper()) {
|
|
|
address = new AddressInfo();
|
|
|
String areaCode = String.valueOf(HK_AREA_CODE);
|
|
|
address.setAreaCode(areaCode);
|
|
|
address.setAddress("香港客户地址");
|
|
|
addressHidden = new AddressInfo();
|
|
|
addressHidden.setAreaCode(areaCode);
|
|
|
addressHidden.setAddress("香港客户地址");
|
|
|
} else {
|
|
|
try {
|
...
|
...
|
@@ -1188,13 +1191,16 @@ public class ProductServiceImpl implements IProductService, ApplicationContextAw |
|
|
ApiResponse response = null;
|
|
|
try {
|
|
|
LOGGER.info("batch import send taskId={}, batchId={}", tran.getId(), (i + 1));
|
|
|
response = serviceCaller.call("ufo-gateway.batchImportPrds", batchReq, ApiResponse.class, 10);
|
|
|
LOGGER.info("batch import send success taskId={}, batchId={}", tran.getId(), (i + 1));
|
|
|
JSONObject res = serviceCaller.call("ufo-gateway.batchImportPrds", batchReq, JSONObject.class, 10);
|
|
|
LOGGER.info("batch import send success taskId={}, batchId={}, resp={}", tran.getId(), (i + 1), res);
|
|
|
if (res != null) {
|
|
|
response = res.toJavaObject(ApiResponse.class);
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
LOGGER.info("batch import send failed taskId={}, batchId={}, err={}", tran.getId(), (i + 1), e);
|
|
|
}
|
|
|
if (response != null && response.getCode() != 200) {
|
|
|
LOGGER.info("batch import send failed broke taskId={}, batchId={}, resp={}", tran.getId(), (i + 1), response);
|
|
|
LOGGER.info("batch import send failed broke taskId={}, batchId={}, respObj={}", tran.getId(), (i + 1), JSON.toJSONString(response));
|
|
|
throw new PlatformException("导入出错:" + response.getMessage(), response.getCode());
|
|
|
}
|
|
|
}
|
...
|
...
|
|