package com.whyc.service;
|
|
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageInfo;
|
import com.whyc.dto.Batt_Maint_Dealarm;
|
import com.whyc.dto.Response;
|
import com.whyc.dto.paramter.BattinfPar;
|
import com.whyc.mapper.BadbattMonMapper;
|
import org.springframework.stereotype.Service;
|
|
import javax.annotation.Resource;
|
import java.util.List;
|
|
@Service
|
public class BadBattMonService {
|
|
@Resource
|
BadbattMonMapper badbattMonMapper;
|
|
public Response<List<Batt_Maint_Dealarm>> searchByInfo(BattinfPar battinfPar) {
|
|
//分页信息
|
PageHelper.startPage(battinfPar.getPage().getPageCurr(), battinfPar.getPage().getPageSize());
|
List<Batt_Maint_Dealarm> list = badbattMonMapper.searchByInfo(battinfPar);
|
PageInfo<Batt_Maint_Dealarm> pinfo = new PageInfo<>(list);
|
|
return new Response<List<Batt_Maint_Dealarm>>().set(1, list, String.valueOf(pinfo.getTotal()));
|
}
|
}
|