ziwen 1 жил өмнө
parent
commit
251fb1c00a

+ 6 - 0
controllers/yanxuan_special.go

@@ -117,6 +117,9 @@ func (this *YanxuanSpecialNoLoginController) List() {
 
 	if specialUser != nil {
 		resp.IsAuthor = true
+		if specialUser.Status == 2 {
+			resp.IsDisable = true
+		}
 	}
 	resp.List = list
 
@@ -918,6 +921,9 @@ func (this *YanxuanSpecialNoLoginController) AuthorList() {
 
 	if specialUser != nil {
 		resp.IsAuthor = true
+		if specialUser.Status == 2 {
+			resp.IsDisable = true
+		}
 	}
 
 	br.Data = resp

+ 4 - 3
models/cygx_yanxuan_special.go

@@ -108,8 +108,9 @@ func EnableYanxuanSpecial(id, status int, reason string) (err error) {
 }
 
 type SpecialListResp struct {
-	List     []*CygxYanxuanSpecialItem
-	IsAuthor bool
+	List      []*CygxYanxuanSpecialItem
+	IsAuthor  bool
+	IsDisable bool
 }
 
 func GetYanxuanSpecialById(specialId, userId int) (item *CygxYanxuanSpecialItem, err error) {
@@ -133,7 +134,7 @@ type CygxYanxuanSpecialReq struct {
 	CompanyTags  []string // 公司标签
 	DoType       int      // 1保存 2发布
 	ImgUrl       []string // 图片链接
-	Docs         []Doc // 文档链接
+	Docs         []Doc    // 文档链接
 	Title        string   // 标题
 	Type         int      // 类型1:笔记,2:观点
 }

+ 1 - 0
models/cygx_yanxuan_special_user.go

@@ -141,6 +141,7 @@ ORDER BY
 type SpecialAuthorListResp struct {
 	List     []*CygxYanxuanSpecialAuthorItem
 	IsAuthor bool
+	IsDisable bool
 }
 
 type SaveCygxYanxuanSpecialAuthoHeadImgrReq struct {