Files
ks/ruoyi-bussiness/src/main/resources/mapper/app/IndustryMapper.xml

33 lines
1.7 KiB
XML
Raw Normal View History

2025-09-22 17:06:47 +08:00
<?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.ruoyi.cms.mapper.IndustryMapper">
<resultMap type="Industry" id="IndustryResult">
<result property="industryId" column="industry_id" />
<result property="parentId" column="parent_id" />
<result property="industryName" column="industry_name" />
<result property="orderNum" column="order_num" />
<result property="status" column="status" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectIndustryVo">
select industry_id, parent_id, industry_name, order_num, status, del_flag, create_by, create_time, update_by, update_time from industry
</sql>
<select id="selectIndustryList" parameterType="Industry" resultMap="IndustryResult">
<include refid="selectIndustryVo"/>
2025-09-24 10:49:59 +08:00
<where> del_flag = '0'
2025-09-22 17:06:47 +08:00
<if test="parentId != null "> and parent_id = #{parentId}</if>
<if test="industryName != null and industryName != ''"> and industry_name like concat('%', #{industryName}, '%')</if>
<if test="orderNum != null "> and order_num = #{orderNum}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
</where>
</select>
</mapper>