苍穹外卖项目初始化代码-提交订单
This commit is contained in:
21
sky-server/src/main/resources/mapper/ShoppingCartMapper.xml
Normal file
21
sky-server/src/main/resources/mapper/ShoppingCartMapper.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?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.sky.mapper.ShoppingCartMapper">
|
||||
<select id="list" resultType="com.sky.entity.ShoppingCart">
|
||||
select * from shopping_cart
|
||||
<where>
|
||||
<if test="dishId != null">
|
||||
and dish_id = #{dishId}
|
||||
</if>
|
||||
<if test="dishFlavor != null">
|
||||
and dish_flavor = #{dishFlavor}
|
||||
</if>
|
||||
<if test="setmealId != null">
|
||||
and setmeal_id = #{setmealId}
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
and user_id = #{userId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user