提交 019a757d 作者: 沈振路

日志

上级 8fea31c8
/.idea/ /.idea/
/target/ /target/
/customer-service/
...@@ -171,6 +171,37 @@ public class CustomerServiceCommonAsyncComponent { ...@@ -171,6 +171,37 @@ public class CustomerServiceCommonAsyncComponent {
} }
} }
@Async("myExecutor")
public void dispatchDelay(String dateStr, AuthInfoVO authInfoVo, ReferralEntity referralEntity) {
String storeType = referralEntity.getStoreType();
if (storeType.equals(CustomerCommonConstant.STORE_NAME_YANG_GUANG) || storeType.equals(CustomerCommonConstant.STORE_NAME_ZHANG_ZHONG_YUN)) {
if (CustomerCommonConstant.ACTIVITY_NEWS_TYPE.equals(referralEntity.getNewsType())) {
// 获取config
R activityConfig = referralFeignClient.getActivityConfig(referralEntity.getRechargeAmount().stripTrailingZeros().toPlainString(), storeType, null);
// 获取资源配置列表
Map<String, Object> data = activityConfig.getData();
JSONArray configList = JSONUtil.parseArray(data.get("configList"));
List<CommonOptionResponseVO> activityConfigList = JSONUtil.toList(configList, CommonOptionResponseVO.class);
if (!CollectionUtil.isEmpty(activityConfigList)) {
// 转换config
String activityContent = referralEntity.getRechargeAmount().stripTrailingZeros().toPlainString() + "送" + referralEntity.getGiftAmount();
Map<String, String> configMap = activityConfigList.stream().collect(Collectors.toMap(key -> key.getLabel().replaceAll("[^(0-9.送)]", ""), CommonOptionResponseVO::getValue, (o1, o2) -> o2));
String configId = configMap.get(activityContent);
LOCAL_LOG.info("活动内容: {} 获取到configId: {}", activityContent, configId);
if (ObjectUtil.isNull(configId)) {
LOCAL_LOG.info("无法获取资源配置");
}
} else {
LOCAL_LOG.info("无法获取资源配置");
}
}
}
getCopyReferral(dateStr, authInfoVo, referralEntity);
}
/** /**
* 以下是客服消息模块的私有方法 * 以下是客服消息模块的私有方法
......
...@@ -139,7 +139,7 @@ public class CrowdPackageServiceImpl extends ServiceImpl<MaterialCrowdPackageMap ...@@ -139,7 +139,7 @@ public class CrowdPackageServiceImpl extends ServiceImpl<MaterialCrowdPackageMap
public GenericsResult<List<CrowdPackageListVO>> pageList(CrowdPackageQueryDTO queryDto) { public GenericsResult<List<CrowdPackageListVO>> pageList(CrowdPackageQueryDTO queryDto) {
List<CrowdPackageListVO> pageList = baseMapper.getPageList(queryDto); List<CrowdPackageListVO> pageList = baseMapper.getPageList(queryDto);
if (CollectionUtil.isEmpty(pageList)) { if (CollectionUtil.isEmpty(pageList)) {
return new GenericsResult<>(false, "暂无数据"); return new GenericsResult<>(true, "暂无数据");
} }
return new GenericsResult<>(pageList); return new GenericsResult<>(pageList);
......
...@@ -110,7 +110,7 @@ public class CustomerDelayTextServiceImpl extends ServiceImpl<CustomerGraphicsDe ...@@ -110,7 +110,7 @@ public class CustomerDelayTextServiceImpl extends ServiceImpl<CustomerGraphicsDe
// 公众号 // 公众号
AuthInfoVO authInfoVO = super.baseMapper.getCustomerDelayAuthInfo(referralDto.getMaterialGraphicsId()); AuthInfoVO authInfoVO = super.baseMapper.getCustomerDelayAuthInfo(referralDto.getMaterialGraphicsId());
if (CustomerCommonConstant.REMOTE_LINK_NEWS_TYPE_LIST.contains(referralEntity.getNewsType())) { if (CustomerCommonConstant.REMOTE_LINK_NEWS_TYPE_LIST.contains(referralEntity.getNewsType())) {
commonAsyncComponent.getCopyReferral(format, authInfoVO, referralEntity); commonAsyncComponent.dispatchDelay(format, authInfoVO, referralEntity);
} }
// 保存链接数据 // 保存链接数据
referralEntityService.saveOrUpdate(referralEntity); referralEntityService.saveOrUpdate(referralEntity);
......
...@@ -120,7 +120,7 @@ public class CustomerGraphicsDelayServiceImpl extends ServiceImpl<CustomerGraphi ...@@ -120,7 +120,7 @@ public class CustomerGraphicsDelayServiceImpl extends ServiceImpl<CustomerGraphi
AuthorizerInfo authorizerInfo = authorizerInfoService.getOne(new QueryWrapper<AuthorizerInfo>().eq("appid", saveDto.getAppId())); AuthorizerInfo authorizerInfo = authorizerInfoService.getOne(new QueryWrapper<AuthorizerInfo>().eq("appid", saveDto.getAppId()));
AuthInfoVO authInfoVO = new AuthInfoVO(); AuthInfoVO authInfoVO = new AuthInfoVO();
authInfoVO.putPropertyValue(authorizerInfo); authInfoVO.putPropertyValue(authorizerInfo);
commonAsyncComponent.getCopyReferral(dateStr, authInfoVO, referralEntity); commonAsyncComponent.dispatchDelay(dateStr, authInfoVO, referralEntity);
customerGraphicsDelay.setSendStatus(CustomerCommonConstant.SEND_STATUS_ACTIVE); customerGraphicsDelay.setSendStatus(CustomerCommonConstant.SEND_STATUS_ACTIVE);
localLog.info("链接获取完成"); localLog.info("链接获取完成");
} catch (Exception e) { } catch (Exception e) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论