StatisticalData.go 521 B

123456789101112131415161718192021222324
  1. package controllers
  2. import (
  3. "AIOTCOER/lib"
  4. "AIOTCOER/models/StatisticalData"
  5. beego "github.com/beego/beego/v2/server/web"
  6. )
  7. type StatisticalDataController struct {
  8. beego.Controller
  9. }
  10. func (c *StatisticalDataController) FlowCountList() {
  11. PageSize, err := c.GetInt("PageSize")
  12. if err != nil {
  13. PageSize = 1
  14. }
  15. StatisticalData_r := StatisticalData.FlowCountLists(c.GetString("T_ProductID"), PageSize)
  16. c.Data["json"] = lib.JSONR{Code: lib.Success, Msg: "ok!", Data: StatisticalData_r}
  17. c.ServeJSON()
  18. return
  19. }