feat: product store

This commit is contained in:
zzw
2026-08-07 15:41:18 +08:00
parent 39fb09e7df
commit 089bdc9761
15 changed files with 1313 additions and 762 deletions
+21 -6
View File
@@ -22,17 +22,32 @@ func NewProductServer(svcCtx *svc.ServiceContext) *ProductServer {
}
}
func (s *ProductServer) Add(ctx context.Context, in *product.AddReq) (*product.Response, error) {
l := logic.NewAddLogic(ctx, s.svcCtx)
return l.Add(in)
func (s *ProductServer) Create(ctx context.Context, in *product.CreateReq) (*product.Response, error) {
l := logic.NewCreateLogic(ctx, s.svcCtx)
return l.Create(in)
}
func (s *ProductServer) Edit(ctx context.Context, in *product.EditReq) (*product.Response, error) {
l := logic.NewEditLogic(ctx, s.svcCtx)
return l.Edit(in)
func (s *ProductServer) Info(ctx context.Context, in *product.InfoReq) (*product.Response, error) {
l := logic.NewInfoLogic(ctx, s.svcCtx)
return l.Info(in)
}
func (s *ProductServer) Items(ctx context.Context, in *product.ItemsReq) (*product.Response, error) {
l := logic.NewItemsLogic(ctx, s.svcCtx)
return l.Items(in)
}
func (s *ProductServer) Names(ctx context.Context, in *product.NamesReq) (*product.Response, error) {
l := logic.NewNamesLogic(ctx, s.svcCtx)
return l.Names(in)
}
func (s *ProductServer) Status(ctx context.Context, in *product.StatusReq) (*product.Response, error) {
l := logic.NewStatusLogic(ctx, s.svcCtx)
return l.Status(in)
}
func (s *ProductServer) Sort(ctx context.Context, in *product.SortReq) (*product.Response, error) {
l := logic.NewSortLogic(ctx, s.svcCtx)
return l.Sort(in)
}