parent
d4b267106e
commit
e94805c640
|
|
@ -1126,7 +1126,6 @@ export class ShopyyAdapter implements ISiteAdapter {
|
||||||
// ========== 产品变体映射方法 ==========
|
// ========== 产品变体映射方法 ==========
|
||||||
mapPlatformToUnifiedVariation(variant: ShopyyVariant): UnifiedProductVariationDTO {
|
mapPlatformToUnifiedVariation(variant: ShopyyVariant): UnifiedProductVariationDTO {
|
||||||
// 映射变体
|
// 映射变体
|
||||||
console.log('ivarianttem', variant)
|
|
||||||
return {
|
return {
|
||||||
id: variant.id,
|
id: variant.id,
|
||||||
name: variant.title || '',
|
name: variant.title || '',
|
||||||
|
|
|
||||||
|
|
@ -2138,7 +2138,6 @@ export class ProductService {
|
||||||
|
|
||||||
return product;
|
return product;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 根据站点SKU查询产品
|
// 根据站点SKU查询产品
|
||||||
async getProductBySiteSku(siteSku: string, site?: Site): Promise<Product> {
|
async getProductBySiteSku(siteSku: string, site?: Site): Promise<Product> {
|
||||||
// 使用查询构建器来正确查询关联表
|
// 使用查询构建器来正确查询关联表
|
||||||
|
|
@ -2150,7 +2149,7 @@ export class ProductService {
|
||||||
.leftJoinAndSelect('product.components', 'components')
|
.leftJoinAndSelect('product.components', 'components')
|
||||||
.leftJoinAndSelect('product.siteSkus', 'siteSku')
|
.leftJoinAndSelect('product.siteSkus', 'siteSku')
|
||||||
.where('siteSku.sku LIKE :siteSku', { siteSku: `%${siteSku}%` })
|
.where('siteSku.sku LIKE :siteSku', { siteSku: `%${siteSku}%` })
|
||||||
.orWhere('product.sku = :siteSku', { siteSku });
|
.orWhere('product.sku = :siteSku', { siteSku })
|
||||||
|
|
||||||
if (site) {
|
if (site) {
|
||||||
queryBuilder.orWhere('product.sku = :processedSku', {
|
queryBuilder.orWhere('product.sku = :processedSku', {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue