mirror of
https://github.com/Li4n0/revsuit.git
synced 2026-09-22 06:40:43 +08:00
fix(mysql/record): fix the bug when searching mysql record with username as keyword
This commit is contained in:
@@ -89,6 +89,9 @@ func Records(c *gin.Context) {
|
||||
if mysqlRecord.RuleName != "" {
|
||||
db.Where("rule_name = ?", mysqlRecord.RuleName)
|
||||
}
|
||||
if mysqlRecord.Username != "" {
|
||||
db.Where("username = ?", mysqlRecord.Username)
|
||||
}
|
||||
if mysqlRecord.ClientOS != "" {
|
||||
db.Where("client_os like ?", "%"+mysqlRecord.ClientOS)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user