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

📄 .#part.xml.1.4

📁 struts spring ibatis
💻 4
字号:
<?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="Part">
<typeAlias alias="part" type="com.vodacar.repository.domain.Part"/>
<resultMap id="PartResult" class="com.vodacar.repository.domain.Part">
<result property="id" column="ID" nullValue="-9999999999" />
<result property="seriesId" column="SERIES_ID" nullValue="-9999999999" />
<result property="category" column="CATEGORY" nullValue="-9999999999" />
<result property="manufacturer" column="MANUFACTURER" />
<result property="brand" column="BRAND" />
<result property="name" column="NAME" />
<result property="oemSign" column="OEM_SIGN" nullValue="-9999999999"/>
<result property="price" column="PRICE" />
<result property="parameter" column="PARAMETER" />
<result property="manufacturerInfo" column="MANUFACTURER_INFO" />
<result property="communicate" column="COMMUNICATE" />
<result property="status" column="STATUS" nullValue="-9999999999" />
<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="retrievePart" resultMap="PartResult" parameterClass="long">
select "ID", "SERIES_ID", "CATEGORY", "MANUFACTURER", "BRAND", "NAME", 
    "OEM_SIGN", "PRICE", "PARAMETER", "MANUFACTURER_INFO", "COMMUNICATE", 
    "STATUS", "CREATE_BY", "CREATE_DATE", "UPDATE_DATE", "UPDATE_BY"
from "DB2ADMIN"."AUTOWIKI_PART"
	WHERE "ID"=#id#
</select>

<update id="updatePart" parameterClass="com.vodacar.repository.domain.Part">
UPDATE "DB2ADMIN"."AUTOWIKI_PART" SET 

"SERIES_ID"=#seriesId#,
"CATEGORY"=#category#,
<isNotEmpty  property="manufacturer">"MANUFACTURER" = #manufacturer#,</isNotEmpty>
<isNotEmpty  property="brand">"BRAND" = #brand#,</isNotEmpty>
<isNotEmpty  property="name">"NAME" = #name#,</isNotEmpty>
"OEM_SIGN" =#oemSign#,
<isNotEmpty  property="price">"PRICE" = #price#,</isNotEmpty>
<isNotEmpty  property="parameter">"PARAMETER" = #parameter#,</isNotEmpty>
<isNotEmpty  property="manufacturerInfo">"MANUFACTURER_INFO" = #manufacturerInfo#,</isNotEmpty>
<isNotEmpty  property="communicate">"COMMUNICATE" = #communicate#,</isNotEmpty>
"STATUS"=#status#,
<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="insertPart" parameterClass="com.vodacar.repository.domain.Part">
 INSERT INTO "DB2ADMIN"."AUTOWIKI_PART" 
      (	"SERIES_ID", "CATEGORY", "MANUFACTURER", "BRAND", "NAME", 
    "OEM_SIGN", "PRICE", "PARAMETER", "MANUFACTURER_INFO", "COMMUNICATE","STATUS", "CREATE_BY", 
    "CREATE_DATE", "UPDATE_BY", "UPDATE_DATE"  )
    VALUES
      ( #seriesId#,
        #category#,
        <isNotNull property="manufacturer">#manufacturer#</isNotNull><isNull property="manufacturer">NULL</isNull>,  
	    <isNotNull property="brand">#brand#</isNotNull><isNull property="brand">NULL</isNull>,  
	   <isNotNull property="name">#name#</isNotNull><isNull property="name">NULL</isNull>,  
	   #oemSign#, 
	   <isNotNull property="price">#price#</isNotNull><isNull property="price">NULL</isNull>,  
	    <isNotNull property="parameter">#parameter#</isNotNull><isNull property="parameter">NULL</isNull>,  
	    <isNotNull property="manufacturerInfo">#manufacturerInfo#</isNotNull><isNull property="manufacturerInfo">NULL</isNull>,  
	   <isNotNull property="communicate">#communicate#</isNotNull><isNull property="communicate">NULL</isNull>,
	   #status#,
	   <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>)
        <selectKey resultClass="java.lang.Long" keyProperty="id"> 
          values IDENTITY_VAL_LOCAL() 
        </selectKey>
</insert>
<delete  id="deletePart" parameterClass="long">
DELETE FROM  "DB2ADMIN"."AUTOWIKI_PART" 
WHERE "ID"= #id#
</delete>
<!-- 鏍规嵁杈撳叆鏉′欢鏌ヨ

⌨️ 快捷键说明

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