This commit is contained in:
苏尹岚
2020-08-11 09:27:00 +08:00
25 changed files with 348 additions and 117 deletions

View File

@@ -286,6 +286,12 @@ type StoreSkuPriceAndWeight struct {
SkuID int `orm:"column(sku_id)"`
Weight int
Price int
Prefix string
Name string
Unit string
Comment string
SpecQuality float32
SpecUnit string
}
type StoreSkuAndName struct {
@@ -621,10 +627,12 @@ func GetStoreSkuPriceAndWeight(db *DaoDB, vendorStoreID string, vendorID int, ve
vendorSkuIDField = fmt.Sprintf("t2.%s_id", ConvertDBFieldPrefix(model.VendorNames[vendorID]))
}
sql := fmt.Sprintf(`
SELECT %s vendor_sku_id, t1.id sku_id, t2.price, t1.weight
SELECT %s vendor_sku_id, t1.id sku_id, t2.price, t1.weight,
t5.prefix, t5.name, t1.comment, t5.unit, t1.spec_quality, t1.spec_unit
FROM sku t1
JOIN store_sku_bind t2 ON t2.sku_id = t1.id AND t2.deleted_at = ?
JOIN store_map t3 ON t3.store_id = t2.store_id AND t3.vendor_id = ? AND t3.vendor_store_id = ? AND t3.deleted_at = ?
JOIN sku_name t5 ON t5.id = t1.name_id
%s
WHERE %s IN (`+GenQuestionMarks(len(vendorSkuIDs))+`)`, vendorSkuIDField, sqlThingMap, vendorSkuIDField)
sqlParams := []interface{}{

View File

@@ -226,6 +226,7 @@ type Sku struct {
ExdSkuID string `orm:"column(exd_sku_id)" json:"exdSkuID"` //饿鲜达商品ID
ExdCategoryThirdID int `orm:"column(exd_category_third_id)" json:"exdCategoryThirdID"`
EclpID string `orm:"column(eclp_id)" json:"eclpID"` //eclp物料商品ID
MinOrderCount int `json:"minOrderCount"` //最少起购份数,美团用
// JdID int64 `orm:"column(jd_id);null;index" json:"jdID"`
// JdSyncStatus int8 `orm:"default(2)" json:"jdSyncStatus"`