buyersupplyinfologic.go 913 B

123456789101112131415161718192021222324252627282930313233343536
  1. package logic
  2. import (
  3. "context"
  4. IC "jyBXBuyer/rpc/init"
  5. "jyBXBuyer/rpc/internal/svc"
  6. "jyBXBuyer/rpc/model"
  7. "jyBXBuyer/rpc/type/bxbuyer"
  8. "github.com/zeromicro/go-zero/core/logx"
  9. )
  10. type BuyerSupplyInfoLogic struct {
  11. ctx context.Context
  12. svcCtx *svc.ServiceContext
  13. logx.Logger
  14. }
  15. func NewBuyerSupplyInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext) *BuyerSupplyInfoLogic {
  16. return &BuyerSupplyInfoLogic{
  17. ctx: ctx,
  18. svcCtx: svcCtx,
  19. Logger: logx.WithContext(ctx),
  20. }
  21. }
  22. // 采购单位搜索补充信息 招标动态数量 、历史联系人数量、项目数量、采购规模
  23. func (l *BuyerSupplyInfoLogic) BuyerSupplyInfo(in *bxbuyer.BuyerSupplyInfoReq) (*bxbuyer.BuyerSupplyResp, error) {
  24. resp := &bxbuyer.BuyerSupplyResp{}
  25. if len(in.Buyers) == 0 || len(in.Buyers) > int(IC.C.BuyerSearchLimit) {
  26. return resp, nil
  27. }
  28. resp = model.BuyerSupplyInfo(in.Buyers)
  29. return resp, nil
  30. }