fix: 1. bei_an cannot update error

2. CleanArticles deleted all article error in rdbms, fixed #43,fixed #44
This commit is contained in:
henry.chen
2024-10-10 13:38:38 +08:00
parent 720387ecd5
commit b53fc91ce7
2 changed files with 2 additions and 1 deletions

View File

@@ -144,7 +144,7 @@ func (db *rdbms) RemoveArticle(ctx context.Context, id int) error {
// CleanArticles 清理回收站文章
func (db *rdbms) CleanArticles(ctx context.Context, exp time.Time) error {
return db.Where("deleted_at BETWEEN ? AND ?", time.Time{}, exp).Delete(model.Article{}).Error
return db.Where("deleted_at > ? AND deleted_at < ?", time.Time{}, exp).Delete(model.Article{}).Error
}
// UpdateArticle 更新文章

View File

@@ -94,6 +94,7 @@ func handleAPIBlogger(c *gin.Context) {
err := cache.Ei.UpdateBlogger(context.Background(), map[string]interface{}{
"blog_name": bn,
"b_title": bt,
"bei_an": ba,
"sub_title": st,
"series_say": ss,
"archives_say": as,