ziwen 1 year ago
parent
commit
afb2036b4f
1 changed files with 11 additions and 2 deletions
  1. 11 2
      controllers/yanxuan_special.go

+ 11 - 2
controllers/yanxuan_special.go

@@ -876,19 +876,28 @@ func (this *YanxuanSpecialController) AuthorList() {
 		return
 	}
 
+	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) + "更新"
 		}
+		if v.UserId == sysUser.UserId {
+			resp.List = append(resp.List, v)
+		}
+	}
+
+	for _, v := range list {
+		if v.UserId != sysUser.UserId {
+			resp.List = append(resp.List, v)
+		}
 	}
-	resp := new(models.SpecialAuthorListResp)
 
 	if specialUser != nil {
 		resp.IsAuthor = true
 	}
-	resp.List = list
 
 	br.Data = resp
 	br.Ret = 200