完成UserService、UserMapper编写,通过单元测试

This commit is contained in:
freeebird
2018-11-13 18:49:38 +08:00
parent ed537bd926
commit 40d4e46f74
10 changed files with 174 additions and 30 deletions

View File

@@ -1,8 +1,11 @@
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);
@@ -16,4 +19,10 @@ public interface UserMapper {
int updateByPrimaryKeySelective(User record);
int updateByPrimaryKey(User record);
User selectByUsernameAndPassword(@Param("username") String username,@Param("password") String password);
User selectByUsername(String username);
List<User> selectAll();
}