mirror of
https://github.com/Li4n0/revsuit.git
synced 2026-09-21 22:30:46 +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 != "" {
|
if mysqlRecord.RuleName != "" {
|
||||||
db.Where("rule_name = ?", mysqlRecord.RuleName)
|
db.Where("rule_name = ?", mysqlRecord.RuleName)
|
||||||
}
|
}
|
||||||
|
if mysqlRecord.Username != "" {
|
||||||
|
db.Where("username = ?", mysqlRecord.Username)
|
||||||
|
}
|
||||||
if mysqlRecord.ClientOS != "" {
|
if mysqlRecord.ClientOS != "" {
|
||||||
db.Where("client_os like ?", "%"+mysqlRecord.ClientOS)
|
db.Where("client_os like ?", "%"+mysqlRecord.ClientOS)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user