提交 f9064326 作者: 沈振路

关键词、关回更换消息类型之后,清空referral记录的同时,置空传入referral的id

上级 ad3dc645
......@@ -97,6 +97,9 @@ public class CustomerFollowReplyServiceImpl extends ServiceImpl<CustomerFollowRe
} else if (!entity.getType().equals(sourceEntity.getType()) && CustomerMaterialConstant.needReferral(sourceEntity.getType())) {
// 如果编辑更换过类型,清除掉referral数据
referralEntityService.remove(new QueryWrapper<ReferralEntity>().eq(ReferralEntity.COL_MATERIAL_GRAPHICS_ID, sourceEntity.getId()));
if (saveDto.getReferralBody() != null) {
saveDto.getReferralBody().setId(null);
}
}
entity.setStatus(1);
......@@ -195,7 +198,6 @@ public class CustomerFollowReplyServiceImpl extends ServiceImpl<CustomerFollowRe
entity.setMpPath(referral);
entity.setMpAppId(referralEntity.getMpAppId());
entity.setContent("");
referralEntity.setReferral(referral);
// 保存链接数据
if (ObjectUtil.isNull(referralEntity.getId())) {
referralEntityService.save(referralEntity);
......
......@@ -112,6 +112,9 @@ public class CustomerKeywordServiceImpl extends ServiceImpl<CustomerKeywordMappe
} else if (!entity.getType().equals(sourceEntity.getType()) && CustomerMaterialConstant.needReferral(sourceEntity.getType())) {
// 如果编辑更换过类型,清除掉referral数据
referralEntityService.remove(new QueryWrapper<ReferralEntity>().eq(ReferralEntity.COL_MATERIAL_GRAPHICS_ID, sourceEntity.getId()));
if (saveDto.getReferralBody() != null) {
saveDto.getReferralBody().setId(null);
}
}
entity.setStatus(1);
......@@ -200,7 +203,6 @@ public class CustomerKeywordServiceImpl extends ServiceImpl<CustomerKeywordMappe
entity.setMpPath(referral);
entity.setMpAppId(referralEntity.getMpAppId());
entity.setContent("");
referralEntity.setReferral(referral);
// 保存链接数据
if (ObjectUtil.isNull(referralEntity.getId())) {
referralEntityService.save(referralEntity);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论