diff --git a/src/dao/egg_energy_basic_setting_dao.go b/src/dao/egg_energy_basic_setting_dao.go index 58b2415..e839afc 100644 --- a/src/dao/egg_energy_basic_setting_dao.go +++ b/src/dao/egg_energy_basic_setting_dao.go @@ -8,4 +8,5 @@ import ( type EggEnergyBasicSettingDao interface { EggEnergyBasicSettingUpdate(session *xorm.Session, id interface{}, EggEnergyBasicSetting *model.EggEnergyBasicSetting, forceColums ...string) (int64, error) EggEnergyBasicSettingGetOneByParams(params map[string]interface{}) (*model.EggEnergyBasicSetting, error) + EggEnergyBasicSettingGetOne() (*model.EggEnergyBasicSetting, error) } diff --git a/src/dao/virtual_coin_dao.go b/src/dao/virtual_coin_dao.go index 1fb1366..1ac66b6 100644 --- a/src/dao/virtual_coin_dao.go +++ b/src/dao/virtual_coin_dao.go @@ -4,5 +4,5 @@ import "code.fnuoos.com/EggPlanet/egg_models.git/src/model" type VirtualCoinDao interface { //TODO:: You can add specific method definitions here - VirtualCoinFindAllAndCount(pageSize, page int) (kindList []model.VirtualCoin, total int64, err error) + VirtualCoinFindAll() ([]model.VirtualCoin, error) } diff --git a/src/implement/egg_energy_basic_setting_implement.go b/src/implement/egg_energy_basic_setting_implement.go index e4217da..af077e3 100644 --- a/src/implement/egg_energy_basic_setting_implement.go +++ b/src/implement/egg_energy_basic_setting_implement.go @@ -40,3 +40,12 @@ func (e EggEnergyBasicSettingDb) EggEnergyBasicSettingGetOneByParams(params map[ } return &m, nil } + +func (e EggEnergyBasicSettingDb) EggEnergyBasicSettingGetOne() (*model.EggEnergyBasicSetting, error) { + var m *model.EggEnergyBasicSetting + _, err := e.Db.Where("id > ?", 1).Get(&m) + if err != nil { + return nil, zhios_order_relate_logx.Error(err.Error()) + } + return m, nil +} diff --git a/src/implement/virtual_coin_implement.go b/src/implement/virtual_coin_implement.go index acd42e1..6241927 100644 --- a/src/implement/virtual_coin_implement.go +++ b/src/implement/virtual_coin_implement.go @@ -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 }