|
@@ -9,6 +9,7 @@ import ( |
|
|
"code.fnuoos.com/EggPlanet/egg_models.git/src/implement" |
|
|
"code.fnuoos.com/EggPlanet/egg_models.git/src/implement" |
|
|
"encoding/json" |
|
|
"encoding/json" |
|
|
"github.com/gin-gonic/gin" |
|
|
"github.com/gin-gonic/gin" |
|
|
|
|
|
"time" |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
func Base(c *gin.Context) { |
|
|
func Base(c *gin.Context) { |
|
@@ -59,7 +60,10 @@ func UpdateState(c *gin.Context) { |
|
|
if req.BuildId != "" { |
|
|
if req.BuildId != "" { |
|
|
data.BuildId = req.BuildId |
|
|
data.BuildId = req.BuildId |
|
|
} |
|
|
} |
|
|
db.Db.Where("id=?", data.Id).Cols("build_id,build_number,error_msg,state,src").Update(data) |
|
|
|
|
|
|
|
|
if data.State == 999 { |
|
|
|
|
|
data.FinishAt = int(time.Now().Unix()) |
|
|
|
|
|
} |
|
|
|
|
|
db.Db.Where("id=?", data.Id).Cols("finish_at,build_id,build_number,error_msg,state,src").Update(data) |
|
|
e.OutSuc(c, "success", nil) |
|
|
e.OutSuc(c, "success", nil) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |