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.Fbs9100sFodStateMapper;
|
import com.whyc.pojo.Fbs9100sFodState;
|
import org.springframework.stereotype.Service;
|
import org.springframework.transaction.annotation.Transactional;
|
|
import javax.annotation.Resource;
|
|
@Service
|
public class Fbs9100sFodStateService {
|
|
@Resource
|
private Fbs9100sFodStateMapper mapper;
|
//获取剩余天数,工作模式,组端电压,峰值电
|
@Transactional
|
public Response serchByCondition(int battGroupId) {
|
QueryWrapper wrapper=new QueryWrapper();
|
wrapper.eq("battGroupId",battGroupId);
|
wrapper.last(" limit 1");
|
Fbs9100sFodState fodState=mapper.selectOne(wrapper);
|
return new Response().setII(1,fodState==null?false:true,fodState,"");
|
}
|
}
|