mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-14 13:13:51 +08:00
1、泛型化参数,预留泛型约束,方便以后代码扩展的类型安全校验
2、升级goframe至v2.7.3
This commit is contained in:
@@ -55,7 +55,7 @@ func (s *sSysAttachment) View(ctx context.Context, in *sysin.AttachmentViewInp)
|
||||
// List 获取附件列表
|
||||
func (s *sSysAttachment) List(ctx context.Context, in *sysin.AttachmentListInp) (list []*sysin.AttachmentListModel, totalCount int, err error) {
|
||||
mod := s.Model(ctx)
|
||||
memberId := contexts.GetUserId(ctx)
|
||||
memberId := contexts.GetUserId[any](ctx)
|
||||
|
||||
// 超管允许查看指定用户的附件
|
||||
if service.AdminMember().VerifySuperId(ctx, memberId) && in.MemberId > 0 {
|
||||
@@ -108,7 +108,7 @@ func (s *sSysAttachment) List(ctx context.Context, in *sysin.AttachmentListInp)
|
||||
|
||||
// ClearKind 清空上传类型
|
||||
func (s *sSysAttachment) ClearKind(ctx context.Context, in *sysin.AttachmentClearKindInp) (err error) {
|
||||
memberId := contexts.GetUserId(ctx)
|
||||
memberId := contexts.GetUserId[any](ctx)
|
||||
if _, err = s.Model(ctx).Where(dao.SysAttachment.Columns().MemberId, memberId).Where(dao.SysAttachment.Columns().Kind, in.Kind).Delete(); err != nil {
|
||||
err = gerror.Wrap(err, "删除附件上传类型失败,请稍后重试!")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user