提交 | 用户 | 时间
|
58d006
|
1 |
|
A |
2 |
package com.mandi.system.mapper; |
|
3 |
|
|
4 |
import org.apache.ibatis.annotations.Delete; |
|
5 |
import org.apache.ibatis.annotations.Insert; |
|
6 |
import org.apache.ibatis.annotations.Options; |
|
7 |
import org.apache.ibatis.annotations.Select; |
|
8 |
import org.apache.ibatis.annotations.Update; |
|
9 |
|
|
10 |
import com.mandi.system.persist.Login; |
|
11 |
|
|
12 |
|
|
13 |
/** |
|
14 |
* Function: TODO <br/> |
|
15 |
* Date: 2017年1月11日 上午9:20:53 <br/> |
|
16 |
* @author guolq |
|
17 |
*/ |
|
18 |
public interface LoginMapper { |
|
19 |
@Insert("insert into fd_login_log(depart,departname,ipaddr,loginside,logintime,logouttime,macaddr,note,userid,username,sysDepartName,workername,sysDepartID,sdepartNo) values (#{depart},#{departname},#{ipaddr},#{loginside},#{logintime},#{logouttime},#{macaddr},#{note},#{userid},#{username},#{sysDepartName},#{workername},#{sysDepartID},#{sdepartNo})") |
|
20 |
@Options(useGeneratedKeys = true, keyProperty = "id") |
|
21 |
public int insert(Login l); |
|
22 |
@Update("update fd_login_log set depart=#{depart},departname=#{departname},ipaddr=#{ipaddr},loginside=#{loginside},logintime=#{logintime},logouttime=#{logouttime},macaddr=#{macaddr},note=#{note},userid=#{userid},username=#{username},sysDepartName=#{sysDepartName},workername=#{workername},sysDepartID=#{sysDepartID},sdepartNo=#{sdepartNo} where id=#{id}") |
|
23 |
public int update(Login l); |
|
24 |
@Update("update fd_login_log set logouttime=getdate() where id=#{id}") |
|
25 |
public int logout(long id); |
|
26 |
@Select("select * from fd_login_log where id=#{id} ") |
|
27 |
public Login getbyId(long id); |
|
28 |
@Delete("delete from fd_login_log where id=#{id} ") |
|
29 |
public int delbyId(long id); |
|
30 |
} |