| | |
| | | package com.whyc.service; |
| | | |
| | | 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; |
| | |
| | | PageInfo<BattStationTempAlarm> pageInfo = new PageInfo<>(list); |
| | | return new Response<PageInfo<BattStationTempAlarm>>().set(1,pageInfo); |
| | | } |
| | | |
| | | public BattStationTempAlarm getByBattGroupId(int battGroupId) { |
| | | QueryWrapper<BattStationTempAlarm> query = Wrappers.query(); |
| | | query.eq("batt_group_id",battGroupId); |
| | | return mapper.selectOne(query); |
| | | } |
| | | |
| | | public void updateById(BattStationTempAlarm alarm) { |
| | | mapper.updateById(alarm); |
| | | } |
| | | |
| | | public void add(BattStationTempAlarm alarm) { |
| | | mapper.insert(alarm); |
| | | } |
| | | } |