Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bwallet
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
Go
bwallet
Commits
5877b658
Commit
5877b658
authored
Mar 25, 2020
by
shajiaiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
47b34408
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
coin.go
models/coin.go
+2
-2
coin.go
service/coin_service/coin.go
+1
-1
No files found.
models/coin.go
View file @
5877b658
...
@@ -92,10 +92,10 @@ func GetCoinTotal(maps interface{}) (int, error) {
...
@@ -92,10 +92,10 @@ func GetCoinTotal(maps interface{}) (int, error) {
return
count
,
nil
return
count
,
nil
}
}
func
GetAllPlatform
()
([]
*
Platform
,
error
)
{
func
GetAllPlatform
(
maps
interface
{}
)
([]
*
Platform
,
error
)
{
var
platforms
[]
*
Platform
var
platforms
[]
*
Platform
err
:=
db
.
Where
(
"platform <> ''"
)
.
Group
(
"platform"
)
.
Find
(
&
platforms
)
.
Error
err
:=
db
.
Where
(
"platform <> ''"
)
.
Where
(
maps
)
.
Group
(
"platform"
)
.
Find
(
&
platforms
)
.
Error
if
err
!=
nil
&&
err
!=
gorm
.
ErrRecordNotFound
{
if
err
!=
nil
&&
err
!=
gorm
.
ErrRecordNotFound
{
return
nil
,
err
return
nil
,
err
}
}
...
...
service/coin_service/coin.go
View file @
5877b658
...
@@ -58,7 +58,7 @@ func (c *Coin) Count() (int, error) {
...
@@ -58,7 +58,7 @@ func (c *Coin) Count() (int, error) {
func
(
c
*
Coin
)
GetAllPlatform
()
([]
*
models
.
Platform
,
error
)
{
func
(
c
*
Coin
)
GetAllPlatform
()
([]
*
models
.
Platform
,
error
)
{
var
platforms
[]
*
models
.
Platform
var
platforms
[]
*
models
.
Platform
platforms
,
err
:=
models
.
GetAllPlatform
()
platforms
,
err
:=
models
.
GetAllPlatform
(
c
.
getMaps
()
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
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