소스 검색

update

master
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
}

불러오는 중...
취소
저장