1、泛型化参数,预留泛型约束,方便以后代码扩展的类型安全校验

2、升级goframe至v2.7.3
This commit is contained in:
apefuu
2024-09-19 19:33:00 +08:00
parent 2a87055b62
commit f18ce6384b
57 changed files with 221 additions and 220 deletions

View File

@@ -26,7 +26,7 @@ func init() {
// UploadFile 上传文件
func (s *sCommonUpload) UploadFile(ctx context.Context, uploadType string, file *ghttp.UploadFile) (res *sysin.AttachmentListModel, err error) {
attachment, err := storager.DoUpload(ctx, uploadType, file)
attachment, err := storager.DoUpload[any](ctx, uploadType, file)
if err != nil {
return
}
@@ -41,7 +41,7 @@ func (s *sCommonUpload) UploadFile(ctx context.Context, uploadType string, file
// CheckMultipart 检查文件分片
func (s *sCommonUpload) CheckMultipart(ctx context.Context, in *sysin.CheckMultipartInp) (res *sysin.CheckMultipartModel, err error) {
data, err := storager.CheckMultipart(ctx, in.CheckMultipartParams)
data, err := storager.CheckMultipart[any](ctx, in.CheckMultipartParams)
if err != nil {
return nil, err
}

View File

@@ -64,7 +64,7 @@ func (s *sCommonWechat) Authorize(ctx context.Context, in *commonin.WechatAuthor
prefix = g.Cfg().MustGet(ctx, "router.admin.prefix", "/admin").String()
path = gmeta.Get(common.WechatAuthorizeCallReq{}, "path").String()
redirectUri = basic.Domain + prefix + path
memberId = contexts.GetUserId(ctx)
memberId = contexts.GetUserId[any](ctx)
state = s.GetCacheKey(in.Type, token.GetAuthKey(token.GetAuthorization(request)))
scope string
)