mirror of
https://github.com/FreeeBird/hotel.git
synced 2025-11-02 21:44:50 +08:00
完成WorkerService类编写,通过单元测试
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
package cn.mafangui.hotel.mapper;
|
||||
|
||||
import cn.mafangui.hotel.entity.Admin;
|
||||
import jdk.internal.dynalink.linker.LinkerServices;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public interface AdminMapper {
|
||||
int deleteByPrimaryKey(Integer adminId);
|
||||
int insert(Admin record);
|
||||
int insertSelective(Admin record);
|
||||
Admin selectByPrimaryKey(Integer adminId);
|
||||
int updateByPrimaryKeySelective(Admin record);
|
||||
int updateByPrimaryKey(Admin record);
|
||||
Admin selectByUserName(String userName);
|
||||
Admin selectByUserNameAndPassword(Admin record);
|
||||
int updateByUserNameSelective(Admin record);
|
||||
List<Admin> findAll();
|
||||
}
|
||||
@@ -1,11 +1,8 @@
|
||||
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);
|
||||
@@ -19,12 +16,4 @@ public interface UserMapper {
|
||||
int updateByPrimaryKeySelective(User record);
|
||||
|
||||
int updateByPrimaryKey(User record);
|
||||
|
||||
int count();
|
||||
|
||||
List<User> selectAll();
|
||||
|
||||
User selectByUsernameAndPassword(@Param("username") String username, @Param("password") String password);
|
||||
|
||||
|
||||
}
|
||||
@@ -1,7 +1,12 @@
|
||||
package cn.mafangui.hotel.mapper;
|
||||
|
||||
import cn.mafangui.hotel.entity.Worker;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public interface WorkerMapper {
|
||||
int deleteByPrimaryKey(Integer workerId);
|
||||
|
||||
@@ -14,4 +19,10 @@ public interface WorkerMapper {
|
||||
int updateByPrimaryKeySelective(Worker record);
|
||||
|
||||
int updateByPrimaryKey(Worker record);
|
||||
|
||||
Worker selectByUsernameAndPassword(@Param("username") String username, @Param("password") String password);
|
||||
|
||||
List<Worker> selectByRole(String role);
|
||||
|
||||
List<Worker> selectAll();
|
||||
}
|
||||
Reference in New Issue
Block a user