mirror of
https://github.com/FreeeBird/hotel.git
synced 2025-11-02 21:44:50 +08:00
update RoomType
This commit is contained in:
18
src/main/java/cn/mafangui/hotel/service/RoomTypeService.java
Normal file
18
src/main/java/cn/mafangui/hotel/service/RoomTypeService.java
Normal file
@@ -0,0 +1,18 @@
|
||||
package cn.mafangui.hotel.service;
|
||||
|
||||
import cn.mafangui.hotel.entity.RoomType;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface RoomTypeService {
|
||||
|
||||
int addRoomType(RoomType roomType);
|
||||
|
||||
int delRoomType(RoomType roomType);
|
||||
|
||||
int updateRoomType(RoomType roomType);
|
||||
|
||||
RoomType selectByName(RoomType roomType);
|
||||
|
||||
List<RoomType> findAllType();
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package cn.mafangui.hotel.service.impl;
|
||||
|
||||
import cn.mafangui.hotel.entity.RoomType;
|
||||
import cn.mafangui.hotel.mapper.RoomTypeMapper;
|
||||
import cn.mafangui.hotel.service.RoomTypeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class RoomTypeServiceImpl implements RoomTypeService {
|
||||
@Autowired
|
||||
private RoomTypeMapper roomTypeMapper;
|
||||
|
||||
@Override
|
||||
public int addRoomType(RoomType roomType) {
|
||||
return roomTypeMapper.insertSelective(roomType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int delRoomType(RoomType roomType) {
|
||||
return roomTypeMapper.deleteByRoomType(roomType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateRoomType(RoomType roomType) {
|
||||
return roomTypeMapper.updateByRoomTypeSelective(roomType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RoomType selectByName(RoomType roomType) {
|
||||
return roomTypeMapper.selectByRoomType(roomType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RoomType> findAllType() {
|
||||
return roomTypeMapper.findAll();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user