Commit b6ceb34c authored by honghuiliu's avatar honghuiliu 💬

日常提交

parent 97581418
......@@ -8,4 +8,6 @@ import (
type QshMonitorDataSearch struct {
admin.QshMonitorData
request.PageInfo
StartTime string `json:"start_time"`
EndTime string `json:"end_time"`
}
......@@ -60,6 +60,15 @@ func (qshMonitorDataService *QshMonitorDataService) GetQshMonitorDataInfoList(in
if info.TypeName != "" {
db = db.Where("type_name LIKE ?", "%"+info.TypeName+"%")
}
if info.ToiletId != 0 {
db = db.Where("toilet_id = ?", info.ToiletId)
}
if info.StartTime != "" {
db.Where("created_at >= ?", info.StartTime)
}
if info.EndTime != "" {
db.Where("created_at <= ?", info.EndTime)
}
err = db.Count(&total).Error
if err != nil {
return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment