whycxzp
2023-02-25 ade751704a36681e5eb0e55c3db8458896a0135c
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
package com.whyc.service;
 
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.whyc.dto.Response;
import com.whyc.mapper.JhstateMapper;
import com.whyc.pojo.Jhstate;
import org.springframework.stereotype.Service;
 
import javax.annotation.Resource;
 
@Service
public class JhstateService {
 
    @Resource
    private JhstateMapper mapper;
    //查询历史实时数据
    public Response serchByCondition(int devId) {
        PageHelper.startPage(1,1);
        QueryWrapper wrapper=new QueryWrapper();
        wrapper.eq("dev_id",devId);
        Jhstate jhstate= mapper.selectOne(wrapper);
        return new Response().set(1,jhstate);
    }
}