...
|
...
|
@@ -59,13 +59,14 @@ class ArticleModel extends global.yoho.BaseModel { |
|
|
* 获取文章无用户
|
|
|
* @returns {*}
|
|
|
*/
|
|
|
articleListWithoutUser({actId, pageNo, pageSize, orderBy, order, dateTime}) {
|
|
|
articleListWithoutUser({actId, pageNo, pageSize, orderBy, order, dateTime, limitDate}) {
|
|
|
const orderMapping = {
|
|
|
goodCount: 'good_count',
|
|
|
createTime: 'create_time'
|
|
|
};
|
|
|
|
|
|
const date = dateTime || '';
|
|
|
const limit_date = limitDate || '';
|
|
|
|
|
|
let limitSql;
|
|
|
let orderSql;
|
...
|
...
|
@@ -75,6 +76,9 @@ class ArticleModel extends global.yoho.BaseModel { |
|
|
if (date !== '') {
|
|
|
whereSql += ' AND to_days(AA.create_time) = to_days(\'' + date + '\')';
|
|
|
}
|
|
|
if (limit_date !== '') {
|
|
|
whereSql += ' AND to_days(AA.create_time) <= to_days(\'' + limit_date + '\')';
|
|
|
}
|
|
|
orderSql = `ORDER BY AA.${orderMapping[orderBy]} ${order}`;
|
|
|
limitSql = 'LIMIT :start, :page';
|
|
|
|
...
|
...
|
|