lxw
2023-12-12 dffd83940f190d301cc38cdc65191797f9cff846
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
28
29
30
31
32
33
package com.whyc.service;
 
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.whyc.dto.Response;
import com.whyc.mapper.GatewayInfMapepr;
import com.whyc.pojo.db_ckpwrdev_inf.BreakerInf;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
import java.util.List;
 
@Service
public class GatewayInfService {
    @Autowired(required = false)
    private GatewayInfMapepr mapper;
 
    //获取网关配置
    public Response getGatewayInf(int pageCurr, int pageSize, Integer gatewayType, String commType) {
        PageHelper.startPage(pageCurr,pageSize);
        QueryWrapper wrapper=new QueryWrapper();
        if(gatewayType!=null){
            wrapper.eq("gateway_type",gatewayType);
        }
        if(commType!=null){
            wrapper.eq("comm_type",commType);
        }
        List<BreakerInf> list=mapper.selectList(wrapper);
        PageInfo pageInfo=new PageInfo(list);
        return new Response().setII(1,list!=null,pageInfo,"获取网关配置");
    }
}