statisticsProjectDetailsLogic.go 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. package logic
  2. import (
  3. "app.yhyue.com/moapp/jybase/encrypt"
  4. "context"
  5. "jyBXCore/rpc/type/bxcore"
  6. "jyBXCore/api/internal/svc"
  7. "jyBXCore/api/internal/types"
  8. "github.com/zeromicro/go-zero/core/logx"
  9. )
  10. type StatisticsProjectDetailsLogic struct {
  11. logx.Logger
  12. ctx context.Context
  13. svcCtx *svc.ServiceContext
  14. }
  15. func NewStatisticsProjectDetailsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *StatisticsProjectDetailsLogic {
  16. return &StatisticsProjectDetailsLogic{
  17. Logger: logx.WithContext(ctx),
  18. ctx: ctx,
  19. svcCtx: svcCtx,
  20. }
  21. }
  22. func (l *StatisticsProjectDetailsLogic) StatisticsProjectDetails(req *types.ProjectDetailReq) (resp *types.CommonResp, err error) {
  23. // todo: add your logic here and delete this line
  24. for k, v := range req.EntUserIdArr {
  25. req.EntUserIdArr[k] = encrypt.SE.Decode4Hex(v)
  26. }
  27. res, err := l.svcCtx.BxCore.ProjectDetails(l.ctx, &bxcore.ProjectDetailsReq{
  28. EntId: req.EntId,
  29. EntUserId: req.EntUserId,
  30. PositionId: req.PositionId,
  31. EntUserIdArr: req.EntUserIdArr,
  32. DeptId: req.DeptId,
  33. StartTime: req.StartTime,
  34. EndTime: req.EndTime,
  35. BidWay: req.BidWay,
  36. Source: req.Source,
  37. IsParticipate: req.Isparticipate,
  38. BidUpdateEndTime: req.UpdateEndTime,
  39. BidUpdateStartTime: req.UpdateStartTime,
  40. PageNum: req.PageNum,
  41. PageSize: req.PageSize,
  42. })
  43. if err != nil {
  44. return nil, err
  45. }
  46. return &types.CommonResp{
  47. Data: res.Data,
  48. }, nil
  49. return
  50. }