You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

screenpagetaskhandler.go 1.0 kB

12345678910111213141516171819202122232425262728293031323334
  1. package core
  2. import (
  3. "gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
  4. "gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils"
  5. "net/http"
  6. "github.com/zeromicro/go-zero/rest/httpx"
  7. "gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/core"
  8. "gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
  9. "gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
  10. )
  11. func ScreenPageTaskHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
  12. return func(w http.ResponseWriter, r *http.Request) {
  13. var req types.PageTaskReq
  14. if err := httpx.Parse(r, &req); err != nil {
  15. result.ParamErrorResult(r, w, err)
  16. return
  17. }
  18. token := r.Header.Get("Authorization")
  19. // 获取用户信息
  20. jccUserInfo, err := utils.ParseTokenWithoutVerify(token)
  21. if err != nil {
  22. result.ParamErrorResult(r, w, err)
  23. return
  24. }
  25. req.UserId = jccUserInfo.Id
  26. req.UserName = jccUserInfo.UserName
  27. l := core.NewScreenPageTaskLogic(r.Context(), svcCtx)
  28. resp, err := l.ScreenPageTask(&req)
  29. result.HttpResult(r, w, resp, err)
  30. }
  31. }

PCM is positioned as Software stack over Cloud, aiming to build the standards and ecology of heterogeneous cloud collaboration for JCC in a non intrusive and autonomous peer-to-peer manner.