ADD file via upload

master
pqu3f57g4 2 years ago
parent 11088eb8ef
commit 578b7bde6d

@ -0,0 +1,37 @@
<?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.example.dao.FoodsMenuInfoDao">
<select id="findByNameAndId" resultType="com.example.vo.FoodsMenuInfoVo">
select `foods_menu_info`.*, `sub_classify_info`.name as subName from `foods_menu_info`
left join `sub_classify_info` on `foods_menu_info`.subId = `sub_classify_info`.id
where 1 = 1
<if test="name != null and name != '' and name != 'all'">
and `foods_menu_info`.`name` like concat('%', #{name}, '%')
</if>
<if test="id != null and id != 0">
and `foods_menu_info`.`id` = #{id}
</if>
<if test="classifyId != null and classifyId != 0">
and `foods_menu_info`.`subId` = #{classifyId}
</if>
order by `foods_menu_info`.`id`
</select>
<select id="findByNameAndUser" resultType="com.example.vo.FoodsMenuInfoVo">
select `foods_menu_info`.*, `sub_classify_info`.name as subName from `foods_menu_info`
left join `sub_classify_info` on `foods_menu_info`.subId = `sub_classify_info`.id
where 1=1
<if test="name != null and name != '' and name != 'all'">
and `foods_menu_info`.`name` like concat('%', #{name}, '%')
</if>
<if test="username != null and username != ''">
and `foods_menu_info`.`username` = #{username}
</if>
<if test="level != null">
and `foods_menu_info`.`level` = #{level}
</if>
order by `foods_menu_info`.`id`
</select>
</mapper>
Loading…
Cancel
Save