📄 .#insurance.xml.1.1
字号:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN"
"/WEB-INF/dtd/sql-map-2.dtd">
<sqlMap namespace="Insurance">
<typeAlias alias="insurance" type="com.vodacar.repository.domain.Insurance" />
<resultMap id="InsuranceResult" class="com.vodacar.repository.domain.Insurance">
<result property="id" column="ID" />
<result property="introduced" column="INTRODUCED" nullValue="" />
<result property="specialService" column="SPECIALSERVICE" />
<result property="insuranceIntroduced" column="INSURANCEINTRODUCED" />
<result property="creator" column="CREATOR" nullValue="" />
<result property="makeId" column="MAKEID" nullValue="0" />
<result property="area" column="AREA" nullValue="0" />
<result property="classId" column="CLASSID" nullValue="0" />
<result property="released" column="RELEASED" nullValue="0" />
<result property="pass" column="PASS" nullValue="4" />
<result property="title" column="TITLE" nullValue="" />
<result property="content" column="CONTENT" nullValue="" />
</resultMap>
<select id="retrieveInsurance" resultMap="InsuranceResult" parameterClass="long">
select "ID", "RELEASED", "MAKEID", "AREA", "CLASSID", "PASS", "TITLE", "CONTENT", "INTRODUCED", "SPECIALSERVICE", "INSURANCEINTRODUCED", "CREATOR" from "DB2ADMIN"."AUTOWIKI_INSURANCE" where "ID"=#id#
</select>
<select id="queryInsurance" resultMap="InsuranceResult">
select "ID", "RELEASED", "MAKEID", "AREA", "CLASSID", "PASS", "TITLE", "CONTENT", "INTRODUCED", "SPECIALSERVICE", "INSURANCEINTRODUCED", "CREATOR" from "DB2ADMIN"."AUTOWIKI_INSURANCE"
<dynamic prepend=" where ">
<isNotNull prepend=" and " property="name">"NAME" = #name#</isNotNull>
<isNotNull prepend=" and " property="introduced">"INTRODUCED" = #introduced#</isNotNull>
<isNotNull prepend=" and " property="classId">"CLASSID" = #classId#</isNotNull>
<isGreaterThan prepend=" and " property="area" compareValue="0">"AREA" = #area#</isGreaterThan>
<isNotNull prepend=" and " property="makeId">"MAKEID" = #makeId#</isNotNull>
<isNotNull prepend=" and " property="pass">"PASS" = #pass#</isNotNull>
<isNotNull prepend=" and " property="creator">"CREATOR" = #creator#</isNotNull>
</dynamic>
</select>
<insert id="insertInsurance" parameterClass="insurance">
INSERT INTO "DB2ADMIN"."AUTOWIKI_INSURANCE" ( "RELEASED", "MAKEID", "AREA", "CLASSID", "PASS", "TITLE", "CONTENT", "INTRODUCED", "SPECIALSERVICE", "INSURANCEINTRODUCED", "CREATOR") VALUES ( #released#, #makeId#,#area#,
#classId#,#pass#,#title#,#content#, #introduced#, #specialService#, #insuranceIntroduced#, #creator#)
</insert>
<select id="queryCountInsurance" resultClass="int">
select count(*) as count from "DB2ADMIN"."AUTOWIKI_INSURANCE"
<dynamic prepend=" where ">
<isNotNull prepend=" and " property="introduced">"INTRODUCED" = #introduced#</isNotNull>
<isNotNull prepend=" and " property="classId">"CLASSID" = #classId#</isNotNull>
<isGreaterThan prepend=" and " property="area" compareValue="0">"AREA" = #area#</isGreaterThan>
<isNotNull prepend=" and " property="makeId">"MAKEID" = #makeId#</isNotNull>
<isNotNull prepend=" and " property="pass">"PASS" = #pass#</isNotNull>
</dynamic>
</select>
<update id="updateInsurance" parameterClass="insurance">
UPDATE "DB2ADMIN"."AUTOWIKI_INSURANCE" SET
<isNotEmpty property="content">"CONTENT" = #content#,</isNotEmpty>
<isNotEmpty property="title">"TITLE" = #title#,</isNotEmpty>
<isNotEmpty property="introduced">"INTRODUCED" = #introduced#,</isNotEmpty>
<isNotEmpty property="specialService">"SPECIALSERVICE" = #specialService#,</isNotEmpty>
<isNotEmpty property="insuranceIntroduced">"INSURANCEINTRODUCED" = #insuranceIntroduced#,</isNotEmpty>
<isGreaterThan property="makeId" compareValue="0">"MAKEID" = #makeId#,</isGreaterThan>
<isGreaterThan property="area" compareValue="0">"AREA" = #area#,</isGreaterThan>
<isNotEmpty property="creator">"CREATOR" = #creator#,</isNotEmpty>
<isNotEmpty property="released">"RELEASED" =#released#,</isNotEmpty>
<isGreaterThan property="classId" compareValue="0">"CLASSID" = #classId#,</isGreaterThan>
<isGreaterThan property="pass" compareValue="0">"PASS" = #pass# ,</isGreaterThan>
"ID" = #id# WHERE ID=#id#
</update>
</sqlMap>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -