定时刷新商品可售状态
This commit is contained in:
@@ -84,8 +84,8 @@ type StoreSkuSyncInfo struct {
|
||||
VendorPrice int64
|
||||
MergedStatus int
|
||||
SkuName string
|
||||
StatusSaleBegin int `json:"statusSaleBegin"` //商品可售时间范围
|
||||
StatusSaleEnd int `json:"statusSaleEnd"`
|
||||
StatusSaleBegin int16 `json:"statusSaleBegin"` //商品可售时间范围
|
||||
StatusSaleEnd int16 `json:"statusSaleEnd"`
|
||||
}
|
||||
|
||||
type MissingStoreSkuInfo struct {
|
||||
@@ -589,7 +589,7 @@ func (s *StoreSkuSyncInfo) GetSeq() int {
|
||||
return int(s.VendorPrice)
|
||||
}
|
||||
|
||||
func GetStoresSkusInfoBySaleTime(db *DaoDB) (storeSkuBindList []*model.StoreSkuBind, err error) {
|
||||
func GetStoresSkusInfoBySaleTime(db *DaoDB, storeID int) (storeSkuBindList []*model.StoreSkuBind, err error) {
|
||||
sql := `
|
||||
SELECT t1.*
|
||||
FROM store_sku_bind t1
|
||||
@@ -601,6 +601,10 @@ func GetStoresSkusInfoBySaleTime(db *DaoDB) (storeSkuBindList []*model.StoreSkuB
|
||||
model.SkuStatusNormal,
|
||||
utils.DefaultTimeValue,
|
||||
}
|
||||
if storeID > 0 {
|
||||
sql += ` AND t1.store_id = ?`
|
||||
sqlParams = append(sqlParams, storeID)
|
||||
}
|
||||
err = GetRows(db, &storeSkuBindList, sql, sqlParams...)
|
||||
return storeSkuBindList, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user