1.数据库重构

2.修改User注册登录接口
This commit is contained in:
freeebird
2018-11-12 10:44:54 +08:00
parent 643ef18f0a
commit 3ef7a1b88d
30 changed files with 1765 additions and 311 deletions

View File

@@ -0,0 +1,17 @@
package cn.mafangui.hotel.mapper;
import cn.mafangui.hotel.entity.Department;
public interface DepartmentMapper {
int deleteByPrimaryKey(Integer departmentId);
int insert(Department record);
int insertSelective(Department record);
Department selectByPrimaryKey(Integer departmentId);
int updateByPrimaryKeySelective(Department record);
int updateByPrimaryKey(Department record);
}

View File

@@ -1,20 +1,17 @@
package cn.mafangui.hotel.mapper;
import cn.mafangui.hotel.entity.Hotel;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
public interface HotelMapper {
int deleteByPrimaryKey(Integer hotelId);
int updateByPrimaryKey(Hotel record);
int insert(Hotel record);
int insertSelective(Hotel record);
int updateByPrimaryKeySelective(Hotel record);
Hotel selectByPrimaryKey(Integer hotelId);
Hotel selectByName(String hotelName);
List<Hotel> selectAll();
int updateByPrimaryKeySelective(Hotel record);
int updateByPrimaryKey(Hotel record);
}

View File

@@ -0,0 +1,17 @@
package cn.mafangui.hotel.mapper;
import cn.mafangui.hotel.entity.OrderType;
public interface OrderTypeMapper {
int deleteByPrimaryKey(Integer typeId);
int insert(OrderType record);
int insertSelective(OrderType record);
OrderType selectByPrimaryKey(Integer typeId);
int updateByPrimaryKeySelective(OrderType record);
int updateByPrimaryKey(OrderType record);
}

View File

@@ -1,25 +1,17 @@
package cn.mafangui.hotel.mapper;
import cn.mafangui.hotel.entity.Room;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
public interface RoomMapper {
int insertSelective(Room record);
Room selectByPrimaryKey(Integer roomId);
int updateByPrimaryKey(Room record);
int deleteByPrimaryKey(Integer roomId);
int insert(Room record);
int deleteByPrimaryKey(Integer roomId);
int deleteByRoomNumber(String roomNumber);
int updateByPrimaryKeySelective(Room record);
Room selectByRoomId(Integer roomId);
Room selectByRoomNumber(String roomNumber);
List<Room> selectAllRoom();
List<Room> selectByType(String typeName);
List<Room> selectByStatus(String status);
int insertSelective(Room record);
Room selectByPrimaryKey(Integer roomId);
int updateByPrimaryKeySelective(Room record);
int updateByPrimaryKey(Room record);
}

View File

@@ -1,21 +1,17 @@
package cn.mafangui.hotel.mapper;
import cn.mafangui.hotel.entity.RoomType;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
public interface RoomTypeMapper {
int deleteByPrimaryKey(Integer typeId);
int deleteByPrimaryKey(Long typeId);
int insert(RoomType record);
RoomType selectByPrimaryKey(Integer typeId);
int updateByPrimaryKeySelective(RoomType record);
int updateByPrimaryKey(RoomType record);
int insertSelective(RoomType record);
int updateByRoomTypeSelective(RoomType record);
int deleteByRoomType(RoomType roomType);
RoomType selectByRoomType(RoomType roomType);
List<RoomType> findAll();
RoomType selectByPrimaryKey(Long typeId);
int updateByPrimaryKeySelective(RoomType record);
int updateByPrimaryKey(RoomType record);
}

View File

@@ -1,17 +1,30 @@
package cn.mafangui.hotel.mapper;
import cn.mafangui.hotel.entity.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
public interface UserMapper {
int deleteByPrimaryKey(Integer userId);
int insert(User record);
int insertSelective(User record);
User selectByPrimaryKey(Integer userId);
int updateByPrimaryKeySelective(User record);
int updateByPrimaryKey(User record);
User selectByUserNameAndPassword(User user);
User selectByUserName(String userName);
int updateByUserNameSelective(User record);
int count();
List<User> selectAll();
User selectByUsernameAndPassword(@Param("username") String username, @Param("password") String password);
}

View File

@@ -1,11 +1,7 @@
package cn.mafangui.hotel.mapper;
import cn.mafangui.hotel.entity.Worker;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
public interface WorkerMapper {
int deleteByPrimaryKey(Integer workerId);
@@ -18,10 +14,4 @@ public interface WorkerMapper {
int updateByPrimaryKeySelective(Worker record);
int updateByPrimaryKey(Worker record);
int deleteByUserName(String userName);
int updateByUserNameSelective(Worker record);
Worker selectByUserName(String userName);
List<Worker> findAll();
Worker selectByUserNameAndPassword(Worker worker);
}