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