myinfologic.go 966 B

123456789101112131415161718192021222324252627282930313233343536
  1. package logic
  2. import (
  3. "bp.jydev.jianyu360.cn/BaseService/biService/rpc/biservice"
  4. "context"
  5. "github.com/gogf/gf/v2/util/gconv"
  6. "bp.jydev.jianyu360.cn/BaseService/biService/api/internal/svc"
  7. "bp.jydev.jianyu360.cn/BaseService/biService/api/internal/types"
  8. "github.com/zeromicro/go-zero/core/logx"
  9. )
  10. type MyinfoLogic struct {
  11. logx.Logger
  12. ctx context.Context
  13. svcCtx *svc.ServiceContext
  14. }
  15. func NewMyinfoLogic(ctx context.Context, svcCtx *svc.ServiceContext) *MyinfoLogic {
  16. return &MyinfoLogic{
  17. Logger: logx.WithContext(ctx),
  18. ctx: ctx,
  19. svcCtx: svcCtx,
  20. }
  21. }
  22. func (l *MyinfoLogic) Myinfo(req *types.MyInfoReq) (resp *types.Resp, err error) {
  23. // todo: add your logic here and delete this line
  24. res, err := l.svcCtx.BiServiceRpc.MyInfo(l.ctx, &biservice.MyInfoReq{
  25. Bid: req.Bid,
  26. Sid: req.Sid,
  27. })
  28. data := gconv.Map(gconv.UnsafeBytesToStr(res.Data))
  29. return &types.Resp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg, Data: data}, err
  30. }