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
+6
View File
@@ -3,6 +3,7 @@ package logic
import (
"context"
"product/internal/apply"
"product/internal/dao"
"product/internal/model"
"product/internal/svc"
@@ -65,7 +66,12 @@ func (l *ItemsLogic) Items(in *product.ItemsReq) (*product.Response, error) {
}
items := make([]*product.Item, 0, len(info))
// 管理员信息后续从 ctx / metadata 取
adminId := 0
for _, row := range info {
if applyData, err := apply.Get(l.ctx, adminId, row.Id); err == nil {
row.Edit = applyData.Status
}
items = append(items, toProductItem(row))
}