Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dj
/
rpc-dj-strategy
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 5dc2c8e7
authored
Jun 17, 2026
by
章家宝
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat:客户画像表初始化
1 parent
d927d2f7
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
332 additions
and
0 deletions
rpc-dj-strategy-api/src/main/java/cn/com/glsx/dj/strategy/dto/ArchiveCustomerProfileReqDTO.java
rpc-dj-strategy-api/src/main/java/cn/com/glsx/dj/strategy/dto/CustomerProfileRespDTO.java
rpc-dj-strategy-api/src/main/java/cn/com/glsx/dj/strategy/dto/ProfileQueryReqDTO.java
rpc-dj-strategy-api/src/main/java/cn/com/glsx/dj/strategy/model/CustomerTagProfile.java
rpc-dj-strategy-api/src/main/java/cn/com/glsx/dj/strategy/remote/CustomerTagProfileRemote.java
rpc-dj-strategy/src/main/java/cn/com/glsx/dj/strategy/mapper/CustomerTagProfileMapper.java
rpc-dj-strategy/src/main/java/cn/com/glsx/dj/strategy/service/CustomerTagProfileService.java
rpc-dj-strategy/src/main/resources/META-INF/orm/CustomerTagProfileMapper.xml
rpc-dj-strategy-api/src/main/java/cn/com/glsx/dj/strategy/dto/ArchiveCustomerProfileReqDTO.java
0 → 100644
View file @
5dc2c8e
package
cn
.
com
.
glsx
.
dj
.
strategy
.
dto
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* 建档时客户画像请求DTO
*
* @author yangwei_by_claude
* @version 1.0
* @since 2026/06/17
*/
@Data
public
class
ArchiveCustomerProfileReqDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 客户手机号
*/
private
String
phone
;
/**
* 车系id
*/
private
Integer
carSeriesId
;
}
rpc-dj-strategy-api/src/main/java/cn/com/glsx/dj/strategy/dto/CustomerProfileRespDTO.java
0 → 100644
View file @
5dc2c8e
package
cn
.
com
.
glsx
.
dj
.
strategy
.
dto
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 客户画像响应DTO
*
* @author yangwei_by_claude
* @version 1.0
* @since 2026/06/17
*/
@Data
public
class
CustomerProfileRespDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 客户手机号
*/
private
String
phone
;
/**
* 标签类别代码
*/
private
String
categoryCode
;
/**
* 标签类别名称
*/
private
String
categoryName
;
/**
* 标签维度代码
*/
private
String
dimensionCode
;
/**
* 标签维度名称
*/
private
String
dimensionName
;
/**
* 枚举代码
*/
private
String
enumCode
;
/**
* 枚举名称
*/
private
String
enumName
;
/**
* 评分依据
*/
private
String
scoreBasis
;
/**
* 该标签贡献分值
*/
private
Integer
score
;
/**
* 打标来源
*/
private
String
sourceType
;
/**
* 创建时间
*/
private
Date
createTime
;
}
rpc-dj-strategy-api/src/main/java/cn/com/glsx/dj/strategy/dto/ProfileQueryReqDTO.java
0 → 100644
View file @
5dc2c8e
package
cn
.
com
.
glsx
.
dj
.
strategy
.
dto
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* 画像查询请求DTO
*
* @author yangwei_by_claude
* @version 1.0
* @since 2026/06/17
*/
@Data
public
class
ProfileQueryReqDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 手机号列表
*/
private
List
<
String
>
phoneList
;
}
rpc-dj-strategy-api/src/main/java/cn/com/glsx/dj/strategy/model/CustomerTagProfile.java
0 → 100644
View file @
5dc2c8e
package
cn
.
com
.
glsx
.
dj
.
strategy
.
model
;
import
lombok.Data
;
import
javax.persistence.*
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 客户标签画像实体类
* 对应数据库表:dj_car_life_customer_tag_profile
*
* @author yangwei_by_claude
* @version 1.0
* @since 2026/06/17
*/
@Data
@Table
(
name
=
"dj_car_life_customer_tag_profile"
)
public
class
CustomerTagProfile
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键ID
*/
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
Long
id
;
/**
* 客户手机号(业务唯一标识)
*/
@Column
(
name
=
"phone"
)
private
String
phone
;
/**
* 标签类别代码(关联dj_car_life_tag_category.category_code)
*/
@Column
(
name
=
"category_code"
)
private
String
categoryCode
;
/**
* 标签维度代码(关联dj_car_life_tag_dimension.dimension_code)
*/
@Column
(
name
=
"dimension_code"
)
private
String
dimensionCode
;
/**
* 枚举代码(关联dj_car_life_tag_enum.enum_code)
*/
@Column
(
name
=
"enum_code"
)
private
String
enumCode
;
/**
* 评分依据(前端直接回显文本)
*/
@Column
(
name
=
"score_basis"
)
private
String
scoreBasis
;
/**
* 该标签贡献分值(写入时从dj_car_life_tag_enum.score快照)
*/
@Column
(
name
=
"score"
)
private
Integer
score
;
/**
* 打标来源:ORDER/ARCHIVE/AI/MANUAL
*/
@Column
(
name
=
"source_type"
)
private
String
sourceType
;
/**
* 来源引用ID(订单号/录音ID等)
*/
@Column
(
name
=
"source_ref_id"
)
private
String
sourceRefId
;
/**
* 创建时间
*/
@Column
(
name
=
"create_time"
)
private
Date
createTime
;
/**
* 更新时间
*/
@Column
(
name
=
"update_time"
)
private
Date
updateTime
;
/**
* 删除标识:N-未删除,D-已删除
*/
@Column
(
name
=
"deleted_flag"
)
private
String
deletedFlag
;
}
rpc-dj-strategy-api/src/main/java/cn/com/glsx/dj/strategy/remote/CustomerTagProfileRemote.java
0 → 100644
View file @
5dc2c8e
package
cn
.
com
.
glsx
.
dj
.
strategy
.
remote
;
import
cn.com.glsx.dj.strategy.dto.ArchiveCustomerProfileReqDTO
;
import
cn.com.glsx.dj.strategy.dto.CustomerProfileRespDTO
;
import
cn.com.glsx.dj.strategy.dto.ProfileQueryReqDTO
;
import
cn.com.glsx.framework.core.annotation.ApiMethod
;
import
cn.com.glsx.framework.core.annotation.ApiParam
;
import
cn.com.glsx.framework.core.annotation.ApiResponse
;
import
cn.com.glsx.framework.core.annotation.ApiService
;
import
cn.com.glsx.framework.core.beans.rpc.RpcResponse
;
import
java.util.List
;
/**
* 客户标签画像远程接口
*
* @author yangwei_by_claude
* @version 1.0
* @since 2026/06/17
*/
@ApiService
(
value
=
"客户标签画像"
,
owner
=
"yangwei"
)
public
interface
CustomerTagProfileRemote
{
/**
* 建档时生成客户画像
* <p>
* 根据手机号和车系信息,为客户生成标签画像
*
* @param request 请求对象,包含手机号和车系代码
* @return 操作结果
*/
@ApiMethod
(
"建档时生成客户画像"
)
@ApiParam
(
name
=
"request"
,
notes
=
"请求对象,包含手机号和车系代码"
,
dataType
=
ApiParam
.
DataTypeEnum
.
OBJECT
,
required
=
true
)
@ApiResponse
(
"操作结果"
)
RpcResponse
<
Void
>
createCustomerProfileOnArchive
(
ArchiveCustomerProfileReqDTO
request
);
/**
* 根据手机号列表批量查询客户画像
*
* @param request 请求对象,包含手机号列表
* @return 客户画像列表
*/
@ApiMethod
(
"根据手机号列表批量查询客户画像"
)
@ApiParam
(
name
=
"request"
,
notes
=
"请求对象,包含手机号列表"
,
dataType
=
ApiParam
.
DataTypeEnum
.
OBJECT
,
required
=
true
)
@ApiResponse
(
"客户画像列表"
)
RpcResponse
<
List
<
CustomerProfileRespDTO
>>
queryCustomerProfileByPhones
(
ProfileQueryReqDTO
request
);
}
rpc-dj-strategy/src/main/java/cn/com/glsx/dj/strategy/mapper/CustomerTagProfileMapper.java
0 → 100644
View file @
5dc2c8e
package
cn
.
com
.
glsx
.
dj
.
strategy
.
mapper
;
import
cn.com.glsx.dj.strategy.model.CustomerTagProfile
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.oreframework.datasource.mybatis.mapper.OreMapper
;
/**
* 客户标签画像Mapper
*
* @author yangwei_by_claude
* @version 1.0
* @since 2026/06/17
*/
@Mapper
public
interface
CustomerTagProfileMapper
extends
OreMapper
<
CustomerTagProfile
>
{
}
rpc-dj-strategy/src/main/java/cn/com/glsx/dj/strategy/service/CustomerTagProfileService.java
0 → 100644
View file @
5dc2c8e
package
cn
.
com
.
glsx
.
dj
.
strategy
.
service
;
import
cn.com.glsx.dj.strategy.mapper.CustomerTagProfileMapper
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
/**
* 客户标签画像服务
*
* @author yangwei_by_claude
* @version 1.0
* @since 2026/06/17
*/
@Slf4j
@Service
public
class
CustomerTagProfileService
{
@Autowired
private
CustomerTagProfileMapper
customerTagProfileMapper
;
}
rpc-dj-strategy/src/main/resources/META-INF/orm/CustomerTagProfileMapper.xml
0 → 100644
View file @
5dc2c8e
<?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=
"cn.com.glsx.dj.strategy.mapper.CustomerTagProfileMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.com.glsx.dj.strategy.model.CustomerTagProfile"
>
<id
column=
"id"
property=
"id"
jdbcType=
"BIGINT"
/>
<result
column=
"phone"
property=
"phone"
jdbcType=
"VARCHAR"
/>
<result
column=
"category_code"
property=
"categoryCode"
jdbcType=
"VARCHAR"
/>
<result
column=
"dimension_code"
property=
"dimensionCode"
jdbcType=
"VARCHAR"
/>
<result
column=
"enum_code"
property=
"enumCode"
jdbcType=
"VARCHAR"
/>
<result
column=
"score_basis"
property=
"scoreBasis"
jdbcType=
"VARCHAR"
/>
<result
column=
"score"
property=
"score"
jdbcType=
"INTEGER"
/>
<result
column=
"source_type"
property=
"sourceType"
jdbcType=
"VARCHAR"
/>
<result
column=
"source_ref_id"
property=
"sourceRefId"
jdbcType=
"VARCHAR"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"deleted_flag"
property=
"deletedFlag"
jdbcType=
"CHAR"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, phone, category_code, dimension_code, enum_code, score_basis, score,
source_type, source_ref_id, create_time, update_time, deleted_flag
</sql>
</mapper>
Write
Preview
Markdown
is supported
Attach a file
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 post a comment