ziwen 1 year ago
parent
commit
c21f155695
2 changed files with 2 additions and 6 deletions
  1. 1 5
      controllers/yanxuan_special.go
  2. 1 1
      models/cygx_yanxuan_special.go

+ 1 - 5
controllers/yanxuan_special.go

@@ -900,11 +900,7 @@ func (this *YanxuanSpecialController) AuthorList() {
 	resp := new(models.SpecialAuthorListResp)
 
 	for _, v := range list {
-		if !v.LatestPublishTime.IsZero() {
-			v.LatestPublishDate = v.LatestPublishTime.Format(utils.FormatDate) + "更新"
-		} else {
-			v.LatestPublishDate = v.ModifyTime.Format(utils.FormatDate) + "更新"
-		}
+		v.LatestPublishDate = v.LatestPublishTime.Format(utils.FormatDate) + "更新"
 		if v.UserId == sysUser.UserId {
 			resp.List = append(resp.List, v)
 		}

+ 1 - 1
models/cygx_yanxuan_special.go

@@ -172,7 +172,7 @@ type CancelPublishCygxYanxuanSpecialReq struct {
 func CancelPublishYanxuanSpecial(id int) (err error) {
 	o := orm.NewOrm()
 	sql := ``
-	sql = `UPDATE cygx_yanxuan_special SET status=1,publish_time=NOW() WHERE id = ? `
+	sql = `UPDATE cygx_yanxuan_special SET status=1,publish_time=NOW(),modify_time=NOW() WHERE id = ? `
 	_, err = o.Raw(sql, id).Exec()
 	return
 }