⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 .#textpublish.xml.1.13

📁 struts spring ibatis
💻 13
字号:
<?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="TextPublish">
	<typeAlias alias="textPublish" type="com.vodacar.repository.domain.TextPublish" />
	<resultMap id="TextPublishResult" class="com.vodacar.repository.domain.TextPublish">
		<result property="id" column="ID" nullValue="-9999999999" />

		<result property="category" column="CATEGORY" />
		<result property="title" column="TITLE" />

		<result property="content" column="CONTENT" />
		<result property="seriesId" column="SERIES_ID" nullValue="-9999999999" />

		<result property="trimId" column="TRIM_ID" nullValue="-9999999999" />
		<result property="status" column="STATUS" nullValue="-9999999999" />
		<result property="creatorId" column="CREATOR_ID" />
		<result property="createBy" column="CREATE_BY" />
		<result property="createDate" column="CREATE_DATE" />
		<result property="updateBy" column="UPDATE_BY" />
		<result property="updateDate" column="UPDATE_DATE" />

	</resultMap>
	<select id="retrieveTextPublish" resultMap="TextPublishResult" parameterClass="long">
		select "ID","CATEGORY","TITLE", "CONTENT", "SERIES_ID", "TRIM_ID","STATUS", "CREATOR_ID","CREATE_BY", "CREATE_DATE", "UPDATE_BY", "UPDATE_DATE" from "DB2ADMIN"."AUTOWIKI_TEXT_PUBLISH" WHERE "ID"=#id#
	</select>

	<update id="updateTextPublish" parameterClass="com.vodacar.repository.domain.TextPublish">
		UPDATE "DB2ADMIN"."AUTOWIKI_TEXT_PUBLISH" SET
		<isNotEmpty property="category">"CATEGORY"=#category#,</isNotEmpty>
		<isNotEmpty property="title">"TITLE"=#title#,</isNotEmpty>
		<isNotEmpty property="content">"CONTENT"=#content#,</isNotEmpty>
		<isGreaterThan compareValue="0" property="seriesId">"SERIES_ID"=#seriesId#,</isGreaterThan>
		<isGreaterThan compareValue="0" property="trimId">"TRIM_ID"=#trimId#,</isGreaterThan>
		<isNotEmpty property="status">"STATUS"=#status#,</isNotEmpty>
		<isGreaterThan compareValue="0" property="creatorId">"CREATOR_ID"=#creatorId#,</isGreaterThan>
		<isNotEmpty property="createBy">"CREATE_BY"=#createBy#,</isNotEmpty>
		<isNotEmpty property="createDate">"CREATE_DATE"=#createDate#,</isNotEmpty>
		<isNotEmpty property="updateBy">"UPDATE_BY"=#updateBy#,</isNotEmpty>
		<isNotEmpty property="updateDate">"UPDATE_DATE"=#updateDate#,</isNotEmpty>
		"ID" = #id# WHERE ID=#id#

	</update>
	<insert id="insertTextPublish" parameterClass="com.vodacar.repository.domain.TextPublish">
		INSERT INTO "DB2ADMIN"."AUTOWIKI_TEXT_PUBLISH"
		<selectKey resultClass="java.lang.Long" keyProperty="id">values IDENTITY_VAL_LOCAL()</selectKey>
		("CATEGORY","TITLE", "CONTENT", "SERIES_ID", "TRIM_ID","STATUS","CREATOR_ID","CREATE_BY", "CREATE_DATE", "UPDATE_BY", "UPDATE_DATE" ) VALUES (#category#,
		<isNotNull property="title">#title#</isNotNull>
		<isNull property="title">NULL</isNull>
		,
		<isNotNull property="content">#content#</isNotNull>
		<isNull property="content">NULL</isNull>
		, #seriesId#, #trimId#, #status#, #creatorId#,
		<isNotNull property="createBy">#createBy#</isNotNull>
		<isNull property="createBy">NULL</isNull>
		,
		<isNotNull property="createDate">#createDate#</isNotNull>
		<isNull property="createDate">NULL</isNull>
		,
		<isNotNull property="updateBy">#updateBy#</isNotNull>
		<isNull property="updateBy">NULL</isNull>
		,
		<isNotNull property="updateDate">#updateDate#</isNotNull>
		<isNull property="updateDate">NULL</isNull>
		)
	</insert>
	<delete id="deleteTextPublish" parameterClass="long">DELETE FROM "DB2ADMIN"."AUTOWIKI_TEXT_PUBLISH" WHERE "ID"= #id#</delete>
	<!-- 鏍规嵁杈撳叆鏉′欢鏌ヨ

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -