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.
83 lines
2.5 KiB
83 lines
2.5 KiB
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<sqlMap namespace="SYS_USER" xmlns="http://ibatis.apache.org/mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
<alias>
|
|
<typeAlias alias="SYS_USER" type="SSWMS.Common.SYS_USER, SSWMS.Common" />
|
|
</alias>
|
|
<resultMaps>
|
|
<resultMap id="SelectResult" class="SYS_USER">
|
|
<result property="USER_ID" column="USER_ID" />
|
|
<result property="USER_CODE" column="USER_CODE" />
|
|
<result property="USER_NAME" column="USER_NAME" />
|
|
<result property="USER_PASSWORD" column="USER_PASSWORD" />
|
|
<result property="USER_REMARK" column="USER_REMARK" />
|
|
<result property="USER_FLAG" column="USER_FLAG" />
|
|
</resultMap>
|
|
</resultMaps>
|
|
<statements>
|
|
<select id="SYS_USER_SELECT" parameterClass="int" resultMap="SelectResult">
|
|
select
|
|
USER_ID,
|
|
USER_CODE,
|
|
USER_NAME,
|
|
USER_PASSWORD,
|
|
USER_REMARK,
|
|
USER_FLAG
|
|
from SYS_USER
|
|
</select>
|
|
<select id="SYS_USER_SELECT_BY_ID" parameterClass="int"
|
|
extends="SYS_USER_SELECT" resultMap="SelectResult">
|
|
where USER_ID=#USER_ID#
|
|
</select>
|
|
<select id="SYS_USER_SELECT_BY_USER_CODE" parameterClass="Hashtable"
|
|
extends="SYS_USER_SELECT" resultMap="SelectResult">
|
|
where USER_CODE=#USER_CODE# and USER_FLAG=#USER_FLAG#
|
|
</select>
|
|
<insert id="SYS_USER_INSERT_SQLSERVER" parameterClass="SYS_USER">
|
|
insert into SYS_USER (
|
|
USER_CODE,
|
|
USER_NAME,
|
|
USER_PASSWORD,
|
|
USER_REMARK,
|
|
USER_FLAG
|
|
)values(
|
|
#USER_CODE#,
|
|
#USER_NAME#,
|
|
#USER_PASSWORD#,
|
|
#USER_REMARK#,
|
|
#USER_FLAG#
|
|
)
|
|
<selectKey resultClass="int" type="post" property="USER_ID">
|
|
select @@IDENTITY as value
|
|
</selectKey>
|
|
</insert>
|
|
<insert id="SYS_USER_INSERT_ORACLE" parameterClass="SYS_USER">
|
|
insert into SYS_USER (
|
|
USER_ID,
|
|
USER_CODE,
|
|
USER_NAME,
|
|
USER_PASSWORD,
|
|
USER_REMARK,
|
|
USER_FLAG
|
|
)values(
|
|
#USER_ID#,
|
|
#USER_CODE#,
|
|
#USER_NAME#,
|
|
#USER_PASSWORD#,
|
|
#USER_REMARK#,
|
|
#USER_FLAG#
|
|
)
|
|
<selectKey resultClass="int" type="pre" property="USER_ID">
|
|
select SYS_USER_SEQ.nextval as value from DUAL
|
|
</selectKey>
|
|
</insert>
|
|
<update id="SYS_USER_UPDATE" parameterClass="SYS_USER">
|
|
update SYS_USER set
|
|
USER_PASSWORD=#USER_PASSWORD#
|
|
where USER_ID=#USER_ID#
|
|
</update>
|
|
<delete id="SYS_USER_DELETE" parameterClass="int">
|
|
delete from SYS_USER
|
|
where USER_ID=#USER_ID#
|
|
</delete>
|
|
</statements>
|
|
</sqlMap>
|