getPushSetLogic.go 907 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. package logic
  2. import (
  3. "context"
  4. "jyBXSubscribe/rpc/bxsubscribe"
  5. "jyBXSubscribe/api/internal/svc"
  6. "jyBXSubscribe/api/internal/types"
  7. "github.com/zeromicro/go-zero/core/logx"
  8. )
  9. type GetPushSetLogic struct {
  10. logx.Logger
  11. ctx context.Context
  12. svcCtx *svc.ServiceContext
  13. }
  14. func NewGetPushSetLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetPushSetLogic {
  15. return &GetPushSetLogic{
  16. Logger: logx.WithContext(ctx),
  17. ctx: ctx,
  18. svcCtx: svcCtx,
  19. }
  20. }
  21. func (l *GetPushSetLogic) GetPushSet(req *types.GetUserReq) (*types.CommonResp, error) {
  22. // todo: add your logic here and delete this line
  23. res, _ := l.svcCtx.Suscribe.GetKey(l.ctx, &bxsubscribe.GetKeyReq{
  24. UserId: req.UserId,
  25. EntId: req.EntId,
  26. EntUserId: req.EntUserId,
  27. PositionType: req.PositionType,
  28. })
  29. return &types.CommonResp{
  30. Err_code: res.ErrCode,
  31. Err_msg: res.ErrMsg,
  32. Data: res,
  33. }, nil
  34. }