Commit 5877b658 authored by shajiaiming's avatar shajiaiming

fix

parent 47b34408
...@@ -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
} }
......
...@@ -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
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment