|
@@ -2,6 +2,7 @@ package com.kmall.admin.service.impl;
|
|
|
|
|
|
import com.google.common.collect.ImmutableBiMap;
|
|
|
import com.kmall.admin.dao.*;
|
|
|
+import com.kmall.admin.dto.GoodsDto;
|
|
|
import com.kmall.admin.entity.*;
|
|
|
import com.kmall.admin.service.GoodsService;
|
|
|
import com.kmall.api.contants.Dict;
|
|
@@ -14,10 +15,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
-import java.util.Date;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
+import java.util.*;
|
|
|
|
|
|
/**
|
|
|
* Service实现类
|
|
@@ -48,6 +46,16 @@ public class GoodsServiceImpl implements GoodsService {
|
|
|
private GoodsGroupDao goodsGroupDao;
|
|
|
@Autowired
|
|
|
private CategoryDao categoryDao;
|
|
|
+ @Autowired
|
|
|
+ private SupplierDao supplierDao;
|
|
|
+ @Autowired
|
|
|
+ private BrandDao brandDao;
|
|
|
+ @Autowired
|
|
|
+ private FreightDao freightDao;
|
|
|
+ @Autowired
|
|
|
+ private SysCusNationCodeDao sysCusNationCodeDao;
|
|
|
+ @Autowired
|
|
|
+ private SysCusUnitCodeDao sysCusUnitCodeDao;
|
|
|
|
|
|
@Override
|
|
|
public GoodsEntity queryObject(Integer id) {
|
|
@@ -91,16 +99,17 @@ public class GoodsServiceImpl implements GoodsService {
|
|
|
builder.put("attributeCategory", "商品分类");
|
|
|
builder.put("categoryId", "商品二级分类");
|
|
|
builder.put("goodsSn", "商品编码");
|
|
|
- builder.put("goodsBizType", "货品业务类型");
|
|
|
builder.put("name", "商品名称");
|
|
|
+ builder.put("goodsUnit", "商品单位");
|
|
|
+ builder.put("prodBarcode", "产品条码");
|
|
|
+ builder.put("goodsBizType", "货品业务类型");
|
|
|
builder.put("brandId", "品牌");
|
|
|
builder.put("supplierId", "供应商");
|
|
|
builder.put("freightId", "运费模版");
|
|
|
- builder.put("goodsDesc", "商品描述");
|
|
|
- builder.put("isOnSale", "上架");
|
|
|
- builder.put("goodsUnit", "商品单位");
|
|
|
builder.put("primaryPicUrl", "商品主图");
|
|
|
builder.put("listPicUrl", "商品列表图");
|
|
|
+ builder.put("goodsDesc", "商品描述");
|
|
|
+ builder.put("isOnSale", "上架");
|
|
|
builder.put("isHot", "热销");
|
|
|
|
|
|
R r = ValidatorUtil.isEmpty(builder.build(), valideDate);
|
|
@@ -112,7 +121,6 @@ public class GoodsServiceImpl implements GoodsService {
|
|
|
builder.put("sku", "SKU");
|
|
|
builder.put("goodsRate", "商品税率");
|
|
|
builder.put("retailPrice", "零售价");
|
|
|
- builder.put("prodBarcode", "产品编码");
|
|
|
builder.put("brand", "产品品牌");
|
|
|
builder.put("unitCode", "计量单位代码");
|
|
|
builder.put("cusGoodsCode", "海关商品编码");
|
|
@@ -132,6 +140,10 @@ public class GoodsServiceImpl implements GoodsService {
|
|
|
if (galleryEntityList == null || galleryEntityList.size() <= 0) {
|
|
|
throw new RRException("至少添加一张商品轮播图!");
|
|
|
}
|
|
|
+ GoodsEntity prodbarGoods = goodsDao.queryObjectByProdBarcode(goods.getProdBarcode(),"",null);
|
|
|
+ if(prodbarGoods != null){
|
|
|
+ throw new RRException("不能有重复的产品条码信息!");
|
|
|
+ }
|
|
|
|
|
|
SysUserEntity user = ShiroUtils.getUserEntity();
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
@@ -224,16 +236,17 @@ public class GoodsServiceImpl implements GoodsService {
|
|
|
builder.put("attributeCategory", "商品分类");
|
|
|
builder.put("categoryId", "商品二级分类");
|
|
|
builder.put("goodsSn", "商品编码");
|
|
|
- builder.put("goodsBizType", "货品业务类型");
|
|
|
builder.put("name", "商品名称");
|
|
|
+ builder.put("goodsUnit", "商品单位");
|
|
|
+ builder.put("prodBarcode", "产品条码");
|
|
|
+ builder.put("goodsBizType", "货品业务类型");
|
|
|
builder.put("brandId", "品牌");
|
|
|
builder.put("supplierId", "供应商");
|
|
|
builder.put("freightId", "运费模版");
|
|
|
- builder.put("goodsDesc", "商品描述");
|
|
|
- builder.put("isOnSale", "上架");
|
|
|
- builder.put("goodsUnit", "商品单位");
|
|
|
builder.put("primaryPicUrl", "商品主图");
|
|
|
builder.put("listPicUrl", "商品列表图");
|
|
|
+ builder.put("goodsDesc", "商品描述");
|
|
|
+ builder.put("isOnSale", "上架");
|
|
|
builder.put("isHot", "热销");
|
|
|
|
|
|
|
|
@@ -246,14 +259,13 @@ public class GoodsServiceImpl implements GoodsService {
|
|
|
builder.put("sku", "SKU");
|
|
|
builder.put("goodsRate", "商品税率");
|
|
|
builder.put("retailPrice", "零售价");
|
|
|
- builder.put("prodBarcode", "产品编码");
|
|
|
builder.put("brand", "产品品牌");
|
|
|
builder.put("unitCode", "计量单位代码");
|
|
|
builder.put("cusGoodsCode", "海关商品编码");
|
|
|
builder.put("ciqProdModel", "国检规格型号");
|
|
|
builder.put("oriCntCode", "原产国代码");
|
|
|
- builder.put("cusDeclEle", "海关申报要素");
|
|
|
builder.put("cusRecCode", "海关备案编号");
|
|
|
+ builder.put("cusDeclEle", "海关申报要素");
|
|
|
}
|
|
|
r = ValidatorUtil.isEmpty(builder.build(), valideDate);
|
|
|
if (Integer.valueOf(r.get("code").toString()) != 0) {
|
|
@@ -266,7 +278,10 @@ public class GoodsServiceImpl implements GoodsService {
|
|
|
if (galleryEntityList == null || galleryEntityList.size() <= 0) {
|
|
|
throw new RRException("至少保留一张商品轮播图!");
|
|
|
}
|
|
|
-
|
|
|
+ GoodsEntity prodbarGoods = goodsDao.queryObjectByProdBarcode(goods.getProdBarcode(),"",goods.getId());
|
|
|
+ if(prodbarGoods != null){
|
|
|
+ throw new RRException("不能有重复的产品条码信息!");
|
|
|
+ }
|
|
|
SysUserEntity user = ShiroUtils.getUserEntity();
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
map.put("isSame", "true");
|
|
@@ -476,6 +491,265 @@ public class GoodsServiceImpl implements GoodsService {
|
|
|
|
|
|
@Override
|
|
|
@Transactional
|
|
|
+ public int uploadExcel(List<GoodsDto> goodsEntityList) {
|
|
|
+ SysUserEntity user = ShiroUtils.getUserEntity();
|
|
|
+ boolean isSuccess = false;
|
|
|
+ List<String> failSameSkuList = new ArrayList<>(), failHotSkuList = new ArrayList<>(), failCateSkuList = new ArrayList<>(),
|
|
|
+ failBrandSkuList = new ArrayList<>(), failFreightSkuList = new ArrayList<>(), failSuppSkuList = new ArrayList<>(),
|
|
|
+ failUnitSkuList = new ArrayList<>(), failNationSkuList = new ArrayList<>(),failProdbarSkuList = new ArrayList<>(),
|
|
|
+ failCateL2SkuList = new ArrayList<>(), failTypeSkuList = new ArrayList<>();
|
|
|
+ List<String> failGoodsSnList = new ArrayList<>();
|
|
|
+ List<String> failGoodsTypeList = new ArrayList<>();
|
|
|
+ List<String> failFreightList = new ArrayList<>();
|
|
|
+ if (goodsEntityList != null && goodsEntityList.size() > 0) {
|
|
|
+ for (int i = 0; i < goodsEntityList.size(); i++) {
|
|
|
+ GoodsDto goodsDto = goodsEntityList.get(i);
|
|
|
+ GoodsEntity goodsEntity = new GoodsEntity();
|
|
|
+ Map<String, Object> valideDate = MapBeanUtil.fromObject(goodsDto);
|
|
|
+ ImmutableBiMap.Builder builder = new ImmutableBiMap.Builder();
|
|
|
+ builder.put("goodsSn", "商品编码");
|
|
|
+ builder.put("categoryName", "商品分类");
|
|
|
+ builder.put("goodsBizType", "货品业务类型");
|
|
|
+ builder.put("name", "商品名称");
|
|
|
+ builder.put("brandName", "商品品牌名称");
|
|
|
+ builder.put("defaultFreight", "运费");
|
|
|
+ builder.put("isOnSaleStr", "上架");
|
|
|
+ builder.put("goodsUnit", "商品单位");
|
|
|
+ builder.put("isHotStr", "热销");
|
|
|
+ builder.put("prodBarcode", "产品条码");
|
|
|
+ builder.put("marketPrice", "市场价");
|
|
|
+ builder.put("retailPrice", "零售价");
|
|
|
+ builder.put("supplierName", "供应商");
|
|
|
+ R r = ValidatorUtil.isEmpty(builder.build(), valideDate);
|
|
|
+ if (Integer.valueOf(r.get("code").toString()) != 0) {
|
|
|
+ throw new RRException(r.get("msg").toString());
|
|
|
+ } else {
|
|
|
+ if (!Dict.orderBizType.item_11.getItem().equals(goodsDto.getGoodsBizType())) {
|
|
|
+ // 海关信息,普通货物可不添加
|
|
|
+ builder.put("goodsRate", "商品税率");
|
|
|
+ builder.put("sku", "SKU");
|
|
|
+ builder.put("brand", "产品品牌");
|
|
|
+ builder.put("unitName", "计量单位");
|
|
|
+ builder.put("oriCntName", "原产国");
|
|
|
+ builder.put("cusGoodsCode", "海关商品编码");
|
|
|
+ builder.put("ciqProdModel", "国检规格型号");
|
|
|
+ builder.put("cusDeclEle", "海关申报要素");
|
|
|
+ builder.put("cusRecCode", "海关备案编号");
|
|
|
+ }
|
|
|
+ r = ValidatorUtil.isEmpty(builder.build(), valideDate);
|
|
|
+ if (Integer.valueOf(r.get("code").toString()) != 0) {
|
|
|
+ throw new RRException(r.get("msg").toString());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(!Dict.orderBizType.item_11.getItem().equalsIgnoreCase(goodsDto.getGoodsBizType())){
|
|
|
+ if(!(Dict.orderBizType.item_02.getItem().equalsIgnoreCase(goodsDto.getGoodsBizType())
|
|
|
+ || Dict.orderBizType.item_10.getItem().equalsIgnoreCase(goodsDto.getGoodsBizType())
|
|
|
+ || Dict.orderBizType.item_00.getItem().equalsIgnoreCase(goodsDto.getGoodsBizType()))){
|
|
|
+ isSuccess = true;
|
|
|
+ failTypeSkuList.add(goodsDto.getSku());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
+ map.put("isSame", "true");
|
|
|
+ map.put("sku", goodsDto.getSku());
|
|
|
+ map.put("goodsSn", goodsDto.getGoodsSn());
|
|
|
+ map.put("goodsBizType", goodsDto.getGoodsBizType());
|
|
|
+ List<GoodsEntity> list = querySame(map);
|
|
|
+ if (list != null && list.size() != 0) {
|
|
|
+ isSuccess = true;
|
|
|
+ if(goodsDto.getSku()!=null) {
|
|
|
+ failSameSkuList.add(goodsDto.getGoodsSn());
|
|
|
+ }
|
|
|
+ failGoodsSnList.add(goodsDto.getGoodsSn());
|
|
|
+ failGoodsTypeList.add(goodsDto.getGoodsBizType());
|
|
|
+ }
|
|
|
+ GoodsEntity prodbarGoods = goodsDao.queryObjectByProdBarcode(goodsDto.getProdBarcode(),"",null);
|
|
|
+ if(prodbarGoods != null){
|
|
|
+ isSuccess = true;
|
|
|
+ failProdbarSkuList.add(goodsDto.getGoodsSn());
|
|
|
+ }else{
|
|
|
+ goodsEntity.setProdBarcode(goodsDto.getProdBarcode());
|
|
|
+ }
|
|
|
+ if (Dict.orderBizType.item_02.getItem().equals(goodsDto.getGoodsBizType())
|
|
|
+ || Dict.orderBizType.item_10.getItem().equals(goodsDto.getGoodsBizType())) {
|
|
|
+ if(goodsDto.getIsHotStr().equalsIgnoreCase("1")){
|
|
|
+ isSuccess = true;
|
|
|
+ failHotSkuList.add(goodsDto.getGoodsSn());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ CategoryEntity categoryEntity = categoryDao.queryObjectByName(goodsDto.getCategoryName());
|
|
|
+ if(categoryEntity==null){
|
|
|
+ isSuccess = true;
|
|
|
+ failCateSkuList.add(goodsDto.getGoodsSn());
|
|
|
+ }else{
|
|
|
+ if(categoryEntity.getLevel().equalsIgnoreCase("L2")) {
|
|
|
+ goodsEntity.setCategoryId(categoryEntity.getId());
|
|
|
+ goodsEntity.setAttributeCategory(categoryEntity.getParentId());
|
|
|
+ }else{
|
|
|
+ isSuccess = true;
|
|
|
+ failCateL2SkuList.add(goodsDto.getGoodsSn());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ BrandEntity brandEntity = brandDao.queryObjectByName(goodsDto.getBrandName());
|
|
|
+ if (brandEntity == null) {
|
|
|
+ isSuccess = true;
|
|
|
+ failBrandSkuList.add(goodsDto.getGoodsSn());
|
|
|
+ } else {
|
|
|
+ goodsEntity.setBrandId(brandEntity.getId());
|
|
|
+ }
|
|
|
+ //运费
|
|
|
+ FreightEntity freightEntity = freightDao.queryObjectByName(goodsDto.getDefaultFreight());
|
|
|
+ if(freightEntity==null){
|
|
|
+ isSuccess = true;
|
|
|
+ failFreightSkuList.add(goodsDto.getGoodsSn());
|
|
|
+ failFreightList.add(goodsDto.getDefaultFreight());
|
|
|
+ }else {
|
|
|
+ goodsEntity.setFreightId(freightEntity.getId());
|
|
|
+ }
|
|
|
+ if (!Dict.orderBizType.item_11.getItem().equals(goodsDto.getGoodsBizType())) {
|
|
|
+ SupplierEntity supplierEntity = supplierDao.queryObjectByName(goodsDto.getSupplierName());
|
|
|
+ if (supplierEntity == null) {
|
|
|
+ isSuccess = true;
|
|
|
+ failSuppSkuList.add(goodsDto.getGoodsSn());
|
|
|
+ } else {
|
|
|
+ goodsEntity.setSupplierId(supplierEntity.getId());
|
|
|
+ }
|
|
|
+ SysCusUnitCodeEntity sysCusUnitCodeEntity = sysCusUnitCodeDao.queryObjectByName(goodsDto.getUnitName());
|
|
|
+ if (sysCusUnitCodeEntity == null) {
|
|
|
+ isSuccess = true;
|
|
|
+ failUnitSkuList.add(goodsDto.getGoodsSn());
|
|
|
+ } else {
|
|
|
+ goodsEntity.setUnitCode(sysCusUnitCodeEntity.getCode());
|
|
|
+ }
|
|
|
+ //原产国
|
|
|
+ SysCusNationCodeEntity sysCusNationCodeEntity = sysCusNationCodeDao.queryObjectByName(goodsDto.getOriCntName());
|
|
|
+ if (sysCusNationCodeEntity == null) {
|
|
|
+ isSuccess = true;
|
|
|
+ failNationSkuList.add(goodsDto.getGoodsSn());
|
|
|
+ } else {
|
|
|
+ goodsEntity.setOriCntCode(sysCusNationCodeEntity.getCode());
|
|
|
+ }
|
|
|
+ goodsEntity.setGoodsRate(BigDecimal.valueOf(Integer.valueOf(goodsDto.getGoodsRate())));
|
|
|
+ }
|
|
|
+ goodsEntity.setIsOnSale(Integer.parseInt(goodsDto.getIsOnSaleStr()));
|
|
|
+ goodsEntity.setIsHot(Integer.parseInt(goodsDto.getIsHotStr()));
|
|
|
+ goodsEntity.setRetailPrice(BigDecimal.valueOf(Integer.valueOf(goodsDto.getRetailPrice())));
|
|
|
+ goodsEntity.setMarketPrice(BigDecimal.valueOf(Integer.valueOf(goodsDto.getMarketPrice())));
|
|
|
+ goodsEntity.setGoodsSn(goodsDto.getGoodsSn());
|
|
|
+ goodsEntity.setSku(goodsDto.getSku());
|
|
|
+ goodsEntity.setName(goodsDto.getName());
|
|
|
+ goodsEntity.setGoodsUnit(goodsDto.getGoodsUnit());
|
|
|
+ goodsEntity.setGoodsBizType(goodsDto.getGoodsBizType());
|
|
|
+ goodsEntity.setBrand(goodsDto.getBrand());
|
|
|
+ goodsEntity.setCusDeclEle(goodsDto.getCusDeclEle());
|
|
|
+ goodsEntity.setCusGoodsCode(goodsDto.getCusGoodsCode());
|
|
|
+ goodsEntity.setCusRecCode(goodsDto.getCusRecCode());
|
|
|
+ goodsEntity.setCiqProdModel(goodsDto.getCiqProdModel());
|
|
|
+ goodsEntity.setIsDelete(0);
|
|
|
+ goodsEntity.setIsNew(0);
|
|
|
+ goodsEntity.setUpdateUserId(user.getUserId());
|
|
|
+ goodsEntity.setAddTime(new Date());
|
|
|
+ goodsEntity.setCreateTime(new Date());
|
|
|
+ goodsEntity.setUpdateTime(new Date());
|
|
|
+ goodsEntity.setModTime(new Date());
|
|
|
+
|
|
|
+ if(!isSuccess){
|
|
|
+ GoodsEntity goods = goodsDao.queryObjectBySn(goodsDto.getGoodsSn());
|
|
|
+ if(goods!=null) {// 修改商品
|
|
|
+ goodsEntity.setId(goods.getId());
|
|
|
+ goodsDao.update(goodsEntity);
|
|
|
+ }else{
|
|
|
+ goodsDao.save(goodsEntity);
|
|
|
+ }
|
|
|
+ // 保税商品修改各个门店商品价格
|
|
|
+ if (!Dict.orderBizType.item_11.getItem().equals(goodsDto.getGoodsBizType())) {
|
|
|
+ List<ProductStoreRelaEntity> productStoreRelaEntityList = productStoreRelaDao.queryByGoodsId(goodsDto.getId());
|
|
|
+ if (productStoreRelaEntityList != null && productStoreRelaEntityList.size() > 0) {
|
|
|
+ for (ProductStoreRelaEntity productStoreRela : productStoreRelaEntityList) {
|
|
|
+ productStoreRela.setMarketPrice(goodsEntity.getMarketPrice());
|
|
|
+ productStoreRela.setRetailPrice(goodsEntity.getRetailPrice());
|
|
|
+ productStoreRelaDao.update(productStoreRela);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 修改产品
|
|
|
+ ProductEntity product = productDao.queryObjectBySn(goodsDto.getGoodsSn());
|
|
|
+
|
|
|
+ GoodsSpecificationEntity goodsSpecification = new GoodsSpecificationEntity();
|
|
|
+ // 保税商品,普通货物暂不添加商品规格
|
|
|
+ if (!Dict.orderBizType.item_11.getItem().equals(goodsDto.getGoodsBizType())) {
|
|
|
+ // 添加商品规格
|
|
|
+ GoodsSpecificationEntity specificationEntity = goodsSpecificationDao.queryByGoodsId(goodsEntity.getId());
|
|
|
+ if(specificationEntity ==null) {
|
|
|
+ goodsSpecification.setGoodsId(goodsEntity.getId() );
|
|
|
+ goodsSpecification.setValue(goodsEntity.getCiqProdModel());
|
|
|
+ goodsSpecification.setSpecificationId(1);
|
|
|
+ goodsSpecificationDao.save(goodsSpecification);
|
|
|
+ }else {
|
|
|
+ goodsSpecification.setValue(goodsDto.getCiqProdModel());
|
|
|
+ goodsSpecificationDao.update(goodsSpecification);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if(product == null){
|
|
|
+ product = new ProductEntity();
|
|
|
+ product.setGoodsSn(goodsDto.getGoodsSn());
|
|
|
+ product.setGoodsSpecificationNameValue(goodsSpecification.getValue());
|
|
|
+ product.setGoodsSpecificationIds(goodsSpecification.getSpecificationId()+"");
|
|
|
+ product.setGoodsId(goodsEntity.getId());
|
|
|
+ product.setGoodsDefault(0);
|
|
|
+ product.setGoodsNumber(goodsEntity.getGoodsNumber());
|
|
|
+ productDao.save(product);
|
|
|
+ }else{
|
|
|
+ product.setGoodsSpecificationNameValue(goodsSpecification.getValue());
|
|
|
+ productDao.update(product);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(failGoodsSnList != null && failGoodsSnList.size() > 0){
|
|
|
+ if(failSameSkuList.size()>0) {
|
|
|
+ throw new RRException("不能有重复的商品编码、sku信息!请检查商品编码【" + failGoodsSnList + "】,业务类型【" +
|
|
|
+ failGoodsTypeList + "】,SKU【" + failSameSkuList + "】的商品信息");
|
|
|
+ }else{
|
|
|
+ throw new RRException("不能有重复的商品编码、sku信息!请检查商品编码【" + failGoodsSnList + "】,业务类型【" +
|
|
|
+ failGoodsTypeList + "】的商品信息");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(failTypeSkuList != null && failTypeSkuList.size() > 0){
|
|
|
+ throw new RRException("货品业务类型只能是【00保税备货、02保税补货、10保税展示】!请检查SKU【"+failTypeSkuList+"】的商品信息");
|
|
|
+ }
|
|
|
+ if(failProdbarSkuList != null && failProdbarSkuList.size() > 0){
|
|
|
+ throw new RRException("不能有重复的产品条码信息!请检查SKU【"+failProdbarSkuList+"】的商品产品条码信息");
|
|
|
+ }
|
|
|
+ if(failHotSkuList != null && failHotSkuList.size() > 0){
|
|
|
+ throw new RRException("请检查业务类型为【保税补货或保税展示】的商品,sku【"+failHotSkuList+"】的商品不能设置为热销!");
|
|
|
+ }
|
|
|
+ if(failCateSkuList != null && failCateSkuList.size() > 0){
|
|
|
+ throw new RRException("分类信息请在商城配置》商品分类中维护,不存在的商品sku【"+failCateSkuList+"】");
|
|
|
+ }
|
|
|
+ if(failCateL2SkuList != null && failCateL2SkuList.size() > 0){
|
|
|
+ throw new RRException("分类信息请在商城配置》商品分类中查看,商品分类必须为二级分类,错误的商品sku【"+failCateL2SkuList+"】");
|
|
|
+ }
|
|
|
+ if(failBrandSkuList != null && failBrandSkuList.size() > 0){
|
|
|
+ throw new RRException("品牌信息请在商城配置》品牌制造商中维护,不存在的商品sku【" + failBrandSkuList + "】");
|
|
|
+ }
|
|
|
+ if(failFreightSkuList != null && failFreightSkuList.size() > 0){
|
|
|
+ throw new RRException("运费信息请在商城配置》运费模板中维护,不存在的商品sku【"+failFreightSkuList+"】,运费【"+failFreightList+"】");
|
|
|
+ }
|
|
|
+ if(failSuppSkuList != null && failSuppSkuList.size() > 0){
|
|
|
+ throw new RRException("供应商信息请在商城配置》商品供应商中维护,不存在的商品sku【" + failSuppSkuList + "】");
|
|
|
+ }
|
|
|
+ if(failUnitSkuList != null && failUnitSkuList.size() > 0){
|
|
|
+ throw new RRException("计算单位信息请在商城配置》计算单位中维护,不存在的商品sku【" + failUnitSkuList + "】");
|
|
|
+ }
|
|
|
+ if(failNationSkuList != null && failNationSkuList.size() > 0){
|
|
|
+ throw new RRException("原产国信息请在商城配置》原产国中维护,不存在的商品sku【" + failNationSkuList + "】");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return 1;
|
|
|
+ }
|
|
|
+/* @Override
|
|
|
+ @Transactional
|
|
|
public int uploadExcel(MultipartFile file) {
|
|
|
SysUserEntity user = ShiroUtils.getUserEntity();
|
|
|
|
|
@@ -519,7 +793,7 @@ public class GoodsServiceImpl implements GoodsService {
|
|
|
}
|
|
|
}
|
|
|
return 1;
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
public GoodsEntity queryObjectBySn(String goodsSn) {
|
|
|
return goodsDao.queryObjectBySn(goodsSn);
|