- fix misplace params in RefreshJdPromotionLockStatus
This commit is contained in:
@@ -769,6 +769,8 @@ func RefreshJdPromotionItemListLockStatus(promotionItemList []*tPromotionItemInf
|
|||||||
}
|
}
|
||||||
|
|
||||||
func RefreshJdPromotionLockStatus(promotionID int) (err error) {
|
func RefreshJdPromotionLockStatus(promotionID int) (err error) {
|
||||||
|
globals.SugarLogger.Debugf("RefreshJdPromotionLockStatus promotionID:%d", promotionID)
|
||||||
|
|
||||||
sql := `
|
sql := `
|
||||||
SELECT t22.vendor_store_id, t3.sku_id, t32.jd_id, IF(t1.begin_at <= ? AND t1.end_at >= ? AND t1.status = ?, t3.is_lock, 0) is_lock, t1.end_at
|
SELECT t22.vendor_store_id, t3.sku_id, t32.jd_id, IF(t1.begin_at <= ? AND t1.end_at >= ? AND t1.status = ?, t3.is_lock, 0) is_lock, t1.end_at
|
||||||
FROM promotion t1
|
FROM promotion t1
|
||||||
@@ -780,11 +782,11 @@ func RefreshJdPromotionLockStatus(promotionID int) (err error) {
|
|||||||
`
|
`
|
||||||
nowDate := utils.GetCurDate()
|
nowDate := utils.GetCurDate()
|
||||||
sqlParams := []interface{}{
|
sqlParams := []interface{}{
|
||||||
model.VendorIDJD,
|
|
||||||
utils.DefaultTimeValue,
|
|
||||||
nowDate,
|
nowDate,
|
||||||
nowDate,
|
nowDate,
|
||||||
model.PromotionStatusRemoteCreated,
|
model.PromotionStatusRemoteCreated,
|
||||||
|
model.VendorIDJD,
|
||||||
|
utils.DefaultTimeValue,
|
||||||
promotionID,
|
promotionID,
|
||||||
}
|
}
|
||||||
var promotionItemList []*tPromotionItemInfo
|
var promotionItemList []*tPromotionItemInfo
|
||||||
@@ -798,6 +800,8 @@ func RefreshJdPromotionLockStatus(promotionID int) (err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func LockPromotionSkus(ctx *jxcontext.Context, promotionID int, isLock bool, skuIDs []int) (num int64, err error) {
|
func LockPromotionSkus(ctx *jxcontext.Context, promotionID int, isLock bool, skuIDs []int) (num int64, err error) {
|
||||||
|
globals.SugarLogger.Debugf("LockPromotionSkus promotionID:%d, isLock:%t, skuIDs:%v", promotionID, isLock, skuIDs)
|
||||||
|
|
||||||
sql := `
|
sql := `
|
||||||
UPDATE promotion_sku t1
|
UPDATE promotion_sku t1
|
||||||
SET t1.is_lock = ?
|
SET t1.is_lock = ?
|
||||||
|
|||||||
Reference in New Issue
Block a user