Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1-office-web-sit
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴迪
gs1-office-web-sit
Commits
187d39b5
Commit
187d39b5
authored
Aug 06, 2023
by
吴迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【修改】点击量统计需求
parent
cf82092c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
325 additions
and
9 deletions
+325
-9
pom.xml
pom.xml
+6
-0
ClickDetailController.java
...fice/modules/manage/controller/ClickDetailController.java
+80
-7
ClickDetailDao.java
...ain/java/io/office/modules/manage/dao/ClickDetailDao.java
+86
-2
ClickDetailDTO.java
...a/io/office/modules/manage/entity/dto/ClickDetailDTO.java
+90
-0
ClickDetailService.java
.../io/office/modules/manage/service/ClickDetailService.java
+63
-0
ClickDetailServiceImpl.java
...e/modules/manage/service/impl/ClickDetailServiceImpl.java
+0
-0
ClickDetailDao.xml
src/main/resources/mapper/manage/ClickDetailDao.xml
+0
-0
No files found.
pom.xml
View file @
187d39b5
...
...
@@ -342,6 +342,12 @@
<version>
1.20
</version>
</dependency>
<dependency>
<groupId>
cn.afterturn
</groupId>
<artifactId>
easypoi-spring-boot-starter
</artifactId>
<version>
4.4.0
</version>
</dependency>
</dependencies>
<build>
...
...
src/main/java/io/office/modules/manage/controller/ClickDetailController.java
View file @
187d39b5
package
io
.
office
.
modules
.
manage
.
controller
;
import
cn.hutool.core.util.StrUtil
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.sitech.idworkstarter.IdWorkService
;
import
eu.bitwalker.useragentutils.UserAgent
;
import
io.office.common.enumpack.manage.ClickTypeEnum
;
...
...
@@ -9,17 +11,22 @@ import io.office.common.utils.PageUtils;
import
io.office.common.utils.R
;
import
io.office.modules.manage.entity.ClickDetailEntity
;
import
io.office.modules.manage.entity.dto.ClickCodeDetailDTO
;
import
io.office.modules.manage.entity.dto.ClickDetailDTO
;
import
io.office.modules.manage.service.ClickDetailService
;
import
io.office.modules.manage.utils.DateUtils
;
import
io.office.modules.manage.utils.IdKeysConstant
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.Map
;
/**
...
...
@@ -41,15 +48,71 @@ public class ClickDetailController {
/**
* 列表
*/
//@RequestMapping("/list")
//// @RequiresPermissions("datamanage:clickdetail:list")
//public R list(@RequestParam Map<String, Object> params) {
// PageUtils page = clickDetailService.queryPage(params);
//
// return R.ok().put("page", page);
//}
@RequestMapping
(
"/list"
)
// @RequiresPermissions("datamanage:clickdetail:list")
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
)
{
PageUtils
page
=
clickDetailService
.
queryPage
(
params
);
//@RequiresPermissions("datamanage:clickdetail:list")
public
R
list
(
@RequestBody
ClickDetailDTO
clickDetailDTO
)
{
Page
page
=
null
;
if
(
StrUtil
.
equals
(
"1"
,
clickDetailDTO
.
getTypeValue
()))
{
page
=
clickDetailService
.
selectClickNewsList
(
clickDetailDTO
);
}
else
if
(
StrUtil
.
equals
(
"2"
,
clickDetailDTO
.
getTypeValue
()))
{
page
=
clickDetailService
.
getListPageImages
(
clickDetailDTO
);
}
else
if
(
StrUtil
.
equals
(
"3"
,
clickDetailDTO
.
getTypeValue
()))
{
page
=
clickDetailService
.
getListPageViewSubs
(
clickDetailDTO
);
}
else
if
(
StrUtil
.
equals
(
"4"
,
clickDetailDTO
.
getTypeValue
()))
{
page
=
clickDetailService
.
getListPageMovies
(
clickDetailDTO
);
}
else
if
(
StrUtil
.
equals
(
"5"
,
clickDetailDTO
.
getTypeValue
()))
{
page
=
clickDetailService
.
getListPagePolicys
(
clickDetailDTO
);
}
else
if
(
StrUtil
.
equals
(
"6"
,
clickDetailDTO
.
getTypeValue
()))
{
page
=
clickDetailService
.
getListPageApplications
(
clickDetailDTO
);
}
else
if
(
StrUtil
.
equals
(
"7"
,
clickDetailDTO
.
getTypeValue
()))
{
page
=
clickDetailService
.
getListPageKnowledgeInfos
(
clickDetailDTO
);
}
else
if
(
StrUtil
.
equals
(
"9"
,
clickDetailDTO
.
getTypeValue
()))
{
page
=
clickDetailService
.
getListPageProducts
(
clickDetailDTO
);
}
else
if
(
StrUtil
.
equals
(
"12"
,
clickDetailDTO
.
getTypeValue
()))
{
page
=
clickDetailService
.
getListPageAnnounces
(
clickDetailDTO
);
}
PageUtils
pageUtils
=
new
PageUtils
(
page
);
return
R
.
ok
().
put
(
"page"
,
pageUtils
);
}
@RequestMapping
(
"/export"
)
//@RequiresPermissions("datamanage:clickdetail:list")
public
void
export
(
@RequestBody
ClickDetailDTO
clickDetailDTO
,
HttpServletResponse
response
)
throws
IOException
{
if
(
StrUtil
.
equals
(
"1"
,
clickDetailDTO
.
getTypeValue
()))
{
clickDetailService
.
selectClickNewsListExport
(
clickDetailDTO
,
response
);
}
else
if
(
StrUtil
.
equals
(
"2"
,
clickDetailDTO
.
getTypeValue
()))
{
clickDetailService
.
getListPageImagesExport
(
clickDetailDTO
,
response
);
}
else
if
(
StrUtil
.
equals
(
"3"
,
clickDetailDTO
.
getTypeValue
()))
{
clickDetailService
.
getListPageViewSubsExport
(
clickDetailDTO
,
response
);
}
else
if
(
StrUtil
.
equals
(
"4"
,
clickDetailDTO
.
getTypeValue
()))
{
clickDetailService
.
getListPageMoviesExport
(
clickDetailDTO
,
response
);
}
else
if
(
StrUtil
.
equals
(
"5"
,
clickDetailDTO
.
getTypeValue
()))
{
clickDetailService
.
getListPagePolicysExport
(
clickDetailDTO
,
response
);
}
else
if
(
StrUtil
.
equals
(
"6"
,
clickDetailDTO
.
getTypeValue
()))
{
clickDetailService
.
getListPageApplicationsExport
(
clickDetailDTO
,
response
);
}
else
if
(
StrUtil
.
equals
(
"7"
,
clickDetailDTO
.
getTypeValue
()))
{
clickDetailService
.
getListPageKnowledgeInfosExport
(
clickDetailDTO
,
response
);
}
else
if
(
StrUtil
.
equals
(
"9"
,
clickDetailDTO
.
getTypeValue
()))
{
clickDetailService
.
getListPageProductsExport
(
clickDetailDTO
,
response
);
}
else
if
(
StrUtil
.
equals
(
"12"
,
clickDetailDTO
.
getTypeValue
()))
{
clickDetailService
.
getListPageAnnouncesExport
(
clickDetailDTO
,
response
);
}
return
R
.
ok
().
put
(
"page"
,
page
);
}
/**
* 信息
*/
...
...
@@ -61,6 +124,16 @@ public class ClickDetailController {
return
R
.
ok
().
put
(
"clickDetail"
,
clickDetail
);
}
@RequestMapping
(
"/getClickDetailList"
)
// @RequiresPermissions("datamanage:clickdetail:info")
public
R
getclickDetail
(
@RequestBody
ClickDetailDTO
clickDetailDTO
)
{
Page
page
=
clickDetailService
.
selectClickList
(
clickDetailDTO
);
PageUtils
pageUtils
=
new
PageUtils
(
page
);
return
R
.
ok
().
put
(
"page"
,
pageUtils
);
}
/**
* 保存
*/
...
...
@@ -68,7 +141,7 @@ public class ClickDetailController {
// @RequiresPermissions("datamanage:clickdetail:save")
public
R
save
(
@RequestBody
ClickCodeDetailDTO
clickCodeDetailDTO
)
{
if
(
StringUtils
.
isBlank
(
clickCodeDetailDTO
.
getCode
())||
StringUtils
.
isBlank
(
clickCodeDetailDTO
.
getId
()))
{
if
(
StringUtils
.
isBlank
(
clickCodeDetailDTO
.
getCode
())
||
StringUtils
.
isBlank
(
clickCodeDetailDTO
.
getId
()))
{
return
R
.
error
(
"参数不能为空"
);
}
//获取request
...
...
src/main/java/io/office/modules/manage/dao/ClickDetailDao.java
View file @
187d39b5
package
io
.
office
.
modules
.
manage
.
dao
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.office.modules.manage.entity.ClickDetailEntity
;
import
io.office.modules.manage.entity.dto.ClickDetailDTO
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* ${comments}
*
*
* @author wudi
* @email 632132852@qq.com
* @date 2023-07-02 23:22:31
*/
@Mapper
public
interface
ClickDetailDao
extends
BaseMapper
<
ClickDetailEntity
>
{
/**
* 文章
* @param clickDetailDTO
* @param page
* @return
*/
List
<
ClickDetailDTO
>
getListPageNews
(
@Param
(
"clickDetailDTO"
)
ClickDetailDTO
clickDetailDTO
,
Page
page
);
/**
* 图片
* @param clickDetailDTO
* @param page
* @return
*/
List
<
ClickDetailDTO
>
getListPageImages
(
@Param
(
"clickDetailDTO"
)
ClickDetailDTO
clickDetailDTO
,
Page
page
);
/**
* 专题
* @param clickDetailDTO
* @param page
* @return
*/
List
<
ClickDetailDTO
>
getListPageViewSubs
(
@Param
(
"clickDetailDTO"
)
ClickDetailDTO
clickDetailDTO
,
Page
page
);
/**
* 视频
* @param clickDetailDTO
* @param page
* @return
*/
List
<
ClickDetailDTO
>
getListPageMovies
(
@Param
(
"clickDetailDTO"
)
ClickDetailDTO
clickDetailDTO
,
Page
page
);
/**
* 政策法规
* @param clickDetailDTO
* @param page
* @return
*/
List
<
ClickDetailDTO
>
getListPagePolicys
(
@Param
(
"clickDetailDTO"
)
ClickDetailDTO
clickDetailDTO
,
Page
page
);
/**
* 应用领域
* @param clickDetailDTO
* @param page
* @return
*/
List
<
ClickDetailDTO
>
getListPageApplications
(
@Param
(
"clickDetailDTO"
)
ClickDetailDTO
clickDetailDTO
,
Page
page
);
/**
* 知识统计
* @param clickDetailDTO
* @param page
* @return
*/
List
<
ClickDetailDTO
>
getListPageKnowledgeInfos
(
@Param
(
"clickDetailDTO"
)
ClickDetailDTO
clickDetailDTO
,
Page
page
);
/**
* 图书文献
* @param clickDetailDTO
* @param page
* @return
*/
List
<
ClickDetailDTO
>
getListPageProducts
(
@Param
(
"clickDetailDTO"
)
ClickDetailDTO
clickDetailDTO
,
Page
page
);
/**
* 公告统计
* @param clickDetailDTO
* @param page
* @return
*/
List
<
ClickDetailDTO
>
getListPageAnnounces
(
@Param
(
"clickDetailDTO"
)
ClickDetailDTO
clickDetailDTO
,
Page
page
);
List
<
ClickDetailDTO
>
selectClickList
(
@Param
(
"clickDetailDTO"
)
ClickDetailDTO
clickDetailDTO
,
Page
page
);
}
src/main/java/io/office/modules/manage/entity/dto/ClickDetailDTO.java
0 → 100644
View file @
187d39b5
package
io
.
office
.
modules
.
manage
.
entity
.
dto
;
import
cn.afterturn.easypoi.excel.annotation.Excel
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* @author wudi
* @date 2023/7/30
* @comment
*/
@Data
public
class
ClickDetailDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@Excel
(
name
=
"ID"
,
width
=
20
)
private
Long
id
;
/**
* 点击的知识id
*/
private
Long
cId
;
/**
* $column.comments
*/
private
String
typeValue
;
/**
* $column.comments
*/
private
String
typeName
;
/**
* $column.comments
*/
private
String
clickTime
;
/**
* $column.comments
*/
private
String
clientIp
;
/**
* $column.comments
*/
private
String
clientOs
;
/**
* $column.comments
*/
private
String
clientBrowser
;
@Excel
(
name
=
"标题"
,
width
=
80
)
private
String
title
;
private
String
keyWord
;
private
String
keyWordType
;
private
String
type
;
@Excel
(
name
=
"点击数"
,
width
=
40
)
private
Integer
countNum
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
inputDate
;
@Excel
(
name
=
"发布时间"
,
width
=
60
)
private
String
inputDateStr
;
private
String
jumpPath
;
/**
* 编辑
*/
private
String
editor
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
updatedate
;
private
long
page
=
1
;
private
long
limit
=
10
;
private
String
sidx
;
private
String
order
;
}
src/main/java/io/office/modules/manage/service/ClickDetailService.java
View file @
187d39b5
package
io
.
office
.
modules
.
manage
.
service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
io.office.common.utils.PageUtils
;
import
io.office.modules.manage.entity.ClickDetailEntity
;
import
io.office.modules.manage.entity.dto.ClickDetailDTO
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.util.Map
;
/**
...
...
@@ -17,5 +21,64 @@ import java.util.Map;
public
interface
ClickDetailService
extends
IService
<
ClickDetailEntity
>
{
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
);
Page
<
ClickDetailDTO
>
selectClickNewsList
(
ClickDetailDTO
clickDetailDTO
);
Page
<
ClickDetailDTO
>
getListPageImages
(
ClickDetailDTO
clickDetailDTO
);
Page
<
ClickDetailDTO
>
getListPageViewSubs
(
ClickDetailDTO
clickDetailDTO
);
Page
<
ClickDetailDTO
>
getListPageMovies
(
ClickDetailDTO
clickDetailDTO
);
Page
<
ClickDetailDTO
>
getListPagePolicys
(
ClickDetailDTO
clickDetailDTO
);
Page
<
ClickDetailDTO
>
getListPageApplications
(
ClickDetailDTO
clickDetailDTO
);
Page
<
ClickDetailDTO
>
getListPageKnowledgeInfos
(
ClickDetailDTO
clickDetailDTO
);
Page
<
ClickDetailDTO
>
getListPageProducts
(
ClickDetailDTO
clickDetailDTO
);
Page
<
ClickDetailDTO
>
getListPageAnnounces
(
ClickDetailDTO
clickDetailDTO
);
Page
<
ClickDetailDTO
>
selectClickList
(
ClickDetailDTO
clickDetailDTO
);
void
selectClickNewsListExport
(
ClickDetailDTO
clickDetailDTO
,
HttpServletResponse
response
)
throws
IOException
;
void
getListPageImagesExport
(
ClickDetailDTO
clickDetailDTO
,
HttpServletResponse
response
)
throws
IOException
;
void
getListPageViewSubsExport
(
ClickDetailDTO
clickDetailDTO
,
HttpServletResponse
response
)
throws
IOException
;
void
getListPageMoviesExport
(
ClickDetailDTO
clickDetailDTO
,
HttpServletResponse
response
)
throws
IOException
;
void
getListPagePolicysExport
(
ClickDetailDTO
clickDetailDTO
,
HttpServletResponse
response
)
throws
IOException
;
void
getListPageApplicationsExport
(
ClickDetailDTO
clickDetailDTO
,
HttpServletResponse
response
)
throws
IOException
;
void
getListPageKnowledgeInfosExport
(
ClickDetailDTO
clickDetailDTO
,
HttpServletResponse
response
)
throws
IOException
;
void
getListPageProductsExport
(
ClickDetailDTO
clickDetailDTO
,
HttpServletResponse
response
)
throws
IOException
;
void
getListPageAnnouncesExport
(
ClickDetailDTO
clickDetailDTO
,
HttpServletResponse
response
)
throws
IOException
;
void
selectClickListExport
(
ClickDetailDTO
clickDetailDTO
,
HttpServletResponse
response
)
throws
IOException
;
}
src/main/java/io/office/modules/manage/service/impl/ClickDetailServiceImpl.java
View file @
187d39b5
This diff is collapsed.
Click to expand it.
src/main/resources/mapper/manage/ClickDetailDao.xml
View file @
187d39b5
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment