wang
2024-03-28 04adb88a2ed54cdf4c2958c79972c30109b9b5b6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package com.mes.mapper.userInfo;
 
 
import com.mes.controller.dto.UserDTO;
import com.mes.entity.userInfo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
 
import java.util.List;
 
@Mapper
 
public interface UserMapper {
    List<User> findAll();
 
    User findOne(Integer id);
 
    @Select("select user_name FROM `user` where login_name=#{LoginName}")
    User findOneLoginName(String LoginName);
    @Select("select count(id) FROM `user` where login_name=#{userName} and password=#{password}  ")
    int  checkUser(@Param("userName") String userName,@Param("password") String password);
 
    @Select("select password FROM `user` where login_name=#{userId} ")
    String getUserByID(String userId);
 
 
    Boolean register(User user);
}