| | |
| | | public Response getRessetStation(@RequestParam int pageNum,@RequestParam int pageSize) { |
| | | return service.getRessetStation(pageNum,pageSize); |
| | | } |
| | | |
| | | |
| | | @GetMapping("getDefaultRessetStationById") |
| | | @ApiOperation(value = "根据机房id获取机房内阻定期") |
| | | public Response getDefaultRessetStationById(@RequestParam String stationId) { |
| | | return service.getDefaultRessetStationById(stationId); |
| | | } |
| | | } |
| | |
| | | public interface RessetStationMapper extends CustomMapper<RessetStation>{ |
| | | //获取机房内阻定期 |
| | | List<RessetStation> getRessetStation(); |
| | | |
| | | //根据机房id获取机房内阻定期 |
| | | RessetStation getDefaultRessetStationById(String stationId); |
| | | } |
| | |
| | | package com.whyc.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | |
| | | PageInfo pageInfo=new PageInfo(list); |
| | | return new Response().setII(1,list.size()>0,pageInfo,"获取机房内阻定期"); |
| | | } |
| | | //根据机房id获取机房内阻定期 |
| | | public Response getDefaultRessetStationById(String stationId) { |
| | | RessetStation ressetStation=mapper.getDefaultRessetStationById(stationId); |
| | | return new Response().setII(1,ressetStation!=null,ressetStation,"根据机房id获取机房内阻定期"); |
| | | } |
| | | } |
| | |
| | | where r.stationId=s.stationId |
| | | order by r.stationId asc |
| | | </select> |
| | | <select id="getDefaultRessetStationById" resultType="com.whyc.pojo.RessetStation"> |
| | | select r.*,s.stationName from web_site.tb_resset_station r,db_battinf.tb_station_inf s |
| | | where r.stationId=s.stationId |
| | | and r.stationId=#{stationId} |
| | | order by r.stationId asc |
| | | limit 1 |
| | | </select> |
| | | </mapper> |