participatePersonsLogic.go 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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 ParticipatePersonsLogic struct {
  11. logx.Logger
  12. ctx context.Context
  13. svcCtx *svc.ServiceContext
  14. r *http.Request
  15. }
  16. func NewParticipatePersonsLogic(ctx context.Context, svcCtx *svc.ServiceContext, r *http.Request) *ParticipatePersonsLogic {
  17. return &ParticipatePersonsLogic{
  18. Logger: logx.WithContext(ctx),
  19. ctx: ctx,
  20. svcCtx: svcCtx,
  21. r: r,
  22. }
  23. }
  24. func (l *ParticipatePersonsLogic) ParticipatePersons(req *types.ParticipatePersonsReq) (resp *types.CommonResp, err error) {
  25. res, err := l.svcCtx.BxCore.ParticipatePersons(l.ctx, &bxcore.ParticipatePersonsReq{
  26. EntId: req.EntId,
  27. EntUserId: req.EntUserId,
  28. PositionId: req.PositionId,
  29. PositionType: req.PositionType,
  30. MgoUserId: req.MgoUserId,
  31. AppId: req.AppId,
  32. UserId: req.UserId,
  33. NewUserId: req.NewUserId,
  34. AccountId: req.AccountId,
  35. ProjectId: req.ProjectId, //项目信息id 移动需要
  36. EntAccountId: req.EntAccountId,
  37. Phone: req.Phone,
  38. })
  39. return &types.CommonResp{
  40. Err_code: res.ErrCode,
  41. Err_msg: res.ErrMsg,
  42. Data: res.Data,
  43. }, nil
  44. return
  45. }