更新房间类型的接口

This commit is contained in:
freeebird
2018-11-05 19:13:40 +08:00
parent 6063878687
commit 4680160c2f
8 changed files with 101 additions and 42 deletions

View File

@@ -10,9 +10,13 @@ public interface RoomTypeService {
int delRoomType(RoomType roomType);
int delById(int typeId);
int updateRoomType(RoomType roomType);
RoomType selectByName(RoomType roomType);
RoomType selectById(int typeId);
List<RoomType> findAllType();
}

View File

@@ -23,9 +23,14 @@ public class RoomTypeServiceImpl implements RoomTypeService {
return roomTypeMapper.deleteByRoomType(roomType);
}
@Override
public int delById(int typeId) {
return roomTypeMapper.deleteByPrimaryKey(typeId);
}
@Override
public int updateRoomType(RoomType roomType) {
return roomTypeMapper.updateByRoomTypeSelective(roomType);
return roomTypeMapper.updateByPrimaryKeySelective(roomType);
}
@Override
@@ -33,6 +38,11 @@ public class RoomTypeServiceImpl implements RoomTypeService {
return roomTypeMapper.selectByRoomType(roomType);
}
@Override
public RoomType selectById(int typeId) {
return roomTypeMapper.selectByPrimaryKey(typeId);
}
@Override
public List<RoomType> findAllType() {
return roomTypeMapper.findAll();