用户申请入驻
This commit is contained in:
@@ -837,3 +837,31 @@ func GetStorePushClient(db *DaoDB, storeID int, cID string) (storePushClient []*
|
||||
}
|
||||
return storePushClient, err
|
||||
}
|
||||
|
||||
func GetStoreAudit(db *DaoDB, auditStatus int, userID, keyword string) (storeAudit []*model.StoreAudit, err error) {
|
||||
sql := `
|
||||
SELECT *
|
||||
FROM store_audit
|
||||
WHERE deleted_at = ?
|
||||
`
|
||||
sqlParams := []interface{}{
|
||||
utils.DefaultTimeValue,
|
||||
}
|
||||
if auditStatus != model.StoreStatusAll {
|
||||
sql += " AND audit_status = ?"
|
||||
sqlParams = append(sqlParams, auditStatus)
|
||||
}
|
||||
if userID != "" {
|
||||
sql += " AND user_id = ?"
|
||||
sqlParams = append(sqlParams, userID)
|
||||
}
|
||||
if keyword != "" {
|
||||
sql += " AND (user_id LIKE ? OR name LIKE ? OR tel1 LIKE ? OR tel2 LIKE ? OR address LIKE ?)"
|
||||
sqlParams = append(sqlParams, "%"+keyword+"%", "%"+keyword+"%", "%"+keyword+"%", "%"+keyword+"%", "%"+keyword+"%")
|
||||
}
|
||||
err = GetRows(db, &storeAudit, sql, sqlParams)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return storeAudit, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user