first commit
This commit is contained in:
30
src/main/resources/mapper/book/OrderCartDao.xml
Normal file
30
src/main/resources/mapper/book/OrderCartDao.xml
Normal file
@@ -0,0 +1,30 @@
|
||||
<?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.peanut.modules.book.dao.OrderCartDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.OrderCartEntity" id="orderCartMap">
|
||||
<result property="cartId" column="cart_id"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="productId" column="product_id"/>
|
||||
<result property="productAmount" column="product_amount"/>
|
||||
<result property="price" column="price"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="getDeteleOrderCart" resultType="com.peanut.modules.book.entity.OrderCartEntity">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
`order_cart`
|
||||
WHERE
|
||||
product_id = #{productId}
|
||||
AND user_id = #{userId}
|
||||
AND del_flag = -1
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user