| | |
| | | private ArdSyCarRtuMapper ardSyCarRtuMapper; |
| | | |
| | | @Override |
| | | public List<ArdSyCarRtu> allCarTopic() { |
| | | public String[] allCarTopic() { |
| | | List<ArdSyCarRtu> carRtus = ardSyCarRtuMapper.selectList(null); |
| | | List<String> list = new ArrayList<>(); |
| | | for (int i = 0; i < carRtus.size(); i++) { |
| | | list.add(carRtus.get(i).getTopicPublish()); |
| | | } |
| | | return list.toArray(new String[list.size()]); |
| | | } |
| | | |
| | | @Override |
| | | public List<ArdSyCarRtu> allCarTopicList() { |
| | | return ardSyCarRtuMapper.selectList(null); |
| | | } |
| | | |
| | |
| | | return "已发送开锁指令"; |
| | | } |
| | | |
| | | @Override |
| | | public ArdSyCarRtu subscribeByCarId(String subscribe) { |
| | | QueryWrapper<ArdSyCarRtu> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("topic_subscribe",subscribe); |
| | | return ardSyCarRtuMapper.selectOne(queryWrapper); |
| | | } |
| | | |
| | | } |