refactor: reorganize modules and add Linux build tooling

This commit is contained in:
2026-08-09 12:41:08 +08:00
parent 86024fa81d
commit 5cc5fd92ed
1461 changed files with 4054 additions and 4724 deletions

View File

@@ -0,0 +1,35 @@
package summary
import (
"context"
"bsm/full/module/ec/order/internal/logic/common"
pb "bsm/full/module/ec/order/pb"
"git.apinb.com/bsm-sdk/core/errcode"
"git.apinb.com/bsm-sdk/core/printer"
"git.apinb.com/bsm-sdk/core/service"
)
// 获取一个订单的详情数据
func Get(ctx context.Context, in *pb.IdentRequest) (reply *pb.SummaryGetReply, err error) {
// parse authorization meta.
_, err = service.ParseMetaCtx(ctx, nil)
if err != nil {
return nil, err
}
// valildate request id,identity.
if in.Identity == "" {
return nil, errcode.ErrInvalidArgument
}
summary, err := common.GetOrderSummaryByIdentity(in.Identity)
if err != nil {
printer.Error(err.Error())
return nil, errcode.ErrDB
}
return &pb.SummaryGetReply{
Summary: summary,
}, nil
}