<?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.stylefeng.guns.modular.system.dao.DictDao">

	<sql id="Base_Column_List">
		id, num, pid, name, tips
	</sql>

	<select id="selectByCode" resultType="dict">
		select
		<include refid="Base_Column_List" />
		from _dict
		where code = #{code}
	</select>

	<select id="list" resultType="map">
		select * from _dict
		where num = 0
		<if test="condition != null and condition != ''">
			AND name like CONCAT('%',#{condition},'%')
		</if>
		order by id ASC
	</select>

</mapper>