zhibing.pu
2024-08-24 cc788c86acd2983d791fbd3e50a9b30335b91953
ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/mongodb/service/impl/PlatformRemoteUpdateReplyServiceImpl.java
New file
@@ -0,0 +1,31 @@
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);
    }
}