itemHistoryDataInfoHandler.go 680 B

12345678910111213141516171819202122232425
  1. package dtgateway
  2. import (
  3. "GtDataStore/common/result"
  4. "net/http"
  5. "GtDataStore/app/cmd/dtgateway/internal/logic/dtgateway"
  6. "GtDataStore/app/cmd/dtgateway/internal/svc"
  7. "GtDataStore/app/cmd/dtgateway/internal/types"
  8. "github.com/zeromicro/go-zero/rest/httpx"
  9. )
  10. func ItemHistoryDataInfoHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
  11. return func(w http.ResponseWriter, r *http.Request) {
  12. var req types.ItemHistoryDataByTimeResq
  13. if err := httpx.Parse(r, &req); err != nil {
  14. httpx.Error(w, err)
  15. return
  16. }
  17. l := dtgateway.NewItemHistoryDataInfoLogic(r.Context(), svcCtx)
  18. resp, err := l.ItemHistoryDataInfo(&req)
  19. result.HttpResult(r, w, resp, err)
  20. }
  21. }