调整商户管理表

This commit is contained in:
2025-06-11 16:01:00 +08:00
parent 82d8944e7a
commit ed243f4e9d
10 changed files with 32 additions and 30 deletions

View File

@ -11,9 +11,10 @@ import (
func (c *ControllerV1) MerchantAdminInfo(ctx context.Context, req *v1.MerchantAdminInfoReq) (res *v1.MerchantAdminInfoRes, err error) {
merchantAdminId := g.RequestFromCtx(ctx).GetCtxVar("id").Int64()
role := g.RequestFromCtx(ctx).GetCtxVar("role").String()
info, err := service.MerchantAdmin().Info(ctx, &model.MerchantAdminInfoIn{MerchantAdminId: merchantAdminId})
if err != nil {
return nil, err
}
return &v1.MerchantAdminInfoRes{Username: info.Username, MerchantId: info.MerchantId, StoreId: info.StoreId}, nil
return &v1.MerchantAdminInfoRes{Username: info.Username, MerchantId: info.MerchantId, Role: role}, nil
}