同步数据唯一值判断

This commit is contained in:
liyj 2025-07-22 09:13:30 +08:00
parent e07613ce41
commit 5b6852b00f
3 changed files with 4 additions and 3 deletions

View File

@ -27,5 +27,5 @@ public interface ShopBaseProductTypeService extends IBaseService<ShopBaseProduct
* @param typeName
* @return
*/
ShopBaseProductType getProductTypeByName(String typeName);
ShopBaseProductType getProductTypeByName(String typeName,String storeId);
}

View File

@ -128,9 +128,10 @@ public class ShopBaseProductTypeServiceImpl extends BaseServiceImpl<ShopBaseProd
* @return
*/
@Override
public ShopBaseProductType getProductTypeByName(String typeName) {
public ShopBaseProductType getProductTypeByName(String typeName,String storeId) {
QueryWrapper<ShopBaseProductType> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("type_name", typeName);
queryWrapper.eq("store_id", Integer.valueOf(storeId));
return getOne(queryWrapper);
}
}

View File

@ -149,7 +149,7 @@ public abstract class SyncBaseThirdSxAbstract{
Integer typeId = 1001;
if (StrUtil.isNotBlank(o.getStr("product_type"))) {
productType = productTypeService.getProductTypeByName(o.getStr("product_type"));
productType = productTypeService.getProductTypeByName(o.getStr("product_type"),storeId);
if (productType != null) {
typeId = productType.getType_id();
} else {