package com.usky.system.controller.web;

import com.usky.common.core.influx.core.InfluxDbUtils;
import org.influxdb.dto.QueryResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
 * 租户管理-管理员配置
 *
 * @author yq
 */
@RestController
@RequestMapping("/test")
public class TestController extends BaseController {

    @Autowired
    private InfluxDbUtils influxDbUtils;

    @GetMapping("select")
    public QueryResult select(){
        String command="SELECT * FROM sp_d868474049166828 WHERE time > now() - 7d order by time desc";
        QueryResult query = influxDbUtils.query(command);
        return query;
    }


}
