Files
SchoolFood/fp-system/src/main/resources/mapper/EduMapper.xml
2025-05-21 08:59:12 +08:00

37 lines
1.3 KiB
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.zf.foodpurchase.fdsafe.mapper.EduMapper">
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
e.edu_id, e.edu_name, e.area_code as area_code_str, e.parent_id, e.create_time, e.update_time, e.del_flag,e.remark
</sql>
<select id="queryEduList" resultType="com.zf.foodpurchase.fdsafe.vo.EduVO">
select
<include refid="Base_Column_List"/>
from edu e
where e.del_flag = '0'
<if test="eduId!=null">
and e.edu_id = #{eduId}
</if>
<if test="eduName != null and eduName != ''">
and e.edu_name like concat('%', #{eduName}, '%')
</if>
<if test="areaCode != null and areaCode != ''">
and e.area_code = #{areaCode}
</if>
<if test="parentId != null and parentId != ''">
and e.parent_id = #{parentId}
</if>
<if test="beginTime != null ">
and e.create_time &gt;= #{beginTime}
</if>
<if test="endTime != null ">
and e.create_time &lt;= #{endTime}
</if>
order by e.create_time desc
</select>
</mapper>