Bladeren bron

add 基础设置

tags/v0.0.2
shenjiachi 1 week geleden
bovenliggende
commit
b7ed2908de
4 gewijzigde bestanden met toevoegingen van 15 en 5 verwijderingen
  1. +1
    -0
      src/dao/egg_energy_basic_setting_dao.go
  2. +1
    -1
      src/dao/virtual_coin_dao.go
  3. +9
    -0
      src/implement/egg_energy_basic_setting_implement.go
  4. +4
    -4
      src/implement/virtual_coin_implement.go

+ 1
- 0
src/dao/egg_energy_basic_setting_dao.go Bestand weergeven

@@ -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)
}

+ 1
- 1
src/dao/virtual_coin_dao.go Bestand weergeven

@@ -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)
}

+ 9
- 0
src/implement/egg_energy_basic_setting_implement.go Bestand weergeven

@@ -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
}

+ 4
- 4
src/implement/virtual_coin_implement.go Bestand weergeven

@@ -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
}

Laden…
Annuleren
Opslaan