Commit 99e094af by 吴佳

更改计数器从CNT表中获取数据

parent d87d4169
......@@ -3,15 +3,15 @@
<mapper namespace="com.brilliance.mda.support.mybatis.count.mapper.CounterMapper">
<insert id="insertNewCounter" >
insert into COU(COUNAM,COUVAL,COUSTP) values(#{nam},#{start},#{stp})
insert into CNT(NAM,VAL,STP) values(#{nam},#{start},#{stp})
</insert>
<select id="getCountValWithUpdate" resultType="java.lang.Integer">
select COUVAL from COU where COUNAM = #{nam} for update
select VAL from CNT where NAM = #{nam} for update
</select>
<update id="updateCounter" >
update COU set COUVAL = COUVAL + COUSTP where COUNAM = #{nam}
update CNT set VAL = VAL + STP where NAM = #{nam}
</update>
<select id="seqNextval" resultType="java.lang.Integer" >
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment