This commit is contained in:
2018-01-07 19:28:20 +08:00
parent b24d4be809
commit 4c7a0d6e91
170 changed files with 4155 additions and 32 deletions

View File

@@ -0,0 +1,21 @@
#sql("content.list")
SELECT c.*,u.nickname,u.avatar
FROM content c LEFT JOIN user u ON c.userId=u.userId
WHERE c.status != -1
#if(type)
AND c.`type`=#(type)
#end
#if(contentId)
AND c.`contentId`=#(contentId)
#end
#if(order)
ORDER BY #(order)
#elseif(top == 1)
AND c.top > 0
ORDER BY top DESC,createTime DESC
#elseif(top == "0")
AND c.top = 0
ORDER BY createTime DESC
#end
#end