Browse Source

Merge remote-tracking branch 'origin/master'

master
huangjiajun 10 hours ago
parent
commit
78f1b4dd75
4 changed files with 24 additions and 4 deletions
  1. +1
    -1
      src/dao/egg_friend_circle_basic_dao.go
  2. +1
    -1
      src/dao/egg_friend_circle_user_black_list_dao.go
  3. +10
    -2
      src/implement/egg_friend_circle_basic_implement.go
  4. +12
    -0
      src/implement/egg_friend_circle_user_black_list_implement.go

+ 1
- 1
src/dao/egg_friend_circle_basic_dao.go View File

@@ -3,7 +3,7 @@
import "code.fnuoos.com/EggPlanet/egg_models.git/src/model"

type EggFriendCircleBasicDao interface {
//TODO:: You can add specific method definitions here
EggFriendCircleBasicGet() (*model.EggFriendCircleBasic, error)
EggFriendCircleBasicGetOne() (*model.EggFriendCircleBasic, error)
EggFriendCircleBasicInsert(m *model.EggFriendCircleBasic) (int, error)
UpdateEggFriendCircleBasic(m *model.EggFriendCircleBasic, columns ...string) (int64, error)


+ 1
- 1
src/dao/egg_friend_circle_user_black_list_dao.go View File

@@ -3,7 +3,7 @@
import "code.fnuoos.com/EggPlanet/egg_models.git/src/model"

type EggFriendCircleUserBlackListDao interface {
//TODO:: You can add specific method definitions here
EggFriendCircleUserBlackListGet(uid int64) (*model.EggFriendCircleUserBlackList, error)
EggFriendCircleUserBlackListInsert(m *model.EggFriendCircleUserBlackList) (int, error)
EggFriendCircleUserBlackListDeleteById(id int) (int64, error)
}

+ 10
- 2
src/implement/egg_friend_circle_basic_implement.go View File

@@ -15,6 +15,14 @@ type EggFriendCircleBasicDb struct {
Db *xorm.Engine
}

func (e EggFriendCircleBasicDb) EggFriendCircleBasicGet() (*model.EggFriendCircleBasic, error) {
var m model.EggFriendCircleBasic
_, err := e.Db.Where("id >= ?", 1).Get(&m)
if err != nil {
return nil, zhios_order_relate_logx.Error(err.Error())
}
return &m, nil
}
func (e EggFriendCircleBasicDb) EggFriendCircleBasicGetOne() (*model.EggFriendCircleBasic, error) {
var m model.EggFriendCircleBasic
has, err := e.Db.Where("id >= ?", 1).Get(&m)
@@ -30,7 +38,7 @@ func (e EggFriendCircleBasicDb) EggFriendCircleBasicGetOne() (*model.EggFriendCi
func (e EggFriendCircleBasicDb) EggFriendCircleBasicInsert(m *model.EggFriendCircleBasic) (int, error) {
_, err := e.Db.InsertOne(m)
if err != nil {
return 0, err
return 0, zhios_order_relate_logx.Error(err.Error())
}
return m.Id, nil
}
@@ -38,7 +46,7 @@ func (e EggFriendCircleBasicDb) EggFriendCircleBasicInsert(m *model.EggFriendCir
func (e EggFriendCircleBasicDb) UpdateEggFriendCircleBasic(m *model.EggFriendCircleBasic, columns ...string) (int64, error) {
affected, err := e.Db.Where("id =?", m.Id).Cols(columns...).Update(m)
if err != nil {
return 0, err
return 0, zhios_order_relate_logx.Error(err.Error())
}
return affected, nil
}

+ 12
- 0
src/implement/egg_friend_circle_user_black_list_implement.go View File

@@ -29,3 +29,15 @@ func (e EggFriendCircleUserBlackListDb) EggFriendCircleUserBlackListDeleteById(i
}
return affected, nil
}

func (e EggFriendCircleUserBlackListDb) EggFriendCircleUserBlackListGet(uid int64) (*model.EggFriendCircleUserBlackList, error) {
var m model.EggFriendCircleUserBlackList
has, err := e.Db.Where("uid >= ?", uid).Get(&m)
if err != nil {
return nil, zhios_order_relate_logx.Error(err.Error())
}
if !has {
return nil, nil
}
return &m, nil
}

Loading…
Cancel
Save