New file |
| | |
| | | package com.ruoyi.integration.mongodb.service.impl; |
| | | |
| | | import com.ruoyi.integration.iotda.constant.IotConstant; |
| | | import com.ruoyi.integration.api.model.PlatformRemoteUpdateReply; |
| | | import com.ruoyi.integration.mongodb.service.PlatformRemoteUpdateReplyService; |
| | | 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 PlatformRemoteUpdateReplyServiceImpl implements PlatformRemoteUpdateReplyService { |
| | | @Autowired |
| | | private MongoTemplate mongoTemplate; |
| | | @Override |
| | | public int create(PlatformRemoteUpdateReply platformRemoteUpdateReply) { |
| | | mongoTemplate.save(platformRemoteUpdateReply); |
| | | return IotConstant.SUCCESS; |
| | | } |
| | | |
| | | @Override |
| | | public PlatformRemoteUpdateReply findById(String id) { |
| | | return mongoTemplate.findById(id, PlatformRemoteUpdateReply.class); |
| | | } |
| | | |
| | | @Override |
| | | public List<PlatformRemoteUpdateReply> findAll() { |
| | | return mongoTemplate.findAll(PlatformRemoteUpdateReply.class); |
| | | } |
| | | } |