shenjiachi преди 6 дни
родител
ревизия
95864f7c97
променени са 4 файла, в които са добавени 22 реда и са изтрити 1 реда
  1. +1
    -0
      src/dao/public_platoon_free_punish_with_user_dao.go
  2. +5
    -1
      src/dao/user_level_dao.go
  3. +8
    -0
      src/implement/public_platoon_free_punish_with_user_implement.go
  4. +8
    -0
      src/implement/user_level_implement.go

+ 1
- 0
src/dao/public_platoon_free_punish_with_user_dao.go Целия файл

@@ -11,4 +11,5 @@ type PublicPlatoonFreePunishWithUserDao interface {
PublicPlatoonFreePunishWithUserUpdate(Db *xorm.Engine, id interface{}, PublicPlatoonFreePunishWithUser *model.PublicPlatoonFreePunishWithUser, forceColums ...string) (int64, error)
PublicPlatoonFreePunishWithUserCountAndGetPageByParams(page int, limit int, params map[string]interface{}) ([]model.PublicPlatoonFreePunishWithUser, int64, error)
PublicPlatoonFreePunishWithUserGetOneByParams(params map[string]interface{}) (*model.PublicPlatoonFreePunishWithUser, error)
PublicPlatoonFreePunishWithUserDeleteOneByUID(uid int64) (int64, error)
}

+ 5
- 1
src/dao/user_level_dao.go Целия файл

@@ -1,6 +1,9 @@
package dao

import "code.fnuoos.com/EggPlanet/egg_models.git/src/model"
import (
"code.fnuoos.com/EggPlanet/egg_models.git/src/model"
"xorm.io/xorm"
)

type UserLevelDao interface {
//UserLevelInIDescByWeightLowWithOne 查询获取 权重最低 对应等级
@@ -12,4 +15,5 @@ type UserLevelDao interface {
// UserLevelAllByAscByPage 获取所有开启等级升序分页返回
UserLevelAllByAscByPage(page, limit int) ([]*model.UserLevel, int64, error)
UserLevelUpdate(id interface{}, level *model.UserLevel, forceColumns ...string) (int64, error)
UserLevelDeleteBySession(session *xorm.Session, id interface{}) (int64, error)
}

+ 8
- 0
src/implement/public_platoon_free_punish_with_user_implement.go Целия файл

@@ -78,3 +78,11 @@ func (p PublicPlatoonFreePunishWithUserDb) PublicPlatoonFreePunishWithUserGetOne
}
return &m, nil
}

func (p PublicPlatoonFreePunishWithUserDb) PublicPlatoonFreePunishWithUserDeleteOneByUID(uid int64) (int64, error) {
affected, err := p.Db.Where("uid=?", uid).Delete(&model.PublicPlatoonFreePunishWithUser{})
if err != nil {
return 0, zhios_order_relate_logx.Error(err.Error())
}
return affected, nil
}

+ 8
- 0
src/implement/user_level_implement.go Целия файл

@@ -74,3 +74,11 @@ func (u UserLevelDb) UserLevelUpdate(id interface{}, userLevel *model.UserLevel,
}
return affected, nil
}

func (u UserLevelDb) UserLevelDeleteBySession(session *xorm.Session, id interface{}) (int64, error) {
affected, err := session.Where("id = ?", id).Delete(&model.UserLevel{})
if err != nil {
return 0, err
}
return affected, nil
}

Зареждане…
Отказ
Запис