addprojectreqlogic.go 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. package logic
  2. import (
  3. "context"
  4. "bp.jydev.jianyu360.cn/BaseService/biService/api/internal/svc"
  5. "bp.jydev.jianyu360.cn/BaseService/biService/api/internal/types"
  6. "bp.jydev.jianyu360.cn/BaseService/biService/rpc/biservice"
  7. "github.com/zeromicro/go-zero/core/logx"
  8. )
  9. type AddProjectReqLogic struct {
  10. logx.Logger
  11. ctx context.Context
  12. svcCtx *svc.ServiceContext
  13. }
  14. func NewAddProjectReqLogic(ctx context.Context, svcCtx *svc.ServiceContext) AddProjectReqLogic {
  15. return AddProjectReqLogic{
  16. Logger: logx.WithContext(ctx),
  17. ctx: ctx,
  18. svcCtx: svcCtx,
  19. }
  20. }
  21. func (l *AddProjectReqLogic) AddProjectReq(req types.AddProjectReq) (*types.Resp, error) {
  22. // todo: add your logic here and delete this line
  23. res, err := l.svcCtx.BiServiceRpc.AddProject(l.ctx, &biservice.AddProjectReq{
  24. InfoId: req.InfoId,
  25. Source: req.Source,
  26. PositionId: req.PositionId,
  27. PositionType: req.PositionType,
  28. AccountId: req.AccountId,
  29. CompanyName: req.CompanyName,
  30. UserId: req.UserId,
  31. UserName: req.UserName,
  32. })
  33. return &types.Resp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg, Data: res.Data}, err
  34. }