Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
O
operate-customer-service
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
沈振路
operate-customer-service
Commits
09cd46ef
提交
09cd46ef
authored
11月 15, 2022
作者:
gh
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
客服排除error链接
上级
01d603b2
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
11 行增加
和
7 行删除
+11
-7
CustomerGraphicsServiceImpl.java
...zw/customer/service/impl/CustomerGraphicsServiceImpl.java
+4
-2
WeChatRestService.java
...zw/customer/service/wechat/service/WeChatRestService.java
+6
-2
WeChatServiceImpl.java
...zw/customer/service/wechat/service/WeChatServiceImpl.java
+0
-2
ReferralEntityMapper.xml
src/main/resources/mapper/ReferralEntityMapper.xml
+1
-1
没有找到文件。
src/main/java/com/yaoyaozw/customer/service/impl/CustomerGraphicsServiceImpl.java
浏览文件 @
09cd46ef
...
...
@@ -233,8 +233,9 @@ public class CustomerGraphicsServiceImpl extends ServiceImpl<CustomerGraphicsMap
Map
<
Long
,
CrowdPackage
>
crowdPackageMap
=
crowdPackageList
.
stream
().
collect
(
Collectors
.
toMap
(
CrowdPackage:
:
getId
,
a
->
a
));
LOCAL_LOG
.
info
(
"start sendCustomerMessage"
);
for
(
CustomerGraphics
customerGraphics
:
customerGraphicsList
)
{
LOCAL_LOG
.
info
(
"{} start sendCustomerMessage:{}"
,
customerGraphics
.
getId
(),
System
.
currentTimeMillis
());
//人群包id
Long
packId
=
customerGraphics
.
getPackId
();
...
...
@@ -271,9 +272,10 @@ public class CustomerGraphicsServiceImpl extends ServiceImpl<CustomerGraphicsMap
}
//客服状态修改
customerGraphics
.
setSendStatus
(
CustomerCommonConstant
.
SEND_STATUS_FINISHED
);
LOCAL_LOG
.
info
(
"{} finished:{}"
,
customerGraphics
.
getId
(),
System
.
currentTimeMillis
());
}
updateBatchById
(
customerGraphicsList
);
LOCAL_LOG
.
info
(
"end sendCustomerMessage"
);
}
}
...
...
src/main/java/com/yaoyaozw/customer/service/wechat/service/WeChatRestService.java
浏览文件 @
09cd46ef
package
com
.
yaoyaozw
.
customer
.
service
.
wechat
.
service
;
import
cn.hutool.json.JSONUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.nacos.client.utils.JSONUtils
;
import
com.yaoyaozw.customer.service.wechat.entity.WeChatResponseEntity
;
import
org.apache.http.HttpEntity
;
import
org.apache.http.HttpResponse
;
import
org.apache.http.client.HttpClient
;
...
...
@@ -70,18 +68,23 @@ public class WeChatRestService {
}
public
<
T
>
Object
httpPostRequest
(
UriComponentsBuilder
uriComponentsBuilder
,
Object
requestEntity
,
Class
<
T
>
responseEntity
)
throws
Exception
{
HttpClient
defaultHttpClient
=
HttpClients
.
createDefault
();
HttpPost
httpPost
=
new
HttpPost
(
uriComponentsBuilder
.
toUriString
());
httpPost
.
setHeader
(
"Content-Type"
,
"application/json;charset=utf-8"
);
if
(
requestEntity
!=
null
)
{
//转换为json格式并打印
String
json
=
JSONObject
.
toJSONString
(
requestEntity
);
HttpEntity
httpEntity
=
new
StringEntity
(
json
,
"utf-8"
);
httpPost
.
setEntity
(
httpEntity
);
}
HttpResponse
httpResponse
=
defaultHttpClient
.
execute
(
httpPost
);
if
(
httpResponse
.
getStatusLine
().
getStatusCode
()
!=
200
)
{
String
errorLog
=
"请求失败,errorCode:"
+
httpResponse
.
getStatusLine
().
getStatusCode
();
...
...
@@ -98,4 +101,5 @@ public class WeChatRestService {
return
JSONUtils
.
deserializeObject
(
s
,
responseEntity
);
}
}
src/main/java/com/yaoyaozw/customer/service/wechat/service/WeChatServiceImpl.java
浏览文件 @
09cd46ef
...
...
@@ -104,8 +104,6 @@ public class WeChatServiceImpl implements WeChatService{
return
sendCustomerDelayMessage
(
appid
,
tokenObject
.
toString
(),
user
,
delaySortMap
,
needUpdateVoList
);
}
//token过期重新取一下
//AuthorizerToken updateToken = authorizerTokenService.findTokenByAppid(authorizerToken.getAuthorizerAppid());
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
...
...
src/main/resources/mapper/ReferralEntityMapper.xml
浏览文件 @
09cd46ef
...
...
@@ -41,7 +41,7 @@
on referral.account_id=authInfo.account_id
where referral.material_graphics_id=#{graphicsId} and referral.is_deleted=0 and referral.account_id is not null
where referral.material_graphics_id=#{graphicsId} and referral.is_deleted=0 and referral.account_id is not null
and referral.referral!='error'
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论