宜昌华友原料库管理软件
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.

74 lines
1.9 KiB

1 month ago
<?xml version="1.0" encoding="UTF-8" ?>
<sqlMap namespace="SYS_TABLE" xmlns="http://ibatis.apache.org/mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<alias>
<typeAlias alias="SYS_TABLE" type="SiaSun.LMS.Model.SYS_TABLE, SiaSun.LMS.Model" />
</alias>
<resultMaps>
<resultMap id="SelectResult" class="SYS_TABLE">
<result property="TABLE_ID" column="table_id" />
<result property="TABLE_NAME" column="table_name" />
<result property="TABLE_NEXT_ID" column="table_next_id" />
<result property="COLUMN_NAME" column="column_name" />
</resultMap>
</resultMaps>
<statements>
<select id="SYS_TABLE_SELECT" parameterClass="int" resultMap="SelectResult">
Select
table_id,
table_name,
table_next_id,
column_name
From SYS_TABLE
</select>
<select id="SYS_TABLE_SELECT_BY_ID" parameterClass="int" extends = "SYS_TABLE_SELECT" resultMap="SelectResult">
<dynamic prepend="WHERE">
<isParameterPresent>
table_id=#TABLE_ID#
</isParameterPresent>
</dynamic>
</select>
<insert id="SYS_TABLE_INSERT" parameterClass="SYS_TABLE">
Insert Into SYS_TABLE (
table_id,
table_name,
table_next_id,
column_name
)Values(
#TABLE_ID#,
#TABLE_NAME#,
#TABLE_NEXT_ID#,
#COLUMN_NAME#
)
</insert>
<update id="SYS_TABLE_UPDATE" parameterClass="SYS_TABLE">
Update SYS_TABLE Set
table_id=#TABLE_ID#,
table_name=#TABLE_NAME#,
table_next_id=#TABLE_NEXT_ID#,
column_name=#COLUMN_NAME#
<dynamic prepend="WHERE">
<isParameterPresent>
table_id=#TABLE_ID#
</isParameterPresent>
</dynamic>
</update>
<delete id="SYS_TABLE_DELETE" parameterClass="int">
Delete From SYS_TABLE
<dynamic prepend="WHERE">
<isParameterPresent>
table_id=#TABLE_ID#
</isParameterPresent>
</dynamic>
</delete>
</statements>
</sqlMap>