+onSysConfigChanged
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
)
|
||||
|
||||
// 带购物平台信息的
|
||||
@@ -579,3 +580,22 @@ func GetStorePriceScoreSnapshot(db *DaoDB, snapDate time.Time) (storePriceScoreS
|
||||
err = GetRows(db, &storePriceScoreSnapshot, sql, sqlParams...)
|
||||
return storePriceScoreSnapshot, err
|
||||
}
|
||||
|
||||
func SetStoreMapSyncStatus(db *DaoDB, vendorID int, storeIDs []int, syncStatus int) (num int64, err error) {
|
||||
globals.SugarLogger.Debugf("SetStoreMapSyncStatus, storeIDs:%v, vendorID:%d", storeIDs, vendorID)
|
||||
|
||||
sql := `
|
||||
UPDATE store_map t1
|
||||
SET t1.sync_status = t1.sync_status | ?
|
||||
`
|
||||
sqlParams := []interface{}{
|
||||
syncStatus,
|
||||
}
|
||||
sql += " WHERE t1.deleted_at = ? AND t1.sync_status & ? = 0 AND t1.vendor_id = ?"
|
||||
sqlParams = append(sqlParams, utils.DefaultTimeValue, model.SyncFlagDeletedMask, vendorID)
|
||||
if len(storeIDs) > 0 {
|
||||
sql += " AND t1.store_id IN (" + GenQuestionMarks(len(storeIDs)) + ")"
|
||||
sqlParams = append(sqlParams, storeIDs)
|
||||
}
|
||||
return ExecuteSQL(db, sql, sqlParams...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user