New file |
| | |
| | | package com.ruoyi.integration.mongodb.service.impl; |
| | | |
| | | import com.ruoyi.integration.iotda.constant.IotConstant; |
| | | import com.ruoyi.integration.api.model.PlatformStartChargingReply; |
| | | import com.ruoyi.integration.mongodb.service.PlatformStartChargingReplyService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.mongodb.core.MongoTemplate; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class PlatformStartChargingReplyServiceImpl implements PlatformStartChargingReplyService { |
| | | @Autowired |
| | | private MongoTemplate mongoTemplate; |
| | | |
| | | @Override |
| | | public int create(PlatformStartChargingReply platformStartChargingReply) { |
| | | mongoTemplate.save(platformStartChargingReply); |
| | | return IotConstant.SUCCESS; |
| | | } |
| | | |
| | | @Override |
| | | public PlatformStartChargingReply findById(String id) { |
| | | return mongoTemplate.findById(id, PlatformStartChargingReply.class); |
| | | } |
| | | |
| | | @Override |
| | | public List<PlatformStartChargingReply> findAll() { |
| | | return mongoTemplate.findAll(PlatformStartChargingReply.class); |
| | | } |
| | | } |