From 408f683bcf3b6d94cc1d5df1c95c79e7ca773ee9 Mon Sep 17 00:00:00 2001 From: shenjiachi Date: Thu, 28 Nov 2024 19:16:52 +0800 Subject: [PATCH] update --- src/dao/egg_energy_user_watch_records_dao.go | 4 ++-- .../egg_energy_user_watch_records_implement.go | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/dao/egg_energy_user_watch_records_dao.go b/src/dao/egg_energy_user_watch_records_dao.go index f8d5b47..d1ab8c9 100644 --- a/src/dao/egg_energy_user_watch_records_dao.go +++ b/src/dao/egg_energy_user_watch_records_dao.go @@ -3,7 +3,7 @@ import "code.fnuoos.com/EggPlanet/egg_models.git/src/model" type EggEnergyUserWatchRecordsDao interface { - EggEnergyUserWatchRecordsInsert(OneCirclesUserWatchRecords *model.EggEnergyUserWatchRecords) (int64, error) - EggEnergyUserWatchRecordsUpdate(id interface{}, OneCirclesUserWatchRecords *model.EggEnergyUserWatchRecords, forceColums ...string) (int64, error) + EggEnergyUserWatchRecordsInsert(userWatchRecords *model.EggEnergyUserWatchRecords) (int64, error) + EggEnergyUserWatchRecordsUpdate(id interface{}, userWatchRecords *model.EggEnergyUserWatchRecords, forceColums ...string) (int64, error) EggEnergyUserWatchRecordsGetOneByParams(params map[string]interface{}) (*model.EggEnergyUserWatchRecords, error) } diff --git a/src/implement/egg_energy_user_watch_records_implement.go b/src/implement/egg_energy_user_watch_records_implement.go index b942310..9acd11c 100644 --- a/src/implement/egg_energy_user_watch_records_implement.go +++ b/src/implement/egg_energy_user_watch_records_implement.go @@ -16,23 +16,23 @@ type EggEnergyUserWatchRecordsDb struct { Db *xorm.Engine } -func (e EggEnergyUserWatchRecordsDb) EggEnergyUserWatchRecordsInsert(OneCirclesUserWatchRecords *model.EggEnergyUserWatchRecords) (int64, error) { - _, err := e.Db.InsertOne(OneCirclesUserWatchRecords) +func (e EggEnergyUserWatchRecordsDb) EggEnergyUserWatchRecordsInsert(userWatchRecords *model.EggEnergyUserWatchRecords) (int64, error) { + _, err := e.Db.InsertOne(userWatchRecords) if err != nil { return 0, err } - return OneCirclesUserWatchRecords.Id, nil + return userWatchRecords.Id, nil } -func (e EggEnergyUserWatchRecordsDb) EggEnergyUserWatchRecordsUpdate(id interface{}, OneCirclesUserWatchRecords *model.EggEnergyUserWatchRecords, forceColums ...string) (int64, error) { +func (e EggEnergyUserWatchRecordsDb) EggEnergyUserWatchRecordsUpdate(id interface{}, userWatchRecords *model.EggEnergyUserWatchRecords, forceColums ...string) (int64, error) { var ( affected int64 err error ) if forceColums != nil { - affected, err = e.Db.Where("id=?", id).Cols(forceColums...).Update(OneCirclesUserWatchRecords) + affected, err = e.Db.Where("id=?", id).Cols(forceColums...).Update(userWatchRecords) } else { - affected, err = e.Db.Where("id=?", id).Update(OneCirclesUserWatchRecords) + affected, err = e.Db.Where("id=?", id).Update(userWatchRecords) } if err != nil { return 0, err