提交 927f59f1 作者: 沈振路

客服

上级 1bed98b9
...@@ -163,6 +163,8 @@ public class CustomerServiceCommonAsyncComponent { ...@@ -163,6 +163,8 @@ public class CustomerServiceCommonAsyncComponent {
private void generateExtendLink(Map<String, List<CrowdPackageUserVO>> storeGroupMap, ReferralEntity customerReferral) { private void generateExtendLink(Map<String, List<CrowdPackageUserVO>> storeGroupMap, ReferralEntity customerReferral) {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
storeGroupMap.forEach((storeType, userVoList) -> { storeGroupMap.forEach((storeType, userVoList) -> {
LOCAL_LOG.info("当前处理书城: {}", storeType); LOCAL_LOG.info("当前处理书城: {}", storeType);
// 去重提取公众号 // 去重提取公众号
...@@ -240,25 +242,30 @@ public class CustomerServiceCommonAsyncComponent { ...@@ -240,25 +242,30 @@ public class CustomerServiceCommonAsyncComponent {
ReferralEntity referralEntity) { ReferralEntity referralEntity) {
referralEntity.setStoreType(authInfoVo.getStoreType()); referralEntity.setStoreType(authInfoVo.getStoreType());
referralEntity.setStoreTypeName(authInfoVo.getStoreTypeName()); referralEntity.setStoreTypeName(authInfoVo.getStoreTypeName());
// 非常用链接类型的name需要处理
if (!CustomerCommonConstant.USUAL_LINK_NEWS_TYPE.equals(referralEntity.getNewsType())) {
referralEntity.setName(replaceName(referralEntity.getName(), dateStr)); referralEntity.setName(replaceName(referralEntity.getName(), dateStr));
}
referralEntity.setAccountId(null); referralEntity.setAccountId(null);
referralEntity.setInfoId(authInfoVo.getId()); referralEntity.setInfoId(authInfoVo.getId());
R r = referralFeignClient.productReferral(referralEntity); R r = referralFeignClient.productReferral(referralEntity);
if (!r.getCode().equals(ApiResultConstant.SUCCESS_CODE)) { if (!r.getCode().equals(ApiResultConstant.SUCCESS_CODE)) {
throw new RuntimeException(r.getMessage()); throw new RuntimeException(r.getMessage());
} }
String res = r.getData("storeReferral", new TypeReference<String>() { String res = r.getData("storeReferral", new TypeReference<String>() {});
});
JSONObject jsonObject1 = JSON.parseObject(res); JSONObject jsonObject1 = JSON.parseObject(res);
String referral = jsonObject1.getString("referral"); String referral = jsonObject1.getString("referral");
referralEntity.setPromoteId(jsonObject1.getString("promoteId")); referralEntity.setPromoteId(jsonObject1.getString("promoteId"));
referralEntity.setReferral(referral); referralEntity.setReferral(referral);
// 系统-客服-推广-{accountNickName}-{storeType}-2022/04/24-1-{bookName} // 系统-客服-{newsType}-{accountNickName}-{storeType}-{currentDate}-{bookName}
// 系统-客服-活动-{accountNickName}-{storeType}-2022/04/24-1-充{recharge}送{gift} // 系统-客服-{newsType}-{accountNickName}-{storeType}-{currentDate}-充{recharge}送{gift}
} }
private String replaceName(String materialName, String appNickName) { private String replaceName(String materialName, String appNickName) {
if (StringUtils.isBlank(materialName)) {
return null;
}
if (materialName.contains("-")) { if (materialName.contains("-")) {
String[] split = materialName.split("-"); String[] split = materialName.split("-");
String format = new SimpleDateFormat("yyyy/MM/dd").format(new Date()); String format = new SimpleDateFormat("yyyy/MM/dd").format(new Date());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论