feat: test product

This commit is contained in:
zzw
2026-08-11 09:30:38 +08:00
parent a38fff4917
commit bdc582ad5f
22 changed files with 2730 additions and 75 deletions
+7
View File
@@ -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
}