parent
c037c06d56
commit
3d6a8d1a85
@ -0,0 +1,26 @@
|
||||
<?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.example.dao.NewsInfoDao">
|
||||
|
||||
<select id="findByName" resultType="com.example.vo.NewsInfoVo">
|
||||
select `news_info`.* from `news_info`
|
||||
|
||||
where 1 = 1
|
||||
<if test="name != null and name != '' and name != 'all'">
|
||||
and `news_info`.`name` like concat('%', #{name}, '%')
|
||||
</if>
|
||||
order by `news_info`.id
|
||||
</select>
|
||||
|
||||
<select id="findVoById" resultType="com.example.vo.NewsInfoVo">
|
||||
select `news_info`.* from `news_info`
|
||||
|
||||
where `news_info`.id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="count">
|
||||
select count(id) from `news_info`
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
Loading…
Reference in new issue