Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qsh-wc
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
honghuiliu
qsh-wc
Commits
b6ceb34c
Commit
b6ceb34c
authored
Sep 26, 2022
by
honghuiliu
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
日常提交
parent
97581418
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
qsh_monitor_data.go
server/model/admin/request/qsh_monitor_data.go
+2
-0
qsh_monitor_data.go
server/service/admin/qsh_monitor_data.go
+9
-0
No files found.
server/model/admin/request/qsh_monitor_data.go
View file @
b6ceb34c
...
@@ -8,4 +8,6 @@ import (
...
@@ -8,4 +8,6 @@ import (
type
QshMonitorDataSearch
struct
{
type
QshMonitorDataSearch
struct
{
admin
.
QshMonitorData
admin
.
QshMonitorData
request
.
PageInfo
request
.
PageInfo
StartTime
string
`json:"start_time"`
EndTime
string
`json:"end_time"`
}
}
server/service/admin/qsh_monitor_data.go
View file @
b6ceb34c
...
@@ -60,6 +60,15 @@ func (qshMonitorDataService *QshMonitorDataService) GetQshMonitorDataInfoList(in
...
@@ -60,6 +60,15 @@ func (qshMonitorDataService *QshMonitorDataService) GetQshMonitorDataInfoList(in
if
info
.
TypeName
!=
""
{
if
info
.
TypeName
!=
""
{
db
=
db
.
Where
(
"type_name LIKE ?"
,
"%"
+
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
err
=
db
.
Count
(
&
total
)
.
Error
if
err
!=
nil
{
if
err
!=
nil
{
return
return
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment