<?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.nantian.sc.cloud.admin.mapper.SysDictMapper">

	<resultMap id="sysDictMap" type="com.nantian.sc.cloud.admin.api.entity.SysDict">
		<id property="id" column="id"/>
		<result property="type" column="type"/>
		<result property="description" column="description"/>
		<result property="createTime" column="create_time"/>
		<result property="updateTime" column="update_time"/>
		<result property="remarks" column="remarks"/>
		<result property="delFlag" column="del_flag"/>
		<result property="tenantId" column="tenant_id"/>
	</resultMap>

	<select id="getDictPage" resultMap="sysDictMap">
		SELECT
		`user`.id,
		`user`.type,
		`user`.`description`,
		`user`.`create_time` ,
		`user`.`update_time` ,
		`user`.remarks,
		`user`.del_flag,
		`user`.tenant_id
		FROM
		sys_dict AS `user`
		<where>
			`user`.del_flag = '0'
			<if test="query.description != null and query.description != ''">
				AND `user`.description LIKE CONCAT('%',#{query.description},'%')
			</if>
		</where>
		ORDER BY `user`.create_time DESC
	</select>
</mapper>
