package com.whyc.service;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.whyc.mapper.BattresdataInfMapper;
|
import com.whyc.pojo.db_batt_testdata.BattresdataInf;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Service;
|
|
@Service
|
public class BattresdataInfService {
|
@Autowired(required = false)
|
private BattresdataInfMapper mapper;
|
//上一次内阻测试数据
|
public BattresdataInf getLastTestData(Integer battgroupId) {
|
QueryWrapper wrapper = new QueryWrapper();
|
wrapper.eq("battgroup_id", battgroupId);
|
wrapper.last(" limit 1");
|
wrapper.last(" ORDER BY test_starttime DESC ");
|
BattresdataInf rinf = mapper.selectOne(wrapper);
|
return rinf;
|
}
|
}
|