whyclxw
2022-01-10 00b61a61b2a90c85aeae872e351ddf4bb2b516cf
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
package com.whyc.service;
 
import com.github.pagehelper.PageInfo;
import com.whyc.dto.Response;
import com.whyc.mapper.BattRealdataMapper;
import com.whyc.pojo.BattRealdata;
import com.whyc.util.ActionUtil;
import org.springframework.stereotype.Service;
 
import javax.annotation.Resource;
import java.util.List;
 
@Service
public class BattRealdataService {
    @Resource
    private BattRealdataMapper mapper;
    //查询历史实时数据
    public Response serchByCondition(BattRealdata realdata) {
        String table=realdata.getBattGroupId()+"_"+ActionUtil.sdfwithOutday.format(realdata.getRecrodTime());
        System.out.println(table);
        realdata.setNote(table);//表名时间格式部分
        List<BattRealdata> list=mapper.serchByCondition(realdata);
        PageInfo pageInfo=new PageInfo(list);
        return new Response().set(1,pageInfo);
    }
}