projectdetailslogic.go 889 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. package logic
  2. import (
  3. "context"
  4. "jyBXCore/rpc/internal/svc"
  5. "jyBXCore/rpc/service"
  6. "jyBXCore/rpc/type/bxcore"
  7. "github.com/zeromicro/go-zero/core/logx"
  8. )
  9. type ProjectDetailsLogic struct {
  10. ctx context.Context
  11. svcCtx *svc.ServiceContext
  12. logx.Logger
  13. }
  14. func NewProjectDetailsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ProjectDetailsLogic {
  15. return &ProjectDetailsLogic{
  16. ctx: ctx,
  17. svcCtx: svcCtx,
  18. Logger: logx.WithContext(ctx),
  19. }
  20. }
  21. func (l *ProjectDetailsLogic) ProjectDetails(in *bxcore.ProjectDetailsReq) (*bxcore.DetailDataRes, error) {
  22. participateService := service.ParticipateStatistics{
  23. PositionId: in.PositionId,
  24. EntId: in.EntId,
  25. DeptId: in.EntId,
  26. EntUserId: in.EntUserId,
  27. }
  28. data := participateService.ProjectDetails(in.EntUserIdArr, in)
  29. return &bxcore.DetailDataRes{
  30. ErrCode: 0,
  31. ErrMsg: "",
  32. Data: &data,
  33. }, nil
  34. }