mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-12-27 10:36:00 +08:00
This commit is contained in:
@@ -8,7 +8,6 @@ import (
|
||||
"context"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"hotgo/internal/consts"
|
||||
"hotgo/internal/dao/internal"
|
||||
"hotgo/internal/model/entity"
|
||||
)
|
||||
@@ -54,22 +53,3 @@ func (dao *adminMemberPostDao) UpdatePostIds(ctx context.Context, memberId int64
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetMemberByIds 获取指定关联员的岗位ids
|
||||
func (dao *adminMemberPostDao) GetMemberByIds(ctx context.Context, memberId int64) (postIds []int64, err error) {
|
||||
var list []*entity.AdminMemberPost
|
||||
err = dao.Ctx(ctx).
|
||||
Fields("post_id").
|
||||
Where("member_id", memberId).
|
||||
Scan(&list)
|
||||
if err != nil {
|
||||
err = gerror.Wrap(err, consts.ErrorORM)
|
||||
return postIds, err
|
||||
}
|
||||
|
||||
for i := 0; i < len(list); i++ {
|
||||
postIds = append(postIds, list[i].PostId)
|
||||
}
|
||||
|
||||
return postIds, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user