mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-23 02:48:34 +08:00
[fix]登录日志用户名查询筛选
This commit is contained in:
@@ -49,6 +49,9 @@ func (m *logLoginModelImpl) FindListPage(page, pageSize int, data entity.LogLogi
|
||||
if data.LoginLocation != "" {
|
||||
db = db.Where("login_location like ?", "%"+data.LoginLocation+"%")
|
||||
}
|
||||
if data.Username != "" {
|
||||
db = db.Where("username like ?", "%"+data.Username+"%")
|
||||
}
|
||||
err := db.Where("delete_time IS NULL").Count(&total).Error
|
||||
err = db.Order("info_id desc").Limit(pageSize).Offset(offset).Find(&list).Error
|
||||
|
||||
|
||||
Reference in New Issue
Block a user