store
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"lone-services/rpc/sale/pb"
|
||||
"lone-services/services/sale/internal/svc"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type ApiLowerSaleItemsLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewApiLowerSaleItemsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ApiLowerSaleItemsLogic {
|
||||
return &ApiLowerSaleItemsLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *ApiLowerSaleItemsLogic) ApiLowerSaleItems(in *sale.ApiLowerSaleItemsReq) (*sale.Response, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &sale.Response{}, nil
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"lone-services/rpc/sale/pb"
|
||||
"lone-services/services/sale/internal/svc"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type ApiSaleAddLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewApiSaleAddLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ApiSaleAddLogic {
|
||||
return &ApiSaleAddLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
// API
|
||||
func (l *ApiSaleAddLogic) ApiSaleAdd(in *sale.ApiSaleAddReq) (*sale.Response, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &sale.Response{}, nil
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"lone-services/rpc/sale/pb"
|
||||
"lone-services/services/sale/internal/svc"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type ApiSaleInfoLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewApiSaleInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ApiSaleInfoLogic {
|
||||
return &ApiSaleInfoLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *ApiSaleInfoLogic) ApiSaleInfo(in *sale.EmptyReq) (*sale.Response, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &sale.Response{}, nil
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
// Code generated by goctl. DO NOT EDIT.
|
||||
// goctl 1.10.1
|
||||
// goctl 1.10.2
|
||||
// Source: sale.proto
|
||||
|
||||
package server
|
||||
@@ -80,6 +80,22 @@ func (s *SaleServer) Status(ctx context.Context, in *sale.StatusReq) (*sale.Resp
|
||||
return l.Status(in)
|
||||
}
|
||||
|
||||
// API
|
||||
func (s *SaleServer) ApiSaleAdd(ctx context.Context, in *sale.ApiSaleAddReq) (*sale.Response, error) {
|
||||
l := logic.NewApiSaleAddLogic(ctx, s.svcCtx)
|
||||
return l.ApiSaleAdd(in)
|
||||
}
|
||||
|
||||
func (s *SaleServer) ApiLowerSaleItems(ctx context.Context, in *sale.ApiLowerSaleItemsReq) (*sale.Response, error) {
|
||||
l := logic.NewApiLowerSaleItemsLogic(ctx, s.svcCtx)
|
||||
return l.ApiLowerSaleItems(in)
|
||||
}
|
||||
|
||||
func (s *SaleServer) ApiSaleInfo(ctx context.Context, in *sale.EmptyReq) (*sale.Response, error) {
|
||||
l := logic.NewApiSaleInfoLogic(ctx, s.svcCtx)
|
||||
return l.ApiSaleInfo(in)
|
||||
}
|
||||
|
||||
// 销售详情
|
||||
func (s *SaleServer) InfoInternal(ctx context.Context, in *sale.InfoReq) (*sale.InfoData, error) {
|
||||
l := logic.NewInfoInternalLogic(ctx, s.svcCtx)
|
||||
|
||||
Reference in New Issue
Block a user