From 27ab4fa20208bffc554b44d8d8a18c69e3f820a2 Mon Sep 17 00:00:00 2001 From: zcy <290198252@qq.com> Date: Thu, 20 Jan 2022 00:36:07 +0800 Subject: [PATCH] no message --- model/blog.go | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/model/blog.go b/model/blog.go index 7f4ce74..1f9f1b9 100644 --- a/model/blog.go +++ b/model/blog.go @@ -12,7 +12,6 @@ import ( ) type Doc struct { -<<<<<<< .merge_file_a12396 ID int64 `json:"id" gorm:"column:id" sql:"id"` Title string `json:"title" gorm:"column:title" sql:"title"` Type int32 `json:"type" gorm:"column:type" sql:"type"` @@ -25,20 +24,6 @@ type Doc struct { IsPublic int32 `json:"is_public" gorm:"column:is_public" sql:"is_public"` Deleted int32 `json:"deleted" gorm:"column:deleted" sql:"deleted"` OriginUrl string `json:"origin_url" gorm:"column:origin_url" sql:"origin_url"` -======= - ID int64 `json:"id" gorm:"column:id" sql:"id"` - Title string `json:"title" gorm:"column:title" sql:"title"` - Type int32 `json:"type" gorm:"column:type" sql:"type"` - Content string `json:"content" gorm:"column:content" sql:"content"` - Author string `json:"author" gorm:"column:author" sql:"author"` - CreateTime time.Time `json:"create_time" gorm:"column:create_time" sql:"create_time"` - UpdateTime time.Time `json:"update_time" gorm:"column:update_time" sql:"update_time"` - DeleteTime time.Time `json:"delete_time" gorm:"column:delete_time" sql:"delete_time"` - Version int32 `json:"version" gorm:"column:version" sql:"version"` - IsPublic int32 `json:"is_public" gorm:"column:is_public" sql:"is_public"` - Deleted int32 `json:"deleted" gorm:"column:deleted" sql:"deleted"` - OriginUrl string `json:"origin_url" gorm:"column:origin_url" sql:"origin_url"` ->>>>>>> .merge_file_a29080 } type DocGroup struct { @@ -105,11 +90,7 @@ UpdateDoc 更新文档 func UpdateDoc(doc Doc) error { sql := fmt.Sprintf(`update doc set doc.author = '%s' ,doc.title = '%s',doc.type = '%d',doc.content = '%s' ,doc.update_time = '%s' ,doc.version = '%d' where doc.id = '%d'; `, doc.Author, doc.Title, doc.Type, -<<<<<<< .merge_file_a12396 strings.Replace(doc.Content, "'", "\\'", -1), time.Now().Format("2006-01-02 15:04:05"),doc.Version, doc.ID) -======= - strings.Replace(doc.Content, "'", "\\'", -1), time.Now().Format("2006-01-02 15:04:05"), doc.Version, doc.ID) ->>>>>>> .merge_file_a29080 _, e := db.GetMysqlClient().Query(sql) if nil != e { logs.Error(e.Error()) @@ -172,10 +153,6 @@ func DeleteArticleType(id int32) error { return nil } -<<<<<<< .merge_file_a12396 -======= - ->>>>>>> .merge_file_a29080 func GetAllDocs() ([]Doc, error) { ret := []Doc{} sql := fmt.Sprintf("select * from doc")