candidatechannellistlogic.go 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. package logic
  2. import (
  3. "bp.jydev.jianyu360.cn/CRM/application/api/internal/service"
  4. "context"
  5. "fmt"
  6. "bp.jydev.jianyu360.cn/CRM/application/api/internal/svc"
  7. "bp.jydev.jianyu360.cn/CRM/application/api/internal/types"
  8. "github.com/zeromicro/go-zero/core/logx"
  9. )
  10. type CandidateChannelListLogic struct {
  11. logx.Logger
  12. ctx context.Context
  13. svcCtx *svc.ServiceContext
  14. }
  15. func NewCandidateChannelListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CandidateChannelListLogic {
  16. return &CandidateChannelListLogic{
  17. Logger: logx.WithContext(ctx),
  18. ctx: ctx,
  19. svcCtx: svcCtx,
  20. }
  21. }
  22. func (l *CandidateChannelListLogic) CandidateChannelList(req *types.ChannelListReq) (resp *types.Reply, err error) {
  23. // todo: add your logic here and delete this line
  24. logx.Info(fmt.Sprintf("%+v", req))
  25. resp = &types.Reply{}
  26. ownerService := &service.OwnerService{
  27. PartyA: req.PartyA,
  28. Supplier: req.Supplier,
  29. Intermediary: req.Intermediary,
  30. Heterotophy: req.Heterotophy,
  31. Agency: req.Agency,
  32. PositionId: req.PositionId,
  33. EntAccountId: req.EntAccountId,
  34. }
  35. data, a1, a2, a3, a4 := ownerService.CandidateChannel()
  36. resp.Data = map[string]interface{}{
  37. "list": data,
  38. "size1": a1,
  39. "size3": a2,
  40. "size4": a3,
  41. "size2": a4,
  42. }
  43. return
  44. }