package logic import ( "context" "fmt" "bp.jydev.jianyu360.cn/ApplicationCenter/threeMarket/public/entity" "bp.jydev.jianyu360.cn/ApplicationCenter/threeMarket/rpc/internal/svc" "bp.jydev.jianyu360.cn/ApplicationCenter/threeMarket/rpc/pb" "github.com/zeromicro/go-zero/core/logx" ) type ConfirmReceiptLogic struct { ctx context.Context svcCtx *svc.ServiceContext logx.Logger } func NewConfirmReceiptLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ConfirmReceiptLogic { return &ConfirmReceiptLogic{ ctx: ctx, svcCtx: svcCtx, Logger: logx.WithContext(ctx), } } // 确认收货 func (l *ConfirmReceiptLogic) ConfirmReceipt(in *pb.ConfirmReceiptReq) (*pb.Resp, error) { // todo: add your logic here and delete this line resp := &pb.Resp{} tripartite_market_service := &entity.Tripartite_market_service_struct{ Id: in.ServiceId, Appid: in.Appid, User_id: in.BaseUserId, Goods_code: in.GoodsCode, } status, err := tripartite_market_service.Finish() if err != nil { l.Error(fmt.Sprintf("%+v", in), err.Error()) resp.ErrorMsg = err.Error() resp.ErrorCode = -1 } resp.Status = status return resp, nil }