participateInfoLogic.go 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. package logic
  2. import (
  3. "app.yhyue.com/moapp/jybase/common"
  4. "context"
  5. "jyBXCore/rpc/type/bxcore"
  6. "net/http"
  7. "jyBXCore/api/internal/svc"
  8. "jyBXCore/api/internal/types"
  9. "github.com/zeromicro/go-zero/core/logx"
  10. )
  11. type ParticipateInfoLogic struct {
  12. logx.Logger
  13. ctx context.Context
  14. svcCtx *svc.ServiceContext
  15. r *http.Request
  16. }
  17. func NewParticipateInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext, r *http.Request) *ParticipateInfoLogic {
  18. return &ParticipateInfoLogic{
  19. Logger: logx.WithContext(ctx),
  20. ctx: ctx,
  21. svcCtx: svcCtx,
  22. r: r,
  23. }
  24. }
  25. func (l *ParticipateInfoLogic) ParticipateInfo(req *types.ParticipateInfoReq) (resp *types.CommonResp, err error) {
  26. defer common.Catch()
  27. res, err := l.svcCtx.BxCore.ParticipateInfo(l.ctx, &bxcore.ParticipateInfoReq{
  28. EntId: req.EntId,
  29. EntUserId: req.EntUserId,
  30. PositionId: req.PositionId,
  31. PositionType: req.PositionType,
  32. AppId: req.AppId,
  33. MgoUserId: req.MgoUserId,
  34. AccountId: req.AccountId,
  35. UserId: req.UserId,
  36. NewUserId: req.NewUserId,
  37. Sid: req.Sid,
  38. EntAccountId: req.EntAccountId,
  39. Phone: req.Phone,
  40. })
  41. if err != nil {
  42. return &types.CommonResp{
  43. Err_code: -1,
  44. Err_msg: "查询失败",
  45. Data: map[string]interface{}{},
  46. }, nil
  47. }
  48. return &types.CommonResp{
  49. Err_code: res.ErrCode,
  50. Err_msg: res.ErrMsg,
  51. Data: res.Data,
  52. }, nil
  53. }