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
24ebe81f
Commit
24ebe81f
authored
Jan 08, 2020
by
shajiaiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
34e8c7c5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
4 additions
and
6 deletions
+4
-6
Auth.go
middleware/auth/Auth.go
+0
-1
currency.go
models/currency.go
+1
-1
platform_chain.go
models/platform_chain.go
+1
-1
supported_currency.go
models/supported_currency.go
+2
-2
wallet.go
service/wallet_service/wallet.go
+0
-1
No files found.
middleware/auth/Auth.go
View file @
24ebe81f
...
...
@@ -19,7 +19,6 @@ func AUTH() gin.HandlerFunc {
code
=
e
.
INVALID_PARAMS
}
else
{
_
,
err
:=
models
.
CheckToken
(
token
)
fmt
.
Println
(
err
)
if
err
!=
nil
{
code
=
e
.
ERROR_AUTH_CHECK_TOKEN_FAIL
}
...
...
models/currency.go
View file @
24ebe81f
...
...
@@ -27,7 +27,7 @@ func (c Currency) TableName() string {
func
GetCurrencies
()
([]
*
Currency
,
error
)
{
var
currencies
[]
*
Currency
err
:=
db
.
Debug
()
.
Select
(
"id, pj_name"
)
.
Find
(
&
currencies
)
.
Error
err
:=
db
.
Select
(
"id, pj_name"
)
.
Find
(
&
currencies
)
.
Error
if
err
!=
nil
&&
err
!=
gorm
.
ErrRecordNotFound
{
return
nil
,
err
}
...
...
models/platform_chain.go
View file @
24ebe81f
...
...
@@ -50,7 +50,7 @@ func ExistPlatformChainById(id int) (bool, error) {
func
GetPlatformChainTotal
(
maps
interface
{})
(
int
,
error
)
{
var
count
int
if
err
:=
db
.
Debug
()
.
Model
(
&
PlatformChain
{})
.
Where
(
maps
)
.
Count
(
&
count
)
.
Error
;
err
!=
nil
{
if
err
:=
db
.
Model
(
&
PlatformChain
{})
.
Where
(
maps
)
.
Count
(
&
count
)
.
Error
;
err
!=
nil
{
return
0
,
err
}
...
...
models/supported_currency.go
View file @
24ebe81f
...
...
@@ -13,7 +13,7 @@ type SupportedCurrency struct {
CurrencyId
int
`json:"currency_id"`
//法币ID
Sort
int
`json:"sort"`
//排序
Currency
Info
*
Currency
`gorm:"foreignkey:CurrencyId
"`
Currency
*
Currency
`json:"Currency
"`
}
func
(
c
SupportedCurrency
)
TableName
()
string
{
...
...
@@ -61,7 +61,7 @@ func GetSupportedCurrencyTotal(maps interface{}) (int, error) {
func
GetSupportedCurrencies
(
pageNum
,
pageSize
int
,
maps
interface
{})
([]
*
SupportedCurrency
,
error
)
{
var
currencies
[]
*
SupportedCurrency
err
:=
db
.
Preload
(
"Currency
Info
"
)
.
Where
(
maps
)
.
Offset
(
pageNum
)
.
Limit
(
pageSize
)
.
Find
(
&
currencies
)
.
Error
err
:=
db
.
Preload
(
"Currency"
)
.
Where
(
maps
)
.
Offset
(
pageNum
)
.
Limit
(
pageSize
)
.
Find
(
&
currencies
)
.
Error
if
err
!=
nil
&&
err
!=
gorm
.
ErrRecordNotFound
{
return
nil
,
err
}
...
...
service/wallet_service/wallet.go
View file @
24ebe81f
...
...
@@ -68,7 +68,6 @@ func (w *Wallet) Edit() error {
}
func
(
w
*
Wallet
)
ExistById
()
(
bool
,
error
)
{
fmt
.
Println
(
w
.
Id
)
return
models
.
ExistWalletById
(
w
.
Id
)
}
...
...
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