feat: 添加争议微服务,支持订单争议流程

This commit is contained in:
zetaloop
2026-04-24 12:31:41 +08:00
parent 6edf15996c
commit 95f2f10f9f
66 changed files with 13301 additions and 57 deletions
@@ -0,0 +1,33 @@
package logic
import (
"context"
"juwan-backend/app/dispute/rpc/internal/svc"
"juwan-backend/app/dispute/rpc/pb"
"github.com/zeromicro/go-zero/core/logx"
)
type GetDisputesByIdLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewGetDisputesByIdLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetDisputesByIdLogic {
return &GetDisputesByIdLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *GetDisputesByIdLogic) GetDisputesById(in *pb.GetDisputesByIdReq) (*pb.GetDisputesByIdResp, error) {
d, err := l.svcCtx.DisputeModelRO.Disputes.Get(l.ctx, in.GetId())
if err != nil {
return nil, err
}
return &pb.GetDisputesByIdResp{Disputes: entDisputeToPb(d)}, nil
}