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
0
Merge Requests
0
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
ligaishun
chain33-pai
Commits
c73675fc
Commit
c73675fc
authored
Nov 07, 2019
by
szh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
up
parent
b15e9c10
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
raspMinerTxs.go
models/raspMinerTxs.go
+2
-2
No files found.
models/raspMinerTxs.go
View file @
c73675fc
...
...
@@ -40,7 +40,7 @@ func ExistByAddrHeight(addr string,height int64) (bool, error) {
// GetAddrTotal gets the total number of addr based on the constraints
func
GetMinerTxsTotal
(
addr
string
)
(
int64
,
error
)
{
var
count
int64
if
err
:=
db
.
Model
(
&
RaspMinerTxs
{})
.
Where
(
"
mine
r = ? "
,
addr
)
.
Count
(
&
count
)
.
Error
;
err
!=
nil
{
if
err
:=
db
.
Model
(
&
RaspMinerTxs
{})
.
Where
(
"
return_add
r = ? "
,
addr
)
.
Count
(
&
count
)
.
Error
;
err
!=
nil
{
return
0
,
err
}
...
...
@@ -53,7 +53,7 @@ func GetMinerTxs(req *ReqTicketInfo) ([]*RaspMinerTxs, error) {
if
req
.
Order
==
""
{
req
.
Order
=
"desc"
}
maps
:=
map
[
string
]
interface
{}{
"
mine
r"
:
req
.
Addr
}
maps
:=
map
[
string
]
interface
{}{
"
return_add
r"
:
req
.
Addr
}
err
:=
db
.
Where
(
maps
)
.
Order
(
"time "
+
req
.
Order
)
.
Offset
((
req
.
Page
-
1
)
*
req
.
Pagesize
)
.
Limit
(
req
.
Pagesize
)
.
Find
(
&
txs
)
.
Error
if
err
!=
nil
&&
err
!=
gorm
.
ErrRecordNotFound
{
return
nil
,
err
...
...
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