GetEffectiveActStoreSkuInfo, ActTypeAll
This commit is contained in:
@@ -409,7 +409,7 @@ func GetEffectiveActStoreSkuInfo(db *DaoDB, actID int, vendorIDs []int, actType
|
||||
sql = " AND t1.act_type = ?"
|
||||
sqlParams = append(sqlParams, actID)
|
||||
}
|
||||
if actType > 0 {
|
||||
if actType != model.ActTypeAll {
|
||||
sql = " AND t1.type = ?"
|
||||
sqlParams = append(sqlParams, actType)
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"time"
|
||||
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
)
|
||||
|
||||
func TestGetEffectiveActStoreSkuInfo(t *testing.T) {
|
||||
@@ -27,7 +28,7 @@ func TestGetEffectiveActStoreSkuInfo(t *testing.T) {
|
||||
ToTime: utils.Str2Time("2019-08-06 12:34:56"),
|
||||
},
|
||||
} {
|
||||
result, err := GetEffectiveActStoreSkuInfo(GetDB(), v.ActID, v.VendorIDs, 0, v.StoreIDs, v.SkuIDs, v.FromTime, v.ToTime)
|
||||
result, err := GetEffectiveActStoreSkuInfo(GetDB(), v.ActID, v.VendorIDs, model.ActTypeAll, v.StoreIDs, v.SkuIDs, v.FromTime, v.ToTime)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -1136,7 +1136,7 @@ func UpdateActPrice4StoreSkuNameNew(db *DaoDB, storeIDs, skuIDs []int, skuNamesI
|
||||
if actVendorID >= 0 {
|
||||
vendorIDs = []int{actVendorID}
|
||||
}
|
||||
actStoreSkuList, err := GetEffectiveActStoreSkuInfo(db, 0, vendorIDs, 0, storeIDs, skuIDs, time.Now(), time.Now())
|
||||
actStoreSkuList, err := GetEffectiveActStoreSkuInfo(db, 0, vendorIDs, model.ActTypeAll, storeIDs, skuIDs, time.Now(), time.Now())
|
||||
if err != nil {
|
||||
globals.SugarLogger.Errorf("updateActPrice4StoreSkuNameNew can not get sku promotion info for error:%v", err)
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user