|
|
@@ -15,11 +15,11 @@ type VirtualCoinDb struct { |
|
|
|
Db *xorm.Engine |
|
|
|
} |
|
|
|
|
|
|
|
func (v VirtualCoinDb) VirtualCoinFindAllAndCount(pageSize, page int) (kindList []model.VirtualCoin, total int64, err error) { |
|
|
|
func (v VirtualCoinDb) VirtualCoinFindAll() ([]model.VirtualCoin, error) { |
|
|
|
var m []model.VirtualCoin |
|
|
|
total, err = v.Db.Where("is_use = ?", 1).Asc("id").Limit(pageSize, (page-1)*pageSize).FindAndCount(&m) |
|
|
|
err := v.Db.Where("").Find(&m) |
|
|
|
if err != nil { |
|
|
|
return nil, 0, zhios_order_relate_logx.Error(err) |
|
|
|
return nil, zhios_order_relate_logx.Error(err.Error()) |
|
|
|
} |
|
|
|
return m, total, nil |
|
|
|
return m, nil |
|
|
|
} |