京西折扣
This commit is contained in:
@@ -1518,10 +1518,29 @@ func ChangeJxPriceByDiscountAct(ctx *jxcontext.Context) {
|
||||
if len(page.Data) == 0 {
|
||||
return
|
||||
}
|
||||
//第一档时间内
|
||||
if (time.Now().Hour() >= 10 && time.Now().Hour() < 20) || (time.Now().Hour() == 20 && time.Now().Minute() < 1) {
|
||||
for _, act := range page.Data {
|
||||
_, actStoreSkus, _ := dao.GetActStoreSkuVendorList(db, act.ID, nil, nil, nil, "", 0, pageSize)
|
||||
if len(actStoreSkus) == 0 {
|
||||
continue
|
||||
}
|
||||
var (
|
||||
storeIDs, skuIDs []int
|
||||
)
|
||||
for _, actStoreSku := range actStoreSkus {
|
||||
storeIDs = append(storeIDs, actStoreSku.StoreID)
|
||||
skuIDs = append(skuIDs, actStoreSku.SkuID)
|
||||
}
|
||||
storeSkus, _ := dao.GetStoresSkusInfo(db, storeIDs, skuIDs)
|
||||
for _, storeSku := range storeSkus {
|
||||
if storeSku.SkuID == 0 {
|
||||
|
||||
} else { //第二档时间内
|
||||
}
|
||||
//第一档时间内
|
||||
if (time.Now().Hour() >= 10 && time.Now().Hour() < 20) || (time.Now().Hour() == 20 && time.Now().Minute() < 1) {
|
||||
|
||||
} else { //第二档时间内
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user