com.cory.dao.UserDao Maven / Gradle / Ivy
package com.cory.dao;
import com.cory.db.annotations.Dao;
import com.cory.db.annotations.Param;
import com.cory.db.annotations.Select;
import com.cory.db.annotations.Update;
import com.cory.model.User;
import java.util.Date;
/**
* generated by CodeGenerator on 2017/5/10.
*/
@Dao(model = User.class)
public interface UserDao extends BaseDao {
@Select(whereSql = "USER_NAME = #{userName}")
User findByUserName(@Param("userName") String userName);
@Update(columnSql = "LAST_LOGON_TIME = #{time}, LAST_LOGON_IP = #{ip}, LAST_LOGON_SUCCESS = #{success}", whereSql = "id = #{id}")
void updateLastLogonInfo(@Param("id") Integer id,
@Param("ip") String ip,
@Param("success") boolean success,
@Param("time") Date time);
}