| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.mapper.CommonMapper; |
| | | import com.whyc.mapper.OilCommHistoryMapper; |
| | | import com.whyc.mapper.OilCommMapper; |
| | | import com.whyc.pojo.CentralMonitorSysST; |
| | | import com.whyc.pojo.OilComm; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | |
| | | @Resource |
| | | private OilCommMapper mapper; |
| | | |
| | | @Resource |
| | | private OilCommHistoryMapper historyMapper; |
| | | |
| | | @Resource |
| | | private CommonMapper commonMapper; |
| | | |
| | | public Response<List<OilComm>> getAll() { |
| | | try { |
| | |
| | | |
| | | } |
| | | } |
| | | |
| | | public Response<PageInfo<OilComm>> getHistory(int pageNum, int pageSize, int devId) { |
| | | List<String> tableNames = commonMapper.getTableName("db_3.5mw_motor_history", "tb_oil_comm_" + devId); |
| | | PageHelper.startPage(pageNum,pageSize); |
| | | List<OilComm> oilComms = historyMapper.getHistory(tableNames); |
| | | PageInfo<OilComm> oilCommPageInfo = new PageInfo<>(oilComms); |
| | | return new Response<PageInfo<OilComm>>().set(1,oilCommPageInfo); |
| | | } |
| | | } |