Commit 63876cde authored by 刘帅阳's avatar 刘帅阳

超级管理员商家管理员展示

parent 150d4d6a
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
<dependency> <dependency>
<groupId>org.91isoft</groupId> <groupId>org.91isoft</groupId>
<artifactId>91isoft_spbt</artifactId> <artifactId>91isoft_spbt</artifactId>
<version>3.2.0_WF_A_P_TEA_RES_beta26</version> <version>3.2.0_WF_A_P_IPA_beta1</version>
<!-- <version>3.0.0_nlt.25</version>--> <!-- <version>3.0.0_nlt.25</version>-->
<!-- 排除oracle12的驱动,此处代码不能提交,测试使用的是12,生产为11 --> <!-- 排除oracle12的驱动,此处代码不能提交,测试使用的是12,生产为11 -->
</dependency> </dependency>
......
...@@ -40,10 +40,14 @@ public interface CmsNewsRepository extends CyBaseMapper<CmsNews> { ...@@ -40,10 +40,14 @@ public interface CmsNewsRepository extends CyBaseMapper<CmsNews> {
IPage<CmsVideo> listByTopVideo(CyPageInfo<CmsNews> paginationUtility, @Param("entity") CmsVideo cmsVideo); IPage<CmsVideo> listByTopVideo(CyPageInfo<CmsNews> paginationUtility, @Param("entity") CmsVideo cmsVideo);
IPage<CmsNews> noLoginlistTop(CyPageInfo<CmsNews> paginationUtility,@Param("entity") CmsNews cmsNews); IPage<CmsNews> noLoginlistTop(CyPageInfo<CmsNews> paginationUtility, @Param("entity") CmsNews cmsNews);
IPage<CmsNews> listTopMerchants(CyPageInfo<CmsNews> paginationUtility, @Param("entity") CmsNews cmsNews); IPage<CmsNews> listTopMerchants(CyPageInfo<CmsNews> paginationUtility, @Param("entity") CmsNews cmsNews);
IPage<CmsVideo> listByTopVideoHome(CyPageInfo<CmsNews> paginationUtility, @Param("entity") CmsVideo cmsVideo); IPage<CmsVideo> listByTopVideoHome(CyPageInfo<CmsNews> paginationUtility, @Param("entity") CmsVideo cmsVideo);
IPage<CmsNews> listTopAdmin(CyPageInfo<CmsNews> paginationUtility, CmsNews cmsNews);
IPage<CmsVideo> listTopVideoAdmin(CyPageInfo<CmsNews> paginationUtility, CmsVideo cmsVideo);
} }
...@@ -334,6 +334,19 @@ public class CmsNewsServiceImpl extends ServiceImpl<CmsNewsRepository, CmsNews> ...@@ -334,6 +334,19 @@ public class CmsNewsServiceImpl extends ServiceImpl<CmsNewsRepository, CmsNews>
} }
//登陆后会从 首页/分类我的中进入 1是首页 2是分类和我的 //登陆后会从 首页/分类我的中进入 1是首页 2是分类和我的
if ("1".equals(cmsNews.getSource())) { if ("1".equals(cmsNews.getSource())) {
//超级管理员
if (CyUserUtil.getAuthenRoleIds().equals(cyInitComp.admin[0])) {
//超级管理员
IPage<CmsNews> cmsNewsIPage = baseMapper.listTopAdmin(paginationUtility, cmsNews);
List<CmsNews> records = cmsNewsIPage.getRecords();
for (CmsNews cmsNews1 : records) {
if (cmsNews1.getPath() != null) {
cmsNews1.setPath(global.getBase_Discovery() + cmsNews1.getPath());
}
}
return cmsNewsIPage;
}
//当前商家下的文章以及设置为推荐文章 //当前商家下的文章以及设置为推荐文章
IPage<CmsNews> cmsNewsIPage = baseMapper.listTopMerchants(paginationUtility, cmsNews); IPage<CmsNews> cmsNewsIPage = baseMapper.listTopMerchants(paginationUtility, cmsNews);
List<CmsNews> records = cmsNewsIPage.getRecords(); List<CmsNews> records = cmsNewsIPage.getRecords();
...@@ -344,16 +357,8 @@ public class CmsNewsServiceImpl extends ServiceImpl<CmsNewsRepository, CmsNews> ...@@ -344,16 +357,8 @@ public class CmsNewsServiceImpl extends ServiceImpl<CmsNewsRepository, CmsNews>
} }
return cmsNewsIPage; return cmsNewsIPage;
} }
//2分类或者是我的
cmsNews.setUserId(Integer.valueOf(CyUserUtil.getAuthenBusinessId())); return null;
IPage<CmsNews> cmsNewsIPage = baseMapper.listTop(paginationUtility, cmsNews);
List<CmsNews> records = cmsNewsIPage.getRecords();
for (CmsNews cmsNews1 : records) {
if (cmsNews1.getPath() != null) {
cmsNews1.setPath(global.getBase_Discovery() + cmsNews1.getPath());
}
}
return cmsNewsIPage;
} }
@Override @Override
...@@ -455,6 +460,21 @@ public class CmsNewsServiceImpl extends ServiceImpl<CmsNewsRepository, CmsNews> ...@@ -455,6 +460,21 @@ public class CmsNewsServiceImpl extends ServiceImpl<CmsNewsRepository, CmsNews>
} }
return cmsVideoIPage; return cmsVideoIPage;
} }
//超级管理员
//超级管理员
if (CyUserUtil.getAuthenRoleIds().equals(cyInitComp.admin[0])) {
//超级管理员
IPage<CmsVideo> cmsVideoIPage = baseMapper.listTopVideoAdmin(paginationUtility, cmsVideo);
List<CmsVideo> videoRecords = cmsVideoIPage.getRecords();
for (CmsVideo cmsNews1 : videoRecords) {
if (cmsNews1.getPath() != null) {
cmsNews1.setPath(global.getBase_Discovery() + cmsNews1.getPath());
}
}
return cmsVideoIPage;
}
//登陆后 //登陆后
cmsVideo.setUserId(Integer.valueOf(CyUserUtil.getAuthenBusinessId())); cmsVideo.setUserId(Integer.valueOf(CyUserUtil.getAuthenBusinessId()));
//校验是否包含商家信息 //校验是否包含商家信息
......
...@@ -44,7 +44,7 @@ import java.util.List; ...@@ -44,7 +44,7 @@ import java.util.List;
@RestController @RestController
@RequestMapping("/cmspriceclick") @RequestMapping("/cmspriceclick")
public class CmsPriceClickController extends CyPaginationController<CmsPriceClick> { public class CmsPriceClickController extends CyPaginationController<CmsPriceClick> {
private static final String PRICE_CLICK_IMPORT_TEMPLATE_NAME = "PromotionalTemplates.xlsx"; private static final String PRICE_CLICK_IMPORT_TEMPLATE_NAME = "PromotionalTemplates.xls";
@Autowired @Autowired
private Global global; private Global global;
@Autowired @Autowired
......
...@@ -188,6 +188,7 @@ ...@@ -188,6 +188,7 @@
AND cn.del_flag = 0 AND cn.del_flag = 0
AND cn.flag = 1 AND cn.flag = 1
GROUP BY cn.business_id, cpc.business_id) cn GROUP BY cn.business_id, cpc.business_id) cn
GROUP BY cn.business_id
</select> </select>
<select id="listByClassification" resultType="org.rcisoft.business.cmsnews.entity.CmsNews"> <select id="listByClassification" resultType="org.rcisoft.business.cmsnews.entity.CmsNews">
SELECT cn.*, SELECT cn.*,
...@@ -213,6 +214,7 @@ ...@@ -213,6 +214,7 @@
and cpc.business_id IS NOT NULL and cpc.business_id IS NOT NULL
GROUP BY cn.business_id, cpc.business_id GROUP BY cn.business_id, cpc.business_id
ORDER BY cn.update_date DESC) cn ORDER BY cn.update_date DESC) cn
GROUP BY cn.business_id
</select> </select>
<select id="selectDictionaryControl" resultType="java.lang.Integer"> <select id="selectDictionaryControl" resultType="java.lang.Integer">
SELECT dict_value SELECT dict_value
...@@ -346,6 +348,7 @@ ...@@ -346,6 +348,7 @@
GROUP BY cn.business_id, cpc.business_id GROUP BY cn.business_id, cpc.business_id
ORDER BY cn.is_top ORDER BY cn.is_top
DESC, cn.update_date DESC) cn DESC, cn.update_date DESC) cn
GROUP BY cn.business_id
</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.*,
...@@ -370,5 +373,55 @@ ...@@ -370,5 +373,55 @@
AND cv.del_flag = 0 AND cv.del_flag = 0
GROUP BY cv.business_id, cpc.business_id GROUP BY cv.business_id, cpc.business_id
order by cv.flag DESC, cv.update_date DESC) cv order by cv.flag DESC, cv.update_date DESC) cv
GROUP BY cv.business_id
</select>
<select id="listTopAdmin" resultType="org.rcisoft.business.cmsnews.entity.CmsNews">
SELECT cn.*,
SUM(cn.click_through_rate) AS readNum
FROM (SELECT cn.*,
cpc.click_through_rate AS click_through_rate,
oi.path AS path
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 sys_user_unit suu ON cunv.unit_id = suu.unit_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 cms_price_click cpc
ON cpc.news_video_id = cn.business_id AND cpc.del_flag = 0 AND cpc.type = 0
AND cpc.user_id = su.business_id
WHERE 1 = 1
AND cn.del_flag = 0
AND cn.flag = 1
# AND cn.is_recommended = 1
GROUP BY cn.business_id, cpc.business_id
ORDER BY cn.is_top
DESC, cn.update_date DESC) cn
GROUP BY cn.business_id
</select>
<select id="listTopVideoAdmin" resultType="org.rcisoft.business.cmsvideo.entity.CmsVideo">
SELECT cv.*,
SUM(cv.click_through_rate) AS readNum
FROM (SELECT cv.*,
cpc.click_through_rate AS click_through_rate,
oi1.path AS defaultUrl,
oi.path AS path
FROM cms_video cv
LEFT JOIN cms_unit_new_video cunv ON cv.business_id = cunv.news_video_id AND cunv.type = 1
LEFT JOIN sys_user_unit suu ON cunv.unit_id = suu.unit_id
LEFT JOIN sys_user su ON suu.user_id = su.business_id
AND su.del_flag = 0
AND su.flag = 1
LEFT JOIN cms_price_click cpc
ON cpc.news_video_id = cv.business_id AND cpc.del_flag = 0 AND cpc.type = 1
LEFT JOIN oss_info oi ON cv.video_url_id = oi.business_id
LEFT JOIN oss_info oi1 ON cv.default_url = oi1.business_id
WHERE 1 = 1
AND cv.del_flag = 0
GROUP BY cv.business_id, cpc.business_id
order by cv.flag DESC, cv.update_date DESC) cv
GROUP BY cv.business_id
</select> </select>
</mapper> </mapper>
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