21 lines
950 B
XML
21 lines
950 B
XML
<?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.SetmealMapper">
|
|
<insert id="insert">
|
|
insert into setmeal(category_id, name, price, status, description, image, create_time, update_time, create_user,
|
|
update_user)
|
|
VALUES (#{categoryId}, #{name}, #{price}, #{status}, #{description}, #{image}, #{createTime}, #{updateTime},
|
|
#{createUser}, #{updateUser})
|
|
</insert>
|
|
|
|
<select id="pageQuery" resultType="com.sky.entity.Setmeal">
|
|
select * from setmeal
|
|
<where>
|
|
<if test="name != null">and name like concat('%',name,'%')</if>
|
|
<if test="categoryId != null">and category_id = #{categoryId}</if>
|
|
<if test="status != null">and status = #{status}</if>
|
|
</where>
|
|
</select>
|
|
</mapper> |