feat: test product
This commit is contained in:
@@ -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))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user