Finish the System Cleanup feature.
This commit is contained in:
@ -118,3 +118,10 @@ func (this *FootprintDao) AvgCostBetweenTime(startTime time.Time, endTime time.T
|
||||
return int64(cost)
|
||||
}
|
||||
|
||||
|
||||
//执行清理操作
|
||||
func (this *FootprintDao) Cleanup() {
|
||||
this.logger.Info("[FootprintDao]执行清理:清除数据库中所有Footprint记录。")
|
||||
db := CONTEXT.DB.Where("uuid is not null").Delete(Footprint{})
|
||||
this.PanicError(db.Error)
|
||||
}
|
||||
|
Reference in New Issue
Block a user