diff --git a/src/implement/egg_energy_basic_setting_implement.go b/src/implement/egg_energy_basic_setting_implement.go index 3ed7ea7..efd6f3f 100644 --- a/src/implement/egg_energy_basic_setting_implement.go +++ b/src/implement/egg_energy_basic_setting_implement.go @@ -22,7 +22,7 @@ func (e EggEnergyBasicSettingDb) EggEnergyBasicSettingUpdate(session *xorm.Sessi err error ) if forceColums != nil { - affected, err = session.Where("id=?", id).Cols(forceColums...).Update(EggEnergyBasicSetting) + affected, err = session.Where("id=?", id).MustCols(forceColums...).Update(EggEnergyBasicSetting) } else { affected, err = session.Where("id=?", id).Update(EggEnergyBasicSetting) } diff --git a/src/implement/new_user_red_package_implement.go b/src/implement/new_user_red_package_implement.go index 7cf76ff..b8a83c9 100644 --- a/src/implement/new_user_red_package_implement.go +++ b/src/implement/new_user_red_package_implement.go @@ -37,7 +37,7 @@ func (n NewUserRedPackageDb) NewUserRedPackageUpdate(id interface{}, newUserRedP err error ) if forceColums != nil { - affected, err = n.Db.Where("id=?", id).Cols(forceColums...).Update(newUserRedPackage) + affected, err = n.Db.Where("id=?", id).MustCols(forceColums...).Update(newUserRedPackage) } else { affected, err = n.Db.Where("id=?", id).Update(newUserRedPackage) } diff --git a/src/implement/user_implement.go b/src/implement/user_implement.go index c86997d..4a1da12 100644 --- a/src/implement/user_implement.go +++ b/src/implement/user_implement.go @@ -50,7 +50,7 @@ func (u UserDb) UserUpdate(id interface{}, user *model.User, forceColumns ...str err error ) if forceColumns != nil { - affected, err = u.Db.Where("id=?", id).Cols(forceColumns...).Update(user) + affected, err = u.Db.Where("id=?", id).MustCols(forceColumns...).Update(user) } else { affected, err = u.Db.Where("id=?", id).Update(user) }