Commit 22f2516a by 吴迪

【修改】修改bug

parent 187d39b5
......@@ -58,7 +58,7 @@ public class ClickDetailController {
@RequestMapping("/list")
//@RequiresPermissions("datamanage:clickdetail:list")
public R list(@RequestBody ClickDetailDTO clickDetailDTO) {
Page page = null;
Page<ClickDetailDTO> page = new Page();
if (StrUtil.equals("1", clickDetailDTO.getTypeValue())) {
page = clickDetailService.selectClickNewsList(clickDetailDTO);
} else if (StrUtil.equals("2", clickDetailDTO.getTypeValue())) {
......@@ -78,6 +78,8 @@ public class ClickDetailController {
} else if (StrUtil.equals("12", clickDetailDTO.getTypeValue())) {
page = clickDetailService.getListPageAnnounces(clickDetailDTO);
}
PageUtils pageUtils = new PageUtils(page);
return R.ok().put("page", pageUtils);
}
......@@ -108,6 +110,7 @@ public class ClickDetailController {
clickDetailService.getListPageAnnouncesExport(clickDetailDTO,response);
}
}
......
......@@ -86,5 +86,7 @@ public class ClickDetailDTO implements Serializable {
private String order;
private String releaseTimeStart;
private String releaseTimeEnd;
}
......@@ -14,7 +14,6 @@ import io.office.modules.manage.entity.ClickDetailEntity;
import io.office.modules.manage.entity.dto.ClickDetailDTO;
import io.office.modules.manage.service.ClickDetailService;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.stereotype.Service;
......@@ -44,12 +43,10 @@ public class ClickDetailServiceImpl extends ServiceImpl<ClickDetailDao, ClickDet
@Override
public Page<ClickDetailDTO> selectClickNewsList(ClickDetailDTO clickDetailDTO) {
Page page = new Page(clickDetailDTO.getPage(), clickDetailDTO.getLimit());
List<ClickDetailDTO> list = baseMapper.getListPageNews(clickDetailDTO,page);
if(CollectionUtils.isNotEmpty(list)) {
List<ClickDetailDTO> list = baseMapper.getListPageNews(clickDetailDTO, page);
if (CollectionUtils.isNotEmpty(list)) {
for (ClickDetailDTO detailDTO : list) {
if(StringUtils.isBlank(detailDTO.getJumpPath())) {
detailDTO.setJumpPath("http://www.gs1cn.org/News/msg?id="+detailDTO.getId());
}
detailDTO.setJumpPath("http://www.gs1cn.org/News/msg?id=" + detailDTO.getId());
}
}
page.setRecords(list);
......@@ -59,12 +56,12 @@ public class ClickDetailServiceImpl extends ServiceImpl<ClickDetailDao, ClickDet
@Override
public Page<ClickDetailDTO> getListPageImages(ClickDetailDTO clickDetailDTO) {
Page page = new Page(clickDetailDTO.getPage(), clickDetailDTO.getLimit());
List<ClickDetailDTO> list = baseMapper.getListPageImages(clickDetailDTO,page);
if(CollectionUtils.isNotEmpty(list)) {
List<ClickDetailDTO> list = baseMapper.getListPageImages(clickDetailDTO, page);
if (CollectionUtils.isNotEmpty(list)) {
for (ClickDetailDTO detailDTO : list) {
if(StringUtils.isBlank(detailDTO.getJumpPath())) {
detailDTO.setJumpPath("http://www.gs1cn.org/News/msgVideo?id="+detailDTO.getId());
}
detailDTO.setJumpPath("http://www.gs1cn.org/News/msgVideo?id=" + detailDTO.getId());
}
}
page.setRecords(list);
......@@ -74,12 +71,12 @@ public class ClickDetailServiceImpl extends ServiceImpl<ClickDetailDao, ClickDet
@Override
public Page<ClickDetailDTO> getListPageViewSubs(ClickDetailDTO clickDetailDTO) {
Page page = new Page(clickDetailDTO.getPage(), clickDetailDTO.getLimit());
List<ClickDetailDTO> list = baseMapper.getListPageViewSubs(clickDetailDTO,page);
if(CollectionUtils.isNotEmpty(list)) {
List<ClickDetailDTO> list = baseMapper.getListPageViewSubs(clickDetailDTO, page);
if (CollectionUtils.isNotEmpty(list)) {
for (ClickDetailDTO detailDTO : list) {
if(StringUtils.isBlank(detailDTO.getJumpPath())) {
detailDTO.setJumpPath("http://www.gs1cn.org/News/viewsub?id="+detailDTO.getId());
}
detailDTO.setJumpPath("http://www.gs1cn.org/News/viewsub?id=" + detailDTO.getId());
}
}
page.setRecords(list);
......@@ -89,13 +86,13 @@ public class ClickDetailServiceImpl extends ServiceImpl<ClickDetailDao, ClickDet
@Override
public Page<ClickDetailDTO> getListPageMovies(ClickDetailDTO clickDetailDTO) {
Page page = new Page(clickDetailDTO.getPage(), clickDetailDTO.getLimit());
List<ClickDetailDTO> list = baseMapper.getListPageMovies(clickDetailDTO,page);
List<ClickDetailDTO> list = baseMapper.getListPageMovies(clickDetailDTO, page);
if(CollectionUtils.isNotEmpty(list)) {
if (CollectionUtils.isNotEmpty(list)) {
for (ClickDetailDTO detailDTO : list) {
if(StringUtils.isBlank(detailDTO.getJumpPath())) {
detailDTO.setJumpPath("http://www.gs1cn.org/News/msgVideo?id="+detailDTO.getId());
}
detailDTO.setJumpPath("http://www.gs1cn.org/News/msgVideo?id=" + detailDTO.getId());
}
}
......@@ -106,12 +103,12 @@ public class ClickDetailServiceImpl extends ServiceImpl<ClickDetailDao, ClickDet
@Override
public Page<ClickDetailDTO> getListPagePolicys(ClickDetailDTO clickDetailDTO) {
Page page = new Page(clickDetailDTO.getPage(), clickDetailDTO.getLimit());
List<ClickDetailDTO> list = baseMapper.getListPagePolicys(clickDetailDTO,page);
if(CollectionUtils.isNotEmpty(list)) {
List<ClickDetailDTO> list = baseMapper.getListPagePolicys(clickDetailDTO, page);
if (CollectionUtils.isNotEmpty(list)) {
for (ClickDetailDTO detailDTO : list) {
if(StringUtils.isBlank(detailDTO.getJumpPath())) {
detailDTO.setJumpPath("http://www.gs1cn.org/Knowledge/Statuteinfo?id="+detailDTO.getId());
}
detailDTO.setJumpPath("http://www.gs1cn.org/Knowledge/Statuteinfo?id=" + detailDTO.getId());
}
}
page.setRecords(list);
......@@ -121,12 +118,12 @@ public class ClickDetailServiceImpl extends ServiceImpl<ClickDetailDao, ClickDet
@Override
public Page<ClickDetailDTO> getListPageApplications(ClickDetailDTO clickDetailDTO) {
Page page = new Page(clickDetailDTO.getPage(), clickDetailDTO.getLimit());
List<ClickDetailDTO> list = baseMapper.getListPageApplications(clickDetailDTO,page);
if(CollectionUtils.isNotEmpty(list)) {
List<ClickDetailDTO> list = baseMapper.getListPageApplications(clickDetailDTO, page);
if (CollectionUtils.isNotEmpty(list)) {
for (ClickDetailDTO detailDTO : list) {
if(StringUtils.isBlank(detailDTO.getJumpPath())) {
detailDTO.setJumpPath("http://www.gs1cn.org/News/msg?id="+detailDTO.getId());
}
detailDTO.setJumpPath("http://www.gs1cn.org/News/msg?id=" + detailDTO.getId());
}
}
page.setRecords(list);
......@@ -136,12 +133,12 @@ public class ClickDetailServiceImpl extends ServiceImpl<ClickDetailDao, ClickDet
@Override
public Page<ClickDetailDTO> getListPageKnowledgeInfos(ClickDetailDTO clickDetailDTO) {
Page page = new Page(clickDetailDTO.getPage(), clickDetailDTO.getLimit());
List<ClickDetailDTO> list = baseMapper.getListPageKnowledgeInfos(clickDetailDTO,page);
if(CollectionUtils.isNotEmpty(list)) {
List<ClickDetailDTO> list = baseMapper.getListPageKnowledgeInfos(clickDetailDTO, page);
if (CollectionUtils.isNotEmpty(list)) {
for (ClickDetailDTO detailDTO : list) {
if(StringUtils.isBlank(detailDTO.getJumpPath())) {
detailDTO.setJumpPath("http://www.gs1cn.org/Knowledge/Statuteinfo?id="+detailDTO.getId());
}
detailDTO.setJumpPath("http://www.gs1cn.org/Knowledge/Statuteinfo?id=" + detailDTO.getId());
}
}
page.setRecords(list);
......@@ -151,12 +148,12 @@ public class ClickDetailServiceImpl extends ServiceImpl<ClickDetailDao, ClickDet
@Override
public Page<ClickDetailDTO> getListPageProducts(ClickDetailDTO clickDetailDTO) {
Page page = new Page(clickDetailDTO.getPage(), clickDetailDTO.getLimit());
List<ClickDetailDTO> list = baseMapper.getListPageKnowledgeInfos(clickDetailDTO,page);
if(CollectionUtils.isNotEmpty(list)) {
List<ClickDetailDTO> list = baseMapper.getListPageProducts(clickDetailDTO, page);
if (CollectionUtils.isNotEmpty(list)) {
for (ClickDetailDTO detailDTO : list) {
if(StringUtils.isBlank(detailDTO.getJumpPath())) {
detailDTO.setJumpPath("http://www.gs1cn.org/Service/Book?id="+detailDTO.getId());
}
detailDTO.setJumpPath("http://www.gs1cn.org/Service/Book?id=" + detailDTO.getId());
}
}
page.setRecords(list);
......@@ -166,12 +163,12 @@ public class ClickDetailServiceImpl extends ServiceImpl<ClickDetailDao, ClickDet
@Override
public Page<ClickDetailDTO> getListPageAnnounces(ClickDetailDTO clickDetailDTO) {
Page page = new Page(clickDetailDTO.getPage(), clickDetailDTO.getLimit());
List<ClickDetailDTO> list = baseMapper.getListPageKnowledgeInfos(clickDetailDTO,page);
if(CollectionUtils.isNotEmpty(list)) {
List<ClickDetailDTO> list = baseMapper.getListPageKnowledgeInfos(clickDetailDTO, page);
if (CollectionUtils.isNotEmpty(list)) {
for (ClickDetailDTO detailDTO : list) {
if(StringUtils.isBlank(detailDTO.getJumpPath())) {
detailDTO.setJumpPath("http://www.gs1cn.org/News/NoticeArticle?id="+detailDTO.getId());
}
detailDTO.setJumpPath("http://www.gs1cn.org/News/NoticeArticle?id=" + detailDTO.getId());
}
}
page.setRecords(list);
......@@ -181,7 +178,7 @@ public class ClickDetailServiceImpl extends ServiceImpl<ClickDetailDao, ClickDet
@Override
public Page<ClickDetailDTO> selectClickList(ClickDetailDTO clickDetailDTO) {
Page page = new Page(clickDetailDTO.getPage(), clickDetailDTO.getLimit());
List<ClickDetailDTO> list = baseMapper.selectClickList(clickDetailDTO,page);
List<ClickDetailDTO> list = baseMapper.selectClickList(clickDetailDTO, page);
page.setRecords(list);
return page;
}
......@@ -189,27 +186,27 @@ public class ClickDetailServiceImpl extends ServiceImpl<ClickDetailDao, ClickDet
@Override
public void selectClickNewsListExport(ClickDetailDTO clickDetailDTO, HttpServletResponse response) throws IOException {
Page page = new Page(1, 999999);
List<ClickDetailDTO> list = baseMapper.getListPageNews(clickDetailDTO,page);
List<ClickDetailDTO> list = baseMapper.getListPageNews(clickDetailDTO, page);
// 存放excel的表头
ArrayList<ExcelExportEntity> entityList = new ArrayList<>();
//表头
ExcelExportEntity title = new ExcelExportEntity("ID", "id");
entityList.add(title);
title=new ExcelExportEntity("标题","title");
title = new ExcelExportEntity("标题", "title");
entityList.add(title);
title=new ExcelExportEntity("发布时间","inputDateStr");
title = new ExcelExportEntity("发布时间", "inputDateStr");
entityList.add(title);
title=new ExcelExportEntity("点击数","countNum");
title = new ExcelExportEntity("点击数", "countNum");
entityList.add(title);
Workbook result = ExcelExportUtil.exportExcel(new ExportParams("新闻统计结果", "新闻统计结果"), entityList, list);
Workbook result = ExcelExportUtil.exportExcel(new ExportParams("文章统计统计结果", "文章统计统计结果"), entityList, list);
//写出
ServletOutputStream outputStream = response.getOutputStream();
//设置请求头,解决文件名中文乱码问题
response.setCharacterEncoding("UTF-8");
response.setHeader("content-disposition","attachment;fileName="+ URLEncoder.encode("新闻统计结果.xlsx","utf-8") );
response.setHeader("content-disposition", "attachment;fileName=" + URLEncoder.encode("文章统计统计结果.xlsx", "utf-8"));
result.write(outputStream);
result.close();
outputStream.close();
......@@ -218,27 +215,27 @@ public class ClickDetailServiceImpl extends ServiceImpl<ClickDetailDao, ClickDet
@Override
public void getListPageImagesExport(ClickDetailDTO clickDetailDTO, HttpServletResponse response) throws IOException {
Page page = new Page(1, 999999);
List<ClickDetailDTO> list = baseMapper.getListPageImages(clickDetailDTO,page);
List<ClickDetailDTO> list = baseMapper.getListPageImages(clickDetailDTO, page);
// 存放excel的表头
ArrayList<ExcelExportEntity> entityList = new ArrayList<>();
//表头
ExcelExportEntity title = new ExcelExportEntity("ID", "id");
entityList.add(title);
title=new ExcelExportEntity("标题","title");
title = new ExcelExportEntity("标题", "title");
entityList.add(title);
title=new ExcelExportEntity("发布时间","inputDateStr");
title = new ExcelExportEntity("发布时间", "inputDateStr");
entityList.add(title);
title=new ExcelExportEntity("点击数","countNum");
title = new ExcelExportEntity("点击数", "countNum");
entityList.add(title);
Workbook result = ExcelExportUtil.exportExcel(new ExportParams("新闻统计结果", "新闻统计结果"), entityList, list);
Workbook result = ExcelExportUtil.exportExcel(new ExportParams("图片统计结果", "图片统计结果"), entityList, list);
//写出
ServletOutputStream outputStream = response.getOutputStream();
//设置请求头,解决文件名中文乱码问题
response.setCharacterEncoding("UTF-8");
response.setHeader("content-disposition","attachment;fileName="+ URLEncoder.encode("新闻统计结果.xlsx","utf-8") );
response.setHeader("content-disposition", "attachment;fileName=" + URLEncoder.encode("图片统计结果.xlsx", "utf-8"));
result.write(outputStream);
result.close();
outputStream.close();
......@@ -248,27 +245,27 @@ public class ClickDetailServiceImpl extends ServiceImpl<ClickDetailDao, ClickDet
@Override
public void getListPageViewSubsExport(ClickDetailDTO clickDetailDTO, HttpServletResponse response) throws IOException {
Page page = new Page(1, 999999);
List<ClickDetailDTO> list = baseMapper.getListPageViewSubs(clickDetailDTO,page);
List<ClickDetailDTO> list = baseMapper.getListPageViewSubs(clickDetailDTO, page);
// 存放excel的表头
ArrayList<ExcelExportEntity> entityList = new ArrayList<>();
//表头
ExcelExportEntity title = new ExcelExportEntity("ID", "id");
entityList.add(title);
title=new ExcelExportEntity("标题","title");
title = new ExcelExportEntity("标题", "title");
entityList.add(title);
title=new ExcelExportEntity("发布时间","inputDateStr");
title = new ExcelExportEntity("发布时间", "inputDateStr");
entityList.add(title);
title=new ExcelExportEntity("点击数","countNum");
title = new ExcelExportEntity("点击数", "countNum");
entityList.add(title);
Workbook result = ExcelExportUtil.exportExcel(new ExportParams("新闻统计结果", "新闻统计结果"), entityList, list);
Workbook result = ExcelExportUtil.exportExcel(new ExportParams("专题统计结果", "专题统计结果"), entityList, list);
//写出
ServletOutputStream outputStream = response.getOutputStream();
//设置请求头,解决文件名中文乱码问题
response.setCharacterEncoding("UTF-8");
response.setHeader("content-disposition","attachment;fileName="+ URLEncoder.encode("新闻统计结果.xlsx","utf-8") );
response.setHeader("content-disposition", "attachment;fileName=" + URLEncoder.encode("专题统计结果.xlsx", "utf-8"));
result.write(outputStream);
result.close();
outputStream.close();
......@@ -277,27 +274,27 @@ public class ClickDetailServiceImpl extends ServiceImpl<ClickDetailDao, ClickDet
@Override
public void getListPageMoviesExport(ClickDetailDTO clickDetailDTO, HttpServletResponse response) throws IOException {
Page page = new Page(1, 999999);
List<ClickDetailDTO> list = baseMapper.getListPageMovies(clickDetailDTO,page);
List<ClickDetailDTO> list = baseMapper.getListPageMovies(clickDetailDTO, page);
// 存放excel的表头
ArrayList<ExcelExportEntity> entityList = new ArrayList<>();
//表头
ExcelExportEntity title = new ExcelExportEntity("ID", "id");
entityList.add(title);
title=new ExcelExportEntity("标题","title");
title = new ExcelExportEntity("标题", "title");
entityList.add(title);
title=new ExcelExportEntity("发布时间","inputDateStr");
title = new ExcelExportEntity("发布时间", "inputDateStr");
entityList.add(title);
title=new ExcelExportEntity("点击数","countNum");
title = new ExcelExportEntity("点击数", "countNum");
entityList.add(title);
Workbook result = ExcelExportUtil.exportExcel(new ExportParams("新闻统计结果", "新闻统计结果"), entityList, list);
Workbook result = ExcelExportUtil.exportExcel(new ExportParams("视频统计结果", "视频统计结果"), entityList, list);
//写出
ServletOutputStream outputStream = response.getOutputStream();
//设置请求头,解决文件名中文乱码问题
response.setCharacterEncoding("UTF-8");
response.setHeader("content-disposition","attachment;fileName="+ URLEncoder.encode("新闻统计结果.xlsx","utf-8") );
response.setHeader("content-disposition", "attachment;fileName=" + URLEncoder.encode("视频统计结果.xlsx", "utf-8"));
result.write(outputStream);
result.close();
outputStream.close();
......@@ -307,27 +304,27 @@ public class ClickDetailServiceImpl extends ServiceImpl<ClickDetailDao, ClickDet
public void getListPagePolicysExport(ClickDetailDTO clickDetailDTO, HttpServletResponse response) throws IOException {
Page page = new Page(1, 999999);
List<ClickDetailDTO> list = baseMapper.getListPagePolicys(clickDetailDTO,page);
List<ClickDetailDTO> list = baseMapper.getListPagePolicys(clickDetailDTO, page);
// 存放excel的表头
ArrayList<ExcelExportEntity> entityList = new ArrayList<>();
//表头
ExcelExportEntity title = new ExcelExportEntity("ID", "id");
entityList.add(title);
title=new ExcelExportEntity("标题","title");
title = new ExcelExportEntity("标题", "title");
entityList.add(title);
title=new ExcelExportEntity("发布时间","inputDateStr");
title = new ExcelExportEntity("发布时间", "inputDateStr");
entityList.add(title);
title=new ExcelExportEntity("点击数","countNum");
title = new ExcelExportEntity("点击数", "countNum");
entityList.add(title);
Workbook result = ExcelExportUtil.exportExcel(new ExportParams("新闻统计结果", "新闻统计结果"), entityList, list);
Workbook result = ExcelExportUtil.exportExcel(new ExportParams("政策法规结果", "政策法规结果"), entityList, list);
//写出
ServletOutputStream outputStream = response.getOutputStream();
//设置请求头,解决文件名中文乱码问题
response.setCharacterEncoding("UTF-8");
response.setHeader("content-disposition","attachment;fileName="+ URLEncoder.encode("新闻统计结果.xlsx","utf-8") );
response.setHeader("content-disposition", "attachment;fileName=" + URLEncoder.encode("政策法规结果.xlsx", "utf-8"));
result.write(outputStream);
result.close();
outputStream.close();
......@@ -336,27 +333,27 @@ public class ClickDetailServiceImpl extends ServiceImpl<ClickDetailDao, ClickDet
@Override
public void getListPageApplicationsExport(ClickDetailDTO clickDetailDTO, HttpServletResponse response) throws IOException {
Page page = new Page(1, 999999);
List<ClickDetailDTO> list = baseMapper.getListPageApplications(clickDetailDTO,page);
List<ClickDetailDTO> list = baseMapper.getListPageApplications(clickDetailDTO, page);
// 存放excel的表头
ArrayList<ExcelExportEntity> entityList = new ArrayList<>();
//表头
ExcelExportEntity title = new ExcelExportEntity("ID", "id");
entityList.add(title);
title=new ExcelExportEntity("标题","title");
title = new ExcelExportEntity("标题", "title");
entityList.add(title);
title=new ExcelExportEntity("发布时间","inputDateStr");
title = new ExcelExportEntity("发布时间", "inputDateStr");
entityList.add(title);
title=new ExcelExportEntity("点击数","countNum");
title = new ExcelExportEntity("点击数", "countNum");
entityList.add(title);
Workbook result = ExcelExportUtil.exportExcel(new ExportParams("新闻统计结果", "新闻统计结果"), entityList, list);
Workbook result = ExcelExportUtil.exportExcel(new ExportParams("应用领域结果", "应用领域结果"), entityList, list);
//写出
ServletOutputStream outputStream = response.getOutputStream();
//设置请求头,解决文件名中文乱码问题
response.setCharacterEncoding("UTF-8");
response.setHeader("content-disposition","attachment;fileName="+ URLEncoder.encode("新闻统计结果.xlsx","utf-8") );
response.setHeader("content-disposition", "attachment;fileName=" + URLEncoder.encode("应用领域结果.xlsx", "utf-8"));
result.write(outputStream);
result.close();
outputStream.close();
......@@ -365,27 +362,27 @@ public class ClickDetailServiceImpl extends ServiceImpl<ClickDetailDao, ClickDet
@Override
public void getListPageKnowledgeInfosExport(ClickDetailDTO clickDetailDTO, HttpServletResponse response) throws IOException {
Page page = new Page(1, 999999);
List<ClickDetailDTO> list = baseMapper.getListPageKnowledgeInfos(clickDetailDTO,page);
List<ClickDetailDTO> list = baseMapper.getListPageKnowledgeInfos(clickDetailDTO, page);
// 存放excel的表头
ArrayList<ExcelExportEntity> entityList = new ArrayList<>();
//表头
ExcelExportEntity title = new ExcelExportEntity("ID", "id");
entityList.add(title);
title=new ExcelExportEntity("标题","title");
title = new ExcelExportEntity("标题", "title");
entityList.add(title);
title=new ExcelExportEntity("发布时间","inputDateStr");
title = new ExcelExportEntity("发布时间", "inputDateStr");
entityList.add(title);
title=new ExcelExportEntity("点击数","countNum");
title = new ExcelExportEntity("点击数", "countNum");
entityList.add(title);
Workbook result = ExcelExportUtil.exportExcel(new ExportParams("新闻统计结果", "新闻统计结果"), entityList, list);
Workbook result = ExcelExportUtil.exportExcel(new ExportParams("知识统计结果", "知识统计结果"), entityList, list);
//写出
ServletOutputStream outputStream = response.getOutputStream();
//设置请求头,解决文件名中文乱码问题
response.setCharacterEncoding("UTF-8");
response.setHeader("content-disposition","attachment;fileName="+ URLEncoder.encode("新闻统计结果.xlsx","utf-8") );
response.setHeader("content-disposition", "attachment;fileName=" + URLEncoder.encode("知识统计结果.xlsx", "utf-8"));
result.write(outputStream);
result.close();
outputStream.close();
......@@ -394,27 +391,27 @@ public class ClickDetailServiceImpl extends ServiceImpl<ClickDetailDao, ClickDet
@Override
public void getListPageProductsExport(ClickDetailDTO clickDetailDTO, HttpServletResponse response) throws IOException {
Page page = new Page(1, 999999);
List<ClickDetailDTO> list = baseMapper.getListPageProducts(clickDetailDTO,page);
List<ClickDetailDTO> list = baseMapper.getListPageProducts(clickDetailDTO, page);
// 存放excel的表头
ArrayList<ExcelExportEntity> entityList = new ArrayList<>();
//表头
ExcelExportEntity title = new ExcelExportEntity("ID", "id");
entityList.add(title);
title=new ExcelExportEntity("标题","title");
title = new ExcelExportEntity("标题", "title");
entityList.add(title);
title=new ExcelExportEntity("发布时间","inputDateStr");
title = new ExcelExportEntity("发布时间", "inputDateStr");
entityList.add(title);
title=new ExcelExportEntity("点击数","countNum");
title = new ExcelExportEntity("点击数", "countNum");
entityList.add(title);
Workbook result = ExcelExportUtil.exportExcel(new ExportParams("新闻统计结果", "新闻统计结果"), entityList, list);
Workbook result = ExcelExportUtil.exportExcel(new ExportParams("图书文献结果", "图书文献结果"), entityList, list);
//写出
ServletOutputStream outputStream = response.getOutputStream();
//设置请求头,解决文件名中文乱码问题
response.setCharacterEncoding("UTF-8");
response.setHeader("content-disposition","attachment;fileName="+ URLEncoder.encode("新闻统计结果.xlsx","utf-8") );
response.setHeader("content-disposition", "attachment;fileName=" + URLEncoder.encode("图书文献结果.xlsx", "utf-8"));
result.write(outputStream);
result.close();
outputStream.close();
......@@ -423,27 +420,27 @@ public class ClickDetailServiceImpl extends ServiceImpl<ClickDetailDao, ClickDet
@Override
public void getListPageAnnouncesExport(ClickDetailDTO clickDetailDTO, HttpServletResponse response) throws IOException {
Page page = new Page(1, 999999);
List<ClickDetailDTO> list = baseMapper.getListPageAnnounces(clickDetailDTO,page);
List<ClickDetailDTO> list = baseMapper.getListPageAnnounces(clickDetailDTO, page);
// 存放excel的表头
ArrayList<ExcelExportEntity> entityList = new ArrayList<>();
//表头
ExcelExportEntity title = new ExcelExportEntity("ID", "id");
entityList.add(title);
title=new ExcelExportEntity("标题","title");
title = new ExcelExportEntity("标题", "title");
entityList.add(title);
title=new ExcelExportEntity("发布时间","inputDateStr");
title = new ExcelExportEntity("发布时间", "inputDateStr");
entityList.add(title);
title=new ExcelExportEntity("点击数","countNum");
title = new ExcelExportEntity("点击数", "countNum");
entityList.add(title);
Workbook result = ExcelExportUtil.exportExcel(new ExportParams("新闻统计结果", "新闻统计结果"), entityList, list);
Workbook result = ExcelExportUtil.exportExcel(new ExportParams("公告统计结果", "公告统计结果"), entityList, list);
//写出
ServletOutputStream outputStream = response.getOutputStream();
//设置请求头,解决文件名中文乱码问题
response.setCharacterEncoding("UTF-8");
response.setHeader("content-disposition","attachment;fileName="+ URLEncoder.encode("新闻统计结果.xlsx","utf-8") );
response.setHeader("content-disposition", "attachment;fileName=" + URLEncoder.encode("公告统计结果.xlsx", "utf-8"));
result.write(outputStream);
result.close();
outputStream.close();
......@@ -452,18 +449,18 @@ public class ClickDetailServiceImpl extends ServiceImpl<ClickDetailDao, ClickDet
@Override
public void selectClickListExport(ClickDetailDTO clickDetailDTO, HttpServletResponse response) throws IOException {
Page page = new Page(1, 999999);
List<ClickDetailDTO> list = baseMapper.selectClickList(clickDetailDTO,page);
List<ClickDetailDTO> list = baseMapper.selectClickList(clickDetailDTO, page);
// 存放excel的表头
ArrayList<ExcelExportEntity> entityList = new ArrayList<>();
//表头
ExcelExportEntity title = new ExcelExportEntity("ID", "id");
entityList.add(title);
title=new ExcelExportEntity("标题","title");
title = new ExcelExportEntity("标题", "title");
entityList.add(title);
title=new ExcelExportEntity("发布时间","inputDateStr");
title = new ExcelExportEntity("发布时间", "inputDateStr");
entityList.add(title);
title=new ExcelExportEntity("点击数","countNum");
title = new ExcelExportEntity("点击数", "countNum");
entityList.add(title);
Workbook result = ExcelExportUtil.exportExcel(new ExportParams("新闻统计结果", "新闻统计结果"), entityList, list);
......@@ -472,7 +469,7 @@ public class ClickDetailServiceImpl extends ServiceImpl<ClickDetailDao, ClickDet
ServletOutputStream outputStream = response.getOutputStream();
//设置请求头,解决文件名中文乱码问题
response.setCharacterEncoding("UTF-8");
response.setHeader("content-disposition","attachment;fileName="+ URLEncoder.encode("新闻统计结果.xlsx","utf-8") );
response.setHeader("content-disposition", "attachment;fileName=" + URLEncoder.encode("新闻统计结果.xlsx", "utf-8"));
result.write(outputStream);
result.close();
outputStream.close();
......
package io.office.modules.manage.service.impl;
import com.baomidou.mybatisplus.core.metadata.OrderItem;
import io.netty.util.internal.StringUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.office.common.utils.PageUtils;
import io.office.common.utils.Query;
import io.office.modules.manage.dao.MedicalDao;
import io.office.modules.manage.entity.MedicalEntity;
import io.office.modules.manage.service.MedicalService;
......@@ -11,11 +14,6 @@ import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.office.common.utils.PageUtils;
import io.office.common.utils.Query;
......@@ -39,14 +37,14 @@ public class MedicalServiceImpl extends ServiceImpl<MedicalDao, MedicalEntity> i
} else {
medicalEntityQueryWrapper.gt("level",0);
}
if(params.get("sidx")!=null && StringUtils.isNotBlank(String.valueOf(params.get("sidx")))){
if(String.valueOf(params.get("sidx")).equalsIgnoreCase("type")) {
params.put("sidx","typeid");
medicalEntityQueryWrapper.orderByAsc("typeid");
}
} else{
medicalEntityQueryWrapper.orderByAsc("typeid");
}
//if(params.get("sidx")!=null && StringUtils.isNotBlank(String.valueOf(params.get("sidx")))){
// if(String.valueOf(params.get("sidx")).equalsIgnoreCase("type")) {
// params.put("sidx","typeid");
// medicalEntityQueryWrapper.orderByAsc("typeid");
// }
//} else{
// medicalEntityQueryWrapper.orderByAsc("typeid");
//}
IPage<MedicalEntity> page = this.page(
......
......@@ -5,6 +5,7 @@ import io.office.modules.manage.webservice.WebServiceXmlTemplate;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.client.RestTemplate;
......@@ -108,4 +109,49 @@ public class GLNSearchUtils {
}
public static void main(String[] args) {
String smsTemplateXml = WebServiceXmlTemplate.SEND_MESSAGE_TEMPLATE.replaceAll("\\$\\{cascade\\}", "9").replaceAll("\\$\\{requestedKeyCode\\}", "GLN")
.replaceAll("\\$\\{requestedKeyValue\\}", "6929020221650").replaceAll("\\$\\{requestedLanguage\\}", "en");
String url = "http://webservice.anccnet.com:8080/gepir4/gepirv4.asmx";
RestTemplate restTemplate = new RestTemplate();
//创建请求头
//创建请求头
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.TEXT_XML);
HttpEntity<String> entity = new HttpEntity<>("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
"<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n" +
" <soap:Header>\n" +
" <gep:requestHeader xmlns=\"http://gepir4.ws.gs1.org/\">\n" +
" <requesterGLN xmlns=\"\">6900000000007</requesterGLN>\n" +
" <onBehalfOfGLN xmlns=\"\">6900000000007</onBehalfOfGLN>\n" +
" <isAuthenticated xmlns=\"\">true</isAuthenticated>\n" +
" <cascade xmlns=\"\">9</cascade>\n" +
" </gep:requestHeader>\n" +
" </soap:Header>\n" +
" <soap:Body>\n" +
" <getKeyLicensee xmlns=\"http://gepir4.ws.gs1.org/\">\n" +
" <getKeyLicensee xmlns=\"\">\n" +
" <getKeyLicensee>\n" +
" <requestedKeyCode>GLN</requestedKeyCode>\n" +
" <requestedKeyValue>6970974940012</requestedKeyValue>\n" +
" <requestedLanguage>en</requestedLanguage>\n" +
" </getKeyLicensee>\n" +
" </getKeyLicensee>\n" +
" </getKeyLicensee>\n" +
" </soap:Body>\n" +
"</soap:Envelope>\n", headers);
ResponseEntity<String> responseEntity = restTemplate.postForEntity(url, entity, String.class);
System.out.println(responseEntity);
}
}
......@@ -44,9 +44,9 @@ public class SysRoleController extends AbstractController {
@RequiresPermissions("sys:role:list")
public R list(@RequestParam Map<String, Object> params){
//如果不是超级管理员,则只查询自己创建的角色列表
// if(getUserId() != Constant.SUPER_ADMIN){
// params.put("createUserId", getUserId());
// }
if(getUserId() != Constant.SUPER_ADMIN){
params.put("createUserId", getUserId());
}
PageUtils page = sysRoleService.queryPage(params);
......@@ -62,9 +62,9 @@ public class SysRoleController extends AbstractController {
Map<String, Object> map = new HashMap<>();
//如果不是超级管理员,则只查询自己所拥有的角色列表
// if(getUserId() != Constant.SUPER_ADMIN){
// map.put("create_user_id", getUserId());
// }
if(getUserId() != Constant.SUPER_ADMIN){
map.put("create_user_id", getUserId());
}
List<SysRoleEntity> list = (List<SysRoleEntity>) sysRoleService.listByMap(map);
return R.ok().put("list", list);
......
......@@ -50,9 +50,9 @@ public class SysUserController extends AbstractController {
@RequiresPermissions("sys:user:list")
public R list(@RequestParam Map<String, Object> params){
//只有超级管理员,才能查看所有管理员列表
// if(getUserId() != Constant.SUPER_ADMIN){
// params.put("createUserId", getUserId());
// }
if(getUserId() != Constant.SUPER_ADMIN){
params.put("createUserId", getUserId());
}
PageUtils page = sysUserService.queryPage(params);
return R.ok().put("page", page);
......
......@@ -60,9 +60,9 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuDao, SysMenuEntity> i
@Override
public List<SysMenuEntity> getUserMenuList(Long userId) {
//系统管理员,拥有最高权限
// if(userId == Constant.SUPER_ADMIN){
// return getAllMenuList(null);
// }
if(userId == Constant.SUPER_ADMIN){
return getAllMenuList(null);
}
//用户菜单列表
List<Long> menuIdList = sysUserService.queryAllMenuId(userId);
......
......@@ -87,7 +87,7 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleDao, SysRoleEntity> i
this.save(role);
//检查权限是否越权
checkPrems(role);
//checkPrems(role);
//保存角色与菜单关系
sysRoleMenuService.saveOrUpdate(role.getRoleId(), role.getMenuIdList());
......@@ -99,7 +99,7 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleDao, SysRoleEntity> i
this.updateById(role);
//检查权限是否越权
checkPrems(role);
//checkPrems(role);
//更新角色与菜单关系
sysRoleMenuService.saveOrUpdate(role.getRoleId(), role.getMenuIdList());
......@@ -129,9 +129,9 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleDao, SysRoleEntity> i
*/
private void checkPrems(SysRoleEntity role) {
//如果不是超级管理员,则需要判断角色的权限是否超过自己的权限
// if(role.getCreateUserId() == Constant.SUPER_ADMIN){
// return ;
// }
if(role.getCreateUserId() == Constant.SUPER_ADMIN){
return ;
}
//查询用户所拥有的菜单列表
List<Long> menuIdList = sysUserService.queryAllMenuId(role.getCreateUserId());
......
......@@ -12,7 +12,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.office.common.exception.RRException;
import io.office.common.utils.Constant;
import io.office.common.utils.PageUtils;
import io.office.common.utils.Query;
import io.office.modules.sys.dao.SysUserDao;
......@@ -86,7 +85,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserDao, SysUserEntity> i
this.save(user);
//检查角色是否越权
checkRole(user);
//checkRole(user);
//保存用户与角色关系
sysUserRoleService.saveOrUpdate(user.getUserId(), user.getRoleIdList());
......@@ -103,7 +102,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserDao, SysUserEntity> i
this.updateById(user);
//检查角色是否越权
checkRole(user);
//checkRole(user);
//保存用户与角色关系
sysUserRoleService.saveOrUpdate(user.getUserId(), user.getRoleIdList());
......@@ -130,9 +129,9 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserDao, SysUserEntity> i
return;
}
//如果不是超级管理员,则需要判断用户的角色是否自己创建
// if(user.getCreateUserId() == Constant.SUPER_ADMIN){
// return ;
// }
//if(user.getCreateUserId() == Constant.SUPER_ADMIN){
// return ;
//}
//查询用户创建的角色列表
List<Long> roleIdList = sysRoleService.queryRoleIdList(user.getCreateUserId());
......
......@@ -18,9 +18,10 @@
<select id="getListPageNews" parameterType="io.office.modules.manage.entity.dto.ClickDetailDTO"
resultType="io.office.modules.manage.entity.dto.ClickDetailDTO">
select * from ( select a.ID,title,'1' typeValue,(select count(*) from click_detail b where type_value=1 and
select * from ( select a.ID,title,'1' typeValue,'文章统计' typeName,(select count(*) from click_detail b where type_value=1 and
b.c_id=a.Id) countNum,
releasedate inputDate,CONVERT(varchar(100),releasedate,120) inputDateStr,directpath jumpPath ,editor , updatedate from news a where ((classid between 5 and 8) or
releasedate inputDate,CONVERT(varchar(100),releasedate,120) inputDateStr,directpath jumpPath ,editor ,
updatedate ,content from news a where ((classid between 5 and 8) or
(classid in (select Id
from newsClass where p_id=5))) and levels>0
<if test="clickDetailDTO.keyWordType=='1'.toString()">
......@@ -38,10 +39,22 @@
and a.ID =#{clickDetailDTO.keyWord}
</if>
</if>
<if test="clickDetailDTO.releaseTimeStart!=null and clickDetailDTO.releaseTimeStart!=''">
and a.releasedate &gt;=#{clickDetailDTO.releaseTimeStart}
</if>
<if test="clickDetailDTO.releaseTimeEnd!=null and clickDetailDTO.releaseTimeEnd!=''">
and a.releasedate &lt;=#{clickDetailDTO.releaseTimeEnd}
</if>
) c
<choose>
<when test="clickDetailDTO.sidx!=null and clickDetailDTO.sidx!=''">
ORDER BY c.${clickDetailDTO.sidx} ${clickDetailDTO.order}
<when test="clickDetailDTO.keyWordType=='1'.toString() and clickDetailDTO.order!=null and clickDetailDTO.order!=''">
ORDER BY content ${clickDetailDTO.order}
</when>
<when test="clickDetailDTO.keyWordType=='2'.toString() and clickDetailDTO.sidx!=null and clickDetailDTO.sidx!=''">
ORDER BY title ${clickDetailDTO.order}
</when>
<when test="clickDetailDTO.keyWordType=='2'.toString() and clickDetailDTO.sidx!=null and clickDetailDTO.sidx!=''">
ORDER BY id ${clickDetailDTO.order}
</when>
<otherwise>
ORDER BY c.id DESC
......@@ -54,8 +67,8 @@
resultType="io.office.modules.manage.entity.dto.ClickDetailDTO">
select * from ( SELECT
a.pictureid ID,
title,
'2' typeValue,
title,content,
'2' typeValue,'图片统计' typeName,
( SELECT COUNT ( * ) FROM click_detail b WHERE type_value = 2 AND b.c_id= a.pictureid ) countNum,
inputDate,CONVERT(varchar(100),inputDate,120) inputDateStr,
jumpPath,editor
......@@ -75,16 +88,28 @@
and a.pictureid =#{clickDetailDTO.keyWord}
</if>
</if>
<if test="clickDetailDTO.releaseTimeStart!=null and clickDetailDTO.releaseTimeStart!=''">
and a.inputDate &gt;=#{clickDetailDTO.releaseTimeStart}
</if>
<if test="clickDetailDTO.releaseTimeEnd!=null and clickDetailDTO.releaseTimeEnd!=''">
and a.inputDate &lt;=#{clickDetailDTO.releaseTimeEnd}
</if>
) c
<choose>
<when test="clickDetailDTO.sidx!=null and clickDetailDTO.sidx!=''">
ORDER BY c.${clickDetailDTO.sidx} ${clickDetailDTO.order}
<when test="clickDetailDTO.keyWordType=='1'.toString() and clickDetailDTO.order!=null and clickDetailDTO.order!=''">
ORDER BY content ${clickDetailDTO.order}
</when>
<when test="clickDetailDTO.keyWordType=='2'.toString() and clickDetailDTO.sidx!=null and clickDetailDTO.sidx!=''">
ORDER BY title ${clickDetailDTO.order}
</when>
<when test="clickDetailDTO.keyWordType=='2'.toString() and clickDetailDTO.sidx!=null and clickDetailDTO.sidx!=''">
ORDER BY id ${clickDetailDTO.order}
</when>
<otherwise>
ORDER BY c.id DESC
</otherwise>
</choose>
</select>
......@@ -93,7 +118,8 @@
select * from ( SELECT
a.classid ID,
title,
'3' typeValue,
'3' typeValue,shortcontent,
'专题统计' typeName,
(
SELECT COUNT(*) FROM
click_detail b
......@@ -101,7 +127,7 @@
type_value = 3
AND b.c_id= a.classid
) countNum,
TIME inputDate,
TIME inputDate
,CONVERT(varchar(100),TIME,120) inputDateStr,
directpath jumpPath,
editor
......@@ -126,10 +152,22 @@
and a.classid =#{clickDetailDTO.keyWord}
</if>
</if>
<if test="clickDetailDTO.releaseTimeStart!=null and clickDetailDTO.releaseTimeStart!=''">
and a.TIME &gt;=#{clickDetailDTO.releaseTimeStart}
</if>
<if test="clickDetailDTO.releaseTimeEnd!=null and clickDetailDTO.releaseTimeEnd!=''">
and a.TIME &lt;=#{clickDetailDTO.releaseTimeEnd}
</if>
) c
<choose>
<when test="clickDetailDTO.sidx!=null and clickDetailDTO.sidx!=''">
ORDER BY c.${clickDetailDTO.sidx} ${clickDetailDTO.order}
<when test="clickDetailDTO.keyWordType=='1'.toString() and clickDetailDTO.order!=null and clickDetailDTO.order!=''">
ORDER BY shortcontent ${clickDetailDTO.order}
</when>
<when test="clickDetailDTO.keyWordType=='2'.toString() and clickDetailDTO.sidx!=null and clickDetailDTO.sidx!=''">
ORDER BY title ${clickDetailDTO.order}
</when>
<when test="clickDetailDTO.keyWordType=='2'.toString() and clickDetailDTO.sidx!=null and clickDetailDTO.sidx!=''">
ORDER BY id ${clickDetailDTO.order}
</when>
<otherwise>
ORDER BY c.id DESC
......@@ -141,8 +179,9 @@
resultType="io.office.modules.manage.entity.dto.ClickDetailDTO">
select * from ( SELECT
a.ID,
title,
title,brief,
'4' typeValue,
'视频统计' typeName,
(
SELECT
COUNT (*)
......@@ -152,7 +191,7 @@
b.type_value = 4
AND b.c_id = a.Id
) countNum,
releasedate inputDate,
releasedate inputDate
,CONVERT(varchar(100),releasedate,120) inputDateStr,
directpath jumpPath,
editor
......@@ -175,10 +214,22 @@
and a.id =#{clickDetailDTO.keyWord}
</if>
</if>
<if test="clickDetailDTO.releaseTimeStart!=null and clickDetailDTO.releaseTimeStart!=''">
and a.releasedate &gt;=#{clickDetailDTO.releaseTimeStart}
</if>
<if test="clickDetailDTO.releaseTimeEnd!=null and clickDetailDTO.releaseTimeEnd!=''">
and a.releasedate &lt;=#{clickDetailDTO.releaseTimeEnd}
</if>
) c
<choose>
<when test="clickDetailDTO.sidx!=null and clickDetailDTO.sidx!=''">
ORDER BY c.${clickDetailDTO.sidx} ${clickDetailDTO.order}
<when test="clickDetailDTO.keyWordType=='1'.toString() and clickDetailDTO.order!=null and clickDetailDTO.order!=''">
ORDER BY brief ${clickDetailDTO.order}
</when>
<when test="clickDetailDTO.keyWordType=='2'.toString() and clickDetailDTO.sidx!=null and clickDetailDTO.sidx!=''">
ORDER BY title ${clickDetailDTO.order}
</when>
<when test="clickDetailDTO.keyWordType=='2'.toString() and clickDetailDTO.sidx!=null and clickDetailDTO.sidx!=''">
ORDER BY id ${clickDetailDTO.order}
</when>
<otherwise>
ORDER BY c.id DESC
......@@ -191,8 +242,9 @@
resultType="io.office.modules.manage.entity.dto.ClickDetailDTO">
select * from ( SELECT
a.ID,
title,
title,content,
'5' typeValue,
'政策法规' typeName,
( SELECT COUNT ( * ) FROM click_detail b WHERE type_value = 5 AND b.c_id= a.Id ) countNum,
releasedate inputDate,
,CONVERT(varchar(100),releasedate,120) inputDateStr,
......@@ -217,10 +269,22 @@
and a.id =#{clickDetailDTO.keyWord}
</if>
</if>
<if test="clickDetailDTO.releaseTimeStart!=null and clickDetailDTO.releaseTimeStart!=''">
and a.releasedate &gt;=#{clickDetailDTO.releaseTimeStart}
</if>
<if test="clickDetailDTO.releaseTimeEnd!=null and clickDetailDTO.releaseTimeEnd!=''">
and a.releasedate &lt;=#{clickDetailDTO.releaseTimeEnd}
</if>
) c
<choose>
<when test="clickDetailDTO.sidx!=null and clickDetailDTO.sidx!=''">
ORDER BY c.${clickDetailDTO.sidx} ${clickDetailDTO.order}
<when test="clickDetailDTO.keyWordType=='1'.toString() and clickDetailDTO.order!=null and clickDetailDTO.order!=''">
ORDER BY content ${clickDetailDTO.order}
</when>
<when test="clickDetailDTO.keyWordType=='2'.toString() and clickDetailDTO.sidx!=null and clickDetailDTO.sidx!=''">
ORDER BY title ${clickDetailDTO.order}
</when>
<when test="clickDetailDTO.keyWordType=='2'.toString() and clickDetailDTO.sidx!=null and clickDetailDTO.sidx!=''">
ORDER BY id ${clickDetailDTO.order}
</when>
<otherwise>
ORDER BY c.id DESC
......@@ -235,10 +299,11 @@
select * from (
SELECT
a.ID,
title,
title,content,
'6' typeValue,
'应用领域' typeName,
( SELECT COUNT ( * ) FROM click_detail b WHERE type_Value = 6 AND b.c_id= a.Id ) countNum,
releasedate inputDate,
releasedate inputDate
,CONVERT(varchar(100),releasedate,120) inputDateStr,
directpath jumpPath,
editor
......@@ -262,10 +327,22 @@
and a.ID =#{clickDetailDTO.keyWord}
</if>
</if>
<if test="clickDetailDTO.releaseTimeStart!=null and clickDetailDTO.releaseTimeStart!=''">
and a.releasedate &gt;=#{clickDetailDTO.releaseTimeStart}
</if>
<if test="clickDetailDTO.releaseTimeEnd!=null and clickDetailDTO.releaseTimeEnd!=''">
and a.releasedate &lt;=#{clickDetailDTO.releaseTimeEnd}
</if>
) c
<choose>
<when test="clickDetailDTO.sidx!=null and clickDetailDTO.sidx!=''">
ORDER BY c.${clickDetailDTO.sidx} ${clickDetailDTO.order}
<when test="clickDetailDTO.keyWordType=='1'.toString() and clickDetailDTO.order!=null and clickDetailDTO.order!=''">
ORDER BY content ${clickDetailDTO.order}
</when>
<when test="clickDetailDTO.keyWordType=='2'.toString() and clickDetailDTO.sidx!=null and clickDetailDTO.sidx!=''">
ORDER BY title ${clickDetailDTO.order}
</when>
<when test="clickDetailDTO.keyWordType=='2'.toString() and clickDetailDTO.sidx!=null and clickDetailDTO.sidx!=''">
ORDER BY id ${clickDetailDTO.order}
</when>
<otherwise>
ORDER BY c.id DESC
......@@ -279,10 +356,11 @@
select * from ( SELECT
a.knowledgeInfoID ID,
title,
title,content,
'7' typeValue,
'知识统计' typeName,
( SELECT COUNT ( * ) FROM click_detail b WHERE type_Value = 7 AND b.c_id= a.knowledgeInfoID ) countNum,
inputDate,
inputDate
,CONVERT(varchar(100),inputDate,120) inputDateStr,
directpath jumpPath,
editor
......@@ -305,10 +383,22 @@
and a.knowledgeInfoID =#{clickDetailDTO.keyWord}
</if>
</if>
<if test="clickDetailDTO.releaseTimeStart!=null and clickDetailDTO.releaseTimeStart!=''">
and a.inputDate &gt;=#{clickDetailDTO.releaseTimeStart}
</if>
<if test="clickDetailDTO.releaseTimeEnd!=null and clickDetailDTO.releaseTimeEnd!=''">
and a.inputDate &lt;=#{clickDetailDTO.releaseTimeEnd}
</if>
) c
<choose>
<when test="clickDetailDTO.sidx!=null and clickDetailDTO.sidx!=''">
ORDER BY c.${clickDetailDTO.sidx} ${clickDetailDTO.order}
<when test="clickDetailDTO.keyWordType=='1'.toString() and clickDetailDTO.order!=null and clickDetailDTO.order!=''">
ORDER BY content ${clickDetailDTO.order}
</when>
<when test="clickDetailDTO.keyWordType=='2'.toString() and clickDetailDTO.sidx!=null and clickDetailDTO.sidx!=''">
ORDER BY title ${clickDetailDTO.order}
</when>
<when test="clickDetailDTO.keyWordType=='2'.toString() and clickDetailDTO.sidx!=null and clickDetailDTO.sidx!=''">
ORDER BY id ${clickDetailDTO.order}
</when>
<otherwise>
ORDER BY c.id DESC
......@@ -319,9 +409,10 @@
<select id="getListPageProducts" parameterType="io.office.modules.manage.entity.dto.ClickDetailDTO"
resultType="io.office.modules.manage.entity.dto.ClickDetailDTO">
select * from ( SELECT
a.ID,
a.ID,description,
prename title,
'9' typeValue,
'图书文献' typeName,
(
SELECT COUNT
( * )
......@@ -331,7 +422,7 @@
type_Value = 9
AND b.c_id= a.ID
) countNum,
adddate inputDate,
adddate inputDate
,CONVERT(varchar(100),adddate,120) inputDateStr,
'' jumpPath,
author
......@@ -354,10 +445,22 @@
and a.id =#{clickDetailDTO.keyWord}
</if>
</if>
<if test="clickDetailDTO.releaseTimeStart!=null and clickDetailDTO.releaseTimeStart!=''">
and a.adddate &gt;=#{clickDetailDTO.releaseTimeStart}
</if>
<if test="clickDetailDTO.releaseTimeEnd!=null and clickDetailDTO.releaseTimeEnd!=''">
and a.adddate &lt;=#{clickDetailDTO.releaseTimeEnd}
</if>
) c
<choose>
<when test="clickDetailDTO.sidx!=null and clickDetailDTO.sidx!=''">
ORDER BY c.${clickDetailDTO.sidx} ${clickDetailDTO.order}
<when test="clickDetailDTO.keyWordType=='1'.toString() and clickDetailDTO.order!=null and clickDetailDTO.order!=''">
ORDER BY description ${clickDetailDTO.order}
</when>
<when test="clickDetailDTO.keyWordType=='2'.toString() and clickDetailDTO.sidx!=null and clickDetailDTO.sidx!=''">
ORDER BY title ${clickDetailDTO.order}
</when>
<when test="clickDetailDTO.keyWordType=='2'.toString() and clickDetailDTO.sidx!=null and clickDetailDTO.sidx!=''">
ORDER BY id ${clickDetailDTO.order}
</when>
<otherwise>
ORDER BY c.id DESC
......@@ -368,11 +471,12 @@
<select id="getListPageAnnounces" parameterType="io.office.modules.manage.entity.dto.ClickDetailDTO"
resultType="io.office.modules.manage.entity.dto.ClickDetailDTO">
select * from ( SELECT
a.ID,
a.ID,content,
title,
'12' typeValue,
'公告统计' typeName,
( SELECT COUNT ( * ) FROM click_detail b WHERE type_Value = 12 AND b.c_id= a.Id ) countNum,
releasedate inputDate,
releasedate inputDate
,CONVERT(varchar(100),releasedate,120) inputDateStr,
'' jumpPath,
editor
......@@ -397,10 +501,22 @@
and a.id =#{clickDetailDTO.keyWord}
</if>
</if>
<if test="clickDetailDTO.releaseTimeStart!=null and clickDetailDTO.releaseTimeStart!=''">
and a.releasedate &gt;=#{clickDetailDTO.releaseTimeStart}
</if>
<if test="clickDetailDTO.releaseTimeEnd!=null and clickDetailDTO.releaseTimeEnd!=''">
and a.releasedate &lt;=#{clickDetailDTO.releaseTimeEnd}
</if>
) c
<choose>
<when test="clickDetailDTO.sidx!=null and clickDetailDTO.sidx!=''">
ORDER BY c.${clickDetailDTO.sidx} ${clickDetailDTO.order}
<when test="clickDetailDTO.keyWordType=='1'.toString() and clickDetailDTO.order!=null and clickDetailDTO.order!=''">
ORDER BY content ${clickDetailDTO.order}
</when>
<when test="clickDetailDTO.keyWordType=='2'.toString() and clickDetailDTO.sidx!=null and clickDetailDTO.sidx!=''">
ORDER BY title ${clickDetailDTO.order}
</when>
<when test="clickDetailDTO.keyWordType=='2'.toString() and clickDetailDTO.sidx!=null and clickDetailDTO.sidx!=''">
ORDER BY id ${clickDetailDTO.order}
</when>
<otherwise>
ORDER BY c.id DESC
......
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