Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
chain33-pai
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
szh
chain33-pai
Commits
6747b236
Commit
6747b236
authored
Mar 18, 2020
by
szh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add table
parent
ae5f3447
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
raspFeedBackList.go
models/raspFeedBackList.go
+3
-2
No files found.
models/raspFeedBackList.go
View file @
6747b236
...
...
@@ -33,7 +33,7 @@ func AddFeedBackList(fd RaspFeedbackList)bool{
func
GetAddrFeedBackList
(
req
*
ReqRaspFeedbackList
)
([]
*
RaspFeedbackList
,
error
)
{
var
txs
[]
*
RaspFeedbackList
maps
:=
map
[
string
]
interface
{}{
"addr"
:
req
.
Addr
}
err
:=
db
.
Where
(
maps
)
.
Order
(
"id "
+
"desc"
)
.
Offset
((
req
.
Page
-
1
)
*
req
.
Pagesize
)
.
Limit
(
req
.
Pagesize
)
.
Find
(
&
txs
)
.
Error
err
:=
db
.
Model
(
&
RaspFeedbackList
{})
.
Where
(
maps
)
.
Order
(
"id "
+
"desc"
)
.
Offset
((
req
.
Page
-
1
)
*
req
.
Pagesize
)
.
Limit
(
req
.
Pagesize
)
.
Find
(
&
txs
)
.
Error
if
err
!=
nil
&&
err
!=
gorm
.
ErrRecordNotFound
{
return
nil
,
err
}
...
...
@@ -44,6 +44,6 @@ func GetAddrFeedBackList(req *ReqRaspFeedbackList) ([]*RaspFeedbackList, error)
func
GetAddrFeedBackCount
(
addr
string
)
int64
{
maps
:=
map
[
string
]
interface
{}{
"addr"
:
addr
}
var
count
int64
db
.
Where
(
maps
)
.
Count
(
&
count
)
db
.
Model
(
&
RaspFeedbackList
{})
.
Where
(
maps
)
.
Count
(
&
count
)
return
count
}
\ No newline at end of file
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