participateListLogic.go 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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 ParticipateListLogic struct {
  12. logx.Logger
  13. ctx context.Context
  14. svcCtx *svc.ServiceContext
  15. r *http.Request
  16. }
  17. func NewParticipateListLogic(ctx context.Context, svcCtx *svc.ServiceContext, r *http.Request) *ParticipateListLogic {
  18. return &ParticipateListLogic{
  19. Logger: logx.WithContext(ctx),
  20. ctx: ctx,
  21. svcCtx: svcCtx,
  22. r: r,
  23. }
  24. }
  25. func (l *ParticipateListLogic) ParticipateList(req *types.ParticipateListReq) (resp *types.CommonResp, err error) {
  26. defer common.Catch()
  27. res, err := l.svcCtx.BxCore.ParticipateList(l.ctx, &bxcore.ParticipateListReq{
  28. Identity: req.Identity,
  29. EntId: req.EntId,
  30. EntUserId: req.EntUserId,
  31. PositionId: req.PositionId,
  32. PositionType: req.PositionType,
  33. AppId: req.AppId,
  34. MgoUserId: req.MgoUserId,
  35. AccountId: req.AccountId,
  36. UserId: req.UserId,
  37. NewUserId: req.NewUserId,
  38. Area: req.Area,
  39. City: req.City,
  40. BidTime: req.BidTime,
  41. BidEndTime: req.BidEndTime,
  42. BidOpenTime: req.BidOpenTime,
  43. BidEndStatus: req.BidEndStatus,
  44. BidOpenStatus: req.BidOpenStatus,
  45. Keywords: req.Keywords,
  46. EntUserIds: req.EntUserIds,
  47. PageSize: req.PageSize,
  48. PageNum: req.PageNum,
  49. OrderNum: req.OrderNum,
  50. EntAccountId: req.EntAccountId,
  51. Phone: req.Phone,
  52. })
  53. if res != nil && (*res).Data != nil {
  54. return &types.CommonResp{
  55. Err_code: res.ErrCode,
  56. Err_msg: res.ErrMsg,
  57. Data: res.Data,
  58. }, err
  59. }
  60. return &types.CommonResp{
  61. Err_code: 0,
  62. Err_msg: "",
  63. Data: nil,
  64. }, nil
  65. }