Mybatis模糊查询、按商品上架时间查询

 
 
<select id="selectByName" resultType="entity.Good">
		select * from goods where name like '%'||#{name}||'%'
	</select>
	<select id="selectByPrice" resultType="entity.Good">
		select * from goods where price between #{begin} and #{end}
	</select>
	<select id="selectByStatus" resultType="entity.Good">
		select * from goods where status=#{status}
	</select>
	<select id="selectThisMonth" resultType="entity.Good">
		select * from goods where to_char(create_date,'MM')=to_char(sysdate,'MM')
	</select>

猜你喜欢

转载自blog.csdn.net/weixin_42273990/article/details/80627674