@@ -76,5 +76,5 @@ public interface IFsPlatformProductScrmMapper {
* @param productName
* @return
*/
- Boolean productNameExist(@Param("productName") String productName);
+ Boolean productNameExist(@Param("productName") String productName, @Param("storeId") Long storeId);
}
@@ -1326,7 +1326,7 @@ private void addProductAttr(Long productId, List<ProductArrtDTO> items, List<FsS
//原商品库
FsStoreProductScrm fsStoreProductScrm = fsStoreProductMapper.selectFsStoreProductById(storeProductId);
//存在的商品不用一直添加到总库
- Boolean flag = iFsPlatformProductScrmMapper.productNameExist(fsStoreProductScrm.getProductName());
+ Boolean flag = iFsPlatformProductScrmMapper.productNameExist(fsStoreProductScrm.getProductName(), fsStoreProductScrm.getStoreId());
if(flag){
continue;
@@ -299,6 +299,7 @@
<select id="productNameExist" resultType="java.lang.Boolean">
select count(product_id)
from fs_platform_product_scrm p where p.product_name = #{productName}
+ and p.store_id = #{storeId}
</select>
<delete id="deleteFsPlatFormProductByIds">