Bladeren bron

no message

xingzai 1 jaar geleden
bovenliggende
commit
5a1ee728b5
2 gewijzigde bestanden met toevoegingen van 4 en 3 verwijderingen
  1. 1 1
      controllers/yanxuan_special.go
  2. 3 2
      models/cygx_yanxuan_special.go

+ 1 - 1
controllers/yanxuan_special.go

@@ -378,8 +378,8 @@ func (this *YanxuanSpecialController) Save() {
 			return
 		}
 		item.UserId = specialItem.UserId // 专栏userid还是原有userId
-
 		authorUserId = specialItem.UserId
+		item.AdminName = sysUser.RealName //审核人员姓名
 	}
 
 	specialId := 0

+ 3 - 2
models/cygx_yanxuan_special.go

@@ -22,6 +22,7 @@ type CygxYanxuanSpecial struct {
 	Type         int       // 类型1:笔记,2:观点
 	CompanyTags  string    // 公司标签
 	IndustryTags string    // 行业标签
+	AdminName    string    // 审核人员姓名
 }
 
 type CygxYanxuanSpecialItem struct {
@@ -218,8 +219,8 @@ func UpdateYanxuanSpecial(item *CygxYanxuanSpecial) (err error) {
 	o := orm.NewOrm()
 	sql := ``
 	sql = `UPDATE cygx_yanxuan_special SET title=?,content=?,company_tags=?,industry_tags=?,img_url=?,doc_url=?,type=?,status=?,
-	modify_time=NOW(),publish_time=NOW() WHERE id = ? `
-	_, err = o.Raw(sql, item.Title, item.Content, item.CompanyTags, item.IndustryTags, item.ImgUrl, item.DocUrl, item.Type, item.Status, item.Id).Exec()
+	modify_time=NOW(),publish_time=NOW(),admin_name = ? WHERE id = ? `
+	_, err = o.Raw(sql, item.Title, item.Content, item.CompanyTags, item.IndustryTags, item.ImgUrl, item.DocUrl, item.Type, item.Status, item.AdminName, item.Id).Exec()
 	return
 }