whyclxw
2024-07-30 ed04733e15a5304c68ac16c121fd2989c851a57b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package com.whyc.service;
 
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.whyc.dto.Response;
import com.whyc.mapper.Fbs5100InverterInfoMapper;
import com.whyc.pojo.Fbs5100InverterInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
@Service
public class Fbs5100InverterInfoService {
    @Autowired(required = false)
    private Fbs5100InverterInfoMapper mapper;
 
    //查询tb_fbs5100_inverter_info信息
    public Response serchByDevId(int devId) {
        QueryWrapper wrapper = new QueryWrapper();
        wrapper.eq("dev_id", devId);
        wrapper.last("limit 1");
        Fbs5100InverterInfo info = mapper.selectOne(wrapper);
        return new Response().setII(1, info == null ? false : true, info, "");
    }
 
}