participateListLogic.go 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. package logic
  2. import (
  3. "context"
  4. "jyBXCore/rpc/type/bxcore"
  5. "net/http"
  6. "jyBXCore/api/internal/svc"
  7. "jyBXCore/api/internal/types"
  8. "github.com/zeromicro/go-zero/core/logx"
  9. )
  10. type ParticipateListLogic struct {
  11. logx.Logger
  12. ctx context.Context
  13. svcCtx *svc.ServiceContext
  14. r *http.Request
  15. }
  16. func NewParticipateListLogic(ctx context.Context, svcCtx *svc.ServiceContext, r *http.Request) *ParticipateListLogic {
  17. return &ParticipateListLogic{
  18. Logger: logx.WithContext(ctx),
  19. ctx: ctx,
  20. svcCtx: svcCtx,
  21. r: r,
  22. }
  23. }
  24. func (l *ParticipateListLogic) ParticipateList(req *types.ParticipateListReq) (resp *types.CommonResp, err error) {
  25. res, err := l.svcCtx.BxCore.ParticipateList(l.ctx, &bxcore.ParticipateListReq{
  26. Identity: req.Identity,
  27. EntId: req.EntId,
  28. EntUserId: req.EntUserId,
  29. PositionId: req.PositionId,
  30. PositionType: req.PositionType,
  31. AppId: req.AppId,
  32. MgoUserId: req.MgoUserId,
  33. AccountId: req.AccountId,
  34. UserId: req.UserId,
  35. NewUserId: req.NewUserId,
  36. Area: req.Area,
  37. City: req.City,
  38. BidTime: req.BidTime,
  39. BidEndTime: req.BidEndTime,
  40. BidOpenTime: req.BidOpenTime,
  41. BidEndStatus: req.BidEndStatus,
  42. BidOpenStatus: req.BidOpenStatus,
  43. Keywords: req.Keywords,
  44. EntUserIds: req.EntUserIds,
  45. PageSize: req.PageSize,
  46. PageNum: req.PageNum,
  47. })
  48. if err != nil {
  49. return &types.CommonResp{
  50. Err_code: res.ErrCode,
  51. Err_msg: res.ErrMsg,
  52. Data: false,
  53. }, nil
  54. }
  55. return &types.CommonResp{
  56. Err_code: res.ErrCode,
  57. Err_msg: res.ErrMsg,
  58. Data: res.Data,
  59. }, nil
  60. }