|
|
@@ -18,6 +18,7 @@ import com.fs.hisStore.service.IFsPlatformProductScrmService;
|
|
|
import com.fs.hisStore.utils.StoreAuditLogUtil;
|
|
|
import com.fs.hisStore.vo.FsPlatformProductListVO;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.commons.lang3.ObjectUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
@@ -262,6 +263,13 @@ public class FsPlatformProductScrmServiceImpl implements IFsPlatformProductScrmS
|
|
|
if(copyProductInfo==null){
|
|
|
return R.error("复制,商品数据不存在!");
|
|
|
}
|
|
|
+ //这个商品是否已经在我店铺存在了
|
|
|
+ Long storeProductId = copyProductInfo.getStoreProductId();
|
|
|
+ //存在
|
|
|
+ FsStoreProductScrm ObjectExist = fsStoreProductMapper.selectFsStoreProductById(storeProductId);
|
|
|
+ if(ObjectUtils.isNotEmpty(ObjectExist)){
|
|
|
+ return R.error("这个商品你店铺已经有了,无需重复添加!");
|
|
|
+ }
|
|
|
//插入复制商品
|
|
|
Long platformProductId = copyProductInfo.getProductId();
|
|
|
FsStoreProductScrm fsStoreProductScrm = new FsStoreProductScrm();
|