getpushsetlogic.go 915 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. package logic
  2. import (
  3. "context"
  4. "github.com/zeromicro/go-zero/core/logx"
  5. "jyBXSubscribe/rpc/internal/svc"
  6. "jyBXSubscribe/rpc/model/service"
  7. "jyBXSubscribe/rpc/type/bxsubscribe"
  8. )
  9. type GetPushSetLogic struct {
  10. ctx context.Context
  11. svcCtx *svc.ServiceContext
  12. logx.Logger
  13. }
  14. func NewGetPushSetLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetPushSetLogic {
  15. return &GetPushSetLogic{
  16. ctx: ctx,
  17. svcCtx: svcCtx,
  18. Logger: logx.WithContext(ctx),
  19. }
  20. }
  21. // 用户推送设置查看
  22. func (l *GetPushSetLogic) GetPushSet(in *bxsubscribe.GetPushSetReq) (*bxsubscribe.GetPushSetResp, error) {
  23. // todo: add your logic here and delete this line
  24. subService := &service.PushSetService{
  25. UserId: in.UserId,
  26. PositionType: in.PositionType,
  27. EntUserId: in.EntUserId,
  28. EntId: in.EntId,
  29. }
  30. pushSet := subService.Find()
  31. return &bxsubscribe.GetPushSetResp{
  32. Data: pushSet,
  33. }, nil
  34. }