workdesktopmenuinfologic.go 1.1 KB

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