wadmin优化

Former-commit-id: 98d817bf8622e9c1dabbf71909da81a65509905e
master
wangbing 4 years ago
parent 8774eda6a9
commit 96bf9cf102

@ -1,165 +0,0 @@
<?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_LOG_ERR`</sql>
<sql id="entityColumnList">
`ID`,`LOG_ERR_TYPE`,`LOG_TITLE`,`LOG_NOTE`,`LOG_ERR_RESULT`,`LOG_ATTR1`,`LOG_ATTR2`,`LOG_ATTR3`,`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_ERR_TYPE" jdbcType="VARCHAR" property="logErrType"/>
<result column="LOG_TITLE" jdbcType="VARCHAR" property="logTitle"/>
<result column="LOG_NOTE" jdbcType="VARCHAR" property="logNote"/>
<result column="LOG_ERR_RESULT" jdbcType="VARCHAR" property="logErrResult"/>
<result column="LOG_ATTR1" jdbcType="VARCHAR" property="logAttr1"/>
<result column="LOG_ATTR2" jdbcType="VARCHAR" property="logAttr2"/>
<result column="LOG_ATTR3" jdbcType="VARCHAR" property="logAttr3"/>
<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
(
${r"#"}{request.id},
${r"#"}{request.logErrType,jdbcType=VARCHAR},
${r"#"}{request.logTitle,jdbcType=VARCHAR},
${r"#"}{request.logNote,jdbcType=VARCHAR},
${r"#"}{request.logErrResult,jdbcType=VARCHAR},
${r"#"}{request.logAttr1,jdbcType=VARCHAR},
${r"#"}{request.logAttr2,jdbcType=VARCHAR},
${r"#"}{request.logAttr3,jdbcType=VARCHAR},
0,
0,
${r"#"}{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=")">
${r"#"}{item.id},
${r"#"}{item.logErrType,jdbcType=VARCHAR},
${r"#"}{item.logTitle,jdbcType=VARCHAR},
${r"#"}{item.logNote,jdbcType=VARCHAR},
${r"#"}{item.logErrResult,jdbcType=VARCHAR},
${r"#"}{item.logAttr1,jdbcType=VARCHAR},
${r"#"}{item.logAttr2,jdbcType=VARCHAR},
${r"#"}{item.logAttr3,jdbcType=VARCHAR},
0,
0,
${r"#"}{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` = ${r'#'}{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=")">
${r'#'}{item}
</foreach>
</update>
<update id="update">
UPDATE
<include refid="table"/>
SET
`LOG_ERR_RESULT` = ${r"#"}{request.logErrResult,jdbcType=VARCHAR},
`ROW_VERSION` = `ROW_VERSION` + 1,
`LAST_UPDATE_BY` = ${r"#"}{token.userId},
`LAST_UPDATE_TIME` = sysdate()
WHERE `IS_DELETED` = 0
AND `ID` = ${r"#"}{request.id}
AND `ROW_VERSION` = ${r"#"}{request.rowVersion}
</update>
<select id="find" resultMap="logErr">
SELECT
<include refid="entityColumnList"/>
FROM
<include refid="table"/>
WHERE
`IS_DELETED` = 0
<if test="request.logErrType != null and request.logErrType != ''">
AND `LOG_ERR_TYPE` = ${r"#"}{request.logErrType}
</if>
<if test="request.logTitle != null and request.logTitle != ''">
AND `LOG_TITLE` = ${r"#"}{request.logTitle}
</if>
<if test="request.logErrResult != null and request.logErrResult != ''">
AND `LOG_ERR_RESULT` = ${r"#"}{request.logErrResult}
</if>
<if test="request.startDate != null">
AND `CREATE_TIME` &gt;= ${r"#"}{request.startDate}
</if>
<if test="request.endDate != null">
AND `CREATE_TIME` &lt;= ${r"#"}{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` = ${r'#'}{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=")">
${r'#'}{item}
</foreach>
</select>
</mapper>

@ -1,152 +0,0 @@
<?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
(
${r"#"}{request.id},
${r"#"}{request.active,jdbcType=VARCHAR},
${r"#"}{request.key,jdbcType=VARCHAR},
${r"#"}{request.value,jdbcType=VARCHAR},
0,
0,
${r"#"}{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=")">
${r"#"}{item.id},
${r"#"}{item.active,jdbcType=VARCHAR},
${r"#"}{item.key,jdbcType=VARCHAR},
${r"#"}{item.value,jdbcType=VARCHAR},
0,
0,
${r"#"}{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` = ${r'#'}{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=")">
${r'#'}{item}
</foreach>
</update>
<update id="update">
UPDATE
<include refid="table"/>
SET
`ACTIVE` = ${r"#"}{request.active,jdbcType=VARCHAR},
`KEY` = ${r"#"}{request.key,jdbcType=VARCHAR},
`VALUE` = ${r"#"}{request.value,jdbcType=VARCHAR},
`ROW_VERSION` = `ROW_VERSION` + 1,
`LAST_UPDATE_BY` = ${r"#"}{token.userId},
`LAST_UPDATE_TIME` = sysdate()
WHERE `IS_DELETED` = 0
AND `ID` = ${r"#"}{request.id}
AND `ROW_VERSION` = ${r"#"}{request.rowVersion}
</update>
<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` = ${r"#"}{request.active}
</if>
<if test="request.key != null and request.key != ''">
AND `KEY` = ${r"#"}{request.key}
</if>
<if test="request.startDate != null">
AND `CREATE_TIME` &gt;= ${r"#"}{request.startDate}
</if>
<if test="request.endDate != null">
AND `CREATE_TIME` &lt;= ${r"#"}{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` = ${r'#'}{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=")">
${r'#'}{item}
</foreach>
</select>
</mapper>

@ -1,171 +0,0 @@
<?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_LOG_ERR"</sql>
<sql id="entityColumnList">
"ID","LOG_ERR_TYPE","LOG_TITLE","LOG_NOTE","LOG_ERR_RESULT","LOG_ATTR1","LOG_ATTR2","LOG_ATTR3","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_ERR_TYPE" jdbcType="VARCHAR" property="logErrType"/>
<result column="LOG_TITLE" jdbcType="VARCHAR" property="logTitle"/>
<result column="LOG_NOTE" jdbcType="VARCHAR" property="logNote"/>
<result column="LOG_ERR_RESULT" jdbcType="VARCHAR" property="logErrResult"/>
<result column="LOG_ATTR1" jdbcType="VARCHAR" property="logAttr1"/>
<result column="LOG_ATTR2" jdbcType="VARCHAR" property="logAttr2"/>
<result column="LOG_ATTR3" jdbcType="VARCHAR" property="logAttr3"/>
<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
(
${r'#'}{request.id},
${r'#'}{request.logErrType,jdbcType=VARCHAR},
${r'#'}{request.logTitle,jdbcType=VARCHAR},
${r'#'}{request.logNote,jdbcType=VARCHAR},
${r'#'}{request.logErrResult,jdbcType=VARCHAR},
${r'#'}{request.logAttr1,jdbcType=VARCHAR},
${r'#'}{request.logAttr2,jdbcType=VARCHAR},
${r'#'}{request.logAttr3,jdbcType=VARCHAR},
0,
0,
${r'#'}{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=")">
${r'#'}{item.id},
${r'#'}{item.logErrType,jdbcType=VARCHAR},
${r'#'}{item.logTitle,jdbcType=VARCHAR},
${r'#'}{item.logNote,jdbcType=VARCHAR},
${r'#'}{item.logErrResult,jdbcType=VARCHAR},
${r'#'}{item.logAttr1,jdbcType=VARCHAR},
${r'#'}{item.logAttr2,jdbcType=VARCHAR},
${r'#'}{item.logAttr3,jdbcType=VARCHAR},
0,
0,
${r'#'}{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" = ${r'#'}{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=")">
${r'#'}{item}
</foreach>
</update>
<update id="update">
UPDATE
<include refid="table"/>
SET
"LOG_ERR_TYPE" = ${r'#'}{request.logErrType,jdbcType=VARCHAR},
"LOG_TITLE" = ${r'#'}{request.logTitle,jdbcType=VARCHAR},
"LOG_NOTE" = ${r'#'}{request.logNote,jdbcType=VARCHAR},
"LOG_ERR_RESULT" = ${r'#'}{request.logErrResult,jdbcType=VARCHAR},
"LOG_ATTR1" = ${r'#'}{request.logAttr1,jdbcType=VARCHAR},
"LOG_ATTR2" = ${r'#'}{request.logAttr2,jdbcType=VARCHAR},
"LOG_ATTR3" = ${r'#'}{request.logAttr3,jdbcType=VARCHAR},
"ROW_VERSION" = "ROW_VERSION" + 1,
"LAST_UPDATE_BY" = ${r'#'}{token.userId},
"LAST_UPDATE_TIME" = sysdate
WHERE "IS_DELETED" = 0
AND "ID" = ${r'#'}{request.id}
AND "ROW_VERSION" = ${r'#'}{request.rowVersion}
</update>
<select id="find" resultMap="logErr">
SELECT
<include refid="entityColumnList"/>
FROM
<include refid="table"/>
WHERE
"IS_DELETED" = 0
<if test="request.logErrType != null and request.logErrType != ''">
AND "LOG_ERR_TYPE" = ${r'#'}{request.logErrType}
</if>
<if test="request.logTitle != null and request.logTitle != ''">
AND "LOG_TITLE" = ${r'#'}{request.logTitle}
</if>
<if test="request.logErrResult != null and request.logErrResult != ''">
AND "LOG_ERR_RESULT" = ${r'#'}{request.logErrResult}
</if>
<if test="request.startDate != null">
AND "CREATE_TIME" &gt;= ${r"#"}{request.startDate}
</if>
<if test="request.endDate != null">
AND "CREATE_TIME" &lt;= ${r"#"}{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" = ${r'#'}{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=")">
${r'#'}{item}
</foreach>
</select>
</mapper>

@ -1,152 +0,0 @@
<?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
(
${r'#'}{request.id},
${r'#'}{request.active,jdbcType=VARCHAR},
${r'#'}{request.key,jdbcType=VARCHAR},
${r'#'}{request.value,jdbcType=VARCHAR},
0,
0,
${r'#'}{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=")">
${r'#'}{item.id},
${r'#'}{item.active,jdbcType=VARCHAR},
${r'#'}{item.key,jdbcType=VARCHAR},
${r'#'}{item.value,jdbcType=VARCHAR},
0,
0,
${r'#'}{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" = ${r'#'}{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=")">
${r'#'}{item}
</foreach>
</update>
<update id="update">
UPDATE
<include refid="table"/>
SET
"ACTIVE" = ${r'#'}{request.active,jdbcType=VARCHAR},
"KEY" = ${r'#'}{request.key,jdbcType=VARCHAR},
"VALUE" = ${r'#'}{request.value,jdbcType=VARCHAR},
"ROW_VERSION" = "ROW_VERSION" + 1,
"LAST_UPDATE_BY" = ${r'#'}{token.userId},
"LAST_UPDATE_TIME" = sysdate
WHERE "IS_DELETED" = 0
AND "ID" = ${r'#'}{request.id}
AND "ROW_VERSION" = ${r'#'}{request.rowVersion}
</update>
<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" = ${r'#'}{request.active}
</if>
<if test="request.key != null and request.key != ''">
AND "KEY" = ${r'#'}{request.key}
</if>
<if test="request.startDate != null">
AND "CREATE_TIME" &gt;= ${r"#"}{request.startDate}
</if>
<if test="request.endDate != null">
AND "CREATE_TIME" &lt;= ${r"#"}{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" = ${r'#'}{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=")">
${r'#'}{item}
</foreach>
</select>
</mapper>

@ -1,163 +0,0 @@
<?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_LOG_ERR"</sql>
<sql id="entityColumnList">
"ID","LOG_ERR_TYPE","LOG_TITLE","LOG_NOTE","LOG_ERR_RESULT","LOG_ATTR1","LOG_ATTR2","LOG_ATTR3","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_ERR_TYPE" jdbcType="VARCHAR" property="logErrType"/>
<result column="LOG_TITLE" jdbcType="VARCHAR" property="logTitle"/>
<result column="LOG_NOTE" jdbcType="VARCHAR" property="logNote"/>
<result column="LOG_ERR_RESULT" jdbcType="VARCHAR" property="logErrResult"/>
<result column="LOG_ATTR1" jdbcType="VARCHAR" property="logAttr1"/>
<result column="LOG_ATTR2" jdbcType="VARCHAR" property="logAttr2"/>
<result column="LOG_ATTR3" jdbcType="VARCHAR" property="logAttr3"/>
<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
(
${r"#"}{request.id},
${r"#"}{request.logErrType,jdbcType=VARCHAR},
${r"#"}{request.logTitle,jdbcType=VARCHAR},
${r"#"}{request.logNote,jdbcType=VARCHAR},
${r"#"}{request.logErrResult,jdbcType=VARCHAR},
${r"#"}{request.logAttr1,jdbcType=VARCHAR},
${r"#"}{request.logAttr2,jdbcType=VARCHAR},
${r"#"}{request.logAttr3,jdbcType=VARCHAR},
0,
0,
${r"#"}{token.userId,jdbcType=NUMERIC},
datetime('now','localtime'),
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=")">
${r"#"}{item.id},
${r"#"}{item.logErrType,jdbcType=VARCHAR},
${r"#"}{item.logTitle,jdbcType=VARCHAR},
${r"#"}{item.logNote,jdbcType=VARCHAR},
${r"#"}{item.logErrResult,jdbcType=VARCHAR},
${r"#"}{item.logAttr1,jdbcType=VARCHAR},
${r"#"}{item.logAttr2,jdbcType=VARCHAR},
${r"#"}{item.logAttr3,jdbcType=VARCHAR},
0,
0,
${r"#"}{token.userId,jdbcType=NUMERIC},
datetime('now','localtime'),
NULL,
NULL
</foreach >
</insert>
<update id="delete">
UPDATE
<include refid="table"/>
SET "IS_DELETED" = 1
WHERE "IS_DELETED" = 0
AND "ID" = ${r'#'}{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=")">
${r'#'}{item}
</foreach>
</update>
<update id="update">
UPDATE
<include refid="table"/>
SET
LOG_ERR_RESULT = ${r"#"}{request.logErrResult,jdbcType=VARCHAR},
"ROW_VERSION" = "ROW_VERSION" + 1,
"LAST_UPDATE_BY" = ${r"#"}{token.userId},
"LAST_UPDATE_TIME" = datetime('now','localtime')
WHERE "IS_DELETED" = 0
AND "ID" = ${r"#"}{request.id}
AND "ROW_VERSION" = ${r"#"}{request.rowVersion}
</update>
<select id="find" resultMap="logErr">
SELECT
<include refid="entityColumnList"/>
FROM
<include refid="table"/>
WHERE "IS_DELETED" = 0
<if test="request.logErrType != null and request.logErrType != ''">
AND LOG_ERR_TYPE = ${r"#"}{request.logErrType}
</if>
<if test="request.logTitle != null and request.logTitle != ''">
AND LOG_TITLE = ${r"#"}{request.logTitle}
</if>
<if test="request.logErrResult != null and request.logErrResult != ''">
AND LOG_ERR_RESULT = ${r"#"}{request.logErrResult}
</if>
<if test="request.startDate != null">
AND strftime('%s',"CREATE_TIME", 'utc')*1000 &gt;= ${r'#'}{request.startDate}
</if>
<if test="request.endDate != null">
AND strftime('%s',"CREATE_TIME", 'utc')*1000 &lt;= ${r'#'}{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" = ${r'#'}{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=")">
${r'#'}{item}
</foreach>
</select>
</mapper>

@ -1,29 +0,0 @@
package ${domain}.module.wsys.req;
import ${domain}.frame.base.BaseRequest;
import javax.validation.constraints.NotNull;
/**
* LogErrDeleteRequest -
*
* @author wangbing
* @version 0.0.1
* @since 2017-01-01
*/
public class LogErrDeleteRequest extends BaseRequest {
/**
*
*/
@NotNull(message = "[id]主键不能为空")
private long id;
public long getId() {
return this.id;
}
public void setId(long id) {
this.id = id;
}
}

@ -1,26 +0,0 @@
package ${domain}.module.wsys.rsp;
import ${domain}.frame.base.BaseResponse;
/**
* LogErrCreateResponse -
*
* @author wangbing
* @version 0.0.1
* @since 2017-01-01
*/
public class LogErrCreateResponse extends BaseResponse {
/**
*
*/
private Long id;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
}

@ -1,26 +0,0 @@
package ${domain}.module.wsys.rsp;
import ${domain}.frame.base.BaseResponse;
/**
* LogErrDeleteResponse -
*
* @author wangbing
* @version 0.0.1
* @since 2017-01-01
*/
public class LogErrDeleteResponse extends BaseResponse {
/**
*
*/
private Long result;
public Long getResult() {
return this.result;
}
public void setResult(Long result) {
this.result = result;
}
}

@ -1,26 +0,0 @@
package ${domain}.module.wsys.rsp;
import ${domain}.frame.base.BaseResponse;
/**
* LogErrUpdateResponse -
*
* @author wangbing
* @version 0.0.1
* @since 2017-01-01
*/
public class LogErrUpdateResponse extends BaseResponse {
/**
*
*/
private Long result;
public Long getResult() {
return this.result;
}
public void setResult(Long result) {
this.result = result;
}
}

@ -54,7 +54,7 @@
<field defaultValue="" fieldComment="最后更新时间" fieldLength="0" fieldName="LAST_UPDATE_TIME" fieldType="Date" isMust="false" isPrimaryKey="false" isQuery="false" isSearch="false" isSystem="true" isUnique="false"/>
</table>
</module>
<module name="wsys" needGenerate="false" note="系统" prefix="SYS_">
<module name="wsys" needGenerate="false" note="系统服务" prefix="SYS_">
<table ajax="true" api="false" create="true" delete="true" find="true" get="false" html="true" search="false" sys="true" tableComment="字典" tableName="DICT" update="true">
<field defaultValue="" fieldComment="主键" fieldLength="0" fieldName="ID" fieldType="Long" isMust="true" isPrimaryKey="true" isQuery="false" isSearch="false" isSystem="true" isUnique="false"/>
<field defaultValue="NULL" fieldComment="字典名称" fieldLength="50" fieldName="DICT_NAME" fieldType="String_var50" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false" isSystem="false" isUnique="false"/>
@ -158,10 +158,12 @@
<field defaultValue="NULL" fieldComment="部门主键" fieldLength="0" fieldName="DEPT_ID" fieldType="Long" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false" isSystem="false" isUnique="false"/>
<field defaultValue="NULL" fieldComment="部门代码" fieldLength="50" fieldName="DEPT_CODE" fieldType="String_var50" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false" isSystem="false" isUnique="false"/>
<field defaultValue="NULL" fieldComment="部门名称" fieldLength="100" fieldName="DEPT_NAME" fieldType="String_var100" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false" isSystem="false" isUnique="false"/>
<field defaultValue="NULL" fieldComment="终端类型" fieldLength="20" fieldName="TERMINAL_TYPE" fieldType="Dict" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false" isSystem="false" isUnique="false">
<field defaultValue="NULL" fieldComment="终端类型" fieldLength="20" fieldName="TERMINAL" fieldType="Select" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false" isSystem="false" isUnique="false">
<dictItem key="WEB" value="游览器"/>
<dictItem key="API" value="接口"/>
<dictItem key="PHONE" value="手机端"/>
<selectItem label="网页" value="WEB"/>
<selectItem label="终端" value="API"/>
</field>
<field defaultValue="NULL" fieldComment="终端地址" fieldLength="50" fieldName="TERMINAL_IP" fieldType="String_var50" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false" isSystem="false" isUnique="false"/>
<field defaultValue="NULL" fieldComment="终端信息" fieldLength="500" fieldName="TERMINAL_INFO" fieldType="String_var500" isMust="false" isPrimaryKey="false" isQuery="true" isSearch="false" isSystem="false" isUnique="false"/>

Loading…
Cancel
Save

Powered by TurnKey Linux.