巨石化纤
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

97 lines
2.8 KiB

<?xml version="1.0" encoding="UTF-8" ?>
<sqlMap namespace="LED_MAIN" xmlns="http://ibatis.apache.org/mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<alias>
<typeAlias alias="LED_MAIN" type="SSWMS.Common.LED_MAIN, SSWMS.Common" />
</alias>
<resultMaps>
<resultMap id="SelectResult" class="LED_MAIN">
<result property="LED_ID" column="LED_ID" />
<result property="LED_IP" column="LED_IP" />
<result property="LED_CELL_CODE" column="LED_CELL_CODE" />
<result property="LED_TEXT_1" column="LED_TEXT_1" />
<result property="LED_TEXT_2" column="LED_TEXT_2" />
<result property="LED_TEXT_3" column="LED_TEXT_3" />
<result property="LED_TEXT_4" column="LED_TEXT_4" />
<result property="LED_TIME" column="LED_TIME" />
</resultMap>
</resultMaps>
<statements>
<select id="LED_MAIN_SELECT" parameterClass="int" resultMap="SelectResult">
select
LED_ID,
LED_IP,
LED_CELL_CODE,
LED_TEXT_1,
LED_TEXT_2,
LED_TEXT_3,
LED_TEXT_4,
LED_TIME
from LED_MAIN
</select>
<select id="LED_MAIN_SELECT_BY_ID" parameterClass="int"
extends="LED_MAIN_SELECT" resultMap="SelectResult">
where LED_ID=#LED_ID#
</select>
<insert id="LED_MAIN_INSERT_SQLSERVER" parameterClass="LED_MAIN">
insert into LED_MAIN (
LED_IP,
LED_CELL_CODE,
LED_TEXT_1,
LED_TEXT_2,
LED_TEXT_3,
LED_TEXT_4,
LED_TIME
)values(
#LED_IP#,
#LED_CELL_CODE#,
#LED_TEXT_1#,
#LED_TEXT_2#,
#LED_TEXT_3#,
#LED_TEXT_4#,
#LED_TIME#
)
<selectKey resultClass="int" type="post" property="LED_ID">
select @@IDENTITY as value
</selectKey>
</insert>
<insert id="LED_MAIN_INSERT_ORACLE" parameterClass="LED_MAIN">
insert into LED_MAIN (
LED_ID,
LED_IP,
LED_CELL_CODE,
LED_TEXT_1,
LED_TEXT_2,
LED_TEXT_3,
LED_TEXT_4,
LED_TIME
)values(
#LED_ID#,
#LED_IP#,
#LED_CELL_CODE#,
#LED_TEXT_1#,
#LED_TEXT_2#,
#LED_TEXT_3#,
#LED_TEXT_4#,
#LED_TIME#
)
<selectKey resultClass="int" type="pre" property="LED_ID">
select LED_MAIN_SEQ.nextval as value from DUAL
</selectKey>
</insert>
<update id="LED_MAIN_UPDATE" parameterClass="LED_MAIN">
update LED_MAIN set
LED_IP=#LED_IP#,
LED_CELL_CODE=#LED_CELL_CODE#,
LED_TEXT_1=#LED_TEXT_1#,
LED_TEXT_2=#LED_TEXT_2#,
LED_TEXT_3=#LED_TEXT_3#,
LED_TEXT_4=#LED_TEXT_4#,
LED_TIME=#LED_TIME#
where LED_ID=#LED_ID#
</update>
<delete id="LED_MAIN_DELETE" parameterClass="int">
delete from LED_MAIN
where LED_ID=#LED_ID#
</delete>
</statements>
</sqlMap>