fg电池监控平台的达梦数据库版本
whycxzp
2024-11-11 1443158933f220613b43f18a2108a552ea9f1aff
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
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,"");
    }
}