Commit cf2fffd0 authored by 廖旭伟's avatar 廖旭伟

用户行为分析客户埋点接口

parent 62e742d1
......@@ -4610,6 +4610,108 @@ msg|String|消息|-
```
## 用户行为分析
### 客户端埋点
**请求URL:** page/bury/save
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 保存或更新页面事件记录:id为空时为新增保存,否则为更新提交
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:-------
productId|Long|否|产品id
productName|String|否|产品名称
pageCode|String|否|页面编码(页面路由)
pageName|String|否|页面名称
sceneDepth|Integer|否|场景维度
depthValue|Integer|否|本次访问深度
eventInfo|object|否|页面事件信息
 businessCode|String|否|业务场景编码
 businessName|String|否|业务场景名称
 eventCode|String|否|事件编码
 eventName|String|否|事件名称
 takeTime|Integer|否|事件耗时(单位毫秒)
 coordinate|String|否|事件坐标(x,y)
routeInfo|object|否|页面路由信息
 sourceCode|String|否|开始页面编码(路由)
 sourceName|String|否|开始页面名称
 targetCode|String|否|目标页面编码(路由)
 targetName|String|否|目标页面名称
**请求样例:**
```
{
"productId": 7146,
"productName": "5x2mfa",
"pageCode": "gy92kw",
"pageName": "yxjkem",
"sceneDepth": 1,
"depthValue": 1,
"eventInfo": {
"businessCode": "hq6abb",
"businessName": "8996vc",
"eventCode": "u9xo59",
"eventName": "ku7l71",
"takeTime": 12345,
"coordinate": "12,13"
},
"routeInfo": {
"sourceCode": "6mq7ry",
"sourceName": "fxb3mk",
"targetCode": "fzrr3u",
"targetName": "fzrr3u"
}
}
```
**响应参数:**
参数名称 |参数类型|描述
:---|:---|:------
code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
 productId|Long|产品id
 productName|String|产品名称
 pageCode|String|页面编码(页面路由)
 pageName|String|页面名称
 sceneDepth|Integer|场景维度
 depthValue|Integer|本次访问深度
 eventInfo|object|页面事件信息
  businessCode|String|业务场景编码
  businessName|String|业务场景名称
  eventCode|String|事件编码
  eventName|String|事件名称
  takeTime|Integer|事件耗时(单位毫秒)
  coordinate|String|事件坐标(x,y)
 routeInfo|object|页面路由信息
  sourceCode|String|开始页面编码(路由)
  sourceName|String|开始页面名称
  targetCode|String|目标页面编码(路由)
  targetName|String|目标页面名称
**响应消息样例:**
```
{
"msg":"新增模块成功",
"code":1,
"data":{}
}
}
```
## 字典附录
### userType
字典参数key|字典参数值|其它
......
package com.mortals.xhx.module.page.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.page.model.PageAccessEntity;
import java.util.List;
/**
* 产品页面配置Dao
* 产品页面配置 DAO接口
*
* @author zxfei
* @date 2023-04-10
*/
public interface PageAccessDao extends ICRUDDao<PageAccessEntity,Long>{
}
package com.mortals.xhx.module.page.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.page.model.PageAccessDepthEntity;
import java.util.List;
/**
* 产品页面配置Dao
* 产品页面配置 DAO接口
*
* @author zxfei
* @date 2023-04-10
*/
public interface PageAccessDepthDao extends ICRUDDao<PageAccessDepthEntity,Long>{
}
package com.mortals.xhx.module.page.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.page.model.PageEventEntity;
import java.util.List;
/**
* 页面事件记录Dao
* 页面事件记录 DAO接口
*
* @author zxfei
* @date 2023-04-10
*/
public interface PageEventDao extends ICRUDDao<PageEventEntity,Long>{
}
package com.mortals.xhx.module.page.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.page.model.PageInfoEntity;
import java.util.List;
/**
* 产品页面配置Dao
* 产品页面配置 DAO接口
*
* @author zxfei
* @date 2023-04-10
*/
public interface PageInfoDao extends ICRUDDao<PageInfoEntity,Long>{
}
package com.mortals.xhx.module.page.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.page.model.PageRouteEntity;
import java.util.List;
/**
* 页面路径记录Dao
* 页面路径记录 DAO接口
*
* @author zxfei
* @date 2023-04-10
*/
public interface PageRouteDao extends ICRUDDao<PageRouteEntity,Long>{
}
package com.mortals.xhx.module.page.dao.ibatis;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.page.dao.PageAccessDao;
import com.mortals.xhx.module.page.model.PageAccessEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/**
* 产品页面配置DaoImpl DAO接口
*
* @author zxfei
* @date 2023-04-10
*/
@Repository("pageAccessDao")
public class PageAccessDaoImpl extends BaseCRUDDaoMybatis<PageAccessEntity,Long> implements PageAccessDao {
}
package com.mortals.xhx.module.page.dao.ibatis;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.page.dao.PageAccessDepthDao;
import com.mortals.xhx.module.page.model.PageAccessDepthEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/**
* 产品页面配置DaoImpl DAO接口
*
* @author zxfei
* @date 2023-04-10
*/
@Repository("pageAccessDepthDao")
public class PageAccessDepthDaoImpl extends BaseCRUDDaoMybatis<PageAccessDepthEntity,Long> implements PageAccessDepthDao {
}
package com.mortals.xhx.module.page.dao.ibatis;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.page.dao.PageEventDao;
import com.mortals.xhx.module.page.model.PageEventEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/**
* 页面事件记录DaoImpl DAO接口
*
* @author zxfei
* @date 2023-04-10
*/
@Repository("pageEventDao")
public class PageEventDaoImpl extends BaseCRUDDaoMybatis<PageEventEntity,Long> implements PageEventDao {
}
package com.mortals.xhx.module.page.dao.ibatis;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.page.dao.PageInfoDao;
import com.mortals.xhx.module.page.model.PageInfoEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/**
* 产品页面配置DaoImpl DAO接口
*
* @author zxfei
* @date 2023-04-10
*/
@Repository("pageInfoDao")
public class PageInfoDaoImpl extends BaseCRUDDaoMybatis<PageInfoEntity,Long> implements PageInfoDao {
}
package com.mortals.xhx.module.page.dao.ibatis;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.page.dao.PageRouteDao;
import com.mortals.xhx.module.page.model.PageRouteEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/**
* 页面路径记录DaoImpl DAO接口
*
* @author zxfei
* @date 2023-04-10
*/
@Repository("pageRouteDao")
public class PageRouteDaoImpl extends BaseCRUDDaoMybatis<PageRouteEntity,Long> implements PageRouteDao {
}
package com.mortals.xhx.module.page.model;
import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.page.model.vo.PageAccessDepthVo;
/**
* 产品页面配置实体对象
*
* @author zxfei
* @date 2023-04-10
*/
public class PageAccessDepthEntity extends PageAccessDepthVo {
private static final long serialVersionUID = 1L;
/**
* 产品id
*/
private Long productId;
/**
* 产品名称
*/
private String productName;
/**
* 页面编码(页面路由)
*/
private String pageCode;
/**
* 页面名称
*/
private String pageName;
/**
* 本次访问深度
*/
private Integer depthValue;
public PageAccessDepthEntity(){}
/**
* 获取 产品id
* @return Long
*/
public Long getProductId(){
return productId;
}
/**
* 设置 产品id
* @param productId
*/
public void setProductId(Long productId){
this.productId = productId;
}
/**
* 获取 产品名称
* @return String
*/
public String getProductName(){
return productName;
}
/**
* 设置 产品名称
* @param productName
*/
public void setProductName(String productName){
this.productName = productName;
}
/**
* 获取 页面编码(页面路由)
* @return String
*/
public String getPageCode(){
return pageCode;
}
/**
* 设置 页面编码(页面路由)
* @param pageCode
*/
public void setPageCode(String pageCode){
this.pageCode = pageCode;
}
/**
* 获取 页面名称
* @return String
*/
public String getPageName(){
return pageName;
}
/**
* 设置 页面名称
* @param pageName
*/
public void setPageName(String pageName){
this.pageName = pageName;
}
/**
* 获取 本次访问深度
* @return String
*/
public Integer getDepthValue(){
return depthValue;
}
/**
* 设置 本次访问深度
* @param depthValue
*/
public void setDepthValue(Integer depthValue){
this.depthValue = depthValue;
}
@Override
public int hashCode() {
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj == null) return false;
if (obj instanceof PageAccessDepthEntity) {
PageAccessDepthEntity tmp = (PageAccessDepthEntity) obj;
if (this.getId() == tmp.getId()) {
return true;
}
}
return false;
}
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",productId:").append(getProductId());
sb.append(",productName:").append(getProductName());
sb.append(",pageCode:").append(getPageCode());
sb.append(",pageName:").append(getPageName());
sb.append(",depthValue:").append(getDepthValue());
return sb.toString();
}
public void initAttrValue(){
this.productId = null;
this.productName = "";
this.pageCode = "";
this.pageName = "";
this.depthValue = null;
}
}
\ No newline at end of file
package com.mortals.xhx.module.page.model;
import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.page.model.vo.PageAccessVo;
/**
* 产品页面配置实体对象
*
* @author zxfei
* @date 2023-04-10
*/
public class PageAccessEntity extends PageAccessVo {
private static final long serialVersionUID = 1L;
/**
* 产品id
*/
private Long productId;
/**
* 产品名称
*/
private String productName;
/**
* 页面编码(页面路由)
*/
private String pageCode;
/**
* 页面名称
*/
private String pageName;
/**
* 场景维度
*/
private Integer sceneDepth;
public PageAccessEntity(){}
/**
* 获取 产品id
* @return Long
*/
public Long getProductId(){
return productId;
}
/**
* 设置 产品id
* @param productId
*/
public void setProductId(Long productId){
this.productId = productId;
}
/**
* 获取 产品名称
* @return String
*/
public String getProductName(){
return productName;
}
/**
* 设置 产品名称
* @param productName
*/
public void setProductName(String productName){
this.productName = productName;
}
/**
* 获取 页面编码(页面路由)
* @return String
*/
public String getPageCode(){
return pageCode;
}
/**
* 设置 页面编码(页面路由)
* @param pageCode
*/
public void setPageCode(String pageCode){
this.pageCode = pageCode;
}
/**
* 获取 页面名称
* @return String
*/
public String getPageName(){
return pageName;
}
/**
* 设置 页面名称
* @param pageName
*/
public void setPageName(String pageName){
this.pageName = pageName;
}
/**
* 获取 场景维度
* @return Integer
*/
public Integer getSceneDepth(){
return sceneDepth;
}
/**
* 设置 场景维度
* @param sceneDepth
*/
public void setSceneDepth(Integer sceneDepth){
this.sceneDepth = sceneDepth;
}
@Override
public int hashCode() {
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj == null) return false;
if (obj instanceof PageAccessEntity) {
PageAccessEntity tmp = (PageAccessEntity) obj;
if (this.getId() == tmp.getId()) {
return true;
}
}
return false;
}
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",productId:").append(getProductId());
sb.append(",productName:").append(getProductName());
sb.append(",pageCode:").append(getPageCode());
sb.append(",pageName:").append(getPageName());
sb.append(",sceneDepth:").append(getSceneDepth());
return sb.toString();
}
public void initAttrValue(){
this.productId = null;
this.productName = "";
this.pageCode = "";
this.pageName = "";
this.sceneDepth = 0;
}
}
\ No newline at end of file
package com.mortals.xhx.module.page.model;
import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.page.model.vo.PageEventVo;
/**
* 页面事件记录实体对象
*
* @author zxfei
* @date 2023-04-10
*/
public class PageEventEntity extends PageEventVo {
private static final long serialVersionUID = 1L;
/**
* 产品id
*/
private Long productId;
/**
* 产品名称
*/
private String productName;
/**
* 业务场景编码
*/
private String businessCode;
/**
* 业务场景名称
*/
private String businessName;
/**
* 事件编码
*/
private String eventCode;
/**
* 事件名称
*/
private String eventName;
/**
* 事件耗时(单位毫秒)
*/
private Integer takeTime;
/**
* 页面编码(页面路由)
*/
private String pageCode;
/**
* 页面名称
*/
private String pageName;
/**
* 事件坐标(x,y)
*/
private String coordinate;
public PageEventEntity(){}
/**
* 获取 产品id
* @return Long
*/
public Long getProductId(){
return productId;
}
/**
* 设置 产品id
* @param productId
*/
public void setProductId(Long productId){
this.productId = productId;
}
/**
* 获取 产品名称
* @return String
*/
public String getProductName(){
return productName;
}
/**
* 设置 产品名称
* @param productName
*/
public void setProductName(String productName){
this.productName = productName;
}
/**
* 获取 业务场景编码
* @return String
*/
public String getBusinessCode(){
return businessCode;
}
/**
* 设置 业务场景编码
* @param businessCode
*/
public void setBusinessCode(String businessCode){
this.businessCode = businessCode;
}
/**
* 获取 业务场景名称
* @return String
*/
public String getBusinessName(){
return businessName;
}
/**
* 设置 业务场景名称
* @param businessName
*/
public void setBusinessName(String businessName){
this.businessName = businessName;
}
/**
* 获取 事件编码
* @return String
*/
public String getEventCode(){
return eventCode;
}
/**
* 设置 事件编码
* @param eventCode
*/
public void setEventCode(String eventCode){
this.eventCode = eventCode;
}
/**
* 获取 事件名称
* @return String
*/
public String getEventName(){
return eventName;
}
/**
* 设置 事件名称
* @param eventName
*/
public void setEventName(String eventName){
this.eventName = eventName;
}
/**
* 获取 事件耗时(单位毫秒)
* @return Integer
*/
public Integer getTakeTime(){
return takeTime;
}
/**
* 设置 事件耗时(单位毫秒)
* @param takeTime
*/
public void setTakeTime(Integer takeTime){
this.takeTime = takeTime;
}
/**
* 获取 页面编码(页面路由)
* @return String
*/
public String getPageCode(){
return pageCode;
}
/**
* 设置 页面编码(页面路由)
* @param pageCode
*/
public void setPageCode(String pageCode){
this.pageCode = pageCode;
}
/**
* 获取 页面名称
* @return String
*/
public String getPageName(){
return pageName;
}
/**
* 设置 页面名称
* @param pageName
*/
public void setPageName(String pageName){
this.pageName = pageName;
}
/**
* 获取 事件坐标(x,y)
* @return String
*/
public String getCoordinate(){
return coordinate;
}
/**
* 设置 事件坐标(x,y)
* @param coordinate
*/
public void setCoordinate(String coordinate){
this.coordinate = coordinate;
}
@Override
public int hashCode() {
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj == null) return false;
if (obj instanceof PageEventEntity) {
PageEventEntity tmp = (PageEventEntity) obj;
if (this.getId() == tmp.getId()) {
return true;
}
}
return false;
}
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",productId:").append(getProductId());
sb.append(",productName:").append(getProductName());
sb.append(",businessCode:").append(getBusinessCode());
sb.append(",businessName:").append(getBusinessName());
sb.append(",eventCode:").append(getEventCode());
sb.append(",eventName:").append(getEventName());
sb.append(",takeTime:").append(getTakeTime());
sb.append(",pageCode:").append(getPageCode());
sb.append(",pageName:").append(getPageName());
sb.append(",coordinate:").append(getCoordinate());
return sb.toString();
}
public void initAttrValue(){
this.productId = null;
this.productName = "";
this.businessCode = "";
this.businessName = "";
this.eventCode = "";
this.eventName = "";
this.takeTime = null;
this.pageCode = "";
this.pageName = "";
this.coordinate = "";
}
}
\ No newline at end of file
package com.mortals.xhx.module.page.model;
import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.page.model.vo.PageInfoVo;
/**
* 产品页面配置实体对象
*
* @author zxfei
* @date 2023-04-10
*/
public class PageInfoEntity extends PageInfoVo {
private static final long serialVersionUID = 1L;
/**
* 产品id
*/
private Long productId;
/**
* 产品名称
*/
private String productName;
/**
* 页面编码(页面路由)
*/
private String pageCode;
/**
* 页面名称
*/
private String pageName;
/**
* 页面截图地址
*/
private String screenUrl;
public PageInfoEntity(){}
/**
* 获取 产品id
* @return Long
*/
public Long getProductId(){
return productId;
}
/**
* 设置 产品id
* @param productId
*/
public void setProductId(Long productId){
this.productId = productId;
}
/**
* 获取 产品名称
* @return String
*/
public String getProductName(){
return productName;
}
/**
* 设置 产品名称
* @param productName
*/
public void setProductName(String productName){
this.productName = productName;
}
/**
* 获取 页面编码(页面路由)
* @return String
*/
public String getPageCode(){
return pageCode;
}
/**
* 设置 页面编码(页面路由)
* @param pageCode
*/
public void setPageCode(String pageCode){
this.pageCode = pageCode;
}
/**
* 获取 页面名称
* @return String
*/
public String getPageName(){
return pageName;
}
/**
* 设置 页面名称
* @param pageName
*/
public void setPageName(String pageName){
this.pageName = pageName;
}
/**
* 获取 页面截图地址
* @return String
*/
public String getScreenUrl(){
return screenUrl;
}
/**
* 设置 页面截图地址
* @param screenUrl
*/
public void setScreenUrl(String screenUrl){
this.screenUrl = screenUrl;
}
@Override
public int hashCode() {
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj == null) return false;
if (obj instanceof PageInfoEntity) {
PageInfoEntity tmp = (PageInfoEntity) obj;
if (this.getId() == tmp.getId()) {
return true;
}
}
return false;
}
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",productId:").append(getProductId());
sb.append(",productName:").append(getProductName());
sb.append(",pageCode:").append(getPageCode());
sb.append(",pageName:").append(getPageName());
sb.append(",screenUrl:").append(getScreenUrl());
return sb.toString();
}
public void initAttrValue(){
this.productId = null;
this.productName = "";
this.pageCode = "";
this.pageName = "";
this.screenUrl = "";
}
}
\ No newline at end of file
package com.mortals.xhx.module.page.model;
import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.page.model.vo.PageRouteVo;
/**
* 页面路径记录实体对象
*
* @author zxfei
* @date 2023-04-10
*/
public class PageRouteEntity extends PageRouteVo {
private static final long serialVersionUID = 1L;
/**
* 产品id
*/
private Long productId;
/**
* 产品名称
*/
private String productName;
/**
* 开始页面编码(路由)
*/
private String sourceCode;
/**
* 开始页面名称
*/
private String sourceName;
/**
* 目标页面编码(路由)
*/
private String targetCode;
/**
* 目标页面名称
*/
private String targetName;
public PageRouteEntity(){}
/**
* 获取 产品id
* @return Long
*/
public Long getProductId(){
return productId;
}
/**
* 设置 产品id
* @param productId
*/
public void setProductId(Long productId){
this.productId = productId;
}
/**
* 获取 产品名称
* @return String
*/
public String getProductName(){
return productName;
}
/**
* 设置 产品名称
* @param productName
*/
public void setProductName(String productName){
this.productName = productName;
}
/**
* 获取 开始页面编码(路由)
* @return String
*/
public String getSourceCode(){
return sourceCode;
}
/**
* 设置 开始页面编码(路由)
* @param sourceCode
*/
public void setSourceCode(String sourceCode){
this.sourceCode = sourceCode;
}
/**
* 获取 开始页面名称
* @return String
*/
public String getSourceName(){
return sourceName;
}
/**
* 设置 开始页面名称
* @param sourceName
*/
public void setSourceName(String sourceName){
this.sourceName = sourceName;
}
/**
* 获取 目标页面编码(路由)
* @return String
*/
public String getTargetCode(){
return targetCode;
}
/**
* 设置 目标页面编码(路由)
* @param targetCode
*/
public void setTargetCode(String targetCode){
this.targetCode = targetCode;
}
/**
* 获取 目标页面名称
* @return Integer
*/
public String getTargetName(){
return targetName;
}
/**
* 设置 目标页面名称
* @param targetName
*/
public void setTargetName(String targetName){
this.targetName = targetName;
}
@Override
public int hashCode() {
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj == null) return false;
if (obj instanceof PageRouteEntity) {
PageRouteEntity tmp = (PageRouteEntity) obj;
if (this.getId() == tmp.getId()) {
return true;
}
}
return false;
}
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",productId:").append(getProductId());
sb.append(",productName:").append(getProductName());
sb.append(",sourceCode:").append(getSourceCode());
sb.append(",sourceName:").append(getSourceName());
sb.append(",targetCode:").append(getTargetCode());
sb.append(",targetName:").append(getTargetName());
return sb.toString();
}
public void initAttrValue(){
this.productId = null;
this.productName = "";
this.sourceCode = "";
this.sourceName = "";
this.targetCode = "";
this.targetName = "";
}
}
\ No newline at end of file
package com.mortals.xhx.module.page.model.pdu;
import com.mortals.xhx.module.page.model.PageAccessDepthEntity;
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;
/***
* 页面数据埋点信息
*/
@Data
public class BuryPointPdu {
/*** 产品id */
private Long productId;
/*** 产品名称 */
private String productName;
/*** 页面编码(页面路由) */
private String pageCode;
/** 页面名称 */
private String pageName;
/*** 场景维度 */
private Integer sceneDepth;
/*** 本次访问深度 */
private Integer depthValue;
/** 产品页面访问深度 **/
private PageEventEntity eventInfo;
/** 产品页面访问深度 **/
private PageRouteEntity routeInfo;
}
package com.mortals.xhx.module.page.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.page.model.PageAccessDepthEntity;
import java.util.ArrayList;
import java.util.List;
/**
* 产品页面配置视图对象
*
* @author zxfei
* @date 2023-04-10
*/
public class PageAccessDepthVo extends BaseEntityLong {
}
\ No newline at end of file
package com.mortals.xhx.module.page.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.page.model.PageAccessEntity;
import java.util.ArrayList;
import java.util.List;
/**
* 产品页面配置视图对象
*
* @author zxfei
* @date 2023-04-10
*/
public class PageAccessVo extends BaseEntityLong {
}
\ No newline at end of file
package com.mortals.xhx.module.page.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.page.model.PageEventEntity;
import java.util.ArrayList;
import java.util.List;
/**
* 页面事件记录视图对象
*
* @author zxfei
* @date 2023-04-10
*/
public class PageEventVo extends BaseEntityLong {
}
\ No newline at end of file
package com.mortals.xhx.module.page.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.page.model.PageInfoEntity;
import java.util.ArrayList;
import java.util.List;
/**
* 产品页面配置视图对象
*
* @author zxfei
* @date 2023-04-10
*/
public class PageInfoVo extends BaseEntityLong {
}
\ No newline at end of file
package com.mortals.xhx.module.page.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.page.model.PageRouteEntity;
import java.util.ArrayList;
import java.util.List;
/**
* 页面路径记录视图对象
*
* @author zxfei
* @date 2023-04-10
*/
public class PageRouteVo extends BaseEntityLong {
}
\ No newline at end of file
package com.mortals.xhx.module.page.service;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.page.model.PageAccessDepthEntity;
import com.mortals.xhx.module.page.model.pdu.BuryPointPdu;
/**
* PageAccessDepthService
*
* 产品页面配置 service接口
*
* @author zxfei
* @date 2023-04-10
*/
public interface PageAccessDepthService extends ICRUDService<PageAccessDepthEntity,Long>{
PageAccessDepthEntity saveByPdu(BuryPointPdu pdu);
}
\ No newline at end of file
package com.mortals.xhx.module.page.service;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.page.model.PageAccessEntity;
import com.mortals.xhx.module.page.model.pdu.BuryPointPdu;
/**
* PageAccessService
*
* 产品页面配置 service接口
*
* @author zxfei
* @date 2023-04-10
*/
public interface PageAccessService extends ICRUDService<PageAccessEntity,Long>{
PageAccessEntity saveByPdu(BuryPointPdu pdu);
}
\ No newline at end of file
package com.mortals.xhx.module.page.service;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.page.model.PageEventEntity;
import com.mortals.xhx.module.page.model.pdu.BuryPointPdu;
/**
* PageEventService
*
* 页面事件记录 service接口
*
* @author zxfei
* @date 2023-04-10
*/
public interface PageEventService extends ICRUDService<PageEventEntity,Long>{
PageEventEntity saveByPdu(BuryPointPdu pdu);
}
\ No newline at end of file
package com.mortals.xhx.module.page.service;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.page.model.PageInfoEntity;
/**
* PageInfoService
*
* 产品页面配置 service接口
*
* @author zxfei
* @date 2023-04-10
*/
public interface PageInfoService extends ICRUDService<PageInfoEntity,Long>{
}
\ No newline at end of file
package com.mortals.xhx.module.page.service;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.page.model.PageRouteEntity;
import com.mortals.xhx.module.page.model.pdu.BuryPointPdu;
/**
* PageRouteService
*
* 页面路径记录 service接口
*
* @author zxfei
* @date 2023-04-10
*/
public interface PageRouteService extends ICRUDService<PageRouteEntity,Long>{
PageRouteEntity saveByPdu(BuryPointPdu pdu);
}
\ No newline at end of file
package com.mortals.xhx.module.page.service.impl;
import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.module.page.model.pdu.BuryPointPdu;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.xhx.module.page.dao.PageAccessDepthDao;
import com.mortals.xhx.module.page.model.PageAccessDepthEntity;
import com.mortals.xhx.module.page.service.PageAccessDepthService;
import java.util.Date;
/**
* PageAccessDepthService
* 产品页面配置 service实现
*
* @author zxfei
* @date 2023-04-10
*/
@Service("pageAccessDepthService")
public class PageAccessDepthServiceImpl extends AbstractCRUDServiceImpl<PageAccessDepthDao, PageAccessDepthEntity, Long> implements PageAccessDepthService {
@Override
protected void validData(PageAccessDepthEntity entity, Context context) throws AppException {
if(StringUtils.isEmpty(entity.getPageCode())){
throw new AppException("页面编码(路由)不能为空");
}
if(StringUtils.isEmpty(entity.getPageName())){
throw new AppException("页面名称不能为空");
}
}
@Override
public PageAccessDepthEntity saveByPdu(BuryPointPdu pdu) {
if(pdu.getDepthValue()==null){
return null;
}
PageAccessDepthEntity entity = new PageAccessDepthEntity();
entity.setProductId(pdu.getProductId());
entity.setProductName(pdu.getProductName());
entity.setPageCode(pdu.getPageCode());
entity.setPageName(pdu.getPageName());
entity.setDepthValue(pdu.getDepthValue());
entity.setCreateTime(new Date());
return this.save(entity);
}
}
\ No newline at end of file
package com.mortals.xhx.module.page.service.impl;
import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.module.page.model.pdu.BuryPointPdu;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.xhx.module.page.dao.PageAccessDao;
import com.mortals.xhx.module.page.model.PageAccessEntity;
import com.mortals.xhx.module.page.service.PageAccessService;
import java.util.Date;
/**
* PageAccessService
* 产品页面配置 service实现
*
* @author zxfei
* @date 2023-04-10
*/
@Service("pageAccessService")
public class PageAccessServiceImpl extends AbstractCRUDServiceImpl<PageAccessDao, PageAccessEntity, Long> implements PageAccessService {
@Override
protected void validData(PageAccessEntity entity, Context context) throws AppException {
if(StringUtils.isEmpty(entity.getPageCode())){
throw new AppException("页面编码(路由)不能为空");
}
if(StringUtils.isEmpty(entity.getPageName())){
throw new AppException("页面名称不能为空");
}
}
@Override
public PageAccessEntity saveByPdu(BuryPointPdu pdu) {
if(pdu.getSceneDepth()==null){
return null;
}
PageAccessEntity entity = new PageAccessEntity();
entity.setProductId(pdu.getProductId());
entity.setProductName(pdu.getProductName());
entity.setPageCode(pdu.getPageCode());
entity.setPageName(pdu.getPageName());
entity.setSceneDepth(pdu.getSceneDepth());
entity.setCreateTime(new Date());
return this.save(entity);
}
}
\ No newline at end of file
package com.mortals.xhx.module.page.service.impl;
import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.module.page.model.pdu.BuryPointPdu;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.xhx.module.page.dao.PageEventDao;
import com.mortals.xhx.module.page.model.PageEventEntity;
import com.mortals.xhx.module.page.service.PageEventService;
import java.util.Date;
/**
* PageEventService
* 页面事件记录 service实现
*
* @author zxfei
* @date 2023-04-10
*/
@Service("pageEventService")
public class PageEventServiceImpl extends AbstractCRUDServiceImpl<PageEventDao, PageEventEntity, Long> implements PageEventService {
@Override
protected void validData(PageEventEntity entity, Context context) throws AppException {
if(StringUtils.isEmpty(entity.getPageCode())){
throw new AppException("页面编码(路由)不能为空");
}
if(StringUtils.isEmpty(entity.getPageName())){
throw new AppException("页面名称不能为空");
}
}
@Override
public PageEventEntity saveByPdu(BuryPointPdu pdu) {
if(pdu.getEventInfo()==null){
return null;
}
PageEventEntity entity = new PageEventEntity();
entity.setProductId(pdu.getProductId());
entity.setProductName(pdu.getProductName());
entity.setPageCode(pdu.getPageCode());
entity.setPageName(pdu.getPageName());
entity.setBusinessCode(pdu.getEventInfo().getBusinessCode());
entity.setBusinessName(pdu.getEventInfo().getBusinessName());
entity.setEventCode(pdu.getEventInfo().getEventCode());
entity.setEventName(pdu.getEventInfo().getEventName());
entity.setTakeTime(pdu.getEventInfo().getTakeTime());
entity.setCoordinate(pdu.getEventInfo().getCoordinate());
entity.setCreateTime(new Date());
return this.save(entity);
}
}
\ No newline at end of file
package com.mortals.xhx.module.page.service.impl;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.xhx.module.page.dao.PageInfoDao;
import com.mortals.xhx.module.page.model.PageInfoEntity;
import com.mortals.xhx.module.page.service.PageInfoService;
/**
* PageInfoService
* 产品页面配置 service实现
*
* @author zxfei
* @date 2023-04-10
*/
@Service("pageInfoService")
public class PageInfoServiceImpl extends AbstractCRUDServiceImpl<PageInfoDao, PageInfoEntity, Long> implements PageInfoService {
}
\ No newline at end of file
package com.mortals.xhx.module.page.service.impl;
import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.module.page.model.pdu.BuryPointPdu;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.xhx.module.page.dao.PageRouteDao;
import com.mortals.xhx.module.page.model.PageRouteEntity;
import com.mortals.xhx.module.page.service.PageRouteService;
import java.util.Date;
/**
* PageRouteService
* 页面路径记录 service实现
*
* @author zxfei
* @date 2023-04-10
*/
@Service("pageRouteService")
public class PageRouteServiceImpl extends AbstractCRUDServiceImpl<PageRouteDao, PageRouteEntity, Long> implements PageRouteService {
@Override
protected void validData(PageRouteEntity entity, Context context) throws AppException {
if(StringUtils.isEmpty(entity.getSourceCode())){
throw new AppException("开始页面编码(路由)不能为空");
}
if(StringUtils.isEmpty(entity.getSourceName())){
throw new AppException("开始页面名称不能为空");
}
if(StringUtils.isEmpty(entity.getTargetCode())){
throw new AppException("目标页面编码(路由)不能为空");
}
if(StringUtils.isEmpty(entity.getTargetName())){
throw new AppException("目标页面名称不能为空");
}
}
@Override
public PageRouteEntity saveByPdu(BuryPointPdu pdu) {
if(pdu.getRouteInfo()==null){
return null;
}
PageRouteEntity entity = new PageRouteEntity();
entity.setProductId(pdu.getProductId());
entity.setProductName(pdu.getProductName());
entity.setSourceCode(pdu.getRouteInfo().getSourceCode());
entity.setSourceName(pdu.getRouteInfo().getSourceName());
entity.setTargetCode(pdu.getRouteInfo().getTargetCode());
entity.setTargetName(pdu.getRouteInfo().getTargetName());
entity.setCreateTime(new Date());
return this.save(entity);
}
}
\ No newline at end of file
package com.mortals.xhx.module.page.web;
import com.mortals.framework.model.Context;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.module.page.model.PageAccessEntity;
import com.mortals.xhx.module.page.service.PageAccessService;
import com.mortals.xhx.module.param.service.ParamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Map;
/**
*
* 产品页面配置
*
* @author zxfei
* @date 2023-04-10
*/
@RestController
@RequestMapping("page/access")
public class PageAccessController extends BaseCRUDJsonBodyMappingController<PageAccessService,PageAccessEntity,Long> {
@Autowired
private ParamService paramService;
public PageAccessController(){
super.setModuleDesc( "产品页面配置");
}
@Override
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "pageCode", paramService.getParamBySecondOrganize("PageAccess","pageCode"));
super.init(model, context);
}
}
\ No newline at end of file
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