ownerroutelogic.go 959 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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 OwnerRouteLogic struct {
  11. logx.Logger
  12. ctx context.Context
  13. svcCtx *svc.ServiceContext
  14. }
  15. func NewOwnerRouteLogic(ctx context.Context, svcCtx *svc.ServiceContext) *OwnerRouteLogic {
  16. return &OwnerRouteLogic{
  17. Logger: logx.WithContext(ctx),
  18. ctx: ctx,
  19. svcCtx: svcCtx,
  20. }
  21. }
  22. func (l *OwnerRouteLogic) OwnerRoute(req *types.RouteOwnerListReq) (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. BuyerId: req.BuyerId,
  28. BuyerName: req.BuyerName,
  29. PositionId: req.PositionId,
  30. }
  31. data := ownerService.OwnerRoute()
  32. resp.Data = data
  33. return
  34. }