target/classes/com/bookStore/client/product/dao/IProductDao.xml
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?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.bookStore.client.product.dao.IProductDao">
<select id="selectProductByCategory" resultType="Product">
select * from products
<where>
<if test="category != null and category!=''">
category = #{category}
</if>
</where>
limit #{pageModel.firstLimitParam},#{pageModel.pageSize}
</select>
<select id="selectProductByCategoryCount" resultType="int">
select count(*) from products
<where>
<if test="category != null and category != ''">
category = #{category}
</if>
</where>
</select>
<select id="selectProductByName" resultType="Product">
select * from products
<where>
<if test="name != null and name != '' and name != '请输入书名'">
name like '%' #{name} '%'
</if>
</where>
limit #{pageModel.firstLimitParam},#{pageModel.pageSize}
</select>
<select id="selectProductByNameCount" resultType="int">
select count(*) from products
<where>
<if test="name != null and name != '' and name != '请输入书名'">
name like '%' #{name} '%'
</if>
</where>
</select>
<select id="selectProductById" resultType="Product">
select * from products where id = #{id}
</select>
<select id="selectRecentNotice" resultType="Notice">
<!--根据公告降序排序,查询最新的公告信息,索引为0的,1个信息-->
select * from notice order by n_time desc limit 0,1
</select>
<select id="selectWeekHotProduct" resultType="Product">
select products.id,products.name,products.imgurl,products.price,SUM(orderitem.buynum) totalnum
from products,orders,orderitem
where orders.paystate=1
<!--INTERVAL 7 DAY:时间偏移,往前移7天-->
and orders.ordertime>DATE_SUB(NOW(),INTERVAL 7 DAY)
and orderitem.order_id=orders.id
and products.id=orderitem.product_id
<!--group by:分组,按照商品的id分组-->
后面还有 6 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
