workdesktopmenuinfologic.go 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. package logic
  2. import (
  3. "bp.jydev.jianyu360.cn/BaseService/userCenter/entity"
  4. "bp.jydev.jianyu360.cn/BaseService/userCenter/rpc/pb"
  5. "context"
  6. "net/http"
  7. "bp.jydev.jianyu360.cn/BaseService/userCenter/api/internal/svc"
  8. "bp.jydev.jianyu360.cn/BaseService/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. EntUserId: req.EntUserId,
  34. })
  35. return &types.CommonResp{
  36. Error_code: res.ErrorCode,
  37. Error_msg: res.ErrorMsg,
  38. Data: res.Data,
  39. }, err
  40. }