updatge
This commit is contained in:
parent
76b7eb82d6
commit
8c6bd7307b
@ -34,10 +34,7 @@ async def front_news_search(ns={}):
|
|||||||
publish_time_zh, publish_time_en, read_count
|
publish_time_zh, publish_time_en, read_count
|
||||||
from enterprise_news_article
|
from enterprise_news_article
|
||||||
where %s
|
where %s
|
||||||
order by greatest(
|
order by publish_time_zh desc, update_time desc
|
||||||
ifnull(publish_time_zh, '1000-01-01'),
|
|
||||||
ifnull(publish_time_en, '1000-01-01')
|
|
||||||
) desc, update_time desc
|
|
||||||
limit %s offset %s;
|
limit %s offset %s;
|
||||||
""" % (where_clause, page_size, offset)
|
""" % (where_clause, page_size, offset)
|
||||||
result = await sor.sqlExe(search_sql, {})
|
result = await sor.sqlExe(search_sql, {})
|
||||||
|
|||||||
@ -88,7 +88,7 @@ async def news_article_search(ns={}):
|
|||||||
'status': True,
|
'status': True,
|
||||||
'msg': 'search news article success',
|
'msg': 'search news article success',
|
||||||
'data': result,
|
'data': result,
|
||||||
'article_type_summary_zh': article_type_summary_zh,
|
'article_type_summary': article_type_summary_zh,
|
||||||
'article_type_summary_en': article_type_summary_en,
|
'article_type_summary_en': article_type_summary_en,
|
||||||
'pagination': {
|
'pagination': {
|
||||||
'total': total_count,
|
'total': total_count,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user