|
@@ -13,6 +13,8 @@ import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
+import java.util.Objects;
|
|
|
+
|
|
|
@Log4j2
|
|
|
@Component("vipUserStreamConsumer")
|
|
|
public class VipUserStream extends StreamConsumer<VipUserParam> {
|
|
@@ -30,8 +32,8 @@ public class VipUserStream extends StreamConsumer<VipUserParam> {
|
|
|
public void accept(VipUserParam vipUserParam) {
|
|
|
log.info("收到会员套餐消息:{}",vipUserParam);
|
|
|
|
|
|
- VipUserRecord existsRecord = vipUserRecordDao.findTop1ByCpIdAndSucAndPlanningIdOrderByCreateTimeDesc(vipUserParam.getCpId(), vipUserParam.getSuc(), vipUserParam.getPlanningId());
|
|
|
- if (ObjectUtils.isNotEmpty(existsRecord)){
|
|
|
+ VipUserRecord existsRecord = vipUserRecordDao.findTop1ByCpIdOrderByOperateTime(vipUserParam.getCpId());
|
|
|
+ if (ObjectUtils.isNotEmpty(existsRecord) && vipUserParam.getPlanningId().equals(existsRecord.getPlanningId()) && Objects.equals(vipUserParam.getSuc(), existsRecord.getSuc())){
|
|
|
log.info("重复订阅消息");
|
|
|
return;
|
|
|
}
|