Commit 5dc1bb15 authored by 罗林杰's avatar 罗林杰

修改首页查询

parent 5d1d8ea6
...@@ -18,11 +18,11 @@ cy_db: ...@@ -18,11 +18,11 @@ cy_db:
# username: root # username: root
# password: dsffd9icdrgybhj # password: dsffd9icdrgybhj
# db: intel # db: intel
ip: 127.0.0.1 ip: 106.3.99.31
port: 3306 port: 20084
username: root username: root
password: 123456 password: dsffd9icdrgybhj
db: appintel db: intel
#cy_db: #cy_db:
......
...@@ -352,8 +352,20 @@ ...@@ -352,8 +352,20 @@
cn.weight, cn.weight,
cn.picture_id, cn.picture_id,
cn.read_count, cn.read_count,
cn.path,
SUM(cn.click_through_rate) AS readNum SUM(cn.click_through_rate) AS readNum
FROM (SELECT cn.*, FROM (SELECT cn.release_date as release_date,
cn.business_id as business_id,
cn.title as title,
cn.plate as plate,
cn.is_fornt_page as is_fornt_page,
cn.is_recommended as is_recommended,
cn.is_top as is_top,
cn.news_type as news_type,
cn.tenant as tenant,
cn.weight as weight,
cn.picture_id as picture_id,
cn.read_count as read_count,
cpc.click_through_rate AS click_through_rate, cpc.click_through_rate AS click_through_rate,
oi.path AS path oi.path AS path
FROM cms_news cn FROM cms_news cn
...@@ -416,7 +428,19 @@ ...@@ -416,7 +428,19 @@
cn.read_count, cn.read_count,
cn.path, cn.path,
SUM(cn.click_through_rate) AS readNum SUM(cn.click_through_rate) AS readNum
FROM (SELECT cn.*, FROM (SELECT
cn.release_date as release_date,
cn.business_id as business_id,
cn.title as title,
cn.plate as plate,
cn.is_fornt_page as is_fornt_page,
cn.is_recommended as is_recommended,
cn.is_top as is_top,
cn.news_type as news_type,
cn.tenant as tenant,
cn.weight as weight,
cn.picture_id as picture_id,
cn.read_count as read_count,
cpc.click_through_rate AS click_through_rate, cpc.click_through_rate AS click_through_rate,
oi.path AS path oi.path AS path
FROM cms_news cn FROM cms_news cn
...@@ -467,9 +491,32 @@ ...@@ -467,9 +491,32 @@
GROUP BY cv.business_id GROUP BY cv.business_id
</select> </select>
<select id="listByClassificationAdmin" resultType="org.rcisoft.business.cmsnews.entity.CmsNews"> <select id="listByClassificationAdmin" resultType="org.rcisoft.business.cmsnews.entity.CmsNews">
SELECT cn.*, SELECT cn.release_date,
cn.business_id,
cn.title,
cn.plate,
cn.is_fornt_page,
cn.is_recommended,
cn.is_top,
cn.news_type,
cn.tenant,
cn.weight,
cn.picture_id,
cn.read_count,
cn.path,
SUM(cn.click_through_rate) AS readNum SUM(cn.click_through_rate) AS readNum
FROM (SELECT cn.*, FROM (SELECT cn.release_date,
cn.business_id,
cn.title,
cn.plate,
cn.is_fornt_page,
cn.is_recommended,
cn.is_top,
cn.news_type,
cn.tenant,
cn.weight,
cn.picture_id,
cn.read_count,
cpc.click_through_rate AS click_through_rate, cpc.click_through_rate AS click_through_rate,
oi.path AS path oi.path AS path
FROM cms_news cn FROM cms_news cn
...@@ -493,11 +540,34 @@ ...@@ -493,11 +540,34 @@
GROUP BY cn.business_id GROUP BY cn.business_id
</select> </select>
<select id="listByClassificationMerchants" resultType="org.rcisoft.business.cmsnews.entity.CmsNews"> <select id="listByClassificationMerchants" resultType="org.rcisoft.business.cmsnews.entity.CmsNews">
SELECT cn.*, SELECT cn.release_date,
cn.business_id,
cn.title,
cn.plate,
cn.is_fornt_page,
cn.is_recommended,
cn.is_top,
cn.news_type,
cn.tenant,
cn.weight,
cn.picture_id,
cn.read_count,
cn.path,
SUM(cn.click_through_rate) AS readNum SUM(cn.click_through_rate) AS readNum
FROM (SELECT cn.*, FROM (SELECT cn.release_date,
cpc.click_through_rate AS click_through_rate, cn.business_id,
oi.path AS path cn.title,
cn.plate,
cn.is_fornt_page,
cn.is_recommended,
cn.is_top,
cn.news_type,
cn.tenant,
cn.weight,
cn.picture_id,
cn.read_count,
cpc.click_through_rate AS click_through_rate,
oi.path AS path
FROM cms_news cn FROM cms_news cn
LEFT JOIN cms_unit_new_video cunv LEFT JOIN cms_unit_new_video cunv
ON cn.business_id = cunv.news_video_id AND cunv.type = 0 ON cn.business_id = cunv.news_video_id AND cunv.type = 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment