33 lines
1.7 KiB
XML
33 lines
1.7 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.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"/>
|
|
<where> del_flag = '0'
|
|
<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> |