if (param != null) {
@KafkaListener(topics = {KafkaInitialConfig.TOPIC_RECHARGE_YTK}, groupId = KafkaInitialConfig.GROUP_ID_STORE_BFF, containerFactory = "kafkaListenerContainerFactory", autoStartup = "${kafka.listener.autoStartup}") public void rechargeConsumeKafka(JSONObject param) {
if (param.get("beId") != null && param.get("accountType") != null && param.get("serviceProviderId") != null && param.get("transOrderId") != null) {
beId = Long.valueOf(param.get("beId").toString());
accountType = param.get("accountType").toString();
serviceProviderId = param.get("serviceProviderId").toString();
transOrderId = param.get("transOrderId").toString();
} else {
return;
}
} else {
return;
}
}@Configuration
public class KafkaInitialConfig { /**
* 粤通卡充值kafka
*/
public static final String TOPIC_RECHARGE_YTK = "TOPIC_RECHARGE_YTK"; }
标签:get,param,kafka,工作,toString,accountType,使用,null From: https://www.cnblogs.com/jiangzishun/p/17672140.html