123456789101112131415161718192021222324252627282930313233343536373839 |
- package logic
- import (
- "bp.jydev.jianyu360.cn/BaseService/biService/rpc/biservice"
- "context"
- "github.com/gogf/gf/v2/util/gconv"
- "bp.jydev.jianyu360.cn/BaseService/biService/api/internal/svc"
- "bp.jydev.jianyu360.cn/BaseService/biService/api/internal/types"
- "github.com/zeromicro/go-zero/core/logx"
- )
- type TransferClueSuccLogic struct {
- logx.Logger
- ctx context.Context
- svcCtx *svc.ServiceContext
- }
- func NewTransferClueSuccLogic(ctx context.Context, svcCtx *svc.ServiceContext) *TransferClueSuccLogic {
- return &TransferClueSuccLogic{
- Logger: logx.WithContext(ctx),
- ctx: ctx,
- svcCtx: svcCtx,
- }
- }
- func (l *TransferClueSuccLogic) TransferClueSucc(req *types.TransferClueReq) (resp *types.BiResp, err error) {
- if req.Phone == "" && req.OrderNo == "" {
- return &types.BiResp{Error_code: -1, Error_msg: "手机号或者订单号不能为空", Data: nil}, err
- }
- res, err := l.svcCtx.BiServiceRpc.TransferClueByPhone(l.ctx, &biservice.TransferClueReq{
- PositionId: req.PositionId,
- UserId: req.UserId,
- Phone: req.Phone,
- OrderNo: req.OrderNo,
- })
- return &types.BiResp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg, Data: gconv.Map(gconv.UnsafeBytesToStr(res.Data))}, err
- }
|