Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
smart_gov_platform
Commits
b13740b4
Commit
b13740b4
authored
2 years ago
by
廖旭伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
事件分析、产品热力图、页面访问分析、页面路径分析统计功能
parent
a172b5ad
Changes
27
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
3375 additions
and
1020 deletions
+3375
-1020
portal-manager/db/page_db.sql
portal-manager/db/page_db.sql
+103
-0
portal-manager/doc/api.md
portal-manager/doc/api.md
+676
-2
portal-manager/src/main/java/com/mortals/xhx/module/page/dao/PageAccessDepthDao.java
...a/com/mortals/xhx/module/page/dao/PageAccessDepthDao.java
+9
-1
portal-manager/src/main/java/com/mortals/xhx/module/page/dao/PageEventDao.java
...in/java/com/mortals/xhx/module/page/dao/PageEventDao.java
+31
-0
portal-manager/src/main/java/com/mortals/xhx/module/page/dao/PageRouteDao.java
...in/java/com/mortals/xhx/module/page/dao/PageRouteDao.java
+17
-0
portal-manager/src/main/java/com/mortals/xhx/module/page/dao/ibatis/PageAccessDepthDaoImpl.java
...ls/xhx/module/page/dao/ibatis/PageAccessDepthDaoImpl.java
+6
-1
portal-manager/src/main/java/com/mortals/xhx/module/page/dao/ibatis/PageEventDaoImpl.java
.../mortals/xhx/module/page/dao/ibatis/PageEventDaoImpl.java
+24
-0
portal-manager/src/main/java/com/mortals/xhx/module/page/dao/ibatis/PageRouteDaoImpl.java
.../mortals/xhx/module/page/dao/ibatis/PageRouteDaoImpl.java
+12
-0
portal-manager/src/main/java/com/mortals/xhx/module/page/model/PageAccessEntity.java
...a/com/mortals/xhx/module/page/model/PageAccessEntity.java
+226
-79
portal-manager/src/main/java/com/mortals/xhx/module/page/model/PageAccessQuery.java
...va/com/mortals/xhx/module/page/model/PageAccessQuery.java
+906
-514
portal-manager/src/main/java/com/mortals/xhx/module/page/model/pdu/AccessPdu.java
...java/com/mortals/xhx/module/page/model/pdu/AccessPdu.java
+11
-0
portal-manager/src/main/java/com/mortals/xhx/module/page/model/pdu/BuryPointPdu.java
...a/com/mortals/xhx/module/page/model/pdu/BuryPointPdu.java
+5
-4
portal-manager/src/main/java/com/mortals/xhx/module/page/model/pdu/PageCensusPdu.java
.../com/mortals/xhx/module/page/model/pdu/PageCensusPdu.java
+18
-0
portal-manager/src/main/java/com/mortals/xhx/module/page/model/vo/AccessTrendCensusVo.java
...mortals/xhx/module/page/model/vo/AccessTrendCensusVo.java
+26
-0
portal-manager/src/main/java/com/mortals/xhx/module/page/model/vo/PageEventCensusVo.java
...m/mortals/xhx/module/page/model/vo/PageEventCensusVo.java
+27
-0
portal-manager/src/main/java/com/mortals/xhx/module/page/model/vo/PageWayCensusVo.java
...com/mortals/xhx/module/page/model/vo/PageWayCensusVo.java
+31
-0
portal-manager/src/main/java/com/mortals/xhx/module/page/model/vo/ProductHotCensusVo.java
.../mortals/xhx/module/page/model/vo/ProductHotCensusVo.java
+33
-0
portal-manager/src/main/java/com/mortals/xhx/module/page/service/PageEventService.java
...com/mortals/xhx/module/page/service/PageEventService.java
+29
-0
portal-manager/src/main/java/com/mortals/xhx/module/page/service/PageRouteService.java
...com/mortals/xhx/module/page/service/PageRouteService.java
+11
-0
portal-manager/src/main/java/com/mortals/xhx/module/page/service/impl/PageAccessServiceImpl.java
...s/xhx/module/page/service/impl/PageAccessServiceImpl.java
+25
-10
portal-manager/src/main/java/com/mortals/xhx/module/page/service/impl/PageEventServiceImpl.java
...ls/xhx/module/page/service/impl/PageEventServiceImpl.java
+135
-0
portal-manager/src/main/java/com/mortals/xhx/module/page/service/impl/PageRouteServiceImpl.java
...ls/xhx/module/page/service/impl/PageRouteServiceImpl.java
+24
-0
portal-manager/src/main/java/com/mortals/xhx/module/page/web/PageCensusController.java
...com/mortals/xhx/module/page/web/PageCensusController.java
+142
-0
portal-manager/src/main/resources/sqlmap/module/page/PageAccessDepthMapperExt.xml
...resources/sqlmap/module/page/PageAccessDepthMapperExt.xml
+19
-0
portal-manager/src/main/resources/sqlmap/module/page/PageAccessMapper.xml
...rc/main/resources/sqlmap/module/page/PageAccessMapper.xml
+689
-409
portal-manager/src/main/resources/sqlmap/module/page/PageEventMapperExt.xml
.../main/resources/sqlmap/module/page/PageEventMapperExt.xml
+87
-0
portal-manager/src/main/resources/sqlmap/module/page/PageRouteMapperExt.xml
.../main/resources/sqlmap/module/page/PageRouteMapperExt.xml
+53
-0
No files found.
portal-manager/db/page_db.sql
0 → 100644
View file @
b13740b4
-- ----------------------------
-- 页面事件记录表
-- ----------------------------
DROP
TABLE
IF
EXISTS
`mortals_xhx_page_event`
;
CREATE
TABLE
mortals_xhx_page_event
(
`id`
bigint
(
20
)
AUTO_INCREMENT
COMMENT
'序号,主键,自增长'
,
`deviceNum`
varchar
(
256
)
COMMENT
'设备编码'
,
`productId`
bigint
(
20
)
COMMENT
'产品id'
,
`productName`
varchar
(
256
)
COMMENT
'产品名称'
,
`businessCode`
varchar
(
256
)
COMMENT
'业务场景编码'
,
`businessName`
varchar
(
256
)
COMMENT
'业务场景名称'
,
`eventCode`
varchar
(
256
)
COMMENT
'事件编码'
,
`eventName`
varchar
(
256
)
COMMENT
'事件名称'
,
`takeTime`
int
(
8
)
COMMENT
'事件耗时(单位毫秒)'
,
`pageCode`
varchar
(
256
)
COMMENT
'页面编码(页面路由)'
,
`pageName`
varchar
(
256
)
COMMENT
'页面名称'
,
`coordinate`
varchar
(
128
)
COMMENT
'事件坐标(x,y)'
,
`createUserId`
bigint
(
20
)
COMMENT
'创建用户'
,
`createTime`
datetime
COMMENT
'创建时间'
,
`updateUserId`
bigint
(
20
)
COMMENT
'更新用户'
,
`updateTime`
datetime
COMMENT
'更新时间'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'页面事件记录'
;
-- ----------------------------
-- 页面路径记录表
-- ----------------------------
DROP
TABLE
IF
EXISTS
`mortals_xhx_page_route`
;
CREATE
TABLE
mortals_xhx_page_route
(
`id`
bigint
(
20
)
AUTO_INCREMENT
COMMENT
'序号,主键,自增长'
,
`deviceNum`
varchar
(
256
)
COMMENT
'设备编码'
,
`productId`
bigint
(
20
)
COMMENT
'产品id'
,
`productName`
varchar
(
256
)
COMMENT
'产品名称'
,
`sourceCode`
varchar
(
256
)
COMMENT
'开始页面编码(路由)'
,
`sourceName`
varchar
(
256
)
COMMENT
'开始页面名称'
,
`targetCode`
varchar
(
256
)
COMMENT
'目标页面编码(路由)'
,
`targetName`
varchar
(
256
)
COMMENT
'目标页面名称'
,
`createUserId`
bigint
(
20
)
COMMENT
'创建用户'
,
`createTime`
datetime
COMMENT
'创建时间'
,
`updateUserId`
bigint
(
20
)
COMMENT
'更新用户'
,
`updateTime`
datetime
COMMENT
'更新时间'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'页面路径记录'
;
-- ----------------------------
-- 产品页面配置表
-- ----------------------------
DROP
TABLE
IF
EXISTS
`mortals_xhx_page_info`
;
CREATE
TABLE
mortals_xhx_page_info
(
`id`
bigint
(
20
)
AUTO_INCREMENT
COMMENT
'序号,主键,自增长'
,
`deviceNum`
varchar
(
256
)
COMMENT
'设备编码'
,
`productId`
bigint
(
20
)
COMMENT
'产品id'
,
`productName`
varchar
(
256
)
COMMENT
'产品名称'
,
`pageCode`
varchar
(
256
)
COMMENT
'页面编码(页面路由)'
,
`pageName`
varchar
(
256
)
COMMENT
'页面名称'
,
`screenUrl`
varchar
(
256
)
COMMENT
'页面截图地址'
,
`createUserId`
bigint
(
20
)
COMMENT
'创建用户'
,
`createTime`
datetime
COMMENT
'创建时间'
,
`updateUserId`
bigint
(
20
)
COMMENT
'更新用户'
,
`updateTime`
datetime
COMMENT
'更新时间'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'产品页面配置'
;
-- ----------------------------
-- 产品页面访问记录表
-- ----------------------------
DROP
TABLE
IF
EXISTS
`mortals_xhx_page_access`
;
CREATE
TABLE
mortals_xhx_page_access
(
`id`
bigint
(
20
)
AUTO_INCREMENT
COMMENT
'序号,主键,自增长'
,
`deviceNum`
varchar
(
256
)
COMMENT
'设备编码'
,
`productId`
bigint
(
20
)
COMMENT
'产品id'
,
`productName`
varchar
(
256
)
COMMENT
'产品名称'
,
`firstCode`
varchar
(
256
)
COMMENT
'页面编码(页面路由)'
,
`firstName`
varchar
(
256
)
COMMENT
'页面名称'
,
`secondCode`
varchar
(
256
)
COMMENT
'页面编码(页面路由)'
,
`secondName`
varchar
(
256
)
COMMENT
'页面名称'
,
`thirdCode`
varchar
(
256
)
COMMENT
'页面编码(页面路由)'
,
`thirdName`
varchar
(
256
)
COMMENT
'页面名称'
,
`fourthCode`
varchar
(
256
)
COMMENT
'页面编码(页面路由)'
,
`fourthName`
varchar
(
256
)
COMMENT
'页面名称'
,
`accessContent`
text
COMMENT
'完整路径'
,
`pageDepth`
int
(
8
)
DEFAULT
'0'
COMMENT
'页面深度'
,
`createUserId`
bigint
(
20
)
COMMENT
'创建用户'
,
`createTime`
datetime
COMMENT
'创建时间'
,
`updateUserId`
bigint
(
20
)
COMMENT
'更新用户'
,
`updateTime`
datetime
COMMENT
'更新时间'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'产品页面访问记录'
;
-- ----------------------------
-- 产品页面配置表
-- ----------------------------
DROP
TABLE
IF
EXISTS
`mortals_xhx_page_access_depth`
;
CREATE
TABLE
mortals_xhx_page_access_depth
(
`id`
bigint
(
20
)
AUTO_INCREMENT
COMMENT
'序号,主键,自增长'
,
`deviceNum`
varchar
(
256
)
COMMENT
'设备编码'
,
`productId`
bigint
(
20
)
COMMENT
'产品id'
,
`productName`
varchar
(
256
)
COMMENT
'产品名称'
,
`pageCode`
varchar
(
256
)
COMMENT
'页面编码(页面路由)'
,
`pageName`
varchar
(
256
)
COMMENT
'页面名称'
,
`depthValue`
int
(
8
)
COMMENT
'本次访问深度'
,
`createUserId`
bigint
(
20
)
COMMENT
'创建用户'
,
`createTime`
datetime
COMMENT
'创建时间'
,
`updateUserId`
bigint
(
20
)
COMMENT
'更新用户'
,
`updateTime`
datetime
COMMENT
'更新时间'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'产品页面配置'
;
This diff is collapsed.
Click to expand it.
portal-manager/doc/api.md
View file @
b13740b4
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/module/page/dao/PageAccessDepthDao.java
View file @
b13740b4
...
@@ -2,6 +2,9 @@ package com.mortals.xhx.module.page.dao;
...
@@ -2,6 +2,9 @@ package com.mortals.xhx.module.page.dao;
import
com.mortals.framework.dao.ICRUDDao
;
import
com.mortals.framework.dao.ICRUDDao
;
import
com.mortals.xhx.module.page.model.PageAccessDepthEntity
;
import
com.mortals.xhx.module.page.model.PageAccessDepthEntity
;
import
com.mortals.xhx.module.page.model.pdu.PageCensusPdu
;
import
com.mortals.xhx.module.page.model.vo.AccessTrendCensusVo
;
import
java.util.List
;
import
java.util.List
;
/**
/**
* 产品页面配置Dao
* 产品页面配置Dao
...
@@ -13,5 +16,10 @@ import java.util.List;
...
@@ -13,5 +16,10 @@ import java.util.List;
public
interface
PageAccessDepthDao
extends
ICRUDDao
<
PageAccessDepthEntity
,
Long
>{
public
interface
PageAccessDepthDao
extends
ICRUDDao
<
PageAccessDepthEntity
,
Long
>{
/**
* 人均访问深度
* @param pdu
* @return
*/
List
<
AccessTrendCensusVo
>
getDepthAvg
(
PageCensusPdu
pdu
);
}
}
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/module/page/dao/PageEventDao.java
View file @
b13740b4
...
@@ -2,6 +2,11 @@ package com.mortals.xhx.module.page.dao;
...
@@ -2,6 +2,11 @@ package com.mortals.xhx.module.page.dao;
import
com.mortals.framework.dao.ICRUDDao
;
import
com.mortals.framework.dao.ICRUDDao
;
import
com.mortals.xhx.module.page.model.PageEventEntity
;
import
com.mortals.xhx.module.page.model.PageEventEntity
;
import
com.mortals.xhx.module.page.model.pdu.PageCensusPdu
;
import
com.mortals.xhx.module.page.model.vo.AccessTrendCensusVo
;
import
com.mortals.xhx.module.page.model.vo.PageEventCensusVo
;
import
com.mortals.xhx.module.page.model.vo.ProductHotCensusVo
;
import
java.util.List
;
import
java.util.List
;
/**
/**
* 页面事件记录Dao
* 页面事件记录Dao
...
@@ -13,5 +18,31 @@ import java.util.List;
...
@@ -13,5 +18,31 @@ import java.util.List;
public
interface
PageEventDao
extends
ICRUDDao
<
PageEventEntity
,
Long
>{
public
interface
PageEventDao
extends
ICRUDDao
<
PageEventEntity
,
Long
>{
/**
* 事件分析
* @param pdu
* @return
*/
List
<
PageEventCensusVo
>
getPageEventCensus
(
PageCensusPdu
pdu
);
/**
* 产品热力图
* @param pdu
* @return
*/
List
<
ProductHotCensusVo
>
getProductHotCensus
(
PageCensusPdu
pdu
);
/**
* 页面访问指标趋势
* @param pdu
* @return
*/
List
<
AccessTrendCensusVo
>
getPageAccessTrend
(
PageCensusPdu
pdu
);
/**
* 页面访问次数TOP10
* @param pdu
* @return
*/
List
<
AccessTrendCensusVo
>
getPageAccessTop
(
PageCensusPdu
pdu
);
}
}
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/module/page/dao/PageRouteDao.java
View file @
b13740b4
...
@@ -2,7 +2,12 @@ package com.mortals.xhx.module.page.dao;
...
@@ -2,7 +2,12 @@ package com.mortals.xhx.module.page.dao;
import
com.mortals.framework.dao.ICRUDDao
;
import
com.mortals.framework.dao.ICRUDDao
;
import
com.mortals.xhx.module.page.model.PageRouteEntity
;
import
com.mortals.xhx.module.page.model.PageRouteEntity
;
import
com.mortals.xhx.module.page.model.pdu.PageCensusPdu
;
import
com.mortals.xhx.module.page.model.vo.PageWayCensusVo
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 页面路径记录Dao
* 页面路径记录Dao
* 页面路径记录 DAO接口
* 页面路径记录 DAO接口
...
@@ -13,5 +18,17 @@ import java.util.List;
...
@@ -13,5 +18,17 @@ import java.util.List;
public
interface
PageRouteDao
extends
ICRUDDao
<
PageRouteEntity
,
Long
>{
public
interface
PageRouteDao
extends
ICRUDDao
<
PageRouteEntity
,
Long
>{
/**
* 路径图
* @param pdu
* @return
*/
List
<
PageWayCensusVo
>
getPageWayCensus
(
PageCensusPdu
pdu
);
/**
* 获取路径图页面名称
* @param pdu
* @return
*/
List
<
Map
<
String
,
Object
>>
getPageWayCode
(
PageCensusPdu
pdu
);
}
}
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/module/page/dao/ibatis/PageAccessDepthDaoImpl.java
View file @
b13740b4
package
com.mortals.xhx.module.page.dao.ibatis
;
package
com.mortals.xhx.module.page.dao.ibatis
;
import
com.mortals.xhx.module.page.model.pdu.PageCensusPdu
;
import
com.mortals.xhx.module.page.model.vo.AccessTrendCensusVo
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
com.mortals.xhx.module.page.dao.PageAccessDepthDao
;
import
com.mortals.xhx.module.page.dao.PageAccessDepthDao
;
import
com.mortals.xhx.module.page.model.PageAccessDepthEntity
;
import
com.mortals.xhx.module.page.model.PageAccessDepthEntity
;
...
@@ -16,6 +18,9 @@ import java.util.List;
...
@@ -16,6 +18,9 @@ import java.util.List;
@Repository
(
"pageAccessDepthDao"
)
@Repository
(
"pageAccessDepthDao"
)
public
class
PageAccessDepthDaoImpl
extends
BaseCRUDDaoMybatis
<
PageAccessDepthEntity
,
Long
>
implements
PageAccessDepthDao
{
public
class
PageAccessDepthDaoImpl
extends
BaseCRUDDaoMybatis
<
PageAccessDepthEntity
,
Long
>
implements
PageAccessDepthDao
{
@Override
public
List
<
AccessTrendCensusVo
>
getDepthAvg
(
PageCensusPdu
pdu
)
{
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getDepthAvg"
),
pdu
);
}
}
}
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/module/page/dao/ibatis/PageEventDaoImpl.java
View file @
b13740b4
package
com.mortals.xhx.module.page.dao.ibatis
;
package
com.mortals.xhx.module.page.dao.ibatis
;
import
com.mortals.xhx.module.page.model.pdu.PageCensusPdu
;
import
com.mortals.xhx.module.page.model.vo.AccessTrendCensusVo
;
import
com.mortals.xhx.module.page.model.vo.PageEventCensusVo
;
import
com.mortals.xhx.module.page.model.vo.ProductHotCensusVo
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
com.mortals.xhx.module.page.dao.PageEventDao
;
import
com.mortals.xhx.module.page.dao.PageEventDao
;
import
com.mortals.xhx.module.page.model.PageEventEntity
;
import
com.mortals.xhx.module.page.model.PageEventEntity
;
...
@@ -17,5 +21,25 @@ import java.util.List;
...
@@ -17,5 +21,25 @@ import java.util.List;
public
class
PageEventDaoImpl
extends
BaseCRUDDaoMybatis
<
PageEventEntity
,
Long
>
implements
PageEventDao
{
public
class
PageEventDaoImpl
extends
BaseCRUDDaoMybatis
<
PageEventEntity
,
Long
>
implements
PageEventDao
{
@Override
public
List
<
PageEventCensusVo
>
getPageEventCensus
(
PageCensusPdu
pdu
)
{
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getPageEventCensus"
),
pdu
);
}
@Override
public
List
<
ProductHotCensusVo
>
getProductHotCensus
(
PageCensusPdu
pdu
)
{
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getProductHotCensus"
),
pdu
);
}
@Override
public
List
<
AccessTrendCensusVo
>
getPageAccessTrend
(
PageCensusPdu
pdu
)
{
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getPageAccessTrend"
),
pdu
);
}
@Override
public
List
<
AccessTrendCensusVo
>
getPageAccessTop
(
PageCensusPdu
pdu
)
{
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getPageAccessTop"
),
pdu
);
}
}
}
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/module/page/dao/ibatis/PageRouteDaoImpl.java
View file @
b13740b4
package
com.mortals.xhx.module.page.dao.ibatis
;
package
com.mortals.xhx.module.page.dao.ibatis
;
import
com.mortals.xhx.module.page.model.pdu.PageCensusPdu
;
import
com.mortals.xhx.module.page.model.vo.PageWayCensusVo
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
com.mortals.xhx.module.page.dao.PageRouteDao
;
import
com.mortals.xhx.module.page.dao.PageRouteDao
;
import
com.mortals.xhx.module.page.model.PageRouteEntity
;
import
com.mortals.xhx.module.page.model.PageRouteEntity
;
import
java.util.Date
;
import
java.util.Date
;
import
com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis
;
import
com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 页面路径记录DaoImpl DAO接口
* 页面路径记录DaoImpl DAO接口
*
*
...
@@ -17,5 +21,13 @@ import java.util.List;
...
@@ -17,5 +21,13 @@ import java.util.List;
public
class
PageRouteDaoImpl
extends
BaseCRUDDaoMybatis
<
PageRouteEntity
,
Long
>
implements
PageRouteDao
{
public
class
PageRouteDaoImpl
extends
BaseCRUDDaoMybatis
<
PageRouteEntity
,
Long
>
implements
PageRouteDao
{
@Override
public
List
<
PageWayCensusVo
>
getPageWayCensus
(
PageCensusPdu
pdu
)
{
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getPageWayCensus"
),
pdu
);
}
@Override
public
List
<
Map
<
String
,
Object
>>
getPageWayCode
(
PageCensusPdu
pdu
)
{
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getPageWayCode"
),
pdu
);
}
}
}
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/module/page/model/PageAccessEntity.java
View file @
b13740b4
...
@@ -7,11 +7,11 @@ import com.mortals.framework.annotation.Excel;
...
@@ -7,11 +7,11 @@ import com.mortals.framework.annotation.Excel;
import
com.mortals.framework.model.BaseEntityLong
;
import
com.mortals.framework.model.BaseEntityLong
;
import
com.mortals.xhx.module.page.model.vo.PageAccessVo
;
import
com.mortals.xhx.module.page.model.vo.PageAccessVo
;
/**
/**
* 产品页面配置
实体对象
* 产品页面访问记录
实体对象
*
*
* @author zxfei
* @author zxfei
* @date 2023-04-12
* @date 2023-04-13
*/
*/
public
class
PageAccessEntity
extends
PageAccessVo
{
public
class
PageAccessEntity
extends
PageAccessVo
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
...
@@ -31,15 +31,43 @@ public class PageAccessEntity extends PageAccessVo {
...
@@ -31,15 +31,43 @@ public class PageAccessEntity extends PageAccessVo {
/**
/**
* 页面编码(页面路由)
* 页面编码(页面路由)
*/
*/
private
String
pageCode
;
private
String
firstCode
;
/**
* 页面名称
*/
private
String
firstName
;
/**
* 页面编码(页面路由)
*/
private
String
secondCode
;
/**
/**
* 页面名称
* 页面名称
*/
*/
private
String
pageName
;
private
String
secondName
;
/**
* 页面编码(页面路由)
*/
private
String
thirdCode
;
/**
/**
* 场景维度
* 页面名称
*/
*/
private
Integer
sceneDepth
;
private
String
thirdName
;
/**
* 页面编码(页面路由)
*/
private
String
fourthCode
;
/**
* 页面名称
*/
private
String
fourthName
;
/**
* 完整路径
*/
private
String
accessContent
;
/**
* 页面深度
*/
private
Integer
pageDepth
;
...
@@ -90,43 +118,141 @@ public class PageAccessEntity extends PageAccessVo {
...
@@ -90,43 +118,141 @@ public class PageAccessEntity extends PageAccessVo {
* 获取 页面编码(页面路由)
* 获取 页面编码(页面路由)
* @return String
* @return String
*/
*/
public
String
get
Page
Code
(){
public
String
get
First
Code
(){
return
page
Code
;
return
first
Code
;
}
}
/**
/**
* 设置 页面编码(页面路由)
* 设置 页面编码(页面路由)
* @param page
Code
* @param first
Code
*/
*/
public
void
set
PageCode
(
String
page
Code
){
public
void
set
FirstCode
(
String
first
Code
){
this
.
pageCode
=
page
Code
;
this
.
firstCode
=
first
Code
;
}
}
/**
/**
* 获取 页面名称
* 获取 页面名称
* @return String
* @return String
*/
*/
public
String
get
Page
Name
(){
public
String
get
First
Name
(){
return
page
Name
;
return
first
Name
;
}
}
/**
/**
* 设置 页面名称
* 设置 页面名称
* @param page
Name
* @param first
Name
*/
*/
public
void
set
PageName
(
String
page
Name
){
public
void
set
FirstName
(
String
first
Name
){
this
.
pageName
=
page
Name
;
this
.
firstName
=
first
Name
;
}
}
/**
/**
* 获取 场景维度
* 获取 页面编码(页面路由)
* @return String
*/
public
String
getSecondCode
(){
return
secondCode
;
}
/**
* 设置 页面编码(页面路由)
* @param secondCode
*/
public
void
setSecondCode
(
String
secondCode
){
this
.
secondCode
=
secondCode
;
}
/**
* 获取 页面名称
* @return String
*/
public
String
getSecondName
(){
return
secondName
;
}
/**
* 设置 页面名称
* @param secondName
*/
public
void
setSecondName
(
String
secondName
){
this
.
secondName
=
secondName
;
}
/**
* 获取 页面编码(页面路由)
* @return String
*/
public
String
getThirdCode
(){
return
thirdCode
;
}
/**
* 设置 页面编码(页面路由)
* @param thirdCode
*/
public
void
setThirdCode
(
String
thirdCode
){
this
.
thirdCode
=
thirdCode
;
}
/**
* 获取 页面名称
* @return String
*/
public
String
getThirdName
(){
return
thirdName
;
}
/**
* 设置 页面名称
* @param thirdName
*/
public
void
setThirdName
(
String
thirdName
){
this
.
thirdName
=
thirdName
;
}
/**
* 获取 页面编码(页面路由)
* @return String
*/
public
String
getFourthCode
(){
return
fourthCode
;
}
/**
* 设置 页面编码(页面路由)
* @param fourthCode
*/
public
void
setFourthCode
(
String
fourthCode
){
this
.
fourthCode
=
fourthCode
;
}
/**
* 获取 页面名称
* @return String
*/
public
String
getFourthName
(){
return
fourthName
;
}
/**
* 设置 页面名称
* @param fourthName
*/
public
void
setFourthName
(
String
fourthName
){
this
.
fourthName
=
fourthName
;
}
/**
* 获取 完整路径
* @return String
*/
public
String
getAccessContent
(){
return
accessContent
;
}
/**
* 设置 完整路径
* @param accessContent
*/
public
void
setAccessContent
(
String
accessContent
){
this
.
accessContent
=
accessContent
;
}
/**
* 获取 页面深度
* @return Integer
* @return Integer
*/
*/
public
Integer
get
Scen
eDepth
(){
public
Integer
get
Pag
eDepth
(){
return
scen
eDepth
;
return
pag
eDepth
;
}
}
/**
/**
* 设置 场景维
度
* 设置 页面深
度
* @param scen
eDepth
* @param pag
eDepth
*/
*/
public
void
set
SceneDepth
(
Integer
scen
eDepth
){
public
void
set
PageDepth
(
Integer
pag
eDepth
){
this
.
sceneDepth
=
scen
eDepth
;
this
.
pageDepth
=
pag
eDepth
;
}
}
...
@@ -153,9 +279,16 @@ public class PageAccessEntity extends PageAccessVo {
...
@@ -153,9 +279,16 @@ public class PageAccessEntity extends PageAccessVo {
sb
.
append
(
",deviceNum:"
).
append
(
getDeviceNum
());
sb
.
append
(
",deviceNum:"
).
append
(
getDeviceNum
());
sb
.
append
(
",productId:"
).
append
(
getProductId
());
sb
.
append
(
",productId:"
).
append
(
getProductId
());
sb
.
append
(
",productName:"
).
append
(
getProductName
());
sb
.
append
(
",productName:"
).
append
(
getProductName
());
sb
.
append
(
",pageCode:"
).
append
(
getPageCode
());
sb
.
append
(
",firstCode:"
).
append
(
getFirstCode
());
sb
.
append
(
",pageName:"
).
append
(
getPageName
());
sb
.
append
(
",firstName:"
).
append
(
getFirstName
());
sb
.
append
(
",sceneDepth:"
).
append
(
getSceneDepth
());
sb
.
append
(
",secondCode:"
).
append
(
getSecondCode
());
sb
.
append
(
",secondName:"
).
append
(
getSecondName
());
sb
.
append
(
",thirdCode:"
).
append
(
getThirdCode
());
sb
.
append
(
",thirdName:"
).
append
(
getThirdName
());
sb
.
append
(
",fourthCode:"
).
append
(
getFourthCode
());
sb
.
append
(
",fourthName:"
).
append
(
getFourthName
());
sb
.
append
(
",accessContent:"
).
append
(
getAccessContent
());
sb
.
append
(
",pageDepth:"
).
append
(
getPageDepth
());
return
sb
.
toString
();
return
sb
.
toString
();
}
}
...
@@ -167,10 +300,24 @@ public class PageAccessEntity extends PageAccessVo {
...
@@ -167,10 +300,24 @@ public class PageAccessEntity extends PageAccessVo {
this
.
productName
=
""
;
this
.
productName
=
""
;
this
.
pageCode
=
""
;
this
.
firstCode
=
""
;
this
.
firstName
=
""
;
this
.
secondCode
=
""
;
this
.
secondName
=
""
;
this
.
thirdCode
=
""
;
this
.
thirdName
=
""
;
this
.
fourthCode
=
""
;
this
.
fourthName
=
""
;
this
.
pageName
=
""
;
this
.
accessContent
=
""
;
this
.
scen
eDepth
=
0
;
this
.
pag
eDepth
=
0
;
}
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/module/page/model/PageAccessQuery.java
View file @
b13740b4
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/module/page/model/pdu/AccessPdu.java
0 → 100644
View file @
b13740b4
package
com.mortals.xhx.module.page.model.pdu
;
import
lombok.Data
;
@Data
public
class
AccessPdu
{
/*** 页面编码(页面路由) */
private
String
pageCode
;
/** 页面名称 */
private
String
pageName
;
}
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/module/page/model/pdu/BuryPointPdu.java
View file @
b13740b4
package
com.mortals.xhx.module.page.model.pdu
;
package
com.mortals.xhx.module.page.model.pdu
;
import
com.mortals.xhx.module.page.model.PageAccessDepthEntity
;
import
com.mortals.xhx.module.page.model.*
;
import
com.mortals.xhx.module.page.model.PageAccessEntity
;
import
com.mortals.xhx.module.page.model.PageEventEntity
;
import
com.mortals.xhx.module.page.model.PageRouteEntity
;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.List
;
/***
/***
* 页面数据埋点信息
* 页面数据埋点信息
*/
*/
...
@@ -29,4 +28,6 @@ public class BuryPointPdu {
...
@@ -29,4 +28,6 @@ public class BuryPointPdu {
private
PageEventEntity
eventInfo
;
private
PageEventEntity
eventInfo
;
/** 产品页面访问深度 **/
/** 产品页面访问深度 **/
private
PageRouteEntity
routeInfo
;
private
PageRouteEntity
routeInfo
;
/** 场景深度 **/
private
List
<
AccessPdu
>
depthArr
;
}
}
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/module/page/model/pdu/PageCensusPdu.java
0 → 100644
View file @
b13740b4
package
com.mortals.xhx.module.page.model.pdu
;
import
lombok.Data
;
/**
* 页面统计查询
*/
@Data
public
class
PageCensusPdu
{
/*** 产品id */
private
Long
productId
;
/** 查询日期开始 **/
private
String
dateTimeStart
;
/** 查询日期结束 **/
private
String
dateTimeEnd
;
/** 页面编码 **/
private
String
pageCode
;
}
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/module/page/model/vo/AccessTrendCensusVo.java
0 → 100644
View file @
b13740b4
package
com.mortals.xhx.module.page.model.vo
;
import
lombok.Data
;
/**
* 页面访问指标趋势
*/
@Data
public
class
AccessTrendCensusVo
{
/**
* 页面编码(页面路由)
*/
private
String
pageCode
;
/**
* 页面名称
*/
private
String
pageName
;
/** 访问日期 */
private
String
accessDay
;
/** 访问次数 */
private
Integer
accessCount
;
/** 人均访问深度 */
private
Float
depthAvg
;
/** 次均访问深度 */
private
Float
singleDepth
;
}
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/module/page/model/vo/PageEventCensusVo.java
0 → 100644
View file @
b13740b4
package
com.mortals.xhx.module.page.model.vo
;
import
lombok.Data
;
/**
* 事件分析
*/
@Data
public
class
PageEventCensusVo
{
/**
* 事件编码
*/
private
String
eventCode
;
/**
* 事件名称
*/
private
String
eventName
;
/**
* 事件日均数量
*/
private
Integer
dayAvg
;
/**
* 事件平均耗时(单位毫秒)
*/
private
Float
takeTimeAvg
;
}
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/module/page/model/vo/PageWayCensusVo.java
0 → 100644
View file @
b13740b4
package
com.mortals.xhx.module.page.model.vo
;
import
lombok.Data
;
/**
* 路径
*/
@Data
public
class
PageWayCensusVo
{
/**
* 开始页面编码(路由)
*/
private
String
source
;
/**
* 开始页面名称
*/
private
String
sourceName
;
/**
* 目标页面编码(路由)
*/
private
String
target
;
/**
* 目标页面名称
*/
private
String
targetName
;
/**
* 点击次数
*/
private
Integer
value
;
}
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/module/page/model/vo/ProductHotCensusVo.java
0 → 100644
View file @
b13740b4
package
com.mortals.xhx.module.page.model.vo
;
import
lombok.Data
;
/**
* 产品热力图
*/
@Data
public
class
ProductHotCensusVo
{
/**
* 业务场景编码
*/
private
String
businessCode
;
/**
* 业务场景名称
*/
private
String
businessName
;
/**
* 事件坐标
*/
private
String
coordinate
;
/**
* 点击次数
*/
private
Integer
value
;
/** 页面x坐标 */
private
Float
x
;
/** 页面y坐标 */
private
Float
y
;
/** 事件占比 */
private
String
proportion
;
}
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/module/page/service/PageEventService.java
View file @
b13740b4
package
com.mortals.xhx.module.page.service
;
package
com.mortals.xhx.module.page.service
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.service.ICRUDService
;
import
com.mortals.framework.service.ICRUDService
;
import
com.mortals.xhx.module.page.model.PageEventEntity
;
import
com.mortals.xhx.module.page.model.PageEventEntity
;
import
com.mortals.xhx.module.page.model.pdu.BuryPointPdu
;
import
com.mortals.xhx.module.page.model.pdu.BuryPointPdu
;
import
com.mortals.xhx.module.page.model.pdu.PageCensusPdu
;
import
com.mortals.xhx.module.page.model.vo.PageEventCensusVo
;
import
com.mortals.xhx.module.page.model.vo.ProductHotCensusVo
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* PageEventService
* PageEventService
...
@@ -14,4 +21,26 @@ import com.mortals.xhx.module.page.model.pdu.BuryPointPdu;
...
@@ -14,4 +21,26 @@ import com.mortals.xhx.module.page.model.pdu.BuryPointPdu;
public
interface
PageEventService
extends
ICRUDService
<
PageEventEntity
,
Long
>{
public
interface
PageEventService
extends
ICRUDService
<
PageEventEntity
,
Long
>{
PageEventEntity
saveByPdu
(
BuryPointPdu
pdu
);
PageEventEntity
saveByPdu
(
BuryPointPdu
pdu
);
/**
* 事件分析
* @param pdu
* @return
*/
List
<
PageEventCensusVo
>
getPageEventCensus
(
PageCensusPdu
pdu
)
throws
AppException
;
/**
* 产品热力图
* @param pdu
* @return
*/
Map
<
String
,
Object
>
getProductHotCensus
(
PageCensusPdu
pdu
)
throws
AppException
;
/**
* 页面访问分析
* @param pdu
* @return
*/
Map
<
String
,
Object
>
getPageAccessAnalyse
(
PageCensusPdu
pdu
)
throws
AppException
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/module/page/service/PageRouteService.java
View file @
b13740b4
package
com.mortals.xhx.module.page.service
;
package
com.mortals.xhx.module.page.service
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.service.ICRUDService
;
import
com.mortals.framework.service.ICRUDService
;
import
com.mortals.xhx.module.page.model.PageRouteEntity
;
import
com.mortals.xhx.module.page.model.PageRouteEntity
;
import
com.mortals.xhx.module.page.model.pdu.BuryPointPdu
;
import
com.mortals.xhx.module.page.model.pdu.BuryPointPdu
;
import
com.mortals.xhx.module.page.model.pdu.PageCensusPdu
;
import
java.util.Map
;
/**
/**
* PageRouteService
* PageRouteService
...
@@ -14,4 +18,11 @@ import com.mortals.xhx.module.page.model.pdu.BuryPointPdu;
...
@@ -14,4 +18,11 @@ import com.mortals.xhx.module.page.model.pdu.BuryPointPdu;
public
interface
PageRouteService
extends
ICRUDService
<
PageRouteEntity
,
Long
>{
public
interface
PageRouteService
extends
ICRUDService
<
PageRouteEntity
,
Long
>{
PageRouteEntity
saveByPdu
(
BuryPointPdu
pdu
);
PageRouteEntity
saveByPdu
(
BuryPointPdu
pdu
);
/**
* 页面路径访问分析
* @param pdu
* @return
*/
Map
<
String
,
Object
>
getWayAccessAnalyse
(
PageCensusPdu
pdu
)
throws
AppException
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/module/page/service/impl/PageAccessServiceImpl.java
View file @
b13740b4
package
com.mortals.xhx.module.page.service.impl
;
package
com.mortals.xhx.module.page.service.impl
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mortals.framework.util.StringUtils
;
import
com.mortals.framework.util.StringUtils
;
import
com.mortals.xhx.module.page.model.pdu.BuryPointPdu
;
import
com.mortals.xhx.module.page.model.pdu.BuryPointPdu
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.exception.AppException
;
...
@@ -23,26 +25,39 @@ public class PageAccessServiceImpl extends AbstractCRUDServiceImpl<PageAccessDao
...
@@ -23,26 +25,39 @@ public class PageAccessServiceImpl extends AbstractCRUDServiceImpl<PageAccessDao
@Override
@Override
protected
void
validData
(
PageAccessEntity
entity
,
Context
context
)
throws
AppException
{
protected
void
validData
(
PageAccessEntity
entity
,
Context
context
)
throws
AppException
{
if
(
StringUtils
.
isEmpty
(
entity
.
getPageCode
())){
//
if(StringUtils.isEmpty(entity.getPageCode())){
throw
new
AppException
(
"页面编码(路由)不能为空"
);
//
throw new AppException("页面编码(路由)不能为空");
}
//
}
if
(
StringUtils
.
isEmpty
(
entity
.
getPageName
())){
//
if(StringUtils.isEmpty(entity.getPageName())){
throw
new
AppException
(
"页面名称不能为空"
);
//
throw new AppException("页面名称不能为空");
}
//
}
}
}
@Override
@Override
public
PageAccessEntity
saveByPdu
(
BuryPointPdu
pdu
)
{
public
PageAccessEntity
saveByPdu
(
BuryPointPdu
pdu
)
{
if
(
pdu
.
getSceneDepth
()==
null
){
if
(
CollectionUtils
.
isEmpty
(
pdu
.
getDepthArr
())
){
return
null
;
return
null
;
}
}
PageAccessEntity
entity
=
new
PageAccessEntity
();
PageAccessEntity
entity
=
new
PageAccessEntity
();
entity
.
setDeviceNum
(
pdu
.
getDeviceNum
());
entity
.
setDeviceNum
(
pdu
.
getDeviceNum
());
entity
.
setProductId
(
pdu
.
getProductId
());
entity
.
setProductId
(
pdu
.
getProductId
());
entity
.
setProductName
(
pdu
.
getProductName
());
entity
.
setProductName
(
pdu
.
getProductName
());
entity
.
setPageCode
(
pdu
.
getPageCode
());
entity
.
setFirstCode
(
pdu
.
getDepthArr
().
get
(
0
).
getPageCode
());
entity
.
setPageName
(
pdu
.
getPageName
());
entity
.
setFirstName
(
pdu
.
getDepthArr
().
get
(
0
).
getPageName
());
entity
.
setSceneDepth
(
pdu
.
getSceneDepth
());
if
(
pdu
.
getDepthArr
().
size
()>
1
){
entity
.
setSecondCode
(
pdu
.
getDepthArr
().
get
(
1
).
getPageCode
());
entity
.
setSecondName
(
pdu
.
getDepthArr
().
get
(
1
).
getPageName
());
}
if
(
pdu
.
getDepthArr
().
size
()>
2
){
entity
.
setThirdCode
(
pdu
.
getDepthArr
().
get
(
2
).
getPageCode
());
entity
.
setThirdName
(
pdu
.
getDepthArr
().
get
(
2
).
getPageName
());
}
if
(
pdu
.
getDepthArr
().
size
()>
3
){
entity
.
setFourthCode
(
pdu
.
getDepthArr
().
get
(
3
).
getPageCode
());
entity
.
setFourthName
(
pdu
.
getDepthArr
().
get
(
3
).
getPageName
());
}
entity
.
setPageDepth
(
pdu
.
getDepthArr
().
size
());
entity
.
setAccessContent
(
JSONObject
.
toJSONString
(
pdu
.
getDepthArr
()));
entity
.
setCreateTime
(
new
Date
());
entity
.
setCreateTime
(
new
Date
());
return
this
.
save
(
entity
);
return
this
.
save
(
entity
);
}
}
...
...
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/module/page/service/impl/PageEventServiceImpl.java
View file @
b13740b4
package
com.mortals.xhx.module.page.service.impl
;
package
com.mortals.xhx.module.page.service.impl
;
import
com.mortals.framework.util.StringUtils
;
import
com.mortals.framework.util.StringUtils
;
import
com.mortals.xhx.module.page.dao.PageAccessDepthDao
;
import
com.mortals.xhx.module.page.model.PageInfoEntity
;
import
com.mortals.xhx.module.page.model.PageInfoQuery
;
import
com.mortals.xhx.module.page.model.pdu.BuryPointPdu
;
import
com.mortals.xhx.module.page.model.pdu.BuryPointPdu
;
import
com.mortals.xhx.module.page.model.pdu.PageCensusPdu
;
import
com.mortals.xhx.module.page.model.vo.AccessTrendCensusVo
;
import
com.mortals.xhx.module.page.model.vo.PageEventCensusVo
;
import
com.mortals.xhx.module.page.model.vo.ProductHotCensusVo
;
import
com.mortals.xhx.module.page.service.PageInfoService
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.exception.AppException
;
...
@@ -9,7 +19,13 @@ import com.mortals.xhx.module.page.dao.PageEventDao;
...
@@ -9,7 +19,13 @@ import com.mortals.xhx.module.page.dao.PageEventDao;
import
com.mortals.xhx.module.page.model.PageEventEntity
;
import
com.mortals.xhx.module.page.model.PageEventEntity
;
import
com.mortals.xhx.module.page.service.PageEventService
;
import
com.mortals.xhx.module.page.service.PageEventService
;
import
java.text.DecimalFormat
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* PageEventService
* PageEventService
...
@@ -21,6 +37,13 @@ import java.util.Date;
...
@@ -21,6 +37,13 @@ import java.util.Date;
@Service
(
"pageEventService"
)
@Service
(
"pageEventService"
)
public
class
PageEventServiceImpl
extends
AbstractCRUDServiceImpl
<
PageEventDao
,
PageEventEntity
,
Long
>
implements
PageEventService
{
public
class
PageEventServiceImpl
extends
AbstractCRUDServiceImpl
<
PageEventDao
,
PageEventEntity
,
Long
>
implements
PageEventService
{
@Autowired
private
PageInfoService
pageInfoService
;
@Autowired
private
PageAccessDepthDao
pageAccessDepthDao
;
@Override
@Override
protected
void
validData
(
PageEventEntity
entity
,
Context
context
)
throws
AppException
{
protected
void
validData
(
PageEventEntity
entity
,
Context
context
)
throws
AppException
{
if
(
StringUtils
.
isEmpty
(
entity
.
getPageCode
())){
if
(
StringUtils
.
isEmpty
(
entity
.
getPageCode
())){
...
@@ -51,4 +74,116 @@ public class PageEventServiceImpl extends AbstractCRUDServiceImpl<PageEventDao,
...
@@ -51,4 +74,116 @@ public class PageEventServiceImpl extends AbstractCRUDServiceImpl<PageEventDao,
entity
.
setCreateTime
(
new
Date
());
entity
.
setCreateTime
(
new
Date
());
return
this
.
save
(
entity
);
return
this
.
save
(
entity
);
}
}
@Override
public
List
<
PageEventCensusVo
>
getPageEventCensus
(
PageCensusPdu
pdu
)
throws
AppException
{
if
(
StringUtils
.
isEmpty
(
pdu
.
getDateTimeStart
())){
throw
new
AppException
(
"开始日期不能为空"
);
}
if
(
StringUtils
.
isEmpty
(
pdu
.
getDateTimeEnd
())){
throw
new
AppException
(
"结束日期不能为空"
);
}
if
(
pdu
.
getProductId
()==
null
){
throw
new
AppException
(
"产品id不能为空"
);
}
try
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Date
date1
=
sdf
.
parse
(
pdu
.
getDateTimeStart
());
Date
date2
=
sdf
.
parse
(
pdu
.
getDateTimeEnd
());
}
catch
(
ParseException
e
){
throw
new
AppException
(
"日期格式错误,应为yyyy-MM-dd"
);
}
return
dao
.
getPageEventCensus
(
pdu
);
}
@Override
public
Map
<
String
,
Object
>
getProductHotCensus
(
PageCensusPdu
pdu
)
throws
AppException
{
if
(
StringUtils
.
isEmpty
(
pdu
.
getDateTimeStart
())){
throw
new
AppException
(
"开始日期不能为空"
);
}
if
(
StringUtils
.
isEmpty
(
pdu
.
getDateTimeEnd
())){
throw
new
AppException
(
"结束日期不能为空"
);
}
if
(
pdu
.
getProductId
()==
null
){
throw
new
AppException
(
"产品id不能为空"
);
}
if
(
StringUtils
.
isEmpty
(
pdu
.
getPageCode
())){
throw
new
AppException
(
"页面编码不能为空"
);
}
try
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Date
date1
=
sdf
.
parse
(
pdu
.
getDateTimeStart
());
Date
date2
=
sdf
.
parse
(
pdu
.
getDateTimeEnd
());
}
catch
(
ParseException
e
){
throw
new
AppException
(
"日期格式错误,应为yyyy-MM-dd"
);
}
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
List
<
ProductHotCensusVo
>
list
=
dao
.
getProductHotCensus
(
pdu
);
Long
clickSum
=
0
l
;
if
(
CollectionUtils
.
isNotEmpty
(
list
)){
for
(
ProductHotCensusVo
vo:
list
){
clickSum
+=
vo
.
getValue
();
}
for
(
ProductHotCensusVo
vo:
list
){
float
a
=
(
float
)
vo
.
getValue
();
float
b
=
(
float
)
clickSum
;
float
p
=
a
/
b
;
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
".00%"
);
String
s
=
decimalFormat
.
format
(
p
);
vo
.
setProportion
(
s
);
}
}
result
.
put
(
"data"
,
list
);
result
.
put
(
"clickSum"
,
clickSum
);
PageInfoEntity
pageInfoEntity
=
pageInfoService
.
selectOne
(
new
PageInfoQuery
().
pageCode
(
pdu
.
getPageCode
()).
productId
(
pdu
.
getProductId
()));
if
(
pageInfoEntity
!=
null
)
{
result
.
put
(
"screenUrl"
,
pageInfoEntity
.
getScreenUrl
());
}
else
{
result
.
put
(
"screenUrl"
,
""
);
}
return
result
;
}
@Override
public
Map
<
String
,
Object
>
getPageAccessAnalyse
(
PageCensusPdu
pdu
)
throws
AppException
{
if
(
StringUtils
.
isEmpty
(
pdu
.
getDateTimeStart
())){
throw
new
AppException
(
"开始日期不能为空"
);
}
if
(
StringUtils
.
isEmpty
(
pdu
.
getDateTimeEnd
())){
throw
new
AppException
(
"结束日期不能为空"
);
}
if
(
pdu
.
getProductId
()==
null
){
throw
new
AppException
(
"产品id不能为空"
);
}
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
List
<
AccessTrendCensusVo
>
trendCensusVos
=
dao
.
getPageAccessTrend
(
pdu
);
Long
clickSum
=
0
l
;
float
dayAccessAvg
=
0
;
if
(
CollectionUtils
.
isNotEmpty
(
trendCensusVos
))
{
for
(
AccessTrendCensusVo
vo:
trendCensusVos
){
clickSum
+=
vo
.
getAccessCount
();
}
float
a
=
(
float
)
clickSum
;
float
b
=
(
float
)
trendCensusVos
.
size
();
float
p
=
a
/
b
;
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
".00"
);
String
s
=
decimalFormat
.
format
(
p
);
dayAccessAvg
=
Float
.
valueOf
(
s
);
}
result
.
put
(
"accessTrend"
,
trendCensusVos
);
//页面访问指标趋势
result
.
put
(
"accessSum"
,
clickSum
);
//页面累计访问次数
result
.
put
(
"dayAccessAvg"
,
dayAccessAvg
);
//日均访问次数
List
<
AccessTrendCensusVo
>
pageAccessTop
=
dao
.
getPageAccessTop
(
pdu
);
result
.
put
(
"pageAccessTop"
,
pageAccessTop
);
//页面访问次数TOP10
List
<
AccessTrendCensusVo
>
depthAvg
=
pageAccessDepthDao
.
getDepthAvg
(
pdu
);
if
(
CollectionUtils
.
isNotEmpty
(
depthAvg
)){
result
.
put
(
"depthAvg"
,
depthAvg
.
get
(
0
).
getDepthAvg
());
//人均访问深度
result
.
put
(
"singleDepth"
,
depthAvg
.
get
(
0
).
getSingleDepth
());
//次均访问深度
}
else
{
result
.
put
(
"depthAvg"
,
0
);
result
.
put
(
"singleDepth"
,
0
);
}
return
result
;
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/module/page/service/impl/PageRouteServiceImpl.java
View file @
b13740b4
package
com.mortals.xhx.module.page.service.impl
;
package
com.mortals.xhx.module.page.service.impl
;
import
com.mortals.framework.util.StringUtils
;
import
com.mortals.framework.util.StringUtils
;
import
com.mortals.xhx.module.page.model.pdu.BuryPointPdu
;
import
com.mortals.xhx.module.page.model.pdu.BuryPointPdu
;
import
com.mortals.xhx.module.page.model.pdu.PageCensusPdu
;
import
com.mortals.xhx.module.page.model.vo.PageWayCensusVo
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.exception.AppException
;
...
@@ -10,6 +12,9 @@ import com.mortals.xhx.module.page.model.PageRouteEntity;
...
@@ -10,6 +12,9 @@ import com.mortals.xhx.module.page.model.PageRouteEntity;
import
com.mortals.xhx.module.page.service.PageRouteService
;
import
com.mortals.xhx.module.page.service.PageRouteService
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* PageRouteService
* PageRouteService
...
@@ -53,4 +58,23 @@ public class PageRouteServiceImpl extends AbstractCRUDServiceImpl<PageRouteDao,
...
@@ -53,4 +58,23 @@ public class PageRouteServiceImpl extends AbstractCRUDServiceImpl<PageRouteDao,
entity
.
setCreateTime
(
new
Date
());
entity
.
setCreateTime
(
new
Date
());
return
this
.
save
(
entity
);
return
this
.
save
(
entity
);
}
}
@Override
public
Map
<
String
,
Object
>
getWayAccessAnalyse
(
PageCensusPdu
pdu
)
throws
AppException
{
if
(
StringUtils
.
isEmpty
(
pdu
.
getDateTimeStart
())){
throw
new
AppException
(
"开始日期不能为空"
);
}
if
(
StringUtils
.
isEmpty
(
pdu
.
getDateTimeEnd
())){
throw
new
AppException
(
"结束日期不能为空"
);
}
if
(
pdu
.
getProductId
()==
null
){
throw
new
AppException
(
"产品id不能为空"
);
}
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
List
<
PageWayCensusVo
>
pageWayCensusVos
=
dao
.
getPageWayCensus
(
pdu
);
result
.
put
(
"links"
,
pageWayCensusVos
);
List
<
Map
<
String
,
Object
>>
pageCodes
=
dao
.
getPageWayCode
(
pdu
);
result
.
put
(
"data"
,
pageCodes
);
return
result
;
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/module/page/web/PageCensusController.java
0 → 100644
View file @
b13740b4
package
com.mortals.xhx.module.page.web
;
import
com.mortals.framework.annotation.UnAuth
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.model.Result
;
import
com.mortals.framework.web.BaseJsonBodyController
;
import
com.mortals.xhx.module.page.model.pdu.PageCensusPdu
;
import
com.mortals.xhx.module.page.model.vo.PageEventCensusVo
;
import
com.mortals.xhx.module.page.service.PageEventService
;
import
com.mortals.xhx.module.page.service.PageRouteService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* 用户行为分析
*/
@RestController
@RequestMapping
(
"act/analyse"
)
public
class
PageCensusController
extends
BaseJsonBodyController
{
@Autowired
private
PageEventService
pageEventService
;
@Autowired
private
PageRouteService
pageRouteService
;
/**
* 事件分析
* @param query
* @return
*/
@PostMapping
({
"pageEventCensus"
})
@UnAuth
public
Rest
<
Object
>
getPageEventCensus
(
@RequestBody
PageCensusPdu
query
)
{
Rest
<
Object
>
ret
=
new
Rest
();
Map
<
String
,
Object
>
model
=
new
HashMap
();
String
busiDesc
=
"查询事件分析结果"
;
int
code
=
1
;
try
{
List
<
PageEventCensusVo
>
result
=
pageEventService
.
getPageEventCensus
(
query
);
model
.
put
(
"data"
,
result
);
model
.
put
(
"message_info"
,
busiDesc
+
"成功"
);
this
.
recordSysLog
(
this
.
request
,
busiDesc
+
" 【成功】"
);
}
catch
(
Exception
var9
)
{
code
=
-
1
;
this
.
doException
(
this
.
request
,
busiDesc
,
model
,
var9
);
}
ret
.
setCode
(
code
);
ret
.
setData
(
model
);
ret
.
setMsg
(
model
.
get
(
"message_info"
)
==
null
?
""
:
model
.
remove
(
"message_info"
).
toString
());
return
ret
;
}
/**
* 产品热力图
* @param query
* @return
*/
@PostMapping
({
"productHotCensus"
})
@UnAuth
public
Rest
<
Object
>
getProductHotCensus
(
@RequestBody
PageCensusPdu
query
)
{
Rest
<
Object
>
ret
=
new
Rest
();
Map
<
String
,
Object
>
model
=
new
HashMap
();
String
busiDesc
=
"查询产品热力图"
;
int
code
=
1
;
try
{
Map
<
String
,
Object
>
result
=
pageEventService
.
getProductHotCensus
(
query
);
model
.
put
(
"data"
,
result
);
model
.
put
(
"message_info"
,
busiDesc
+
"成功"
);
this
.
recordSysLog
(
this
.
request
,
busiDesc
+
" 【成功】"
);
}
catch
(
Exception
var9
)
{
code
=
-
1
;
this
.
doException
(
this
.
request
,
busiDesc
,
model
,
var9
);
}
ret
.
setCode
(
code
);
ret
.
setData
(
model
.
get
(
"data"
));
ret
.
setMsg
(
model
.
get
(
"message_info"
)
==
null
?
""
:
model
.
remove
(
"message_info"
).
toString
());
return
ret
;
}
/**
* 页面访问分析
* @param query
* @return
*/
@PostMapping
({
"accessAnalyse"
})
@UnAuth
public
Rest
<
Object
>
getPageAccessAnalyse
(
@RequestBody
PageCensusPdu
query
)
{
Rest
<
Object
>
ret
=
new
Rest
();
Map
<
String
,
Object
>
model
=
new
HashMap
();
String
busiDesc
=
"查询页面访问分析"
;
int
code
=
1
;
try
{
Map
<
String
,
Object
>
result
=
pageEventService
.
getPageAccessAnalyse
(
query
);
model
.
put
(
"data"
,
result
);
model
.
put
(
"message_info"
,
busiDesc
+
"成功"
);
this
.
recordSysLog
(
this
.
request
,
busiDesc
+
" 【成功】"
);
}
catch
(
Exception
var9
)
{
code
=
-
1
;
this
.
doException
(
this
.
request
,
busiDesc
,
model
,
var9
);
}
ret
.
setCode
(
code
);
ret
.
setData
(
model
.
get
(
"data"
));
ret
.
setMsg
(
model
.
get
(
"message_info"
)
==
null
?
""
:
model
.
remove
(
"message_info"
).
toString
());
return
ret
;
}
/**
* 页面路径访问分析
* @param query
* @return
*/
@PostMapping
({
"wayAccessAnalyse"
})
@UnAuth
public
Rest
<
Object
>
getPageWayAnalyse
(
@RequestBody
PageCensusPdu
query
)
{
Rest
<
Object
>
ret
=
new
Rest
();
Map
<
String
,
Object
>
model
=
new
HashMap
();
String
busiDesc
=
"查询页面路径访问分析"
;
int
code
=
1
;
try
{
Map
<
String
,
Object
>
result
=
pageRouteService
.
getWayAccessAnalyse
(
query
);
model
.
put
(
"data"
,
result
);
model
.
put
(
"message_info"
,
busiDesc
+
"成功"
);
this
.
recordSysLog
(
this
.
request
,
busiDesc
+
" 【成功】"
);
}
catch
(
Exception
var9
)
{
code
=
-
1
;
this
.
doException
(
this
.
request
,
busiDesc
,
model
,
var9
);
}
ret
.
setCode
(
code
);
ret
.
setData
(
model
.
get
(
"data"
));
ret
.
setMsg
(
model
.
get
(
"message_info"
)
==
null
?
""
:
model
.
remove
(
"message_info"
).
toString
());
return
ret
;
}
}
This diff is collapsed.
Click to expand it.
portal-manager/src/main/resources/sqlmap/module/page/PageAccessDepthMapperExt.xml
0 → 100644
View file @
b13740b4
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
<mapper
namespace=
"com.mortals.xhx.module.page.dao.ibatis.PageAccessDepthDaoImpl"
>
<!-- 人均访问深度 -->
<select
id=
"getDepthAvg"
parameterType=
"com.mortals.xhx.module.page.model.pdu.PageCensusPdu"
resultType=
"com.mortals.xhx.module.page.model.vo.AccessTrendCensusVo"
>
SELECT
FORMAT(AVG(t.depthValue),2) AS depthAvg,
FORMAT(sum(t.depthValue)/count(t.id),2) AS singleDepth
FROM
mortals_xhx_page_access_depth t
WHERE
t.productId = #{productId}
AND t.createTime
<![CDATA[ >= ]]>
STR_TO_DATE(left(concat(#{dateTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
AND t.createTime
<![CDATA[ <= ]]>
STR_TO_DATE(left(concat(#{dateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</select>
</mapper>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
portal-manager/src/main/resources/sqlmap/module/page/PageAccessMapper.xml
View file @
b13740b4
This diff is collapsed.
Click to expand it.
portal-manager/src/main/resources/sqlmap/module/page/PageEventMapperExt.xml
0 → 100644
View file @
b13740b4
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
<mapper
namespace=
"com.mortals.xhx.module.page.dao.ibatis.PageEventDaoImpl"
>
<!-- 事件分析 -->
<select
id=
"getPageEventCensus"
parameterType=
"com.mortals.xhx.module.page.model.pdu.PageCensusPdu"
resultType=
"com.mortals.xhx.module.page.model.vo.PageEventCensusVo"
>
SELECT
t.eventCode,
t.eventName,
FLOOR(count(id)/(DATEDIFF(MAX(t.createTime),MIN(t.createTime))+1)) as dayAvg,
FORMAT(AVG(t.takeTime)/1000,2) as takeTimeAvg
FROM
mortals_xhx_page_event t
WHERE
t.productId = #{productId}
AND t.createTime
<![CDATA[ >= ]]>
STR_TO_DATE(left(concat(#{dateTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
AND t.createTime
<![CDATA[ <= ]]>
STR_TO_DATE(left(concat(#{dateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
AND t.eventCode IS NOT NULL
GROUP BY
t.eventCode,
t.eventName
</select>
<!-- 产品热力图 -->
<select
id=
"getProductHotCensus"
parameterType=
"com.mortals.xhx.module.page.model.pdu.PageCensusPdu"
resultType=
"com.mortals.xhx.module.page.model.vo.ProductHotCensusVo"
>
SELECT * FROM (
SELECT
t.businessCode,
t.businessName,
t.coordinate,
SUBSTRING_INDEX(t.coordinate,',',1) AS x,
SUBSTRING_INDEX(t.coordinate,',',-1) AS y,
COUNT(t.id) AS `value`
FROM
mortals_xhx_page_event t
WHERE
t.productId = #{productId}
AND t.createTime
<![CDATA[ >= ]]>
STR_TO_DATE(left(concat(#{dateTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
AND t.createTime
<![CDATA[ <= ]]>
STR_TO_DATE(left(concat(#{dateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
AND t.businessCode IS NOT NULL
AND t.businessCode !=''
AND t.coordinate IS NOT NULL
AND t.coordinate !=''
AND t.pageCode = #{pageCode}
GROUP BY
t.businessCode,
t.businessName,
t.coordinate
) as a ORDER BY `value` DESC LIMIT 10
</select>
<!-- 页面访问指标趋势 -->
<select
id=
"getPageAccessTrend"
parameterType=
"com.mortals.xhx.module.page.model.pdu.PageCensusPdu"
resultType=
"com.mortals.xhx.module.page.model.vo.AccessTrendCensusVo"
>
SELECT
date_format(createTime, '%m-%d') AS accessDay,
COUNT(t.id) AS accessCount
FROM
mortals_xhx_page_event t
WHERE
t.productId = #{productId}
AND t.createTime
<![CDATA[ >= ]]>
STR_TO_DATE(left(concat(#{dateTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
AND t.createTime
<![CDATA[ <= ]]>
STR_TO_DATE(left(concat(#{dateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
GROUP BY
date_format(createTime, '%m-%d')
</select>
<!-- 页面访问次数TOP10 -->
<select
id=
"getPageAccessTop"
parameterType=
"com.mortals.xhx.module.page.model.pdu.PageCensusPdu"
resultType=
"com.mortals.xhx.module.page.model.vo.AccessTrendCensusVo"
>
SELECT * FROM (
SELECT
t.pageCode,
t.pageName,
COUNT(t.id) AS accessCount
FROM
mortals_xhx_page_event t
WHERE
t.productId = #{productId}
AND t.createTime
<![CDATA[ >= ]]>
STR_TO_DATE(left(concat(#{dateTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
AND t.createTime
<![CDATA[ <= ]]>
STR_TO_DATE(left(concat(#{dateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
GROUP BY
t.pageCode,
t.pageName
) as a ORDER BY accessCount DESC LIMIT 10
</select>
</mapper>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
portal-manager/src/main/resources/sqlmap/module/page/PageRouteMapperExt.xml
0 → 100644
View file @
b13740b4
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
<mapper
namespace=
"com.mortals.xhx.module.page.dao.ibatis.PageRouteDaoImpl"
>
<!-- 路径图 -->
<select
id=
"getPageWayCensus"
parameterType=
"com.mortals.xhx.module.page.model.pdu.PageCensusPdu"
resultType=
"com.mortals.xhx.module.page.model.vo.PageWayCensusVo"
>
SELECT
t.sourceCode AS source,
t.sourceName,
t.targetCode AS target,
t.targetName,
count(t.id) AS `value`
FROM
mortals_xhx_page_route t
WHERE
t.productId = #{productId}
AND t.createTime
<![CDATA[ >= ]]>
STR_TO_DATE(left(concat(#{dateTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
AND t.createTime
<![CDATA[ <= ]]>
STR_TO_DATE(left(concat(#{dateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
GROUP BY
t.sourceCode,
t.sourceName,
t.targetCode,
t.targetName
</select>
<!-- 路径图 -->
<select
id=
"getPageWayCode"
parameterType=
"com.mortals.xhx.module.page.model.pdu.PageCensusPdu"
resultType=
"java.util.HashMap"
>
SELECT DISTINCT a.* FROM
(
SELECT DISTINCT
sourceCode AS `code`,
sourceName AS `name`
FROM
mortals_xhx_page_route
WHERE
productId = #{productId}
AND createTime
<![CDATA[ >= ]]>
STR_TO_DATE(left(concat(#{dateTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
AND createTime
<![CDATA[ <= ]]>
STR_TO_DATE(left(concat(#{dateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
UNION
SELECT DISTINCT
targetCode AS `code`,
targetName AS `name`
FROM
mortals_xhx_page_route
WHERE
productId = #{productId}
AND createTime
<![CDATA[ >= ]]>
STR_TO_DATE(left(concat(#{dateTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
AND createTime
<![CDATA[ <= ]]>
STR_TO_DATE(left(concat(#{dateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
) AS a
</select>
</mapper>
\ No newline at end of file
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