Browse Source

文章列表页面的开发

xiaoming_global 5 years ago
parent
commit
dc8c5387d9

+ 1 - 1
controllers/article/article_controller.go View File

@@ -74,7 +74,7 @@ func (this *ArticleManage) GetAllArticles()  {
74 74
 	adminUserInfo := this.GetAdminUserInfo()
75 75
 	userOrgID := adminUserInfo.CurrentOrgId
76 76
 
77
-	articles, total, err := article_service.FindAllArticle(userOrgID, page,limit, searchKey, classId)
77
+	articles, total, err := article_service.FindAllArticle(userOrgID, page,10, searchKey, classId)
78 78
 	fmt.Println("文章内容是是么",articles)
79 79
 	if err !=nil{
80 80
 		this.ServeFailJsonSend(enums.ErrorCodeDataException, "获取文章列表失败")

+ 1 - 1
service/article_service/article_category_service.go View File

@@ -16,7 +16,7 @@ func AddAritcle(articles models.Articles) error {
16 16
 	return  err
17 17
 }
18 18
 
19
-func FindAllArticle(orgID int64, page, limit, searchKey string, classId int64) (articles *[]models.Articles,total int64, err error) {
19
+func FindAllArticle(orgID int64, page int, count int, searchKey string, classId int64) (articles *[]models.Articles,total int64, err error) {
20 20
 
21 21
 	db := service.PatientReadDB().Table("sgj_patient_articles as a ").Where("a.status=1")
22 22
 	if(orgID>0){