feat: test product
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"strconv"
|
||||
|
||||
"product/internal/apply"
|
||||
"product/internal/dao"
|
||||
"product/internal/model"
|
||||
"product/internal/svc"
|
||||
@@ -50,5 +51,11 @@ func (l *InfoLogic) Info(in *product.InfoReq) (*product.Response, error) {
|
||||
return failResponse(utils.ErrorNotFund), nil
|
||||
}
|
||||
|
||||
// 管理员信息后续从 ctx / metadata 取
|
||||
adminId := 0
|
||||
if applyData, err := apply.Get(l.ctx, adminId, info.Id); err == nil {
|
||||
info.Edit = applyData.Status
|
||||
}
|
||||
|
||||
return okResponse(utils.StructToJson(toProductItem(info))), nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user