Refine the structure of this project.

This commit is contained in:
zicla
2019-04-26 14:32:15 +08:00
parent e88930e13a
commit c251ed9f1b
69 changed files with 5494 additions and 2251 deletions

View File

@ -2,12 +2,12 @@ package rest
import (
"fmt"
"github.com/eyebluecn/tank/code/tool/builder"
"github.com/eyebluecn/tank/code/tool/util"
"github.com/jinzhu/gorm"
"github.com/nu7hatch/gouuid"
"os"
"path/filepath"
"tank/code/tool/builder"
"tank/code/tool/util"
"time"
)
@ -200,11 +200,9 @@ func (this *ImageCacheDao) SizeBetweenTime(startTime time.Time, endTime time.Tim
return size
}
//执行清理操作
func (this *ImageCacheDao) Cleanup() {
this.logger.Info("[ImageCacheDao]执行清理清除数据库中所有ImageCache记录。")
db := CONTEXT.DB.Where("uuid is not null").Delete(ImageCache{})
this.PanicError(db.Error)
}