getclueinfolistlogic.go 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. package logic
  2. import (
  3. "bp.jydev.jianyu360.cn/BaseService/biService/rpc/biservice"
  4. "context"
  5. "bp.jydev.jianyu360.cn/BaseService/biService/api/internal/svc"
  6. "bp.jydev.jianyu360.cn/BaseService/biService/api/internal/types"
  7. "github.com/zeromicro/go-zero/core/logx"
  8. )
  9. type GetClueInfoListLogic struct {
  10. logx.Logger
  11. ctx context.Context
  12. svcCtx *svc.ServiceContext
  13. }
  14. // 线索验重 列表
  15. func NewGetClueInfoListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetClueInfoListLogic {
  16. return &GetClueInfoListLogic{
  17. Logger: logx.WithContext(ctx),
  18. ctx: ctx,
  19. svcCtx: svcCtx,
  20. }
  21. }
  22. func (l *GetClueInfoListLogic) GetClueInfoList(req *types.ClueInfoReq) (resp *types.BiResp, err error) {
  23. // todo: add your logic here and delete this line
  24. if req.SearchName == "" {
  25. return &types.BiResp{
  26. Error_code: 1,
  27. Error_msg: "参数无效"}, nil
  28. }
  29. res, err := l.svcCtx.BiServiceRpc.GetClueInfoList(l.ctx, &biservice.ClueInfoReq{
  30. SearchName: req.SearchName,
  31. })
  32. return &types.BiResp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg, Data: res.Data}, err
  33. }