participatepersonslogic.go 1007 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. package logic
  2. import (
  3. "context"
  4. "jyBXCore/rpc/service"
  5. "jyBXCore/rpc/util"
  6. "jyBXCore/rpc/internal/svc"
  7. "jyBXCore/rpc/type/bxcore"
  8. "github.com/zeromicro/go-zero/core/logx"
  9. )
  10. type ParticipatePersonsLogic struct {
  11. ctx context.Context
  12. svcCtx *svc.ServiceContext
  13. logx.Logger
  14. }
  15. func NewParticipatePersonsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ParticipatePersonsLogic {
  16. return &ParticipatePersonsLogic{
  17. ctx: ctx,
  18. svcCtx: svcCtx,
  19. Logger: logx.WithContext(ctx),
  20. }
  21. }
  22. // 当前部门/企业下参标人员信息
  23. func (l *ParticipatePersonsLogic) ParticipatePersons(in *bxcore.ParticipatePersonsReq) (*bxcore.ParticipatePersonsRes, error) {
  24. b, _ := util.IsAllowedParticipate(in.AppId, in.UserId, in.NewUserId, in.AccountId, in.EntAccountId, in.EntId, in.EntUserId, in.PositionId, in.PositionType)
  25. if !b {
  26. return &bxcore.ParticipatePersonsRes{
  27. ErrCode: -1,
  28. ErrMsg: "没有权限",
  29. Data: nil,
  30. }, nil
  31. }
  32. return service.GetParticipatePersonInfo(in), nil
  33. }