whycrzh
2021-01-08 cf2abed0458be6b97c36d650804fcbc655b50af4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package com.fgkj.controller;
 
import com.fgkj.dto.Batt_history;
import com.fgkj.dto.ServiceModel;
import com.fgkj.services.Batt_historyService;
import com.fgkj.util.ActionUtil;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
import javax.annotation.Resource;
 
@RequestMapping("battHistory")
@RestController
@Api
public class Batt_historyController{
 
    @Resource
    private Batt_historyService service;
 
    //查询所有的历史实时数据
        //TODO 数据库不同,使用这个表名测试 db_batt_history.tb_batt_910000001_2017_12
    @GetMapping("serchByCondition")
    public ServiceModel serchByCondition(@RequestBody Batt_history batt_his){
//         Batt_history batt_his= ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, Batt_history.class);
        ServiceModel model=service.serchByCondition(batt_his);
 
        return model;
    }
 
}