文章 分頁 bug修改

master
a74589669 2019-09-05 16:06:59 +08:00
parent 6109f974a6
commit e516b374af
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ func GetArticles(c *gin.Context) {
if req.Name != ""{
sql = fmt.Sprintf("select * from doc where doc.name like '%%%s%%' limit %d offset %d",req.Name,limit,offset*limit)
}else{
sql = fmt.Sprintf("select * from doc limit %d offset %d",limit,offset*limit)
sql = fmt.Sprintf("select * from doc limit %d offset %d",limit,offset)
}
e = db.GetMysqlClient().Query2(sql,&article)
if nil != e{