<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.edut.springboot.tarena.dao.SysLogDao">
<select id="findPageObjects" resultType="com.edut.springboot.tarena.pojo.SysLog">
select * from sys_logs
<if test="username != null and username != ''" >
where username like concat('%' , ${username} , '%')
</if>
limit #{startIndex} , #{pageSize}
</select>
</mapper>
List<SysLog> findPageObjects(
@Param("username") String username ,
@Param("startIndex") Integer startIndex ,
@Param("pageSize") Integer pageSize ) ;