integrated_traffic/src/main/resources/mybatis/datasource/hiddenDangerCheckStandard/StandardDictionaryMapper.xml

94 lines
1.9 KiB
XML
Raw Normal View History

2024-01-30 16:00:22 +08:00
<?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">
2024-01-30 16:50:58 +08:00
<mapper namespace="com.zcloud.mapper.datasource.hiddenDangerCheckStandard.StandardDictionaryMapper">
2024-01-30 16:00:22 +08:00
<!--表名 -->
<sql id="tableName">
bus_hiddendangercheckstandard_dictionary
</sql>
<!-- 字段 -->
<sql id="Field">
f.DICTIONARY_ID,
f.DICTIONARY_NAME,
f.PARENT_ID,
f.PARENT_IDS,
f.DICTIONARY_NAMES,
f.DICTIONARY_LEVEL,
f.DICTIONARY_SORT,
f.DICTIONARY_SOURCE,
f.CORPINFO_ID,
f.ISDELETE,
f.CREATOR_ID,
f.CREATOR_NAME,
f.CREATE_TIME,
f.OPERATOR_ID,
f.OPERATOR_NAME,
f.OPERATE_TIME,
f.DELETEOR_ID,
f.DELETEOR_NAME,
f.DELETE_TIME
</sql>
<!-- 字段用于新增 -->
<sql id="Field2">
DICTIONARY_ID,
DICTIONARY_NAME,
PARENT_ID,
PARENT_IDS,
DICTIONARY_NAMES,
DICTIONARY_LEVEL,
DICTIONARY_SORT,
DICTIONARY_SOURCE,
CORPINFO_ID,
ISDELETE,
CREATOR_ID,
CREATOR_NAME,
CREATE_TIME,
OPERATOR_ID,
OPERATOR_NAME,
OPERATE_TIME,
DELETEOR_ID,
DELETEOR_NAME,
DELETE_TIME
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{DICTIONARY_ID},
#{DICTIONARY_NAME},
#{PARENT_ID},
#{PARENT_IDS},
#{DICTIONARY_NAMES},
#{DICTIONARY_LEVEL},
#{DICTIONARY_SORT},
#{DICTIONARY_SOURCE},
#{CORPINFO_ID},
#{ISDELETE},
#{CREATOR_ID},
#{CREATOR_NAME},
#{CREATE_TIME},
#{OPERATOR_ID},
#{OPERATOR_NAME},
#{OPERATE_TIME},
#{DELETEOR_ID},
#{DELETEOR_NAME},
#{DELETE_TIME}
</sql>
<!-- 列表(全部) -->
<select id="list" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where
f.ISDELETE = 0
and f.DICTIONARY_SOURCE = 1
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 -->
or ( f.DICTIONARY_SOURCE = 2
and f.CORPINFO_ID = #{CORPINFO_ID} )
</if>
</select>
</mapper>