| <?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.mzl.flower.mapper.system.CodeValueMapper"> | 
|     <select id="selectByTypeCode" resultType="com.mzl.flower.dto.response.system.CodeValueDTO"> | 
|         SELECT * | 
|         FROM t_code_value | 
|         WHERE TYPE_CODE = #{typeCode} | 
|         ORDER BY SEQ ASC | 
|     </select> | 
|   | 
|     <select id="selectByMultipleTypeCode" resultType="com.mzl.flower.dto.response.system.CodeValueDTO"> | 
|         SELECT * | 
|         FROM t_code_value | 
|         WHERE 1 = 1 | 
|         <if test="types != null and types.size > 0"> | 
|             and TYPE_CODE in | 
|             <foreach collection="types" item="item" open="(" separator="," close=")"> | 
|                 #{item} | 
|             </foreach> | 
|         </if> | 
|         ORDER BY TYPE_CODE, SEQ ASC | 
|     </select> | 
|   | 
|     <select id="selectSeqByCode" resultType="Integer"> | 
|         SELECT SEQ | 
|         FROM t_code_value | 
|         WHERE TYPE_CODE = #{typeCode} | 
|         ORDER BY SEQ DESC | 
|     </select> | 
|   | 
| </mapper> |