jinpengyong
2021-11-15 72086303e261a8f0971299f26409baea4baa18cb
screen-job/src/main/java/com/moral/api/service/impl/HistoryAqiServiceImpl.java
@@ -86,7 +86,7 @@
            }
            HistoryAqi historyAqi = new HistoryAqi();
            historyAqi.setGuid(guid);
            historyAqi.setTime(time);
            historyAqi.setTime(DateUtils.addHours(time, -1));
            //存入数据库
            historyAqi.setValue(JSONObject.toJSONString(map));
            historyAqiMapper.insert(historyAqi);
@@ -130,9 +130,9 @@
    @Override
    public HistoryAqi getHistoryApiByTimeAndGuid(String guid, String time) {
        QueryWrapper<HistoryAqi> wrapper_historyAqi = new QueryWrapper<>();
        wrapper_historyAqi.eq("guid",guid).eq("time",time);
        wrapper_historyAqi.eq("guid", guid).eq("time", time);
        HistoryAqi historyAqi = new HistoryAqi();
        if (historyAqiMapper.selectCount(wrapper_historyAqi)==1){
        if (historyAqiMapper.selectCount(wrapper_historyAqi) == 1) {
            historyAqi = historyAqiMapper.selectOne(wrapper_historyAqi);
        }
        return historyAqi;