liuxiaolong
2020-06-18 e73b432b99ee831a0061b1c53551695b6766800c
test left num
1个文件已修改
12 ■■■■■ 已修改文件
controllers/car.go 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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,