workdesktopmenuinfologic.go 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. package logic
  2. import (
  3. "context"
  4. "net/http"
  5. "userCenter/entity"
  6. "userCenter/rpc/pb"
  7. "userCenter/api/internal/svc"
  8. "userCenter/api/internal/types"
  9. "github.com/zeromicro/go-zero/core/logx"
  10. )
  11. type WorkDesktopMenuInfoLogic struct {
  12. logx.Logger
  13. ctx context.Context
  14. svcCtx *svc.ServiceContext
  15. r *http.Request
  16. }
  17. func NewWorkDesktopMenuInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext, r *http.Request) *WorkDesktopMenuInfoLogic {
  18. return &WorkDesktopMenuInfoLogic{
  19. Logger: logx.WithContext(ctx),
  20. ctx: ctx,
  21. svcCtx: svcCtx,
  22. r: r,
  23. }
  24. }
  25. func (l *WorkDesktopMenuInfoLogic) WorkDesktopMenuInfo(req *types.WorkDesktopMenuInfoReq) (resp *types.CommonResp, err error) {
  26. res, err := entity.UserCenterRpc.WorkDesktopMenuInfo(l.ctx, &pb.WorkDesktopMenuInfoReq{
  27. AppId: req.AppId,
  28. UserId: req.UserId,
  29. Phone: req.Phone,
  30. Platform: req.Platform,
  31. NewUserId: req.NewUserId,
  32. EntId: req.EntId,
  33. })
  34. return &types.CommonResp{
  35. Error_code: res.ErrorCode,
  36. Error_msg: res.ErrorMsg,
  37. Data: res.Data,
  38. }, err
  39. }