更新门店cid
This commit is contained in:
@@ -813,3 +813,27 @@ func DeleteStoreCategroies(db *DaoDB, userName string, storeID int) (err error)
|
||||
_, err = ExecuteSQL(db, sql, sqlParams)
|
||||
return err
|
||||
}
|
||||
|
||||
func GetStorePushClient(db *DaoDB, storeID int, cID string) (storePushClient []*model.StorePushClient, err error) {
|
||||
sql := `
|
||||
SELECT *
|
||||
FROM store_push_client
|
||||
WHERE deleted_at = ?
|
||||
`
|
||||
sqlParams := []interface{}{
|
||||
utils.DefaultTimeValue,
|
||||
}
|
||||
if storeID > 0 {
|
||||
sql += " AND store_id = ?"
|
||||
sqlParams = append(sqlParams, storeID)
|
||||
}
|
||||
if cID != "" {
|
||||
sql += " AND client_id = ?"
|
||||
sqlParams = append(sqlParams, cID)
|
||||
}
|
||||
err = GetRows(db, &storePushClient, sql, sqlParams)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return storePushClient, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user