消息推送:增加过期时间字段
authorqiaowei <jov123@163.com>
Fri, 17 Jul 2020 07:19:12 +0000 (15:19 +0800)
committerqiaowei <jov123@163.com>
Fri, 17 Jul 2020 07:19:12 +0000 (15:19 +0800)
payapi/src/main/kotlin/com/supwisdom/dlpay/api/service/impl/kafka_service_impl.kt

index c913448..fc5afd8 100644 (file)
@@ -79,10 +79,6 @@ class KafkaSendMsgServiceImpl : KafkaSendMsgService {
             if (it.lastloginplatform.isNullOrEmpty()) {
                 message.platform = "all"
                 kafkaTemplate.send(topic, msg.msgid, gson.toJson(message))
-//                message.platform="ios"
-//                kafkaTemplate.send(topic, msg.msgid, gson.toJson(message))
-//                message.platform="android"
-//                kafkaTemplate.send(topic, msg.msgid, gson.toJson(message))
             } else {
                 kafkaTemplate.send(topic, msg.msgid, gson.toJson(message))
             }
@@ -109,6 +105,7 @@ class KafkaSendMsgServiceImpl : KafkaSendMsgService {
                 this.callback = true
                 this.retries = 3
                 this.custom = gson.toJson(extras)
+                this.expiretime = DateUtil.getNewTime(DateUtil.getNow(), 300)
             }
             println(gson.toJson(message))
             kafkaTemplate.send(topic, noticeMsg.msgid, gson.toJson(message))