同步数据唯一值判断
This commit is contained in:
parent
052a6e7e92
commit
9b971268bf
@ -27,5 +27,5 @@ public interface ShopBaseProductTypeService extends IBaseService<ShopBaseProduct
|
|||||||
* @param typeName
|
* @param typeName
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
ShopBaseProductType getProductTypeByName(String typeName);
|
ShopBaseProductType getProductTypeByName(String typeName,String storeId);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -128,9 +128,10 @@ public class ShopBaseProductTypeServiceImpl extends BaseServiceImpl<ShopBaseProd
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public ShopBaseProductType getProductTypeByName(String typeName) {
|
public ShopBaseProductType getProductTypeByName(String typeName,String storeId) {
|
||||||
QueryWrapper<ShopBaseProductType> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<ShopBaseProductType> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.eq("type_name", typeName);
|
queryWrapper.eq("type_name", typeName);
|
||||||
|
queryWrapper.eq("store_id", Integer.valueOf(storeId));
|
||||||
return getOne(queryWrapper);
|
return getOne(queryWrapper);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -149,7 +149,7 @@ public abstract class SyncBaseThirdSxAbstract{
|
|||||||
Integer typeId = 1001;
|
Integer typeId = 1001;
|
||||||
|
|
||||||
if (StrUtil.isNotBlank(o.getStr("product_type"))) {
|
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) {
|
if (productType != null) {
|
||||||
typeId = productType.getType_id();
|
typeId = productType.getType_id();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user