完成WorkerService类编写,通过单元测试

This commit is contained in:
freeebird
2018-11-12 15:50:49 +08:00
parent 3ef7a1b88d
commit dbee98a4f0
48 changed files with 598 additions and 3039 deletions

View File

@@ -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();
}

View File

@@ -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);
}

View File

@@ -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();
}