| | |
| | | package com.ruoyi.integration.rocket.listener; |
| | | |
| | | import com.ruoyi.integration.api.model.Online; |
| | | import com.ruoyi.integration.api.model.OnlineReply; |
| | | import com.ruoyi.integration.iotda.enums.ServiceIdMenu; |
| | | import com.ruoyi.integration.iotda.utils.produce.IotMessageProduce; |
| | | import com.ruoyi.integration.iotda.utils.tools.MessageUtil; |
| | | import com.ruoyi.integration.mongodb.service.OnlineService; |
| | | import com.ruoyi.integration.rocket.model.OnlineMessage; |
| | | import com.ruoyi.integration.rocket.model.OnlineMessage; |
| | |
| | | |
| | | @Autowired |
| | | private OnlineService onlineService; |
| | | @Autowired |
| | | private MessageUtil messageUtil; |
| | | @Autowired |
| | | private IotMessageProduce iotMessageProduce; |
| | | |
| | | @Override |
| | | protected void handleMessage(OnlineMessage message) throws Exception { |
| | |
| | | Online online = new Online(); |
| | | BeanUtils.copyProperties(message,online); |
| | | onlineService.create(online); |
| | | // 业务处理 |
| | | // 业务处理 登录认证应答 |
| | | OnlineReply onlineReply = new OnlineReply(); |
| | | onlineReply.setCharging_pile_code(message.getCharging_pile_code()); |
| | | onlineReply.setOnline_result(0); |
| | | String result = iotMessageProduce.sendMessage(onlineReply.getCharging_pile_code(), ServiceIdMenu.ONLINE_REPLY.getKey(), messageUtil.onlineReply(onlineReply)); |
| | | log.info("充电桩登录认证-返回结果:{}",result); |
| | | } |
| | | |
| | | @Override |