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,"获取网关配置");
|
}
|
}
|