drawcluelogic.go 922 B

12345678910111213141516171819202122232425262728293031323334
  1. package logic
  2. import (
  3. "context"
  4. "bp.jydev.jianyu360.cn/BaseService/biService/api/internal/svc"
  5. "bp.jydev.jianyu360.cn/BaseService/biService/api/internal/types"
  6. "bp.jydev.jianyu360.cn/BaseService/biService/rpc/biservice"
  7. "github.com/zeromicro/go-zero/core/logx"
  8. )
  9. type DrawClueLogic struct {
  10. logx.Logger
  11. ctx context.Context
  12. svcCtx *svc.ServiceContext
  13. }
  14. func NewDrawClueLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DrawClueLogic {
  15. return &DrawClueLogic{
  16. Logger: logx.WithContext(ctx),
  17. ctx: ctx,
  18. svcCtx: svcCtx,
  19. }
  20. }
  21. func (l *DrawClueLogic) DrawClue(req *types.DrawClueReq) (resp *types.Resp, err error) {
  22. // todo: add your logic here and delete this line
  23. res, err := l.svcCtx.BiServiceRpc.DrawClue(l.ctx, &biservice.DrawClueReq{
  24. PositionId: req.PositionId,
  25. Count: req.Count,
  26. })
  27. return &types.Resp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg, Data: res.Data}, err
  28. }