Skip to content

Commit

Permalink
fix(mysql/record): fix the bug when searching mysql record with usern…
Browse files Browse the repository at this point in the history
…ame as keyword
  • Loading branch information
Li4n0 committed Dec 22, 2021
1 parent 3ca242d commit ce8d760
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/mysql/record.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit ce8d760

Please sign in to comment.