package logic import ( "context" "jyBXCore/rpc/type/bxcore" "net/http" "jyBXCore/api/internal/svc" "jyBXCore/api/internal/types" "github.com/zeromicro/go-zero/core/logx" ) type ParticipateActionLogic struct { logx.Logger ctx context.Context svcCtx *svc.ServiceContext r *http.Request } func NewParticipateActionLogic(ctx context.Context, svcCtx *svc.ServiceContext, r *http.Request) *ParticipateActionLogic { return &ParticipateActionLogic{ Logger: logx.WithContext(ctx), ctx: ctx, svcCtx: svcCtx, r: r, } } func (l *ParticipateActionLogic) ParticipateAction(req *types.ParticipateActionReq) (resp *types.CommonResp, err error) { res, err := l.svcCtx.BxCore.ParticipateAction(l.ctx, &bxcore.ParticipateActionReq{ EntId: req.EntId, EntUserId: req.EntUserId, PositionId: req.PositionId, PositionType: req.PositionType, AppId: req.AppId, MgoUserId: req.MgoUserId, AccountId: req.AccountId, UserId: req.UserId, NewUserId: req.NewUserId, BidId: req.BidId, ToEntUserId: req.ToEntUserId, IsRetain: req.IsRetain, ActionType: req.ActionType, }) if err != nil { return &types.CommonResp{ Err_code: res.ErrCode, Err_msg: res.ErrMsg, Data: false, }, nil } return &types.CommonResp{ Err_code: res.ErrCode, Err_msg: res.ErrMsg, Data: res.Data, }, nil return }