This commit is contained in:
邹宗楠
2025-02-05 14:39:15 +08:00
parent a3225eecaf
commit 7a03f58075
2 changed files with 29 additions and 0 deletions

View File

@@ -1751,6 +1751,25 @@ func GetStoreSkuBindByNameID(db *DaoDB, storeID, nameID, status int) (storeSkuBi
return storeSkuBind, err
}
func GetStoreSkuByVendorSkuId(storeId int, vendorID int, vendorSkuId string) (storeSkuBind *model.StoreSkuBind, err error) {
sql := `
SELECT * FROM store_sku_bind s WHERE s.store_id = ?
`
param := []interface{}{
storeId,
}
switch vendorID {
case model.VendorIDEBAI:
sql += ` AND s.ebai_id = ?`
param = append(param, vendorSkuId)
}
sql += ` AND s.deleted_at = ? `
param = append(param, utils.DefaultTimeValue)
err = GetRow(GetDB(), &storeSkuBind, sql, param...)
return storeSkuBind, err
}
func GetPriceReferPrice(db *DaoDB, cityCode int, skuID int, snapDate time.Time) (result *PriceReferSnapshotExt, err error) {
var (
pRefer *PriceReferSnapshotExt