12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- package logic
- import (
- "bp.jydev.jianyu360.cn/BaseService/biService/api/internal/svc"
- "bp.jydev.jianyu360.cn/BaseService/biService/api/internal/types"
- "bp.jydev.jianyu360.cn/BaseService/biService/rpc/biservice"
- "context"
- "github.com/gogf/gf/v2/util/gconv"
- "github.com/zeromicro/go-zero/core/logx"
- )
- type GetClueInfoListLogic struct {
- logx.Logger
- ctx context.Context
- svcCtx *svc.ServiceContext
- }
- // 线索验重 列表
- func NewGetClueInfoListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetClueInfoListLogic {
- return &GetClueInfoListLogic{
- Logger: logx.WithContext(ctx),
- ctx: ctx,
- svcCtx: svcCtx,
- }
- }
- func (l *GetClueInfoListLogic) GetClueInfoList(req *types.ClueInfoReq) (resp *types.BiResp, err error) {
- if req.SearchTxt == "" {
- return &types.BiResp{
- Error_code: 0,
- Error_msg: "搜索字段不能为空",
- Data: nil,
- }, nil
- }
- res, err := l.svcCtx.BiServiceRpc.GetClueInfoList(l.ctx, &biservice.ClueInfoReq{
- SearchTxt: req.SearchTxt,
- SearchType: req.SearchType,
- PageSize: req.PageSize,
- PageNum: req.PageNum,
- })
- if err != nil || res.Data == nil {
- return &types.BiResp{
- Error_code: -1,
- Error_msg: "严重错误!",
- }, err
- }
- data := gconv.Map(gconv.UnsafeBytesToStr(res.Data))
- return &types.BiResp{Data: data}, err
- }
|