kcgFileManager/src/main/resources/mybatisMapper/CommonCodeMapper.xml

32 lines
920 B
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.dbnt.kcgfilemanager.mapper.CommonCodeMapper">
<select id="selectCommonCodeCategory" resultType="CommonCode" parameterType="CommonCode">
SELECT DISTINCT
CATEGORY
FROM COMMON_CODE
<where>
<if test="isDeleted == null or isDeleted == ''">
AND IS_DELETED = 'N'
</if>
</where>
</select>
<select id="selectCommonCodeValue" resultType="CommonCode" parameterType="CommonCode">
SELECT CODE_SQ,
VALUE,
DESCRIPTION
FROM COMMON_CODE
<where>
<if test="category != null and category != ''">
AND CATEGORY = #{category}
</if>
<if test="isDeleted == null or isDeleted == ''">
AND IS_DELETED = 'N'
</if>
</where>
</select>
</mapper>