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
7eb9cd7d
Commit
7eb9cd7d
authored
Sep 28, 2022
by
honghuiliu
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
日常提交
parent
d96918e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
dataService.go
server/service/web/dataService.go
+4
-1
No files found.
server/service/web/dataService.go
View file @
7eb9cd7d
...
...
@@ -6,6 +6,7 @@ import (
"github.com/flipped-aurora/gin-vue-admin/server/model/admin"
"github.com/flipped-aurora/gin-vue-admin/server/request"
"github.com/flipped-aurora/gin-vue-admin/server/server"
"gorm.io/gorm"
)
type
DataService
struct
{
...
...
@@ -32,7 +33,9 @@ func (s *DataService) DataInYeWei(arg server.YeWeiData) error {
func
(
s
*
DataService
)
GetYewei
(
arg
request
.
GetYewei
)
(
admin
.
QshMonitorData
,
error
)
{
var
data
admin
.
QshMonitorData
err
:=
global
.
GVA_DB
.
Model
(
admin
.
QshMonitorData
{})
.
Where
(
"toilet_id = ?"
,
arg
.
ToiletID
)
.
Where
(
"type_name = ?"
,
"液位"
)
.
Last
(
&
data
)
.
Error
if
err
!=
nil
{
if
err
!=
nil
&&
errors
.
Is
(
err
,
gorm
.
ErrRecordNotFound
)
{
return
data
,
nil
}
else
{
return
data
,
err
}
return
data
,
nil
...
...
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