parent
53ec456b38
commit
f9eafc07c3
@ -0,0 +1,174 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="${domain}.module.wsys.mpr.LogerrMapper">
|
||||||
|
|
||||||
|
<sql id="table">`SYS_LOGERR`</sql>
|
||||||
|
|
||||||
|
<sql id="entityColumnList">
|
||||||
|
`ID`,`LOG_TYPE`,`LOG_TITLE`,`LOG_NOTE`,`LOG_STATE`,`ROW_VERSION`,`IS_DELETED`,`CREATE_BY`,`CREATE_TIME`,`LAST_UPDATE_BY`,`LAST_UPDATE_TIME`
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<resultMap id="logerr" type="${domain}.module.wsys.ent.Logerr">
|
||||||
|
<result column="ID" jdbcType="BIGINT" property="id"/>
|
||||||
|
<result column="LOG_TYPE" jdbcType="VARCHAR" property="logType"/>
|
||||||
|
<result column="LOG_TITLE" jdbcType="VARCHAR" property="logTitle"/>
|
||||||
|
<result column="LOG_NOTE" jdbcType="VARCHAR" property="logNote"/>
|
||||||
|
<result column="LOG_STATE" jdbcType="VARCHAR" property="logState"/>
|
||||||
|
<result column="ROW_VERSION" jdbcType="BIGINT" property="rowVersion"/>
|
||||||
|
<result column="IS_DELETED" jdbcType="BIT" property="isDeleted"/>
|
||||||
|
<result column="CREATE_BY" jdbcType="BIGINT" property="createBy"/>
|
||||||
|
<result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime"/>
|
||||||
|
<result column="LAST_UPDATE_BY" jdbcType="BIGINT" property="lastUpdateBy"/>
|
||||||
|
<result column="LAST_UPDATE_TIME" jdbcType="TIMESTAMP" property="lastUpdateTime"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<insert id="insert">
|
||||||
|
INSERT INTO
|
||||||
|
<include refid="table"/>
|
||||||
|
(
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
)
|
||||||
|
VALUES
|
||||||
|
(
|
||||||
|
#{request.id},
|
||||||
|
#{request.logType,jdbcType=VARCHAR},
|
||||||
|
#{request.logTitle,jdbcType=VARCHAR},
|
||||||
|
#{request.logNote,jdbcType=VARCHAR},
|
||||||
|
#{request.logState,jdbcType=VARCHAR},
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
#{token.userId,jdbcType=NUMERIC},
|
||||||
|
sysdate(),
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<insert id="insertBatch">
|
||||||
|
INSERT INTO
|
||||||
|
<include refid="table"/>
|
||||||
|
(
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
)
|
||||||
|
VALUES
|
||||||
|
<foreach collection="list" item="item" index="index" separator="," open="(" close=")">
|
||||||
|
#{item.id},
|
||||||
|
#{item.logType,jdbcType=VARCHAR},
|
||||||
|
#{item.logTitle,jdbcType=VARCHAR},
|
||||||
|
#{item.logNote,jdbcType=VARCHAR},
|
||||||
|
#{item.logState,jdbcType=VARCHAR},
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
#{token.userId,jdbcType=NUMERIC},
|
||||||
|
sysdate(),
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="delete">
|
||||||
|
UPDATE
|
||||||
|
<include refid="table"/>
|
||||||
|
SET `IS_DELETED` = 1
|
||||||
|
WHERE `IS_DELETED` = 0
|
||||||
|
AND `ID` = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="deleteBatch">
|
||||||
|
UPDATE
|
||||||
|
<include refid="table"/>
|
||||||
|
SET `IS_DELETED` = 1
|
||||||
|
WHERE `IS_DELETED` = 0
|
||||||
|
AND `ID` IN
|
||||||
|
<foreach collection="list" item="item" index="index" separator="," open="(" close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="update">
|
||||||
|
UPDATE
|
||||||
|
<include refid="table"/>
|
||||||
|
SET
|
||||||
|
`LOG_TYPE` = #{request.logType,jdbcType=VARCHAR},
|
||||||
|
`LOG_TITLE` = #{request.logTitle,jdbcType=VARCHAR},
|
||||||
|
`LOG_NOTE` = #{request.logNote,jdbcType=VARCHAR},
|
||||||
|
`LOG_STATE` = #{request.logState,jdbcType=VARCHAR},
|
||||||
|
`ROW_VERSION` = `ROW_VERSION` + 1,
|
||||||
|
`LAST_UPDATE_BY` = #{token.userId},
|
||||||
|
`LAST_UPDATE_TIME` = sysdate()
|
||||||
|
WHERE `IS_DELETED` = 0
|
||||||
|
AND `ID` = #{request.id}
|
||||||
|
AND `ROW_VERSION` = #{request.rowVersion}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<select id="select" resultMap="logerr">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE `IS_DELETED` = 0
|
||||||
|
<if test="request.logType != null and request.logType != ''">
|
||||||
|
AND `LOG_TYPE` = #{request.logType}
|
||||||
|
</if>
|
||||||
|
<if test="request.logTitle != null and request.logTitle != ''">
|
||||||
|
AND `LOG_TITLE` = #{request.logTitle}
|
||||||
|
</if>
|
||||||
|
<if test="request.logState != null and request.logState != ''">
|
||||||
|
AND `LOG_STATE` = #{request.logState}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="find" resultMap="logerr">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE `IS_DELETED` = 0
|
||||||
|
<if test="request.logType != null and request.logType != ''">
|
||||||
|
AND `LOG_TYPE` = #{request.logType}
|
||||||
|
</if>
|
||||||
|
<if test="request.logTitle != null and request.logTitle != ''">
|
||||||
|
AND `LOG_TITLE` = #{request.logTitle}
|
||||||
|
</if>
|
||||||
|
<if test="request.logState != null and request.logState != ''">
|
||||||
|
AND `LOG_STATE` = #{request.logState}
|
||||||
|
</if>
|
||||||
|
<if test="request.startDate != null">
|
||||||
|
AND `CREATE_TIME` >= #{request.startDate}
|
||||||
|
</if>
|
||||||
|
<if test="request.endDate != null">
|
||||||
|
AND `CREATE_TIME` <= #{request.endDate}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="search" resultMap="logerr">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE `IS_DELETED` = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getById" resultMap="logerr">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE `IS_DELETED` = 0
|
||||||
|
AND `ID` = #{request.id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getByIds" resultMap="logerr">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE `IS_DELETED` = 0
|
||||||
|
AND `ID` IN
|
||||||
|
<foreach collection="list" item="item" index="index" separator="," open="(" close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
|
</mapper>
|
@ -0,0 +1,164 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="${domain}.module.wsys.mpr.ProfilesMapper">
|
||||||
|
|
||||||
|
<sql id="table">`SYS_PROFILES`</sql>
|
||||||
|
|
||||||
|
<sql id="entityColumnList">
|
||||||
|
`ID`,`ACTIVE`,`KEY`,`VALUE`,`ROW_VERSION`,`IS_DELETED`,`CREATE_BY`,`CREATE_TIME`,`LAST_UPDATE_BY`,`LAST_UPDATE_TIME`
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<resultMap id="profiles" type="${domain}.module.wsys.ent.Profiles">
|
||||||
|
<result column="ID" jdbcType="BIGINT" property="id"/>
|
||||||
|
<result column="ACTIVE" jdbcType="VARCHAR" property="active"/>
|
||||||
|
<result column="KEY" jdbcType="VARCHAR" property="key"/>
|
||||||
|
<result column="VALUE" jdbcType="VARCHAR" property="value"/>
|
||||||
|
<result column="ROW_VERSION" jdbcType="BIGINT" property="rowVersion"/>
|
||||||
|
<result column="IS_DELETED" jdbcType="BIT" property="isDeleted"/>
|
||||||
|
<result column="CREATE_BY" jdbcType="BIGINT" property="createBy"/>
|
||||||
|
<result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime"/>
|
||||||
|
<result column="LAST_UPDATE_BY" jdbcType="BIGINT" property="lastUpdateBy"/>
|
||||||
|
<result column="LAST_UPDATE_TIME" jdbcType="TIMESTAMP" property="lastUpdateTime"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<insert id="insert">
|
||||||
|
INSERT INTO
|
||||||
|
<include refid="table"/>
|
||||||
|
(
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
)
|
||||||
|
VALUES
|
||||||
|
(
|
||||||
|
#{request.id},
|
||||||
|
#{request.active,jdbcType=VARCHAR},
|
||||||
|
#{request.key,jdbcType=VARCHAR},
|
||||||
|
#{request.value,jdbcType=VARCHAR},
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
#{token.userId,jdbcType=NUMERIC},
|
||||||
|
sysdate(),
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<insert id="insertBatch">
|
||||||
|
INSERT INTO
|
||||||
|
<include refid="table"/>
|
||||||
|
(
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
)
|
||||||
|
VALUES
|
||||||
|
<foreach collection="list" item="item" index="index" separator="," open="(" close=")">
|
||||||
|
#{item.id},
|
||||||
|
#{item.active,jdbcType=VARCHAR},
|
||||||
|
#{item.key,jdbcType=VARCHAR},
|
||||||
|
#{item.value,jdbcType=VARCHAR},
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
#{token.userId,jdbcType=NUMERIC},
|
||||||
|
sysdate(),
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="delete">
|
||||||
|
UPDATE
|
||||||
|
<include refid="table"/>
|
||||||
|
SET `IS_DELETED` = 1
|
||||||
|
WHERE `IS_DELETED` = 0
|
||||||
|
AND `ID` = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="deleteBatch">
|
||||||
|
UPDATE
|
||||||
|
<include refid="table"/>
|
||||||
|
SET `IS_DELETED` = 1
|
||||||
|
WHERE `IS_DELETED` = 0
|
||||||
|
AND `ID` IN
|
||||||
|
<foreach collection="list" item="item" index="index" separator="," open="(" close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="update">
|
||||||
|
UPDATE
|
||||||
|
<include refid="table"/>
|
||||||
|
SET
|
||||||
|
`ACTIVE` = #{request.active,jdbcType=VARCHAR},
|
||||||
|
`KEY` = #{request.key,jdbcType=VARCHAR},
|
||||||
|
`VALUE` = #{request.value,jdbcType=VARCHAR},
|
||||||
|
`ROW_VERSION` = `ROW_VERSION` + 1,
|
||||||
|
`LAST_UPDATE_BY` = #{token.userId},
|
||||||
|
`LAST_UPDATE_TIME` = sysdate()
|
||||||
|
WHERE `IS_DELETED` = 0
|
||||||
|
AND `ID` = #{request.id}
|
||||||
|
AND `ROW_VERSION` = #{request.rowVersion}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<select id="select" resultMap="profiles">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE `IS_DELETED` = 0
|
||||||
|
<if test="request.active != null and request.active != ''">
|
||||||
|
AND `ACTIVE` = #{request.active}
|
||||||
|
</if>
|
||||||
|
<if test="request.key != null and request.key != ''">
|
||||||
|
AND `KEY` = #{request.key}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="find" resultMap="profiles">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE `IS_DELETED` = 0
|
||||||
|
<if test="request.active != null and request.active != ''">
|
||||||
|
AND `ACTIVE` = #{request.active}
|
||||||
|
</if>
|
||||||
|
<if test="request.key != null and request.key != ''">
|
||||||
|
AND `KEY` = #{request.key}
|
||||||
|
</if>
|
||||||
|
<if test="request.startDate != null">
|
||||||
|
AND `CREATE_TIME` >= #{request.startDate}
|
||||||
|
</if>
|
||||||
|
<if test="request.endDate != null">
|
||||||
|
AND `CREATE_TIME` <= #{request.endDate}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="search" resultMap="profiles">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE `IS_DELETED` = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getById" resultMap="profiles">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE `IS_DELETED` = 0
|
||||||
|
AND `ID` = #{request.id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getByIds" resultMap="profiles">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE `IS_DELETED` = 0
|
||||||
|
AND `ID` IN
|
||||||
|
<foreach collection="list" item="item" index="index" separator="," open="(" close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
|
</mapper>
|
@ -0,0 +1,188 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="${domain}.module.wsys.mpr.SequenceMapper">
|
||||||
|
|
||||||
|
<sql id="table">`SYS_SEQUENCE`</sql>
|
||||||
|
|
||||||
|
<sql id="entityColumnList">
|
||||||
|
`ID`,`SEQ_NAME`,`SEQ_NOTE`,`YEAR`,`MONTH`,`DATE`,`NEXT_VALUE`,`ROW_VERSION`,`IS_DELETED`,`CREATE_BY`,`CREATE_TIME`,`LAST_UPDATE_BY`,`LAST_UPDATE_TIME`
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<resultMap id="sequence" type="${domain}.module.wsys.ent.Sequence">
|
||||||
|
<result column="ID" jdbcType="BIGINT" property="id"/>
|
||||||
|
<result column="SEQ_NAME" jdbcType="VARCHAR" property="seqName"/>
|
||||||
|
<result column="SEQ_NOTE" jdbcType="VARCHAR" property="seqNote"/>
|
||||||
|
<result column="YEAR" jdbcType="VARCHAR" property="year"/>
|
||||||
|
<result column="MONTH" jdbcType="VARCHAR" property="month"/>
|
||||||
|
<result column="DATE" jdbcType="VARCHAR" property="date"/>
|
||||||
|
<result column="NEXT_VALUE" jdbcType="INTEGER" property="nextValue"/>
|
||||||
|
<result column="ROW_VERSION" jdbcType="BIGINT" property="rowVersion"/>
|
||||||
|
<result column="IS_DELETED" jdbcType="BIT" property="isDeleted"/>
|
||||||
|
<result column="CREATE_BY" jdbcType="BIGINT" property="createBy"/>
|
||||||
|
<result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime"/>
|
||||||
|
<result column="LAST_UPDATE_BY" jdbcType="BIGINT" property="lastUpdateBy"/>
|
||||||
|
<result column="LAST_UPDATE_TIME" jdbcType="TIMESTAMP" property="lastUpdateTime"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<insert id="insert">
|
||||||
|
INSERT INTO
|
||||||
|
<include refid="table"/>
|
||||||
|
(
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
)
|
||||||
|
VALUES
|
||||||
|
(
|
||||||
|
#{request.id},
|
||||||
|
#{request.seqName,jdbcType=VARCHAR},
|
||||||
|
#{request.seqNote,jdbcType=VARCHAR},
|
||||||
|
#{request.year,jdbcType=VARCHAR},
|
||||||
|
#{request.month,jdbcType=VARCHAR},
|
||||||
|
#{request.date,jdbcType=VARCHAR},
|
||||||
|
#{request.nextValue,jdbcType=INTEGER},
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
#{token.userId,jdbcType=NUMERIC},
|
||||||
|
sysdate(),
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<insert id="insertBatch">
|
||||||
|
INSERT INTO
|
||||||
|
<include refid="table"/>
|
||||||
|
(
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
)
|
||||||
|
VALUES
|
||||||
|
<foreach collection="list" item="item" index="index" separator="," open="(" close=")">
|
||||||
|
#{item.id},
|
||||||
|
#{item.seqName,jdbcType=VARCHAR},
|
||||||
|
#{item.seqNote,jdbcType=VARCHAR},
|
||||||
|
#{item.year,jdbcType=VARCHAR},
|
||||||
|
#{item.month,jdbcType=VARCHAR},
|
||||||
|
#{item.date,jdbcType=VARCHAR},
|
||||||
|
#{item.nextValue,jdbcType=INTEGER},
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
#{token.userId,jdbcType=NUMERIC},
|
||||||
|
sysdate(),
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="delete">
|
||||||
|
UPDATE
|
||||||
|
<include refid="table"/>
|
||||||
|
SET `IS_DELETED` = 1
|
||||||
|
WHERE `IS_DELETED` = 0
|
||||||
|
AND `ID` = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="deleteBatch">
|
||||||
|
UPDATE
|
||||||
|
<include refid="table"/>
|
||||||
|
SET `IS_DELETED` = 1
|
||||||
|
WHERE `IS_DELETED` = 0
|
||||||
|
AND `ID` IN
|
||||||
|
<foreach collection="list" item="item" index="index" separator="," open="(" close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="update">
|
||||||
|
UPDATE
|
||||||
|
<include refid="table"/>
|
||||||
|
SET
|
||||||
|
`SEQ_NAME` = #{request.seqName,jdbcType=VARCHAR},
|
||||||
|
`SEQ_NOTE` = #{request.seqNote,jdbcType=VARCHAR},
|
||||||
|
`YEAR` = #{request.year,jdbcType=VARCHAR},
|
||||||
|
`MONTH` = #{request.month,jdbcType=VARCHAR},
|
||||||
|
`DATE` = #{request.date,jdbcType=VARCHAR},
|
||||||
|
`NEXT_VALUE` = #{request.nextValue,jdbcType=INTEGER},
|
||||||
|
`ROW_VERSION` = `ROW_VERSION` + 1,
|
||||||
|
`LAST_UPDATE_BY` = #{token.userId},
|
||||||
|
`LAST_UPDATE_TIME` = sysdate()
|
||||||
|
WHERE `IS_DELETED` = 0
|
||||||
|
AND `ID` = #{request.id}
|
||||||
|
AND `ROW_VERSION` = #{request.rowVersion}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<select id="select" resultMap="sequence">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE `IS_DELETED` = 0
|
||||||
|
<if test="request.seqName != null and request.seqName != ''">
|
||||||
|
AND `SEQ_NAME` = #{request.seqName}
|
||||||
|
</if>
|
||||||
|
<if test="request.year != null and request.year != ''">
|
||||||
|
AND `YEAR` = #{request.year}
|
||||||
|
</if>
|
||||||
|
<if test="request.month != null and request.month != ''">
|
||||||
|
AND `MONTH` = #{request.month}
|
||||||
|
</if>
|
||||||
|
<if test="request.date != null and request.date != ''">
|
||||||
|
AND `DATE` = #{request.date}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="find" resultMap="sequence">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE `IS_DELETED` = 0
|
||||||
|
<if test="request.seqName != null and request.seqName != ''">
|
||||||
|
AND `SEQ_NAME` = #{request.seqName}
|
||||||
|
</if>
|
||||||
|
<if test="request.year != null and request.year != ''">
|
||||||
|
AND `YEAR` = #{request.year}
|
||||||
|
</if>
|
||||||
|
<if test="request.month != null and request.month != ''">
|
||||||
|
AND `MONTH` = #{request.month}
|
||||||
|
</if>
|
||||||
|
<if test="request.date != null and request.date != ''">
|
||||||
|
AND `DATE` = #{request.date}
|
||||||
|
</if>
|
||||||
|
<if test="request.startDate != null">
|
||||||
|
AND `CREATE_TIME` >= #{request.startDate}
|
||||||
|
</if>
|
||||||
|
<if test="request.endDate != null">
|
||||||
|
AND `CREATE_TIME` <= #{request.endDate}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="search" resultMap="sequence">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE `IS_DELETED` = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getById" resultMap="sequence">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE `IS_DELETED` = 0
|
||||||
|
AND `ID` = #{request.id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getByIds" resultMap="sequence">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE `IS_DELETED` = 0
|
||||||
|
AND `ID` IN
|
||||||
|
<foreach collection="list" item="item" index="index" separator="," open="(" close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
|
</mapper>
|
@ -0,0 +1,184 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="${domain}.module.wsys.mpr.VisitorMapper">
|
||||||
|
|
||||||
|
<sql id="table">`SYS_VISITOR`</sql>
|
||||||
|
|
||||||
|
<sql id="entityColumnList">
|
||||||
|
`ID`,`APP_NAME`,`APP_NOTE`,`APP_KEY`,`APP_SECRET`,`VALID`,`ROW_VERSION`,`IS_DELETED`,`CREATE_BY`,`CREATE_TIME`,`LAST_UPDATE_BY`,`LAST_UPDATE_TIME`
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<resultMap id="visitor" type="${domain}.module.wsys.ent.Visitor">
|
||||||
|
<result column="ID" jdbcType="BIGINT" property="id"/>
|
||||||
|
<result column="APP_NAME" jdbcType="VARCHAR" property="appName"/>
|
||||||
|
<result column="APP_NOTE" jdbcType="VARCHAR" property="appNote"/>
|
||||||
|
<result column="APP_KEY" jdbcType="VARCHAR" property="appKey"/>
|
||||||
|
<result column="APP_SECRET" jdbcType="VARCHAR" property="appSecret"/>
|
||||||
|
<result column="VALID" jdbcType="BIT" property="valid"/>
|
||||||
|
<result column="ROW_VERSION" jdbcType="BIGINT" property="rowVersion"/>
|
||||||
|
<result column="IS_DELETED" jdbcType="BIT" property="isDeleted"/>
|
||||||
|
<result column="CREATE_BY" jdbcType="BIGINT" property="createBy"/>
|
||||||
|
<result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime"/>
|
||||||
|
<result column="LAST_UPDATE_BY" jdbcType="BIGINT" property="lastUpdateBy"/>
|
||||||
|
<result column="LAST_UPDATE_TIME" jdbcType="TIMESTAMP" property="lastUpdateTime"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<insert id="insert">
|
||||||
|
INSERT INTO
|
||||||
|
<include refid="table"/>
|
||||||
|
(
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
)
|
||||||
|
VALUES
|
||||||
|
(
|
||||||
|
#{request.id},
|
||||||
|
#{request.appName,jdbcType=VARCHAR},
|
||||||
|
#{request.appNote,jdbcType=VARCHAR},
|
||||||
|
#{request.appKey,jdbcType=VARCHAR},
|
||||||
|
#{request.appSecret,jdbcType=VARCHAR},
|
||||||
|
#{request.valid,jdbcType=BIT},
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
#{token.userId,jdbcType=NUMERIC},
|
||||||
|
sysdate(),
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<insert id="insertBatch">
|
||||||
|
INSERT INTO
|
||||||
|
<include refid="table"/>
|
||||||
|
(
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
)
|
||||||
|
VALUES
|
||||||
|
<foreach collection="list" item="item" index="index" separator="," open="(" close=")">
|
||||||
|
#{item.id},
|
||||||
|
#{item.appName,jdbcType=VARCHAR},
|
||||||
|
#{item.appNote,jdbcType=VARCHAR},
|
||||||
|
#{item.appKey,jdbcType=VARCHAR},
|
||||||
|
#{item.appSecret,jdbcType=VARCHAR},
|
||||||
|
#{item.valid,jdbcType=BIT},
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
#{token.userId,jdbcType=NUMERIC},
|
||||||
|
sysdate(),
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="delete">
|
||||||
|
UPDATE
|
||||||
|
<include refid="table"/>
|
||||||
|
SET `IS_DELETED` = 1
|
||||||
|
WHERE `IS_DELETED` = 0
|
||||||
|
AND `ID` = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="deleteBatch">
|
||||||
|
UPDATE
|
||||||
|
<include refid="table"/>
|
||||||
|
SET `IS_DELETED` = 1
|
||||||
|
WHERE `IS_DELETED` = 0
|
||||||
|
AND `ID` IN
|
||||||
|
<foreach collection="list" item="item" index="index" separator="," open="(" close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="update">
|
||||||
|
UPDATE
|
||||||
|
<include refid="table"/>
|
||||||
|
SET
|
||||||
|
`APP_NAME` = #{request.appName,jdbcType=VARCHAR},
|
||||||
|
`APP_NOTE` = #{request.appNote,jdbcType=VARCHAR},
|
||||||
|
`APP_KEY` = #{request.appKey,jdbcType=VARCHAR},
|
||||||
|
`APP_SECRET` = #{request.appSecret,jdbcType=VARCHAR},
|
||||||
|
`VALID` = #{request.valid,jdbcType=BIT},
|
||||||
|
`ROW_VERSION` = `ROW_VERSION` + 1,
|
||||||
|
`LAST_UPDATE_BY` = #{token.userId},
|
||||||
|
`LAST_UPDATE_TIME` = sysdate()
|
||||||
|
WHERE `IS_DELETED` = 0
|
||||||
|
AND `ID` = #{request.id}
|
||||||
|
AND `ROW_VERSION` = #{request.rowVersion}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<select id="select" resultMap="visitor">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE `IS_DELETED` = 0
|
||||||
|
<if test="request.appName != null and request.appName != ''">
|
||||||
|
AND `APP_NAME` = #{request.appName}
|
||||||
|
</if>
|
||||||
|
<if test="request.appKey != null and request.appKey != ''">
|
||||||
|
AND `APP_KEY` = #{request.appKey}
|
||||||
|
</if>
|
||||||
|
<if test="request.appSecret != null and request.appSecret != ''">
|
||||||
|
AND `APP_SECRET` = #{request.appSecret}
|
||||||
|
</if>
|
||||||
|
<if test="request.valid != null">
|
||||||
|
AND `VALID` = #{request.valid}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="find" resultMap="visitor">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE `IS_DELETED` = 0
|
||||||
|
<if test="request.appName != null and request.appName != ''">
|
||||||
|
AND `APP_NAME` = #{request.appName}
|
||||||
|
</if>
|
||||||
|
<if test="request.appKey != null and request.appKey != ''">
|
||||||
|
AND `APP_KEY` = #{request.appKey}
|
||||||
|
</if>
|
||||||
|
<if test="request.appSecret != null and request.appSecret != ''">
|
||||||
|
AND `APP_SECRET` = #{request.appSecret}
|
||||||
|
</if>
|
||||||
|
<if test="request.valid != null">
|
||||||
|
AND `VALID` = #{request.valid}
|
||||||
|
</if>
|
||||||
|
<if test="request.startDate != null">
|
||||||
|
AND `CREATE_TIME` >= #{request.startDate}
|
||||||
|
</if>
|
||||||
|
<if test="request.endDate != null">
|
||||||
|
AND `CREATE_TIME` <= #{request.endDate}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="search" resultMap="visitor">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE `IS_DELETED` = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getById" resultMap="visitor">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE `IS_DELETED` = 0
|
||||||
|
AND `ID` = #{request.id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getByIds" resultMap="visitor">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE `IS_DELETED` = 0
|
||||||
|
AND `ID` IN
|
||||||
|
<foreach collection="list" item="item" index="index" separator="," open="(" close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
|
</mapper>
|
@ -0,0 +1,180 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="${domain}.module.wsys.mpr.VisitorResMapper">
|
||||||
|
|
||||||
|
<sql id="table">`SYS_VISITOR_RES`</sql>
|
||||||
|
|
||||||
|
<sql id="entityColumnList">
|
||||||
|
`ID`,`APP_ID`,`APP_KEY`,`RES_ID`,`RES_CODE`,`ROW_VERSION`,`IS_DELETED`,`CREATE_BY`,`CREATE_TIME`,`LAST_UPDATE_BY`,`LAST_UPDATE_TIME`
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<resultMap id="visitorRes" type="${domain}.module.wsys.ent.VisitorRes">
|
||||||
|
<result column="ID" jdbcType="BIGINT" property="id"/>
|
||||||
|
<result column="APP_ID" jdbcType="BIGINT" property="appId"/>
|
||||||
|
<result column="APP_KEY" jdbcType="VARCHAR" property="appKey"/>
|
||||||
|
<result column="RES_ID" jdbcType="BIGINT" property="resId"/>
|
||||||
|
<result column="RES_CODE" jdbcType="VARCHAR" property="resCode"/>
|
||||||
|
<result column="ROW_VERSION" jdbcType="BIGINT" property="rowVersion"/>
|
||||||
|
<result column="IS_DELETED" jdbcType="BIT" property="isDeleted"/>
|
||||||
|
<result column="CREATE_BY" jdbcType="BIGINT" property="createBy"/>
|
||||||
|
<result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime"/>
|
||||||
|
<result column="LAST_UPDATE_BY" jdbcType="BIGINT" property="lastUpdateBy"/>
|
||||||
|
<result column="LAST_UPDATE_TIME" jdbcType="TIMESTAMP" property="lastUpdateTime"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<insert id="insert">
|
||||||
|
INSERT INTO
|
||||||
|
<include refid="table"/>
|
||||||
|
(
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
)
|
||||||
|
VALUES
|
||||||
|
(
|
||||||
|
#{request.id},
|
||||||
|
#{request.appId,jdbcType=BIGINT},
|
||||||
|
#{request.appKey,jdbcType=VARCHAR},
|
||||||
|
#{request.resId,jdbcType=BIGINT},
|
||||||
|
#{request.resCode,jdbcType=VARCHAR},
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
#{token.userId,jdbcType=NUMERIC},
|
||||||
|
sysdate(),
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<insert id="insertBatch">
|
||||||
|
INSERT INTO
|
||||||
|
<include refid="table"/>
|
||||||
|
(
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
)
|
||||||
|
VALUES
|
||||||
|
<foreach collection="list" item="item" index="index" separator="," open="(" close=")">
|
||||||
|
#{item.id},
|
||||||
|
#{item.appId,jdbcType=BIGINT},
|
||||||
|
#{item.appKey,jdbcType=VARCHAR},
|
||||||
|
#{item.resId,jdbcType=BIGINT},
|
||||||
|
#{item.resCode,jdbcType=VARCHAR},
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
#{token.userId,jdbcType=NUMERIC},
|
||||||
|
sysdate(),
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="delete">
|
||||||
|
UPDATE
|
||||||
|
<include refid="table"/>
|
||||||
|
SET `IS_DELETED` = 1
|
||||||
|
WHERE `IS_DELETED` = 0
|
||||||
|
AND `ID` = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="deleteBatch">
|
||||||
|
UPDATE
|
||||||
|
<include refid="table"/>
|
||||||
|
SET `IS_DELETED` = 1
|
||||||
|
WHERE `IS_DELETED` = 0
|
||||||
|
AND `ID` IN
|
||||||
|
<foreach collection="list" item="item" index="index" separator="," open="(" close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="update">
|
||||||
|
UPDATE
|
||||||
|
<include refid="table"/>
|
||||||
|
SET
|
||||||
|
`APP_ID` = #{request.appId,jdbcType=BIGINT},
|
||||||
|
`APP_KEY` = #{request.appKey,jdbcType=VARCHAR},
|
||||||
|
`RES_ID` = #{request.resId,jdbcType=BIGINT},
|
||||||
|
`RES_CODE` = #{request.resCode,jdbcType=VARCHAR},
|
||||||
|
`ROW_VERSION` = `ROW_VERSION` + 1,
|
||||||
|
`LAST_UPDATE_BY` = #{token.userId},
|
||||||
|
`LAST_UPDATE_TIME` = sysdate()
|
||||||
|
WHERE `IS_DELETED` = 0
|
||||||
|
AND `ID` = #{request.id}
|
||||||
|
AND `ROW_VERSION` = #{request.rowVersion}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<select id="select" resultMap="visitorRes">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE `IS_DELETED` = 0
|
||||||
|
<if test="request.appId != null and request.appId != 0">
|
||||||
|
AND `APP_ID` = #{request.appId}
|
||||||
|
</if>
|
||||||
|
<if test="request.appKey != null and request.appKey != ''">
|
||||||
|
AND `APP_KEY` = #{request.appKey}
|
||||||
|
</if>
|
||||||
|
<if test="request.resId != null and request.resId != 0">
|
||||||
|
AND `RES_ID` = #{request.resId}
|
||||||
|
</if>
|
||||||
|
<if test="request.resCode != null and request.resCode != ''">
|
||||||
|
AND `RES_CODE` = #{request.resCode}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="find" resultMap="visitorRes">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE `IS_DELETED` = 0
|
||||||
|
<if test="request.appId != null and request.appId != 0">
|
||||||
|
AND `APP_ID` = #{request.appId}
|
||||||
|
</if>
|
||||||
|
<if test="request.appKey != null and request.appKey != ''">
|
||||||
|
AND `APP_KEY` = #{request.appKey}
|
||||||
|
</if>
|
||||||
|
<if test="request.resId != null and request.resId != 0">
|
||||||
|
AND `RES_ID` = #{request.resId}
|
||||||
|
</if>
|
||||||
|
<if test="request.resCode != null and request.resCode != ''">
|
||||||
|
AND `RES_CODE` = #{request.resCode}
|
||||||
|
</if>
|
||||||
|
<if test="request.startDate != null">
|
||||||
|
AND `CREATE_TIME` >= #{request.startDate}
|
||||||
|
</if>
|
||||||
|
<if test="request.endDate != null">
|
||||||
|
AND `CREATE_TIME` <= #{request.endDate}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="search" resultMap="visitorRes">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE `IS_DELETED` = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getById" resultMap="visitorRes">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE `IS_DELETED` = 0
|
||||||
|
AND `ID` = #{request.id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getByIds" resultMap="visitorRes">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE `IS_DELETED` = 0
|
||||||
|
AND `ID` IN
|
||||||
|
<foreach collection="list" item="item" index="index" separator="," open="(" close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
|
</mapper>
|
@ -0,0 +1,176 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="${domain}.module.wsys.mpr.LogerrMapper">
|
||||||
|
|
||||||
|
<sql id="table">"SYS_LOGERR"</sql>
|
||||||
|
|
||||||
|
<sql id="entityColumnList">
|
||||||
|
"ID","LOG_TYPE","LOG_TITLE","LOG_NOTE","LOG_STATE","ROW_VERSION","IS_DELETED","CREATE_BY","CREATE_TIME","LAST_UPDATE_BY","LAST_UPDATE_TIME"
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<resultMap id="logerr" type="${domain}.module.wsys.ent.Logerr">
|
||||||
|
<result column="ID" jdbcType="BIGINT" property="id"/>
|
||||||
|
<result column="LOG_TYPE" jdbcType="VARCHAR" property="logType"/>
|
||||||
|
<result column="LOG_TITLE" jdbcType="VARCHAR" property="logTitle"/>
|
||||||
|
<result column="LOG_NOTE" jdbcType="VARCHAR" property="logNote"/>
|
||||||
|
<result column="LOG_STATE" jdbcType="VARCHAR" property="logState"/>
|
||||||
|
<result column="ROW_VERSION" jdbcType="BIGINT" property="rowVersion"/>
|
||||||
|
<result column="IS_DELETED" jdbcType="BIT" property="isDeleted"/>
|
||||||
|
<result column="CREATE_BY" jdbcType="BIGINT" property="createBy"/>
|
||||||
|
<result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime"/>
|
||||||
|
<result column="LAST_UPDATE_BY" jdbcType="BIGINT" property="lastUpdateBy"/>
|
||||||
|
<result column="LAST_UPDATE_TIME" jdbcType="TIMESTAMP" property="lastUpdateTime"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<insert id="insert">
|
||||||
|
INSERT INTO
|
||||||
|
<include refid="table"/>
|
||||||
|
(
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
)
|
||||||
|
VALUES
|
||||||
|
(
|
||||||
|
#{request.id},
|
||||||
|
#{request.logType,jdbcType=VARCHAR},
|
||||||
|
#{request.logTitle,jdbcType=VARCHAR},
|
||||||
|
#{request.logNote,jdbcType=VARCHAR},
|
||||||
|
#{request.logState,jdbcType=VARCHAR},
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
#{token.userId,jdbcType=NUMERIC},
|
||||||
|
sysdate,
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<insert id="insertBatch">
|
||||||
|
INSERT INTO
|
||||||
|
<include refid="table"/>
|
||||||
|
(
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
)
|
||||||
|
VALUES
|
||||||
|
<foreach collection="list" item="item" index="index" separator="," open="(" close=")">
|
||||||
|
(
|
||||||
|
#{item.id},
|
||||||
|
#{item.logType,jdbcType=VARCHAR},
|
||||||
|
#{item.logTitle,jdbcType=VARCHAR},
|
||||||
|
#{item.logNote,jdbcType=VARCHAR},
|
||||||
|
#{item.logState,jdbcType=VARCHAR},
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
#{token.userId,jdbcType=NUMERIC},
|
||||||
|
sysdate,
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
)
|
||||||
|
</foreach >
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="delete">
|
||||||
|
UPDATE
|
||||||
|
<include refid="table"/>
|
||||||
|
SET "IS_DELETED" = 1
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
AND "ID" = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="deleteBatch">
|
||||||
|
UPDATE
|
||||||
|
<include refid="table"/>
|
||||||
|
SET "IS_DELETED" = 1
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
AND "ID" IN
|
||||||
|
<foreach collection="list" item="item" index="index" separator="," open="(" close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="update">
|
||||||
|
UPDATE
|
||||||
|
<include refid="table"/>
|
||||||
|
SET
|
||||||
|
"LOG_TYPE" = #{request.logType,jdbcType=VARCHAR},
|
||||||
|
"LOG_TITLE" = #{request.logTitle,jdbcType=VARCHAR},
|
||||||
|
"LOG_NOTE" = #{request.logNote,jdbcType=VARCHAR},
|
||||||
|
"LOG_STATE" = #{request.logState,jdbcType=VARCHAR},
|
||||||
|
"ROW_VERSION" = "ROW_VERSION" + 1,
|
||||||
|
"LAST_UPDATE_BY" = #{token.userId},
|
||||||
|
"LAST_UPDATE_TIME" = sysdate
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
AND "ID" = #{request.id}
|
||||||
|
AND "ROW_VERSION" = #{request.rowVersion}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<select id="select" resultMap="logerr">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
<if test="request.logType != null and request.logType != ''">
|
||||||
|
AND "LOG_TYPE" = #{request.logType}
|
||||||
|
</if>
|
||||||
|
<if test="request.logTitle != null and request.logTitle != ''">
|
||||||
|
AND "LOG_TITLE" = #{request.logTitle}
|
||||||
|
</if>
|
||||||
|
<if test="request.logState != null and request.logState != ''">
|
||||||
|
AND "LOG_STATE" = #{request.logState}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="find" resultMap="logerr">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
<if test="request.logType != null and request.logType != ''">
|
||||||
|
AND "LOG_TYPE" = #{request.logType}
|
||||||
|
</if>
|
||||||
|
<if test="request.logTitle != null and request.logTitle != ''">
|
||||||
|
AND "LOG_TITLE" = #{request.logTitle}
|
||||||
|
</if>
|
||||||
|
<if test="request.logState != null and request.logState != ''">
|
||||||
|
AND "LOG_STATE" = #{request.logState}
|
||||||
|
</if>
|
||||||
|
<if test="request.startDate != null">
|
||||||
|
AND "CREATE_TIME" >= #{request.startDate}
|
||||||
|
</if>
|
||||||
|
<if test="request.endDate != null">
|
||||||
|
AND "CREATE_TIME" <= #{request.endDate}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="search" resultMap="logerr">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getById" resultMap="logerr">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
AND "ID" = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getByIds" resultMap="logerr">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
AND "ID" IN
|
||||||
|
<foreach collection="list" item="item" index="index" separator="," open="(" close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
|
</mapper>
|
@ -0,0 +1,166 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="${domain}.module.wsys.mpr.ProfilesMapper">
|
||||||
|
|
||||||
|
<sql id="table">"SYS_PROFILES"</sql>
|
||||||
|
|
||||||
|
<sql id="entityColumnList">
|
||||||
|
"ID","ACTIVE","KEY","VALUE","ROW_VERSION","IS_DELETED","CREATE_BY","CREATE_TIME","LAST_UPDATE_BY","LAST_UPDATE_TIME"
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<resultMap id="profiles" type="${domain}.module.wsys.ent.Profiles">
|
||||||
|
<result column="ID" jdbcType="BIGINT" property="id"/>
|
||||||
|
<result column="ACTIVE" jdbcType="VARCHAR" property="active"/>
|
||||||
|
<result column="KEY" jdbcType="VARCHAR" property="key"/>
|
||||||
|
<result column="VALUE" jdbcType="VARCHAR" property="value"/>
|
||||||
|
<result column="ROW_VERSION" jdbcType="BIGINT" property="rowVersion"/>
|
||||||
|
<result column="IS_DELETED" jdbcType="BIT" property="isDeleted"/>
|
||||||
|
<result column="CREATE_BY" jdbcType="BIGINT" property="createBy"/>
|
||||||
|
<result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime"/>
|
||||||
|
<result column="LAST_UPDATE_BY" jdbcType="BIGINT" property="lastUpdateBy"/>
|
||||||
|
<result column="LAST_UPDATE_TIME" jdbcType="TIMESTAMP" property="lastUpdateTime"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<insert id="insert">
|
||||||
|
INSERT INTO
|
||||||
|
<include refid="table"/>
|
||||||
|
(
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
)
|
||||||
|
VALUES
|
||||||
|
(
|
||||||
|
#{request.id},
|
||||||
|
#{request.active,jdbcType=VARCHAR},
|
||||||
|
#{request.key,jdbcType=VARCHAR},
|
||||||
|
#{request.value,jdbcType=VARCHAR},
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
#{token.userId,jdbcType=NUMERIC},
|
||||||
|
sysdate,
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<insert id="insertBatch">
|
||||||
|
INSERT INTO
|
||||||
|
<include refid="table"/>
|
||||||
|
(
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
)
|
||||||
|
VALUES
|
||||||
|
<foreach collection="list" item="item" index="index" separator="," open="(" close=")">
|
||||||
|
(
|
||||||
|
#{item.id},
|
||||||
|
#{item.active,jdbcType=VARCHAR},
|
||||||
|
#{item.key,jdbcType=VARCHAR},
|
||||||
|
#{item.value,jdbcType=VARCHAR},
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
#{token.userId,jdbcType=NUMERIC},
|
||||||
|
sysdate,
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
)
|
||||||
|
</foreach >
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="delete">
|
||||||
|
UPDATE
|
||||||
|
<include refid="table"/>
|
||||||
|
SET "IS_DELETED" = 1
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
AND "ID" = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="deleteBatch">
|
||||||
|
UPDATE
|
||||||
|
<include refid="table"/>
|
||||||
|
SET "IS_DELETED" = 1
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
AND "ID" IN
|
||||||
|
<foreach collection="list" item="item" index="index" separator="," open="(" close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="update">
|
||||||
|
UPDATE
|
||||||
|
<include refid="table"/>
|
||||||
|
SET
|
||||||
|
"ACTIVE" = #{request.active,jdbcType=VARCHAR},
|
||||||
|
"KEY" = #{request.key,jdbcType=VARCHAR},
|
||||||
|
"VALUE" = #{request.value,jdbcType=VARCHAR},
|
||||||
|
"ROW_VERSION" = "ROW_VERSION" + 1,
|
||||||
|
"LAST_UPDATE_BY" = #{token.userId},
|
||||||
|
"LAST_UPDATE_TIME" = sysdate
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
AND "ID" = #{request.id}
|
||||||
|
AND "ROW_VERSION" = #{request.rowVersion}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<select id="select" resultMap="profiles">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
<if test="request.active != null and request.active != ''">
|
||||||
|
AND "ACTIVE" = #{request.active}
|
||||||
|
</if>
|
||||||
|
<if test="request.key != null and request.key != ''">
|
||||||
|
AND "KEY" = #{request.key}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="find" resultMap="profiles">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
<if test="request.active != null and request.active != ''">
|
||||||
|
AND "ACTIVE" = #{request.active}
|
||||||
|
</if>
|
||||||
|
<if test="request.key != null and request.key != ''">
|
||||||
|
AND "KEY" = #{request.key}
|
||||||
|
</if>
|
||||||
|
<if test="request.startDate != null">
|
||||||
|
AND "CREATE_TIME" >= #{request.startDate}
|
||||||
|
</if>
|
||||||
|
<if test="request.endDate != null">
|
||||||
|
AND "CREATE_TIME" <= #{request.endDate}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="search" resultMap="profiles">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getById" resultMap="profiles">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
AND "ID" = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getByIds" resultMap="profiles">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
AND "ID" IN
|
||||||
|
<foreach collection="list" item="item" index="index" separator="," open="(" close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
|
</mapper>
|
@ -0,0 +1,190 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="${domain}.module.wsys.mpr.SequenceMapper">
|
||||||
|
|
||||||
|
<sql id="table">"SYS_SEQUENCE"</sql>
|
||||||
|
|
||||||
|
<sql id="entityColumnList">
|
||||||
|
"ID","SEQ_NAME","SEQ_NOTE","YEAR","MONTH","DATE","NEXT_VALUE","ROW_VERSION","IS_DELETED","CREATE_BY","CREATE_TIME","LAST_UPDATE_BY","LAST_UPDATE_TIME"
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<resultMap id="sequence" type="${domain}.module.wsys.ent.Sequence">
|
||||||
|
<result column="ID" jdbcType="BIGINT" property="id"/>
|
||||||
|
<result column="SEQ_NAME" jdbcType="VARCHAR" property="seqName"/>
|
||||||
|
<result column="SEQ_NOTE" jdbcType="VARCHAR" property="seqNote"/>
|
||||||
|
<result column="YEAR" jdbcType="VARCHAR" property="year"/>
|
||||||
|
<result column="MONTH" jdbcType="VARCHAR" property="month"/>
|
||||||
|
<result column="DATE" jdbcType="VARCHAR" property="date"/>
|
||||||
|
<result column="NEXT_VALUE" jdbcType="INTEGER" property="nextValue"/>
|
||||||
|
<result column="ROW_VERSION" jdbcType="BIGINT" property="rowVersion"/>
|
||||||
|
<result column="IS_DELETED" jdbcType="BIT" property="isDeleted"/>
|
||||||
|
<result column="CREATE_BY" jdbcType="BIGINT" property="createBy"/>
|
||||||
|
<result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime"/>
|
||||||
|
<result column="LAST_UPDATE_BY" jdbcType="BIGINT" property="lastUpdateBy"/>
|
||||||
|
<result column="LAST_UPDATE_TIME" jdbcType="TIMESTAMP" property="lastUpdateTime"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<insert id="insert">
|
||||||
|
INSERT INTO
|
||||||
|
<include refid="table"/>
|
||||||
|
(
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
)
|
||||||
|
VALUES
|
||||||
|
(
|
||||||
|
#{request.id},
|
||||||
|
#{request.seqName,jdbcType=VARCHAR},
|
||||||
|
#{request.seqNote,jdbcType=VARCHAR},
|
||||||
|
#{request.year,jdbcType=VARCHAR},
|
||||||
|
#{request.month,jdbcType=VARCHAR},
|
||||||
|
#{request.date,jdbcType=VARCHAR},
|
||||||
|
#{request.nextValue,jdbcType=INTEGER},
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
#{token.userId,jdbcType=NUMERIC},
|
||||||
|
sysdate,
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<insert id="insertBatch">
|
||||||
|
INSERT INTO
|
||||||
|
<include refid="table"/>
|
||||||
|
(
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
)
|
||||||
|
VALUES
|
||||||
|
<foreach collection="list" item="item" index="index" separator="," open="(" close=")">
|
||||||
|
(
|
||||||
|
#{item.id},
|
||||||
|
#{item.seqName,jdbcType=VARCHAR},
|
||||||
|
#{item.seqNote,jdbcType=VARCHAR},
|
||||||
|
#{item.year,jdbcType=VARCHAR},
|
||||||
|
#{item.month,jdbcType=VARCHAR},
|
||||||
|
#{item.date,jdbcType=VARCHAR},
|
||||||
|
#{item.nextValue,jdbcType=INTEGER},
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
#{token.userId,jdbcType=NUMERIC},
|
||||||
|
sysdate,
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
)
|
||||||
|
</foreach >
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="delete">
|
||||||
|
UPDATE
|
||||||
|
<include refid="table"/>
|
||||||
|
SET "IS_DELETED" = 1
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
AND "ID" = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="deleteBatch">
|
||||||
|
UPDATE
|
||||||
|
<include refid="table"/>
|
||||||
|
SET "IS_DELETED" = 1
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
AND "ID" IN
|
||||||
|
<foreach collection="list" item="item" index="index" separator="," open="(" close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="update">
|
||||||
|
UPDATE
|
||||||
|
<include refid="table"/>
|
||||||
|
SET
|
||||||
|
"SEQ_NAME" = #{request.seqName,jdbcType=VARCHAR},
|
||||||
|
"SEQ_NOTE" = #{request.seqNote,jdbcType=VARCHAR},
|
||||||
|
"YEAR" = #{request.year,jdbcType=VARCHAR},
|
||||||
|
"MONTH" = #{request.month,jdbcType=VARCHAR},
|
||||||
|
"DATE" = #{request.date,jdbcType=VARCHAR},
|
||||||
|
"NEXT_VALUE" = #{request.nextValue,jdbcType=INTEGER},
|
||||||
|
"ROW_VERSION" = "ROW_VERSION" + 1,
|
||||||
|
"LAST_UPDATE_BY" = #{token.userId},
|
||||||
|
"LAST_UPDATE_TIME" = sysdate
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
AND "ID" = #{request.id}
|
||||||
|
AND "ROW_VERSION" = #{request.rowVersion}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<select id="select" resultMap="sequence">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
<if test="request.seqName != null and request.seqName != ''">
|
||||||
|
AND "SEQ_NAME" = #{request.seqName}
|
||||||
|
</if>
|
||||||
|
<if test="request.year != null and request.year != ''">
|
||||||
|
AND "YEAR" = #{request.year}
|
||||||
|
</if>
|
||||||
|
<if test="request.month != null and request.month != ''">
|
||||||
|
AND "MONTH" = #{request.month}
|
||||||
|
</if>
|
||||||
|
<if test="request.date != null and request.date != ''">
|
||||||
|
AND "DATE" = #{request.date}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="find" resultMap="sequence">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
<if test="request.seqName != null and request.seqName != ''">
|
||||||
|
AND "SEQ_NAME" = #{request.seqName}
|
||||||
|
</if>
|
||||||
|
<if test="request.year != null and request.year != ''">
|
||||||
|
AND "YEAR" = #{request.year}
|
||||||
|
</if>
|
||||||
|
<if test="request.month != null and request.month != ''">
|
||||||
|
AND "MONTH" = #{request.month}
|
||||||
|
</if>
|
||||||
|
<if test="request.date != null and request.date != ''">
|
||||||
|
AND "DATE" = #{request.date}
|
||||||
|
</if>
|
||||||
|
<if test="request.startDate != null">
|
||||||
|
AND "CREATE_TIME" >= #{request.startDate}
|
||||||
|
</if>
|
||||||
|
<if test="request.endDate != null">
|
||||||
|
AND "CREATE_TIME" <= #{request.endDate}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="search" resultMap="sequence">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getById" resultMap="sequence">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
AND "ID" = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getByIds" resultMap="sequence">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
AND "ID" IN
|
||||||
|
<foreach collection="list" item="item" index="index" separator="," open="(" close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
|
</mapper>
|
@ -0,0 +1,186 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="${domain}.module.wsys.mpr.VisitorMapper">
|
||||||
|
|
||||||
|
<sql id="table">"SYS_VISITOR"</sql>
|
||||||
|
|
||||||
|
<sql id="entityColumnList">
|
||||||
|
"ID","APP_NAME","APP_NOTE","APP_KEY","APP_SECRET","VALID","ROW_VERSION","IS_DELETED","CREATE_BY","CREATE_TIME","LAST_UPDATE_BY","LAST_UPDATE_TIME"
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<resultMap id="visitor" type="${domain}.module.wsys.ent.Visitor">
|
||||||
|
<result column="ID" jdbcType="BIGINT" property="id"/>
|
||||||
|
<result column="APP_NAME" jdbcType="VARCHAR" property="appName"/>
|
||||||
|
<result column="APP_NOTE" jdbcType="VARCHAR" property="appNote"/>
|
||||||
|
<result column="APP_KEY" jdbcType="VARCHAR" property="appKey"/>
|
||||||
|
<result column="APP_SECRET" jdbcType="VARCHAR" property="appSecret"/>
|
||||||
|
<result column="VALID" jdbcType="BIT" property="valid"/>
|
||||||
|
<result column="ROW_VERSION" jdbcType="BIGINT" property="rowVersion"/>
|
||||||
|
<result column="IS_DELETED" jdbcType="BIT" property="isDeleted"/>
|
||||||
|
<result column="CREATE_BY" jdbcType="BIGINT" property="createBy"/>
|
||||||
|
<result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime"/>
|
||||||
|
<result column="LAST_UPDATE_BY" jdbcType="BIGINT" property="lastUpdateBy"/>
|
||||||
|
<result column="LAST_UPDATE_TIME" jdbcType="TIMESTAMP" property="lastUpdateTime"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<insert id="insert">
|
||||||
|
INSERT INTO
|
||||||
|
<include refid="table"/>
|
||||||
|
(
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
)
|
||||||
|
VALUES
|
||||||
|
(
|
||||||
|
#{request.id},
|
||||||
|
#{request.appName,jdbcType=VARCHAR},
|
||||||
|
#{request.appNote,jdbcType=VARCHAR},
|
||||||
|
#{request.appKey,jdbcType=VARCHAR},
|
||||||
|
#{request.appSecret,jdbcType=VARCHAR},
|
||||||
|
#{request.valid,jdbcType=BIT},
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
#{token.userId,jdbcType=NUMERIC},
|
||||||
|
sysdate,
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<insert id="insertBatch">
|
||||||
|
INSERT INTO
|
||||||
|
<include refid="table"/>
|
||||||
|
(
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
)
|
||||||
|
VALUES
|
||||||
|
<foreach collection="list" item="item" index="index" separator="," open="(" close=")">
|
||||||
|
(
|
||||||
|
#{item.id},
|
||||||
|
#{item.appName,jdbcType=VARCHAR},
|
||||||
|
#{item.appNote,jdbcType=VARCHAR},
|
||||||
|
#{item.appKey,jdbcType=VARCHAR},
|
||||||
|
#{item.appSecret,jdbcType=VARCHAR},
|
||||||
|
#{item.valid,jdbcType=BIT},
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
#{token.userId,jdbcType=NUMERIC},
|
||||||
|
sysdate,
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
)
|
||||||
|
</foreach >
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="delete">
|
||||||
|
UPDATE
|
||||||
|
<include refid="table"/>
|
||||||
|
SET "IS_DELETED" = 1
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
AND "ID" = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="deleteBatch">
|
||||||
|
UPDATE
|
||||||
|
<include refid="table"/>
|
||||||
|
SET "IS_DELETED" = 1
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
AND "ID" IN
|
||||||
|
<foreach collection="list" item="item" index="index" separator="," open="(" close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="update">
|
||||||
|
UPDATE
|
||||||
|
<include refid="table"/>
|
||||||
|
SET
|
||||||
|
"APP_NAME" = #{request.appName,jdbcType=VARCHAR},
|
||||||
|
"APP_NOTE" = #{request.appNote,jdbcType=VARCHAR},
|
||||||
|
"APP_KEY" = #{request.appKey,jdbcType=VARCHAR},
|
||||||
|
"APP_SECRET" = #{request.appSecret,jdbcType=VARCHAR},
|
||||||
|
"VALID" = #{request.valid,jdbcType=BIT},
|
||||||
|
"ROW_VERSION" = "ROW_VERSION" + 1,
|
||||||
|
"LAST_UPDATE_BY" = #{token.userId},
|
||||||
|
"LAST_UPDATE_TIME" = sysdate
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
AND "ID" = #{request.id}
|
||||||
|
AND "ROW_VERSION" = #{request.rowVersion}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<select id="select" resultMap="visitor">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
<if test="request.appName != null and request.appName != ''">
|
||||||
|
AND "APP_NAME" = #{request.appName}
|
||||||
|
</if>
|
||||||
|
<if test="request.appKey != null and request.appKey != ''">
|
||||||
|
AND "APP_KEY" = #{request.appKey}
|
||||||
|
</if>
|
||||||
|
<if test="request.appSecret != null and request.appSecret != ''">
|
||||||
|
AND "APP_SECRET" = #{request.appSecret}
|
||||||
|
</if>
|
||||||
|
<if test="request.valid != null">
|
||||||
|
AND "VALID" = #{request.valid}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="find" resultMap="visitor">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
<if test="request.appName != null and request.appName != ''">
|
||||||
|
AND "APP_NAME" = #{request.appName}
|
||||||
|
</if>
|
||||||
|
<if test="request.appKey != null and request.appKey != ''">
|
||||||
|
AND "APP_KEY" = #{request.appKey}
|
||||||
|
</if>
|
||||||
|
<if test="request.appSecret != null and request.appSecret != ''">
|
||||||
|
AND "APP_SECRET" = #{request.appSecret}
|
||||||
|
</if>
|
||||||
|
<if test="request.valid != null">
|
||||||
|
AND "VALID" = #{request.valid}
|
||||||
|
</if>
|
||||||
|
<if test="request.startDate != null">
|
||||||
|
AND "CREATE_TIME" >= #{request.startDate}
|
||||||
|
</if>
|
||||||
|
<if test="request.endDate != null">
|
||||||
|
AND "CREATE_TIME" <= #{request.endDate}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="search" resultMap="visitor">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getById" resultMap="visitor">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
AND "ID" = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getByIds" resultMap="visitor">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
AND "ID" IN
|
||||||
|
<foreach collection="list" item="item" index="index" separator="," open="(" close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
|
</mapper>
|
@ -0,0 +1,182 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="${domain}.module.wsys.mpr.VisitorResMapper">
|
||||||
|
|
||||||
|
<sql id="table">"SYS_VISITOR_RES"</sql>
|
||||||
|
|
||||||
|
<sql id="entityColumnList">
|
||||||
|
"ID","APP_ID","APP_KEY","RES_ID","RES_CODE","ROW_VERSION","IS_DELETED","CREATE_BY","CREATE_TIME","LAST_UPDATE_BY","LAST_UPDATE_TIME"
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<resultMap id="visitorRes" type="${domain}.module.wsys.ent.VisitorRes">
|
||||||
|
<result column="ID" jdbcType="BIGINT" property="id"/>
|
||||||
|
<result column="APP_ID" jdbcType="BIGINT" property="appId"/>
|
||||||
|
<result column="APP_KEY" jdbcType="VARCHAR" property="appKey"/>
|
||||||
|
<result column="RES_ID" jdbcType="BIGINT" property="resId"/>
|
||||||
|
<result column="RES_CODE" jdbcType="VARCHAR" property="resCode"/>
|
||||||
|
<result column="ROW_VERSION" jdbcType="BIGINT" property="rowVersion"/>
|
||||||
|
<result column="IS_DELETED" jdbcType="BIT" property="isDeleted"/>
|
||||||
|
<result column="CREATE_BY" jdbcType="BIGINT" property="createBy"/>
|
||||||
|
<result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime"/>
|
||||||
|
<result column="LAST_UPDATE_BY" jdbcType="BIGINT" property="lastUpdateBy"/>
|
||||||
|
<result column="LAST_UPDATE_TIME" jdbcType="TIMESTAMP" property="lastUpdateTime"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<insert id="insert">
|
||||||
|
INSERT INTO
|
||||||
|
<include refid="table"/>
|
||||||
|
(
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
)
|
||||||
|
VALUES
|
||||||
|
(
|
||||||
|
#{request.id},
|
||||||
|
#{request.appId,jdbcType=BIGINT},
|
||||||
|
#{request.appKey,jdbcType=VARCHAR},
|
||||||
|
#{request.resId,jdbcType=BIGINT},
|
||||||
|
#{request.resCode,jdbcType=VARCHAR},
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
#{token.userId,jdbcType=NUMERIC},
|
||||||
|
sysdate,
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<insert id="insertBatch">
|
||||||
|
INSERT INTO
|
||||||
|
<include refid="table"/>
|
||||||
|
(
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
)
|
||||||
|
VALUES
|
||||||
|
<foreach collection="list" item="item" index="index" separator="," open="(" close=")">
|
||||||
|
(
|
||||||
|
#{item.id},
|
||||||
|
#{item.appId,jdbcType=BIGINT},
|
||||||
|
#{item.appKey,jdbcType=VARCHAR},
|
||||||
|
#{item.resId,jdbcType=BIGINT},
|
||||||
|
#{item.resCode,jdbcType=VARCHAR},
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
#{token.userId,jdbcType=NUMERIC},
|
||||||
|
sysdate,
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
)
|
||||||
|
</foreach >
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="delete">
|
||||||
|
UPDATE
|
||||||
|
<include refid="table"/>
|
||||||
|
SET "IS_DELETED" = 1
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
AND "ID" = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="deleteBatch">
|
||||||
|
UPDATE
|
||||||
|
<include refid="table"/>
|
||||||
|
SET "IS_DELETED" = 1
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
AND "ID" IN
|
||||||
|
<foreach collection="list" item="item" index="index" separator="," open="(" close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="update">
|
||||||
|
UPDATE
|
||||||
|
<include refid="table"/>
|
||||||
|
SET
|
||||||
|
"APP_ID" = #{request.appId,jdbcType=BIGINT},
|
||||||
|
"APP_KEY" = #{request.appKey,jdbcType=VARCHAR},
|
||||||
|
"RES_ID" = #{request.resId,jdbcType=BIGINT},
|
||||||
|
"RES_CODE" = #{request.resCode,jdbcType=VARCHAR},
|
||||||
|
"ROW_VERSION" = "ROW_VERSION" + 1,
|
||||||
|
"LAST_UPDATE_BY" = #{token.userId},
|
||||||
|
"LAST_UPDATE_TIME" = sysdate
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
AND "ID" = #{request.id}
|
||||||
|
AND "ROW_VERSION" = #{request.rowVersion}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<select id="select" resultMap="visitorRes">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
<if test="request.appId != null and request.appId != 0">
|
||||||
|
AND "APP_ID" = #{request.appId}
|
||||||
|
</if>
|
||||||
|
<if test="request.appKey != null and request.appKey != ''">
|
||||||
|
AND "APP_KEY" = #{request.appKey}
|
||||||
|
</if>
|
||||||
|
<if test="request.resId != null and request.resId != 0">
|
||||||
|
AND "RES_ID" = #{request.resId}
|
||||||
|
</if>
|
||||||
|
<if test="request.resCode != null and request.resCode != ''">
|
||||||
|
AND "RES_CODE" = #{request.resCode}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="find" resultMap="visitorRes">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
<if test="request.appId != null and request.appId != 0">
|
||||||
|
AND "APP_ID" = #{request.appId}
|
||||||
|
</if>
|
||||||
|
<if test="request.appKey != null and request.appKey != ''">
|
||||||
|
AND "APP_KEY" = #{request.appKey}
|
||||||
|
</if>
|
||||||
|
<if test="request.resId != null and request.resId != 0">
|
||||||
|
AND "RES_ID" = #{request.resId}
|
||||||
|
</if>
|
||||||
|
<if test="request.resCode != null and request.resCode != ''">
|
||||||
|
AND "RES_CODE" = #{request.resCode}
|
||||||
|
</if>
|
||||||
|
<if test="request.startDate != null">
|
||||||
|
AND "CREATE_TIME" >= #{request.startDate}
|
||||||
|
</if>
|
||||||
|
<if test="request.endDate != null">
|
||||||
|
AND "CREATE_TIME" <= #{request.endDate}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="search" resultMap="visitorRes">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getById" resultMap="visitorRes">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
AND "ID" = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getByIds" resultMap="visitorRes">
|
||||||
|
SELECT
|
||||||
|
<include refid="entityColumnList"/>
|
||||||
|
FROM
|
||||||
|
<include refid="table"/>
|
||||||
|
WHERE "IS_DELETED" = 0
|
||||||
|
AND "ID" IN
|
||||||
|
<foreach collection="list" item="item" index="index" separator="," open="(" close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
|
</mapper>
|
Loading…
Reference in new issue