hjg
2024-01-20 4a3404efc438b16044fd9170814e6545a3f86fae
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
30
31
32
33
34
35
36
37
38
39
40
package com.mandi.system.mapper;
 
import java.util.List;
import java.util.Map;
 
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
 
import com.mandi.system.persist.User;
 
public interface FduserMapper {
    
    @Select("select * from fd_user where id=#{id}")
    public User getbyId(String id);
    @Select("select * from fd_user where username=#{username} ")
    public User getbyUname(String username);
    @Delete("delete from fd_user where id=#{id}")
    public int delbyId(String id);
    @Delete("delete from fd_user where username=#{username} ")
    public int delbyUname(String username);
    @Insert("insert into fd_user (id,username,password,companyNo,phone,name,sex,state,lastlogin,utype) "
            + "values (#{id},#{username},#{password},#{companyNo},#{phone},#{name},#{sex},#{state},#{lastlogin},#{utype}) ")
    public int insert(User u);
    @Update("update fd_user set username=#{username},password=#{password},companyNo=#{companyNo},"
            + "phone=#{phone},name=#{name},sex=#{sex},state=#{state},lastlogin=#{lastlogin},utype=#{utype}  where id=#{id}")
    public int updatebyId(User u);
    @Update("update fd_user set state=#{state} where id=#{id}")
    public int valid(@Param("id")String id,@Param("state")boolean state);
    
    public int getcount(Map<String, Object> mp);
    
    public List<User> getList(Map<String, Object> mp);
    
    public List<Map<String, Object>> getMList(Map<String, Object> mp);
    
    
}