huangjiajun vor 1 Tag
Ursprung
Commit
1f1fb9ecdb
2 geänderte Dateien mit 14 neuen und 3 gelöschten Zeilen
  1. +2
    -1
      src/dao/egg_energy_team_assistance_dao.go
  2. +12
    -2
      src/implement/egg_energy_team_assistance_implement.go

+ 2
- 1
src/dao/egg_energy_team_assistance_dao.go Datei anzeigen

@@ -1,4 +1,4 @@
package dao
package dao

import (
"code.fnuoos.com/EggPlanet/egg_models.git/src/model"
@@ -9,6 +9,7 @@ type EggEnergyTeamAssistanceDao interface {
EggEnergyTeamAssistanceInsertBySession(session *xorm.Session, EggEnergyTeamAssistance *model.EggEnergyTeamAssistance) (int64, error)
EggEnergyTeamAssistanceUpdateBySession(session *xorm.Session, id interface{}, EggEnergyTeamAssistance *model.EggEnergyTeamAssistance, forceColums ...string) (int64, error)
EggEnergyTeamAssistanceGetOneByParamsBySession(session *xorm.Session, params map[string]interface{}) (*model.EggEnergyTeamAssistance, error)
EggEnergyTeamAssistanceGetOneBySession(session *xorm.Session, uid int64, date string) (*model.EggEnergyTeamAssistance, error)
EggEnergyTeamAssistanceGetOne(uid int64, date string) (*model.EggEnergyTeamAssistance, error)
EggEnergyTeamAssistanceInsert(EggEnergyTeamAssistance *model.EggEnergyTeamAssistance) (int64, error)
EggEnergyTeamAssistanceUpdate(id interface{}, EggEnergyTeamAssistance *model.EggEnergyTeamAssistance, forceColums ...string) (int64, error)


+ 12
- 2
src/implement/egg_energy_team_assistance_implement.go Datei anzeigen

@@ -1,4 +1,4 @@
package implement
package implement

import (
"code.fnuoos.com/EggPlanet/egg_models.git/src/dao"
@@ -64,7 +64,17 @@ func (e EggEnergyTeamAssistanceDb) EggEnergyTeamAssistanceGetOne(uid int64, date
}
return &m, nil
}

func (e EggEnergyTeamAssistanceDb) EggEnergyTeamAssistanceGetOneBySession(session *xorm.Session, uid int64, date string) (*model.EggEnergyTeamAssistance, error) {
var m model.EggEnergyTeamAssistance
has, err := session.Where("uid = ?", uid).And("date = ?", date).Get(&m)
if err != nil {
return nil, err
}
if has == false {
return nil, nil
}
return &m, nil
}
func (e EggEnergyTeamAssistanceDb) EggEnergyTeamAssistanceInsert(EggEnergyTeamAssistance *model.EggEnergyTeamAssistance) (int64, error) {
_, err := e.Db.InsertOne(EggEnergyTeamAssistance)
if err != nil {


Laden…
Abbrechen
Speichern