Administrator
2022-09-14 58d006e05dcf2a20d0ec5367dd03d66a61db6849
提交 | 用户 | 时间
58d006 1 package com.mandi.system.mapper;
A 2
3 import java.util.List;
4 import java.util.Map;
5
6 import org.apache.ibatis.annotations.Delete;
7 import org.apache.ibatis.annotations.Insert;
8 import org.apache.ibatis.annotations.Param;
9 import org.apache.ibatis.annotations.Select;
10 import org.apache.ibatis.annotations.Update;
11
12 import com.mandi.system.persist.User;
13
14 public interface FduserMapper {
15     
16     @Select("select * from fd_user where id=#{id}")
17     public User getbyId(String id);
18     @Select("select * from fd_user where username=#{username} ")
19     public User getbyUname(String username);
20     @Delete("delete from fd_user where id=#{id}")
21     public int delbyId(String id);
22     @Delete("delete from fd_user where username=#{username} ")
23     public int delbyUname(String username);
24     @Insert("insert into fd_user (id,username,password,companyNo,phone,name,sex,state,lastlogin,utype) "
25             + "values (#{id},#{username},#{password},#{companyNo},#{phone},#{name},#{sex},#{state},#{lastlogin},#{utype}) ")
26     public int insert(User u);
27     @Update("update fd_user set username=#{username},password=#{password},companyNo=#{companyNo},"
28             + "phone=#{phone},name=#{name},sex=#{sex},state=#{state},lastlogin=#{lastlogin},utype=#{utype}  where id=#{id}")
29     public int updatebyId(User u);
30     @Update("update fd_user set state=#{state} where id=#{id}")
31     public int valid(@Param("id")String id,@Param("state")boolean state);
32     
33     public int getcount(Map<String, Object> mp);
34     
35     public List<User> getList(Map<String, Object> mp);
36     
37     public List<Map<String, Object>> getMList(Map<String, Object> mp);
38     
39     
40 }