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 29b82810
authored
Jun 17, 2026
by
章家宝
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat:客户画像表建档前先将现有的删除掉
1 parent
4fd0b4ca
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
0 deletions
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/src/main/java/cn/com/glsx/dj/strategy/mapper/CustomerTagProfileMapper.java
View file @
29b8281
...
@@ -24,4 +24,13 @@ public interface CustomerTagProfileMapper extends OreMapper<CustomerTagProfile>
...
@@ -24,4 +24,13 @@ public interface CustomerTagProfileMapper extends OreMapper<CustomerTagProfile>
* @return 客户画像列表
* @return 客户画像列表
*/
*/
List
<
CustomerTagProfile
>
selectByPhoneList
(
@Param
(
"phoneList"
)
List
<
String
>
phoneList
);
List
<
CustomerTagProfile
>
selectByPhoneList
(
@Param
(
"phoneList"
)
List
<
String
>
phoneList
);
/**
* 根据手机号和类别代码物理删除记录
*
* @param phone 手机号
* @param categoryCode 类别代码
* @return 删除数量
*/
int
deleteByPhoneAndCategoryCode
(
@Param
(
"phone"
)
String
phone
,
@Param
(
"categoryCode"
)
String
categoryCode
);
}
}
rpc-dj-strategy/src/main/java/cn/com/glsx/dj/strategy/service/CustomerTagProfileService.java
View file @
29b8281
...
@@ -81,6 +81,9 @@ public class CustomerTagProfileService {
...
@@ -81,6 +81,9 @@ public class CustomerTagProfileService {
profile
.
setSourceRefId
(
String
.
valueOf
(
carSeriesId
));
profile
.
setSourceRefId
(
String
.
valueOf
(
carSeriesId
));
profile
.
setDeletedFlag
(
"N"
);
profile
.
setDeletedFlag
(
"N"
);
// 先删除该用户已有的建档标签(物理删除)
customerTagProfileMapper
.
deleteByPhoneAndCategoryCode
(
phone
,
CATEGORY_CODE_INIT
);
// 保存到数据库
// 保存到数据库
customerTagProfileMapper
.
insertSelective
(
profile
);
customerTagProfileMapper
.
insertSelective
(
profile
);
log
.
info
(
"建档生成客户画像完成:phone={}, tagEnum={}, avgPrice={}"
,
phone
,
tagEnum
.
getEnumCode
(),
avgPrice
);
log
.
info
(
"建档生成客户画像完成:phone={}, tagEnum={}, avgPrice={}"
,
phone
,
tagEnum
.
getEnumCode
(),
avgPrice
);
...
...
rpc-dj-strategy/src/main/resources/META-INF/orm/CustomerTagProfileMapper.xml
View file @
29b8281
...
@@ -33,4 +33,11 @@
...
@@ -33,4 +33,11 @@
</foreach>
</foreach>
</select>
</select>
<!-- 根据手机号和类别代码物理删除记录 -->
<delete
id=
"deleteByPhoneAndCategoryCode"
>
DELETE FROM dj_car_life_customer_tag_profile
WHERE phone = #{phone}
AND category_code = #{categoryCode}
</delete>
</mapper>
</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