Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
仟微科技
Link Wechat
提交
6cb2ddbd
Link Wechat
项目概览
仟微科技
/
Link Wechat
通知
48
Star
3
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Link Wechat
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
6cb2ddbd
编写于
2月 05, 2021
作者:
孙
孙喜旺
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
裂变客户回调处理
上级
9e96fef5
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
17 addition
and
2 deletion
+17
-2
linkwe-wecom/src/main/java/com/linkwechat/wecom/factory/impl/customer/WeCallBackAddExternalContactImpl.java
...ctory/impl/customer/WeCallBackAddExternalContactImpl.java
+17
-2
未找到文件。
linkwe-wecom/src/main/java/com/linkwechat/wecom/factory/impl/customer/WeCallBackAddExternalContactImpl.java
浏览文件 @
6cb2ddbd
...
...
@@ -44,6 +44,8 @@ public class WeCallBackAddExternalContactImpl extends WeEventStrategy {
@Autowired
private
IWeTaskFissionRecordService
weTaskFissionRecordService
;
@Autowired
private
IWeTaskFissionRewardService
weTaskFissionRewardService
;
@Autowired
private
IWeTaskFissionService
weTaskFissionService
;
@Override
...
...
@@ -62,10 +64,12 @@ public class WeCallBackAddExternalContactImpl extends WeEventStrategy {
//裂变任务处理
private
void
taskFissionRecordHandle
(
String
state
,
String
wecomCode
,
String
externalUserId
)
{
//查询裂变客户任务记录
WeCustomer
weCustomer
=
weCustomerService
.
selectWeCustomerById
(
externalUserId
);
WeTaskFissionRecord
weTaskFissionRecord
=
weTaskFissionRecordService
.
selectWeTaskFissionRecordByIdAndCustomerId
(
Long
.
valueOf
(
state
),
externalUserId
);
.
selectWeTaskFissionRecordByIdAndCustomerId
(
Long
.
valueOf
(
state
),
weCustomer
.
getUnionid
()
);
if
(
weTaskFissionRecord
!=
null
)
{
weTaskFissionRecord
.
setFissNum
(
weTaskFissionRecord
.
getFissNum
()
+
1
);
Long
fissNum
=
weTaskFissionRecord
.
getFissNum
()
+
1
;
weTaskFissionRecord
.
setFissNum
(
fissNum
);
weTaskFissionRecordService
.
updateWeTaskFissionRecord
(
weTaskFissionRecord
);
//查询裂变任务详情
...
...
@@ -79,6 +83,17 @@ public class WeCallBackAddExternalContactImpl extends WeEventStrategy {
weCustomerService
.
sendWelcomeMsg
(
weWelcomeMsgBuilder
.
build
());
}
//裂变数量完成任务处理,消费兑换码
if
(
fissNum
>=
weTaskFission
.
getFissNum
()){
WeTaskFissionReward
reward
=
new
WeTaskFissionReward
();
reward
.
setTaskFissionId
(
weTaskFissionRecord
.
getTaskFissionId
());
reward
.
setRewardCodeStatus
(
0
);
List
<
WeTaskFissionReward
>
weTaskFissionRewardList
=
weTaskFissionRewardService
.
selectWeTaskFissionRewardList
(
reward
);
WeTaskFissionReward
fissionReward
=
weTaskFissionRewardList
.
get
(
0
);
fissionReward
.
setRewardUser
(
weCustomer
.
getName
());
fissionReward
.
setRewardUserId
(
weCustomer
.
getExternalUserid
());
weTaskFissionRewardService
.
updateWeTaskFissionReward
(
fissionReward
);
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录