- 京东回调活动创建等5秒再执行,以免通过API创建时重复创建
- 饿百防重复创建
This commit is contained in:
@@ -302,6 +302,21 @@ func QueryActs(db *DaoDB, actID int, offset, pageSize int, keyword string, vendo
|
||||
return pagedInfo, err
|
||||
}
|
||||
|
||||
func GetExistVendorActIDs(db *DaoDB, vendorID int) (vendorActIDs []string, err error) {
|
||||
// todo 不应该是全表扫描
|
||||
sql := `
|
||||
SELECT
|
||||
DISTINCT t1.vendor_act_id
|
||||
FROM act_store_sku_map t1
|
||||
WHERE t1.deleted_at = ? AND t.vendor_id = ?`
|
||||
sqlParams := []interface{}{
|
||||
utils.DefaultTimeValue,
|
||||
vendorID,
|
||||
}
|
||||
err = GetRows(db, &vendorActIDs, sql, sqlParams...)
|
||||
return vendorActIDs, err
|
||||
}
|
||||
|
||||
func GetEffectiveActStoreSkuInfo(db *DaoDB, actID int, vendorIDs []int, storeIDs, skuIDs []int, beginAt, endAt time.Time) (actStoreSkuList []*model.ActStoreSku2, err error) {
|
||||
if utils.IsTimeZero(beginAt) {
|
||||
return nil, fmt.Errorf("GeActStoreSkuInfo必须指定活动开始时间")
|
||||
|
||||
Reference in New Issue
Block a user