liuxiaolong
2020-06-18 e73b432b99ee831a0061b1c53551695b6766800c
controllers/car.go
@@ -7,6 +7,7 @@
   "github.com/astaxie/beego"
   "net/http"
   "sort"
   "time"
)
type CarController struct {
@@ -21,8 +22,17 @@
func (c *CarController) Statistic() {
   //sv := service.NewCarService()
   //sta := sv.Statistic()
   m := time.Now().Minute()
   i := m % 10
   left := 80
   if i == 0 {
      left = 10
   }
   if m == 40 {
      left = 5
   }
   sta := models.CarStatistic{
      Left: 80,
      Left: left,
   }
   resp := code.Code{
      Success: true,