...
|
...
|
@@ -16,7 +16,7 @@ class Y100Model extends global.yoho.BaseModel { |
|
|
* 获取Y100列表
|
|
|
* @returns {*}
|
|
|
*/
|
|
|
articleY100List({actId, pageNo, pageSize, tag}) {
|
|
|
articleY100List({actId, pageNo, pageSize, tag, top}) {
|
|
|
const params = {
|
|
|
actId,
|
|
|
start: (pageNo - 1) * pageSize,
|
...
|
...
|
@@ -36,13 +36,15 @@ class Y100Model extends global.yoho.BaseModel { |
|
|
if (tag) {
|
|
|
sql += ' and AAY.tag like :tag';
|
|
|
params.tag = `%${tag}%`;
|
|
|
sql += ' ORDER BY AA.good_count DESC';
|
|
|
|
|
|
}
|
|
|
if (top) {
|
|
|
sql += ' ORDER BY AAY.top DESC,AA.create_time DESC';
|
|
|
} else {
|
|
|
sql += ' and AAY.top = 1';
|
|
|
sql += ' ORDER BY AA.good_count DESC';
|
|
|
}
|
|
|
sql += ' LIMIT :start, :page';
|
|
|
|
|
|
|
|
|
return mysqlCli.query(sql, params);
|
|
|
}
|
|
|
|
...
|
...
|
|