workdesktopcomprehensivelogic.go 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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 WorkDesktopComprehensiveLogic struct {
  12. logx.Logger
  13. ctx context.Context
  14. svcCtx *svc.ServiceContext
  15. r *http.Request
  16. }
  17. func NewWorkDesktopComprehensiveLogic(ctx context.Context, svcCtx *svc.ServiceContext, r *http.Request) *WorkDesktopComprehensiveLogic {
  18. return &WorkDesktopComprehensiveLogic{
  19. Logger: logx.WithContext(ctx),
  20. ctx: ctx,
  21. svcCtx: svcCtx,
  22. r: r,
  23. }
  24. }
  25. func (l *WorkDesktopComprehensiveLogic) WorkDesktopComprehensive(req *types.WorkDesktopComprehensiveReq) (resp *types.CommonResp, err error) {
  26. if req.Platform == "H5" {
  27. req.Platform = "APP"
  28. }
  29. res, err := entity.UserCenterRpc.WorkDesktopComprehensive(l.ctx, &pb.WorkDesktopComprehensiveReq{
  30. AppId: req.AppId,
  31. UserId: req.UserId,
  32. Phone: req.Phone,
  33. Platform: req.Platform,
  34. MenuIds: req.MenuIds,
  35. MenuMode: req.MenuMode,
  36. ActionMode: req.ActionMode,
  37. NewUserId: req.NewUserId,
  38. EntId: req.EntId,
  39. EntUserId: req.EntUserId,
  40. })
  41. return &types.CommonResp{
  42. Error_code: res.ErrorCode,
  43. Error_msg: res.ErrorMsg,
  44. Data: res.Data,
  45. }, err
  46. }