|
|
@@ -137,6 +137,13 @@
|
|
|
<include refid="Example_Where_Clause" />
|
|
|
</if>
|
|
|
</delete>
|
|
|
+
|
|
|
+ <update id="updateByAmount">
|
|
|
+ update paybalance set pb_amount = (select sum(ifnull(pd_amount,0.0)) from paybalancedet where pd_pbid = pb_id )
|
|
|
+ where pb_id = #{id,jdbcType=INTEGER} and companyId =#{companyId}
|
|
|
+ exists (select 1 from paybalancedet where pd_pbid = pb_id );
|
|
|
+ </update>
|
|
|
+
|
|
|
<insert id="insert" parameterType="com.usoftchina.saas.money.po.Paybalance">
|
|
|
insert into paybalance (pb_code, pb_kind,
|
|
|
pb_date, pb_vendid, pb_vendcode,
|
|
|
@@ -211,9 +218,6 @@
|
|
|
<if test="updaterId != null">
|
|
|
updaterId,
|
|
|
</if>
|
|
|
- <if test="pb_amount != null">
|
|
|
- pb_amount,
|
|
|
- </if>
|
|
|
<if test="pb_text1 != null">
|
|
|
pb_text1,
|
|
|
</if>
|
|
|
@@ -235,6 +239,9 @@
|
|
|
<if test="createTime != null" >
|
|
|
createTime,
|
|
|
</if>
|
|
|
+ <if test="pb_amount != null" >
|
|
|
+ pb_amount,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="pb_code != null">
|