|
|
@@ -0,0 +1,51 @@
|
|
|
+<?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="jp.yamoto.farm.common.biz.mapper.MastAddressBaseMapper">
|
|
|
+
|
|
|
+ <resultMap type="OptionsAddressVo" id="OptionsKeyValueResult">
|
|
|
+ <result property="key" column="key"/>
|
|
|
+ <result property="value" column="value"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <select id="selectAddressOptionsList" parameterType="OptionsParamBo" resultMap="OptionsKeyValueResult">
|
|
|
+ select DISTINCT
|
|
|
+ <if test="cmdOptionName != null and cmdOptionName != ''">
|
|
|
+ <if test="cmdOptionName =='ken'">
|
|
|
+ ken_id as key,
|
|
|
+ ken_name as value
|
|
|
+ </if>
|
|
|
+ <if test="cmdOptionName =='city'">
|
|
|
+ city_id as key,
|
|
|
+ city_name as value
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+
|
|
|
+ from mast_address
|
|
|
+
|
|
|
+ <where>
|
|
|
+ <if test="cmdOptionName != null and cmdOptionName != ''">
|
|
|
+ <if test="cmdOptionName =='ken' or cmdOptionName =='city'">
|
|
|
+ <if test="conditionValue1 != null and conditionValue1 != ''">
|
|
|
+ and CAST(ken_id AS VARCHAR) = #{conditionValue1}
|
|
|
+ </if>
|
|
|
+ <if test="conditionValue2 != null and conditionValue2 != ''">
|
|
|
+ and ken_name = #{conditionValue2}
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ and discontinued_flg = 0
|
|
|
+ </where>
|
|
|
+ <if test="cmdOptionName != null and cmdOptionName != ''">
|
|
|
+ order by
|
|
|
+ <if test="cmdOptionName =='ken'">
|
|
|
+ ken_id
|
|
|
+ </if>
|
|
|
+ <if test="cmdOptionName =='city'">
|
|
|
+ city_id
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ </mapper>
|