|
|
|
@ -34,16 +34,16 @@
|
|
|
|
|
)
|
|
|
|
|
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},
|
|
|
|
|
${r'#'}{request.id},
|
|
|
|
|
${r'#'}{request.seqName,jdbcType=VARCHAR},
|
|
|
|
|
${r'#'}{request.seqNote,jdbcType=VARCHAR},
|
|
|
|
|
${r'#'}{request.year,jdbcType=VARCHAR},
|
|
|
|
|
${r'#'}{request.month,jdbcType=VARCHAR},
|
|
|
|
|
${r'#'}{request.date,jdbcType=VARCHAR},
|
|
|
|
|
${r'#'}{request.nextValue,jdbcType=INTEGER},
|
|
|
|
|
0,
|
|
|
|
|
0,
|
|
|
|
|
#{token.userId,jdbcType=NUMERIC},
|
|
|
|
|
${r'#'}{token.userId,jdbcType=NUMERIC},
|
|
|
|
|
sysdate(),
|
|
|
|
|
NULL,
|
|
|
|
|
NULL
|
|
|
|
@ -58,16 +58,16 @@
|
|
|
|
|
)
|
|
|
|
|
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},
|
|
|
|
|
${r'#'}{item.id},
|
|
|
|
|
${r'#'}{item.seqName,jdbcType=VARCHAR},
|
|
|
|
|
${r'#'}{item.seqNote,jdbcType=VARCHAR},
|
|
|
|
|
${r'#'}{item.year,jdbcType=VARCHAR},
|
|
|
|
|
${r'#'}{item.month,jdbcType=VARCHAR},
|
|
|
|
|
${r'#'}{item.date,jdbcType=VARCHAR},
|
|
|
|
|
${r'#'}{item.nextValue,jdbcType=INTEGER},
|
|
|
|
|
0,
|
|
|
|
|
0,
|
|
|
|
|
#{token.userId,jdbcType=NUMERIC},
|
|
|
|
|
${r'#'}{token.userId,jdbcType=NUMERIC},
|
|
|
|
|
sysdate(),
|
|
|
|
|
NULL,
|
|
|
|
|
NULL
|
|
|
|
@ -79,7 +79,7 @@
|
|
|
|
|
<include refid="table"/>
|
|
|
|
|
SET `IS_DELETED` = 1
|
|
|
|
|
WHERE `IS_DELETED` = 0
|
|
|
|
|
AND `ID` = #{id}
|
|
|
|
|
AND `ID` = ${r'#'}{id}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<update id="deleteBatch">
|
|
|
|
@ -89,7 +89,7 @@
|
|
|
|
|
WHERE `IS_DELETED` = 0
|
|
|
|
|
AND `ID` IN
|
|
|
|
|
<foreach collection="list" item="item" index="index" separator="," open="(" close=")">
|
|
|
|
|
#{item}
|
|
|
|
|
${r'#'}{item}
|
|
|
|
|
</foreach>
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
@ -97,18 +97,18 @@
|
|
|
|
|
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},
|
|
|
|
|
`SEQ_NAME` = ${r'#'}{request.seqName,jdbcType=VARCHAR},
|
|
|
|
|
`SEQ_NOTE` = ${r'#'}{request.seqNote,jdbcType=VARCHAR},
|
|
|
|
|
`YEAR` = ${r'#'}{request.year,jdbcType=VARCHAR},
|
|
|
|
|
`MONTH` = ${r'#'}{request.month,jdbcType=VARCHAR},
|
|
|
|
|
`DATE` = ${r'#'}{request.date,jdbcType=VARCHAR},
|
|
|
|
|
`NEXT_VALUE` = ${r'#'}{request.nextValue,jdbcType=INTEGER},
|
|
|
|
|
`ROW_VERSION` = `ROW_VERSION` + 1,
|
|
|
|
|
`LAST_UPDATE_BY` = #{token.userId},
|
|
|
|
|
`LAST_UPDATE_BY` = ${r'#'}{token.userId},
|
|
|
|
|
`LAST_UPDATE_TIME` = sysdate()
|
|
|
|
|
WHERE `IS_DELETED` = 0
|
|
|
|
|
AND `ID` = #{request.id}
|
|
|
|
|
AND `ROW_VERSION` = #{request.rowVersion}
|
|
|
|
|
AND `ID` = ${r'#'}{request.id}
|
|
|
|
|
AND `ROW_VERSION` = ${r'#'}{request.rowVersion}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<select id="select" resultMap="sequence">
|
|
|
|
@ -118,16 +118,16 @@
|
|
|
|
|
<include refid="table"/>
|
|
|
|
|
WHERE `IS_DELETED` = 0
|
|
|
|
|
<if test="request.seqName != null and request.seqName != ''">
|
|
|
|
|
AND `SEQ_NAME` = #{request.seqName}
|
|
|
|
|
AND `SEQ_NAME` = ${r'#'}{request.seqName}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="request.year != null and request.year != ''">
|
|
|
|
|
AND `YEAR` = #{request.year}
|
|
|
|
|
AND `YEAR` = ${r'#'}{request.year}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="request.month != null and request.month != ''">
|
|
|
|
|
AND `MONTH` = #{request.month}
|
|
|
|
|
AND `MONTH` = ${r'#'}{request.month}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="request.date != null and request.date != ''">
|
|
|
|
|
AND `DATE` = #{request.date}
|
|
|
|
|
AND `DATE` = ${r'#'}{request.date}
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
@ -138,22 +138,22 @@
|
|
|
|
|
<include refid="table"/>
|
|
|
|
|
WHERE `IS_DELETED` = 0
|
|
|
|
|
<if test="request.seqName != null and request.seqName != ''">
|
|
|
|
|
AND `SEQ_NAME` = #{request.seqName}
|
|
|
|
|
AND `SEQ_NAME` = ${r'#'}{request.seqName}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="request.year != null and request.year != ''">
|
|
|
|
|
AND `YEAR` = #{request.year}
|
|
|
|
|
AND `YEAR` = ${r'#'}{request.year}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="request.month != null and request.month != ''">
|
|
|
|
|
AND `MONTH` = #{request.month}
|
|
|
|
|
AND `MONTH` = ${r'#'}{request.month}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="request.date != null and request.date != ''">
|
|
|
|
|
AND `DATE` = #{request.date}
|
|
|
|
|
AND `DATE` = ${r'#'}{request.date}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="request.startDate != null">
|
|
|
|
|
AND `CREATE_TIME` >= #{request.startDate}
|
|
|
|
|
AND `CREATE_TIME` >= ${r'#'}{request.startDate}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="request.endDate != null">
|
|
|
|
|
AND `CREATE_TIME` <= #{request.endDate}
|
|
|
|
|
AND `CREATE_TIME` <= ${r'#'}{request.endDate}
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
@ -171,7 +171,7 @@
|
|
|
|
|
FROM
|
|
|
|
|
<include refid="table"/>
|
|
|
|
|
WHERE `IS_DELETED` = 0
|
|
|
|
|
AND `ID` = #{request.id}
|
|
|
|
|
AND `ID` = ${r'#'}{request.id}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="getByIds" resultMap="sequence">
|
|
|
|
@ -182,7 +182,7 @@
|
|
|
|
|
WHERE `IS_DELETED` = 0
|
|
|
|
|
AND `ID` IN
|
|
|
|
|
<foreach collection="list" item="item" index="index" separator="," open="(" close=")">
|
|
|
|
|
#{item}
|
|
|
|
|
${r'#'}{item}
|
|
|
|
|
</foreach>
|
|
|
|
|
</select>
|
|
|
|
|
</mapper>
|