Commit a4de8c3e authored by 刘帅阳's avatar 刘帅阳

修改

parent 47dbb92c
...@@ -201,6 +201,7 @@ public class CmsNewsServiceImpl extends ServiceImpl<CmsNewsRepository, CmsNews> ...@@ -201,6 +201,7 @@ public class CmsNewsServiceImpl extends ServiceImpl<CmsNewsRepository, CmsNews>
if (ObjectUtil.isNotNull(check) && !check.getBusinessId().equals(cmsNews.getBusinessId())) { if (ObjectUtil.isNotNull(check) && !check.getBusinessId().equals(cmsNews.getBusinessId())) {
throw new CyServiceException(500, "权重已存在"); throw new CyServiceException(500, "权重已存在");
} else { } else {
cmsNews.setUpdateDate(new Date());
int line = baseMapper.updateById(cmsNews); int line = baseMapper.updateById(cmsNews);
log.debug(CyUserUtil.getAuthenUsername() + "修改了ID为" + cmsNews.getBusinessId() + "的文章表信息"); log.debug(CyUserUtil.getAuthenUsername() + "修改了ID为" + cmsNews.getBusinessId() + "的文章表信息");
return new CyPersistModel(line); return new CyPersistModel(line);
...@@ -324,8 +325,8 @@ public class CmsNewsServiceImpl extends ServiceImpl<CmsNewsRepository, CmsNews> ...@@ -324,8 +325,8 @@ public class CmsNewsServiceImpl extends ServiceImpl<CmsNewsRepository, CmsNews>
public IPage<CmsNews> listMiniProgram(CyPageInfo<CmsNews> paginationUtility, CmsNews cmsNews) { public IPage<CmsNews> listMiniProgram(CyPageInfo<CmsNews> paginationUtility, CmsNews cmsNews) {
//未登陆 //未登陆
if (CyUserUtil.getAuthenUsername() == null) { if (CyUserUtil.getAuthenUsername() == null) {
cmsNews.setIsTop(1); IPage<CmsNews> cmsNewsIPage = baseMapper.noLoginlistTop(paginationUtility, cmsNews);
IPage<CmsNews> cmsNewsIPage = baseMapper.noLoginlistTop(paginationUtility, cmsNews); List<CmsNews> records = cmsNewsIPage.getRecords(); List<CmsNews> records = cmsNewsIPage.getRecords();
for (CmsNews cmsNews1 : records) { for (CmsNews cmsNews1 : records) {
if (cmsNews1.getPath() != null) { if (cmsNews1.getPath() != null) {
cmsNews1.setPath(global.getBase_Discovery() + cmsNews1.getPath()); cmsNews1.setPath(global.getBase_Discovery() + cmsNews1.getPath());
...@@ -334,7 +335,7 @@ public class CmsNewsServiceImpl extends ServiceImpl<CmsNewsRepository, CmsNews> ...@@ -334,7 +335,7 @@ public class CmsNewsServiceImpl extends ServiceImpl<CmsNewsRepository, CmsNews>
return cmsNewsIPage; return cmsNewsIPage;
} }
//登陆后会从 首页/分类我的中进入 1是首页 2是分类和我的 //登陆后会从 首页/分类我的中进入 1是首页 2是分类和我的
if ("1".equals(cmsNews.getSource())){ if ("1".equals(cmsNews.getSource())) {
//当前商家下的文章以及设置为推荐文章 //当前商家下的文章以及设置为推荐文章
IPage<CmsNews> cmsNewsIPage = baseMapper.listTopMerchants(paginationUtility, cmsNews); IPage<CmsNews> cmsNewsIPage = baseMapper.listTopMerchants(paginationUtility, cmsNews);
List<CmsNews> records = cmsNewsIPage.getRecords(); List<CmsNews> records = cmsNewsIPage.getRecords();
......
...@@ -73,7 +73,7 @@ cy: ...@@ -73,7 +73,7 @@ cy:
# 是否开启登录拦截 # 是否开启登录拦截
secure: false secure: false
# token存活时间(30分钟) # token存活时间(30分钟)
ttl: 10 ttl: 1800
security: security:
enable: true enable: true
permission: false permission: false
......
...@@ -141,11 +141,10 @@ ...@@ -141,11 +141,10 @@
FROM cms_banner cb FROM cms_banner cb
LEFT JOIN oss_info oi ON oi.business_id = cb.banner_picture LEFT JOIN oss_info oi ON oi.business_id = cb.banner_picture
LEFT JOIN cms_banner_unit cbu on cbu.cms_banner_id = cb.business_id LEFT JOIN cms_banner_unit cbu on cbu.cms_banner_id = cb.business_id
LEFT JOIN sys_user_unit suu on suu.unit_id = cbu.sys_unit_id
WHERE 1 = 1 WHERE 1 = 1
AND cb.del_flag = 0 AND cb.del_flag = 0
AND cb.flag = 1 AND cb.flag = 1
AND suu.user_id = #{entity.userId} AND cbu.sys_unit_id = #{entity.unitId}
</select> </select>
<select id="visitorPagination" resultType="org.rcisoft.business.cmsbanner.entity.CmsBanner"> <select id="visitorPagination" resultType="org.rcisoft.business.cmsbanner.entity.CmsBanner">
SELECT oi.path AS url, SELECT oi.path AS url,
......
...@@ -208,6 +208,7 @@ ...@@ -208,6 +208,7 @@
AND cn.flag = 1 AND cn.flag = 1
and cpc.business_id IS NOT NULL and cpc.business_id IS NOT NULL
GROUP BY cn.business_id GROUP BY cn.business_id
ORDER BY cn.update_date DESC
</select> </select>
<select id="selectDictionaryControl" resultType="java.lang.Integer"> <select id="selectDictionaryControl" resultType="java.lang.Integer">
SELECT dict_value SELECT dict_value
...@@ -300,7 +301,7 @@ ...@@ -300,7 +301,7 @@
AND cv.home_display = #{entity.homeDisplay} AND cv.home_display = #{entity.homeDisplay}
AND cv.del_flag = 0 AND cv.del_flag = 0
GROUP BY cv.business_id GROUP BY cv.business_id
order by cv.business_id DESC order by cv.flag DESC, cv.update_date DESC
</select> </select>
<select id="noLoginlistTop" resultType="org.rcisoft.business.cmsnews.entity.CmsNews"> <select id="noLoginlistTop" resultType="org.rcisoft.business.cmsnews.entity.CmsNews">
SELECT cn.*, SELECT cn.*,
...@@ -311,14 +312,15 @@ ...@@ -311,14 +312,15 @@
LEFT JOIN sys_user su ON suu.user_id = su.business_id LEFT JOIN sys_user su ON suu.user_id = su.business_id
LEFT JOIN oss_info oi ON cn.picture_id = oi.business_id LEFT JOIN oss_info oi ON cn.picture_id = oi.business_id
WHERE 1 = 1 WHERE 1 = 1
AND cn.is_top = #{entity.isTop} AND cn.is_recommended = 1
AND cn.del_flag = 0 AND cn.del_flag = 0
AND cn.flag = 1 AND cn.flag = 1
GROUP BY cn.business_id GROUP BY cn.business_id
ORDER BY cn.is_top DESC, cn.update_date DESC
</select> </select>
<select id="listTopMerchants" resultType="org.rcisoft.business.cmsnews.entity.CmsNews"> <select id="listTopMerchants" resultType="org.rcisoft.business.cmsnews.entity.CmsNews">
SELECT cn.*, SELECT cn.*,
SUM(cpc.click_through_rate) AS readNum, SUM(DISTINCT cpc.click_through_rate) AS readNum,
oi.path AS path oi.path AS path
FROM cms_news cn FROM cms_news cn
LEFT JOIN cms_unit_new_video cunv ON cn.business_id = cunv.news_video_id AND cunv.type = 0 LEFT JOIN cms_unit_new_video cunv ON cn.business_id = cunv.news_video_id AND cunv.type = 0
...@@ -335,10 +337,11 @@ ...@@ -335,10 +337,11 @@
AND cn.flag = 1 AND cn.flag = 1
# AND cn.is_recommended = 1 # AND cn.is_recommended = 1
GROUP BY cn.business_id GROUP BY cn.business_id
ORDER BY cn.is_top DESC, cn.update_date DESC
</select> </select>
<select id="listByTopVideoHome" resultType="org.rcisoft.business.cmsvideo.entity.CmsVideo"> <select id="listByTopVideoHome" resultType="org.rcisoft.business.cmsvideo.entity.CmsVideo">
SELECT cv.*, SELECT cv.*,
sum(cpc.click_through_rate) AS readNum, sum(DISTINCT cpc.click_through_rate) AS readNum,
oi1.path AS defaultUrl, oi1.path AS defaultUrl,
oi.path AS path oi.path AS path
FROM cms_video cv FROM cms_video cv
...@@ -355,8 +358,7 @@ ...@@ -355,8 +358,7 @@
WHERE 1 = 1 WHERE 1 = 1
AND cunv.unit_id = #{entity.unitId} AND cunv.unit_id = #{entity.unitId}
AND cv.del_flag = 0 AND cv.del_flag = 0
AND cv.flag = 1
GROUP BY cv.business_id GROUP BY cv.business_id
order by cv.business_id DESC order by cv.flag DESC, cv.update_date DESC
</select> </select>
</mapper> </mapper>
...@@ -123,9 +123,9 @@ ...@@ -123,9 +123,9 @@
AND su.del_flag = 0 AND su.del_flag = 0
AND su.flag = 1 AND su.flag = 1
AND cv.del_flag = 0 AND cv.del_flag = 0
AND cv.flag = 1
and cpc.business_id IS NOT NULL and cpc.business_id IS NOT NULL
GROUP BY cv.business_id GROUP BY cv.business_id
order by cv.create_date DESC
</select> </select>
<select id="superAdminPaginatedQuery" resultType="org.rcisoft.business.cmsvideo.entity.CmsVideo"> <select id="superAdminPaginatedQuery" resultType="org.rcisoft.business.cmsvideo.entity.CmsVideo">
SELECT DISTINCT cv.*, SELECT DISTINCT cv.*,
...@@ -155,7 +155,7 @@ ...@@ -155,7 +155,7 @@
and release_time &lt;= #{entity.endTime} and release_time &lt;= #{entity.endTime}
</if> </if>
GROUP BY cv.business_id GROUP BY cv.business_id
ORDER BY cv.business_id DESC ORDER BY cv.update_date DESC
</select> </select>
<select id="businessAdminsPaginatedQuery" resultType="org.rcisoft.business.cmsvideo.entity.CmsVideo"> <select id="businessAdminsPaginatedQuery" resultType="org.rcisoft.business.cmsvideo.entity.CmsVideo">
SELECT DISTINCT cv.*, SELECT DISTINCT cv.*,
......
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