Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
youjj
cloud-platform
Commits
2152ccbd
Commit
2152ccbd
authored
Aug 12, 2019
by
libin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户行为日志实体相关
parent
f7e890d2
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
262 additions
and
0 deletions
+262
-0
pom.xml
xx-user-behavior-collect/xx-user-behavior-api/pom.xml
+7
-0
CustomerBehaviorNoteDTO.java
...c/platform/user/behavior/dto/CustomerBehaviorNoteDTO.java
+39
-0
CustomerBehaviorNotes.java
.../platform/user/behavior/entity/CustomerBehaviorNotes.java
+68
-0
pom.xml
xx-user-behavior-collect/xx-user-behavior-server/pom.xml
+5
-0
CustomerBehaviorNotesBiz.java
.../platform/user/behavior/biz/CustomerBehaviorNotesBiz.java
+18
-0
SwaggerConfig.java
...com/xxfc/platform/user/behavior/config/SwaggerConfig.java
+59
-0
WebConfiguration.java
.../xxfc/platform/user/behavior/config/WebConfiguration.java
+17
-0
CustomerBehaviorNotesMapper.java
...orm/user/behavior/mapper/CustomerBehaviorNotesMapper.java
+15
-0
CustomerBehaviorNotesController.java
...m/user/behavior/rest/CustomerBehaviorNotesController.java
+19
-0
CustomerBehaviorNotesMapper.xml
...src/main/resources/mapper/CustomerBehaviorNotesMapper.xml
+15
-0
No files found.
xx-user-behavior-collect/xx-user-behavior-api/pom.xml
View file @
2152ccbd
...
...
@@ -9,4 +9,11 @@
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
xx-user-behavior-api
</artifactId>
<dependencies>
<dependency>
<groupId>
com.xxfc.common
</groupId>
<artifactId>
xx-common-platform
</artifactId>
<version>
2.0-SNAPSHOT
</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
xx-user-behavior-collect/xx-user-behavior-api/src/main/java/com/xxfc/platform/user/behavior/dto/CustomerBehaviorNoteDTO.java
0 → 100644
View file @
2152ccbd
package
com
.
xxfc
.
platform
.
user
.
behavior
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @author libin
* @version 1.0
* @description
* @data 2019/8/12 14:13
*/
@Data
public
class
CustomerBehaviorNoteDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
"主键id"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"用户id"
)
private
String
customerId
;
@ApiModelProperty
(
value
=
"1-游客;2-用户"
)
private
Integer
customerType
;
/**
* 行为类型(见枚举)
*/
@ApiModelProperty
(
value
=
"行为类型(见枚举)"
)
private
Integer
type
;
@ApiModelProperty
(
value
=
"类型id"
)
private
Integer
typeId
;
}
xx-user-behavior-collect/xx-user-behavior-api/src/main/java/com/xxfc/platform/user/behavior/entity/CustomerBehaviorNotes.java
0 → 100644
View file @
2152ccbd
package
com
.
xxfc
.
platform
.
user
.
behavior
.
entity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
java.io.Serializable
;
/**
* 用户行为记录表
*
* @author libin
* @email 18178966185@163.com
* @date 2019-08-12 14:03:55
*/
@Data
@Table
(
name
=
"customer_behavior_notes"
)
public
class
CustomerBehaviorNotes
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键id
*/
@Id
@GeneratedValue
(
generator
=
"JDBC"
)
@ApiModelProperty
(
"主键id"
)
private
Integer
id
;
/**
* 用户id
*/
@Column
(
name
=
"customer_id"
)
@ApiModelProperty
(
value
=
"用户id"
)
private
String
customerId
;
/**
* 1-游客;2-用户
*/
@Column
(
name
=
"customer_type"
)
@ApiModelProperty
(
value
=
"1-游客;2-用户"
)
private
Integer
customerType
;
/**
* 行为类型(见枚举)
*/
@Column
(
name
=
"type"
)
@ApiModelProperty
(
value
=
"行为类型(见枚举)"
)
private
Integer
type
;
/**
* 类型id
*/
@Column
(
name
=
"type_id"
)
@ApiModelProperty
(
value
=
"类型id"
)
private
Integer
typeId
;
/**
* 创建时间
*/
@Column
(
name
=
"crt_time"
)
@ApiModelProperty
(
value
=
"创建时间"
,
hidden
=
true
)
private
Long
crtTime
;
}
xx-user-behavior-collect/xx-user-behavior-server/pom.xml
View file @
2152ccbd
...
...
@@ -20,5 +20,10 @@
<artifactId>
ace-admin-api
</artifactId>
<version>
2.0-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
com.github.wxiaoqi
</groupId>
<artifactId>
xx-user-behavior-api
</artifactId>
<version>
2.0-SNAPSHOT
</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
xx-user-behavior-collect/xx-user-behavior-server/src/main/java/com/xxfc/platform/user/behavior/biz/CustomerBehaviorNotesBiz.java
0 → 100644
View file @
2152ccbd
package
com
.
xxfc
.
platform
.
user
.
behavior
.
biz
;
import
org.springframework.stereotype.Service
;
import
com.xxfc.platform.user.behavior.entity.CustomerBehaviorNotes
;
import
com.xxfc.platform.user.behavior.mapper.CustomerBehaviorNotesMapper
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
/**
* 用户行为记录表
*
* @author libin
* @email 18178966185@163.com
* @date 2019-08-12 14:03:55
*/
@Service
public
class
CustomerBehaviorNotesBiz
extends
BaseBiz
<
CustomerBehaviorNotesMapper
,
CustomerBehaviorNotes
>
{
}
\ No newline at end of file
xx-user-behavior-collect/xx-user-behavior-server/src/main/java/com/xxfc/platform/user/behavior/config/SwaggerConfig.java
0 → 100644
View file @
2152ccbd
package
com
.
xxfc
.
platform
.
user
.
behavior
.
config
;
import
io.swagger.annotations.Api
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
springfox.documentation.builders.ApiInfoBuilder
;
import
springfox.documentation.builders.ParameterBuilder
;
import
springfox.documentation.builders.RequestHandlerSelectors
;
import
springfox.documentation.schema.ModelRef
;
import
springfox.documentation.service.ApiInfo
;
import
springfox.documentation.service.Parameter
;
import
springfox.documentation.spi.DocumentationType
;
import
springfox.documentation.spring.web.plugins.Docket
;
import
springfox.documentation.swagger2.annotations.EnableSwagger2
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* @Description : swagger配置配置
* @Author : Mars
* @Date : 2017年9月6日
*/
@Configuration
@EnableSwagger2
public
class
SwaggerConfig
{
/**
* Every Docket bean is picked up by the swagger-mvc framework - allowing for multiple
* swagger groups i.e. same code base multiple swagger resource listings.
*/
@Bean
public
Docket
customDocket
()
{
ParameterBuilder
ticketPar
=
new
ParameterBuilder
();
List
<
Parameter
>
pars
=
new
ArrayList
<
Parameter
>();
ticketPar
.
name
(
"Authorization"
).
description
(
"user Authorization"
)
.
modelRef
(
new
ModelRef
(
"string"
)).
parameterType
(
"header"
)
//header中的ticket参数非必填,传空也可以
.
required
(
false
).
build
();
//根据每个方法名也知道当前方法在设置什么参数
pars
.
add
(
ticketPar
.
build
());
return
new
Docket
(
DocumentationType
.
SWAGGER_2
)
.
select
()
.
apis
(
RequestHandlerSelectors
.
basePackage
(
"com.xxfc.platform.activity.rest"
))
//.apis(RequestHandlerSelectors.any())
.
build
()
.
globalOperationParameters
(
pars
)
.
apiInfo
(
apiInfo
());
}
ApiInfo
apiInfo
()
{
return
new
ApiInfoBuilder
()
.
title
(
"api swagger document"
)
.
description
(
"前后端联调swagger api 文档"
)
.
version
(
"2.1.5.5"
)
.
build
();
}
}
\ No newline at end of file
xx-user-behavior-collect/xx-user-behavior-server/src/main/java/com/xxfc/platform/user/behavior/config/WebConfiguration.java
0 → 100644
View file @
2152ccbd
package
com
.
xxfc
.
platform
.
user
.
behavior
.
config
;
import
com.github.wxiaoqi.security.common.handler.GlobalExceptionHandler
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Primary
;
import
org.springframework.web.servlet.config.annotation.WebMvcConfigurer
;
@Configuration
(
"campsiteWebConfig"
)
@Primary
public
class
WebConfiguration
implements
WebMvcConfigurer
{
@Bean
GlobalExceptionHandler
getGlobalExceptionHandler
()
{
return
new
GlobalExceptionHandler
();
}
}
xx-user-behavior-collect/xx-user-behavior-server/src/main/java/com/xxfc/platform/user/behavior/mapper/CustomerBehaviorNotesMapper.java
0 → 100644
View file @
2152ccbd
package
com
.
xxfc
.
platform
.
user
.
behavior
.
mapper
;
import
com.xxfc.platform.user.behavior.entity.CustomerBehaviorNotes
;
import
tk.mybatis.mapper.common.Mapper
;
/**
* 用户行为记录表
*
* @author libin
* @email 18178966185@163.com
* @date 2019-08-12 14:03:55
*/
public
interface
CustomerBehaviorNotesMapper
extends
Mapper
<
CustomerBehaviorNotes
>
{
}
xx-user-behavior-collect/xx-user-behavior-server/src/main/java/com/xxfc/platform/user/behavior/rest/CustomerBehaviorNotesController.java
0 → 100644
View file @
2152ccbd
package
com
.
xxfc
.
platform
.
user
.
behavior
.
rest
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.xxfc.platform.user.behavior.biz.CustomerBehaviorNotesBiz
;
import
com.xxfc.platform.user.behavior.entity.CustomerBehaviorNotes
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* @author libin
* @version 1.0
* @description
* @data 2019/8/12 14:14
*/
@RestController
@RequestMapping
(
"customerBehaviorNotes"
)
public
class
CustomerBehaviorNotesController
extends
BaseController
<
CustomerBehaviorNotesBiz
,
CustomerBehaviorNotes
>
{
}
\ No newline at end of file
xx-user-behavior-collect/xx-user-behavior-server/src/main/resources/mapper/CustomerBehaviorNotesMapper.xml
0 → 100644
View file @
2152ccbd
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.xxfc.platform.user.behavior.mapper.CustomerBehaviorNotesMapper"
>
<!-- 可根据自己的需求,是否要使用 -->
<resultMap
type=
"com.xxfc.platform.user.behavior.entity.CustomerBehaviorNotes"
id=
"customerBehaviorNotesMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"customerId"
column=
"customer_id"
/>
<result
property=
"customerType"
column=
"customer_type"
/>
<result
property=
"type"
column=
"type"
/>
<result
property=
"typeId"
column=
"type_id"
/>
<result
property=
"crtTime"
column=
"crt_time"
/>
</resultMap>
</mapper>
\ No newline at end of file
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