26 lines
1.3 KiB
XML
26 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.nis.web.dao.FunctionRegionDictDao" >
|
||
|
|
<resultMap id="BaseResultMap" type="com.nis.domain.FunctionRegionDict" >
|
||
|
|
<id column="dict_id" property="dictId" jdbcType="INTEGER" />
|
||
|
|
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||
|
|
<result column="config_region" property="configRegion" jdbcType="VARCHAR" />
|
||
|
|
<result column="config_district" property="configDistrict" jdbcType="VARCHAR" />
|
||
|
|
<result column="config_desc" property="configDesc" jdbcType="VARCHAR" />
|
||
|
|
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||
|
|
</resultMap>
|
||
|
|
|
||
|
|
<sql id="Base_Column_List" >
|
||
|
|
dict_id, function_id, config_region, config_district, config_desc, is_valid
|
||
|
|
</sql>
|
||
|
|
<select id="getListByFunctionId" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
||
|
|
select
|
||
|
|
<include refid="Base_Column_List" />
|
||
|
|
from function_region_dict
|
||
|
|
where function_id = #{functionId,jdbcType=INTEGER} and is_valid=1
|
||
|
|
<if test="configRegion != null and configRegion!=''">
|
||
|
|
AND config_district=#{configRegion,jdbcType=VARCHAR}
|
||
|
|
</if>
|
||
|
|
</select>
|
||
|
|
|
||
|
|
</mapper>
|