调整表结构
This commit is contained in:
@ -2,13 +2,20 @@ package store
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"server/internal/model"
|
||||
"server/internal/service"
|
||||
|
||||
"server/api/store/v1"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) Update(ctx context.Context, req *v1.UpdateReq) (res *v1.UpdateRes, err error) {
|
||||
return nil, gerror.NewCode(gcode.CodeNotImplemented)
|
||||
fromCtx := g.RequestFromCtx(ctx)
|
||||
operatorId := fromCtx.Get("id").Int64()
|
||||
operatorRole := fromCtx.Get("role").String()
|
||||
out, err := service.Store().Update(ctx, &model.StoreUpdateIn{OperatorRole: operatorRole, OperatorId: operatorId})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &v1.UpdateRes{Success: out.Success}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user