Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
syzj
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
svn
syzj
Commits
9db891dd
提交
9db891dd
authored
7月 16, 2020
作者:
renjianyu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
上级
1901923f
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
169 行增加
和
87 行删除
+169
-87
StatisticsController.java
...source/bg/controller/statistics/StatisticsController.java
+52
-0
WorkManagementMapper.java
...source/bg/mapper/workmanagement/WorkManagementMapper.java
+8
-87
FgStatisticsMapper.java
...rqx/resource/fg/mapper/statistics/FgStatisticsMapper.java
+27
-0
FgStatisticsService.java
...x/resource/fg/service/statistics/FgStatisticsService.java
+24
-0
FgStatisticsServiceImpl.java
...source/fg/service/statistics/FgStatisticsServiceImpl.java
+58
-0
没有找到文件。
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/controller/statistics/StatisticsController.java
0 → 100644
浏览文件 @
9db891dd
package
com
.
zrqx
.
resource
.
bg
.
controller
.
statistics
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.zrqx.core.constant.resource.ResourceRequestPath
;
import
com.zrqx.core.model.resource.sensitiveword.SensitiveWord
;
import
com.zrqx.core.model.resource.statistics.Statistics
;
import
com.zrqx.core.util.response.CallBack
;
import
com.zrqx.core.vo.resource.workmanagement.WorkmanagementCountVo
;
import
com.zrqx.resource.bg.mapper.workmanagement.WorkManagementMapper
;
import
com.zrqx.resource.bg.service.sensitiveword.SensitiveWordService
;
import
com.zrqx.resource.bg.service.statistics.StatisticsService
;
import
com.zrqx.resource.bg.service.workmanagement.WorkManagementService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
/**
* 统计 Controller
*/
@RestController
@RequestMapping
(
ResourceRequestPath
.
BG
+
ResourceRequestPath
.
STATISTICS
)
@Api
(
description
=
"统计"
)
public
class
StatisticsController
{
@Autowired
private
StatisticsService
service
;
@Autowired
private
WorkManagementService
workmanagementService
;
@Autowired
private
WorkManagementMapper
workManagementMapper
;
@ApiOperation
(
value
=
"整体分析"
,
notes
=
"整体分析"
)
@GetMapping
(
value
=
ResourceRequestPath
.
GET
)
public
CallBack
<
Statistics
>
getSelect
()
{
return
CallBack
.
success
(
service
.
selectAll
().
get
(
0
));
}
@ApiOperation
(
value
=
"查询作品点击量前十"
,
notes
=
"查询作品点击量前十"
)
@GetMapping
(
value
=
ResourceRequestPath
.
GET
+
ResourceRequestPath
.
LIST
)
public
CallBack
<
List
<
WorkmanagementCountVo
>>
getById
()
{
return
CallBack
.
success
(
workManagementMapper
.
listWork
());
}
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/mapper/workmanagement/WorkManagementMapper.java
浏览文件 @
9db891dd
...
...
@@ -12,6 +12,7 @@ import com.zrqx.core.mapper.BaseMapper;
import
com.zrqx.core.model.resource.workmanagement.WorkManagement
;
import
com.zrqx.core.vo.resource.ebook.EbookListVO
;
import
com.zrqx.core.vo.resource.ebook.ExcelEbookListVo
;
import
com.zrqx.core.vo.resource.workmanagement.WorkmanagementCountVo
;
import
com.zrqx.core.vo.resource.workmanagement.WorkmanagementListVo
;
/**
...
...
@@ -61,99 +62,19 @@ public interface WorkManagementMapper extends BaseMapper<WorkManagement>{
+
" ORDER BY uploadTime desc"
+
"</script>"
)
List
<
WorkmanagementListVo
>
page
(
@Param
(
"form"
)
WorkmanagementForm
form
);
@Select
(
"<script>"
+
"SELECT "
+
" bb.id,bb.name,bb.author,bb.isbn, "
+
" be.bookCover,be.price,be.realPrice,be.uploadTime,be.updateTime,be.bookStatus "
+
" FROM res_book bb "
+
" LEFT JOIN res_ebook be ON bb.id = be.id "
+
" LEFT JOIN res_ebook_diy_type bdt ON be.id = bdt.ebookid"
+
" WHERE 1 = 1 and be.bookStatus = 4 and be.realPrice IS NOT NULL "
+
"<if test='"
+
NOTBLANK
+
"(form.diyTypeCode)' >"
+
"and bdt.Code like concat(#{form.diyTypeCode},'%') "
+
"</if>"
+
"<if test='"
+
NOTBLANK
+
"(form.title)'>"
+
" AND bb.name like concat('%',#{form.title},'%')"
+
"</if>"
+
"<if test='form.ids != null and form.ids.size > 0'>"
+
"and bb.id not in "
+
" <foreach collection=\"form.ids\" index=\"index\" item=\"id\" open=\"(\" separator=\",\" close=\")\">"
+
"#{id}"
+
"</foreach>"
+
"</if>"
+
"</script>"
)
List
<
EbookListVO
>
queryByTileAndDiyType
(
@Param
(
"form"
)
QueryResourceForPoPForm
form
);
/**
* 根据图书类型查询图书
* @return
*/
@Select
(
"select id from res_ebook where epubFile is not null"
)
List
<
String
>
selectBooksByType
();
/**
* 查询导出图书信息
* 查询作品游览量排行前十
* @Title page
* @param form
* @return
* @return List<BookVo>
* @author Conan
* @date 2020年7月15日 下午2:33:32
*/
@Select
(
"<script>"
+
"SELECT "
+
" bb.id,bb.name,bb.author,bb.isbn,bb.copyrightTerm,bb.translator,bb.executiveEditor,bb.publishTime,bb.publisher,bb.fontCount,bb.revision,bb.printCount,bb.printNo,bb.format,bb.totalPages,bb.CIP,bb.midpicid,bb.zipCode, "
+
" be.realprice,be.entityRealPrice,be.uploadTime,be.updateTime,be.bookStatus "
+
" FROM res_book bb "
+
" LEFT JOIN res_ebook be ON bb.id = be.id "
+
" LEFT JOIN res_ebook_diy_type bdt ON be.id = bdt.ebookid"
+
" WHERE 1 = 1 "
+
"<if test='option==1'>"
+
" AND bb.author is null "
+
"</if>"
+
"<if test='option==2'>"
+
" AND be.bookCover is null "
+
"</if>"
+
"<if test='option==3'>"
+
" AND be.summary is null "
+
"</if>"
+
"<if test='option==4'>"
+
" AND be.realPrice is null "
+
"</if>"
+
"<if test='bookStatus!=null'>"
+
" AND be.bookStatus = #{bookStatus} "
+
"</if>"
+
"<if test='bookStatus==null'>"
+
" AND be.bookStatus != 6 "
+
"</if>"
+
"<if test='type!=null'>"
+
" AND bb.type = #{type} "
+
"</if>"
+
"<if test='bookType!=null'>"
+
" AND be.bookType = #{bookType} "
+
"</if>"
+
"<if test='status!=null'>"
+
" AND bb.status = #{status} "
+
"</if>"
+
"<if test='"
+
NOTBLANK
+
"(diyTypeCode)' >"
+
"and bdt.code like concat(#{diyTypeCode},'%') "
+
"</if>"
+
"<if test='"
+
NOTBLANK
+
"(nai)'>"
+
" AND (bb.name like concat('%',#{nai},'%') OR bb.author like concat('%',#{nai},'%') OR bb.isbn like concat('%',#{nai},'%')) "
+
"</if>"
+
"<if test='"
+
NOTBLANK
+
"(name)'>"
+
" AND bb.name like concat('%',#{name},'%')"
+
"</if>"
+
"<if test='"
+
NOTBLANK
+
"(author)'>"
+
" AND bb.author like concat('%',#{author},'%')"
+
"</if>"
+
"<if test='"
+
NOTBLANK
+
"(isbn)'>"
+
" AND bb.isbn like concat('%',#{isbn},'%')"
+
"</if>"
+
"<if test='"
+
NOTBLANK
+
"(beginTime)'>"
+
" AND be.uploadTime >= concat(#{beginTime}, ' 00:00:00')"
+
"</if>"
+
"<if test='beginTime!=null and endTime!=null'>"
+
" AND be.uploadTime <= concat(#{endTime}, ' 23:59:59')"
+
"</if>"
+
" order by be.uploadTime desc "
+
" select seriesdescribe name,visitcount from res_work_management ORDER BY visitcount desc LIMIT 10 "
+
"</script>"
)
List
<
ExcelEbookListVo
>
exportBookList
(
QueryEbookInfoForm
form
);
List
<
WorkmanagementCountVo
>
listWork
(
);
}
com.zrqx.resource/src/main/java/com/zrqx/resource/fg/mapper/statistics/FgStatisticsMapper.java
0 → 100644
浏览文件 @
9db891dd
package
com
.
zrqx
.
resource
.
fg
.
mapper
.
statistics
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
com.zrqx.core.form.resource.bg.QueryResourceForPoPForm
;
import
com.zrqx.core.form.resource.bg.ebook.QueryEbookInfoForm
;
import
com.zrqx.core.form.resource.bg.workmanagement.WorkmanagementForm
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.model.resource.statistics.Statistics
;
import
com.zrqx.core.model.resource.workmanagement.WorkManagement
;
import
com.zrqx.core.vo.resource.ebook.EbookListVO
;
import
com.zrqx.core.vo.resource.ebook.ExcelEbookListVo
;
import
com.zrqx.core.vo.resource.workmanagement.WorkmanagementListVo
;
/**
* 统计-mapper
* @author Conan
* @date 2020年7月13日上午10:03:52
*/
public
interface
FgStatisticsMapper
extends
BaseMapper
<
Statistics
>{
}
com.zrqx.resource/src/main/java/com/zrqx/resource/fg/service/statistics/FgStatisticsService.java
0 → 100644
浏览文件 @
9db891dd
package
com
.
zrqx
.
resource
.
fg
.
service
.
statistics
;
import
java.text.ParseException
;
import
com.zrqx.core.form.resource.bg.ebook.QueryEbookInfoForm
;
import
com.zrqx.core.form.resource.bg.ebook.SaveUpdateEbookForm
;
import
com.zrqx.core.form.resource.bg.workmanagement.SaveUpdateWorkForm
;
import
com.zrqx.core.form.resource.bg.workmanagement.WorkmanagementForm
;
import
com.zrqx.core.model.resource.statistics.Statistics
;
import
com.zrqx.core.model.resource.workmanagement.WorkManagement
;
import
com.zrqx.core.service.BaseService
;
import
com.zrqx.core.util.page.PageInfo
;
import
com.zrqx.core.util.page.PageParam
;
import
com.zrqx.core.vo.resource.ebook.EbookListVO
;
import
com.zrqx.core.vo.resource.workmanagement.WorkmanagementListVo
;
/**
* 统计-service
*/
public
interface
FgStatisticsService
extends
BaseService
<
Statistics
,
String
>{
}
com.zrqx.resource/src/main/java/com/zrqx/resource/fg/service/statistics/FgStatisticsServiceImpl.java
0 → 100644
浏览文件 @
9db891dd
package
com
.
zrqx
.
resource
.
fg
.
service
.
statistics
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zrqx.core.form.resource.bg.workmanagement.SaveUpdateWorkForm
;
import
com.zrqx.core.form.resource.bg.workmanagement.WorkmanagementForm
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.model.resource.ebook.EbookDiyType
;
import
com.zrqx.core.model.resource.statistics.Statistics
;
import
com.zrqx.core.model.resource.workmanagement.WorkManagement
;
import
com.zrqx.core.model.resource.workmanagement.WorkManagementDiyType
;
import
com.zrqx.core.model.resource.workmanagement.WorkManagementImg
;
import
com.zrqx.core.model.resource.workmanagement.WorkManagementWork
;
import
com.zrqx.core.service.BaseServiceImpl
;
import
com.zrqx.core.util.bean.BeanUtils
;
import
com.zrqx.core.util.page.PageInfo
;
import
com.zrqx.core.util.page.PageParam
;
import
com.zrqx.core.vo.resource.workmanagement.WorkImgVo
;
import
com.zrqx.core.vo.resource.workmanagement.WorkManagementWorkVo
;
import
com.zrqx.core.vo.resource.workmanagement.WorkmanagementListVo
;
import
com.zrqx.resource.bg.mapper.statistics.StatisticsMapper
;
import
com.zrqx.resource.bg.mapper.workmanagement.WorkManagementDiyTypeMapper
;
import
com.zrqx.resource.bg.mapper.workmanagement.WorkManagementImgMapper
;
import
com.zrqx.resource.bg.mapper.workmanagement.WorkManagementMapper
;
import
com.zrqx.resource.fg.mapper.statistics.FgStatisticsMapper
;
import
io.swagger.annotations.ApiModelProperty
;
import
tk.mybatis.mapper.entity.Example
;
/**
* 统计-serviceimpl
*
* @author Conan
* @date 2020年7月13日上午10:05:36
*/
@Service
public
class
FgStatisticsServiceImpl
extends
BaseServiceImpl
<
Statistics
,
String
>
implements
FgStatisticsService
{
@Autowired
private
FgStatisticsMapper
statisticsMapper
;
@Override
public
BaseMapper
<
Statistics
>
getMapper
()
{
return
statisticsMapper
;
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论