whyclxw
2022-01-07 dca5fa1b0367ccbc052ef953db6adb5c2e2bc64c
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.PageInfo;
import com.whyc.dto.Response;
import com.whyc.mapper.LithiumDataMapper;
import org.springframework.stereotype.Service;
 
import javax.annotation.Resource;
import java.util.List;
 
@Service
public class LithiumDataService {
    @Resource
    private LithiumDataMapper mapper;
 
    //根据电池id查询锂电池信息
    public Response getInfoByBattGroupId(int battGroupId) {
        QueryWrapper wrapper=new QueryWrapper();
        wrapper.eq("BattGroupId",battGroupId);
        List list=mapper.selectList(wrapper);
        PageInfo pageInfo=new PageInfo(list);
        return new Response().set(1,pageInfo);
    }
}