Browse Source

update

tags/v0.0.5
shenjiachi 1 week ago
parent
commit
b87b1b4e41
4 changed files with 22 additions and 0 deletions
  1. +1
    -0
      src/dao/egg_energy_fund_data_dao.go
  2. +1
    -0
      src/dao/platform_revenue_data_dao.go
  3. +10
    -0
      src/implement/egg_energy_fund_data_implement.go
  4. +10
    -0
      src/implement/platform_revenue_data_implement.go

+ 1
- 0
src/dao/egg_energy_fund_data_dao.go View File

@@ -11,4 +11,5 @@ type EggEnergyFundDataDao interface {
EggEnergyFundDataInsert(eggEnergyFundData *model.EggEnergyFundData) (int, error) EggEnergyFundDataInsert(eggEnergyFundData *model.EggEnergyFundData) (int, error)
EggEnergyFundDataFindNotFinish() ([]model.EggEnergyFundData, error) EggEnergyFundDataFindNotFinish() ([]model.EggEnergyFundData, error)
EggEnergyFundDataUpdateBySession(session *xorm.Session, m model.EggEnergyFundData, forceColumns ...string) (int64, error) EggEnergyFundDataUpdateBySession(session *xorm.Session, m model.EggEnergyFundData, forceColumns ...string) (int64, error)
EggEnergyFundDataGetOneByParams(params map[string]interface{}) (*model.EggEnergyFundData, error)
} }

+ 1
- 0
src/dao/platform_revenue_data_dao.go View File

@@ -11,4 +11,5 @@ type PlatformRevenueDataDao interface {
PlatformRevenueDataFindAndCount(page, limit int, startAt, endAt string, kind int) ([]model.PlatformRevenueData, int64, error) PlatformRevenueDataFindAndCount(page, limit int, startAt, endAt string, kind int) ([]model.PlatformRevenueData, int64, error)
PlatformRevenueDataFindNotFinish() ([]model.PlatformRevenueData, error) PlatformRevenueDataFindNotFinish() ([]model.PlatformRevenueData, error)
PlatformRevenueDataUpdateBySession(session *xorm.Session, m model.PlatformRevenueData, forceColumns ...string) (int64, error) PlatformRevenueDataUpdateBySession(session *xorm.Session, m model.PlatformRevenueData, forceColumns ...string) (int64, error)
PlatformRevenueDataGetOneByParams(params map[string]interface{}) (*model.PlatformRevenueData, error)
} }

+ 10
- 0
src/implement/egg_energy_fund_data_implement.go View File

@@ -4,6 +4,7 @@ import (
"code.fnuoos.com/EggPlanet/egg_models.git/src/dao" "code.fnuoos.com/EggPlanet/egg_models.git/src/dao"
"code.fnuoos.com/EggPlanet/egg_models.git/src/model" "code.fnuoos.com/EggPlanet/egg_models.git/src/model"
zhios_order_relate_logx "code.fnuoos.com/EggPlanet/egg_models.git/utils/logx" zhios_order_relate_logx "code.fnuoos.com/EggPlanet/egg_models.git/utils/logx"
"fmt"
"xorm.io/xorm" "xorm.io/xorm"
) )


@@ -59,3 +60,12 @@ func (e EggEnergyFundDataDb) EggEnergyFundDataUpdateBySession(session *xorm.Sess


return affected, nil return affected, nil
} }

func (e EggEnergyFundDataDb) EggEnergyFundDataGetOneByParams(params map[string]interface{}) (*model.EggEnergyFundData, error) {
var m model.EggEnergyFundData
var query = fmt.Sprintf("%s =?", params["key"])
if has, err := e.Db.Where(query, params["value"]).Get(&m); err != nil || has == false {
return nil, zhios_order_relate_logx.Error(err)
}
return &m, nil
}

+ 10
- 0
src/implement/platform_revenue_data_implement.go View File

@@ -4,6 +4,7 @@ import (
"code.fnuoos.com/EggPlanet/egg_models.git/src/dao" "code.fnuoos.com/EggPlanet/egg_models.git/src/dao"
"code.fnuoos.com/EggPlanet/egg_models.git/src/model" "code.fnuoos.com/EggPlanet/egg_models.git/src/model"
zhios_order_relate_logx "code.fnuoos.com/EggPlanet/egg_models.git/utils/logx" zhios_order_relate_logx "code.fnuoos.com/EggPlanet/egg_models.git/utils/logx"
"fmt"
"xorm.io/xorm" "xorm.io/xorm"
) )


@@ -59,3 +60,12 @@ func (p PlatformRevenueDataDb) PlatformRevenueDataUpdateBySession(session *xorm.


return affected, nil return affected, nil
} }

func (p PlatformRevenueDataDb) PlatformRevenueDataGetOneByParams(params map[string]interface{}) (*model.PlatformRevenueData, error) {
var m model.PlatformRevenueData
var query = fmt.Sprintf("%s =?", params["key"])
if has, err := p.Db.Where(query, params["value"]).Get(&m); err != nil || has == false {
return nil, zhios_order_relate_logx.Error(err)
}
return &m, nil
}

Loading…
Cancel
Save