|
|
@@ -20,11 +20,14 @@
|
|
|
<result column="remarks" jdbcType="VARCHAR" property="remarks" />
|
|
|
<result column="total_amount" jdbcType="DECIMAL" property="totalAmount" />
|
|
|
<result column="members_count" jdbcType="INTEGER" property="membersCount" />
|
|
|
+ <result column="received" jdbcType="DECIMAL" property="received" />
|
|
|
+ <result column="foreign" jdbcType="DECIMAL" property="foreign" />
|
|
|
+ <result column="surplus" jdbcType="DECIMAL" property="surplus" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
id, parent_id, ancestors, `name`, order_num, leader, `status`, create_by, create_time,
|
|
|
update_by, update_time, lvl, finance_id, ancestors_names, accountant, remarks, total_amount,
|
|
|
- members_count
|
|
|
+ members_count, received, `foreign`, surplus
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
|
select
|
|
|
@@ -42,13 +45,15 @@
|
|
|
create_by, create_time, update_by,
|
|
|
update_time, lvl, finance_id,
|
|
|
ancestors_names, accountant, remarks,
|
|
|
- total_amount, members_count)
|
|
|
+ total_amount, members_count, received,
|
|
|
+ `foreign`, surplus)
|
|
|
values (#{parentId,jdbcType=BIGINT}, #{ancestors,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
|
|
#{orderNum,jdbcType=INTEGER}, #{leader,jdbcType=VARCHAR}, #{status,jdbcType=CHAR},
|
|
|
#{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR},
|
|
|
#{updateTime,jdbcType=TIMESTAMP}, #{lvl,jdbcType=INTEGER}, #{financeId,jdbcType=VARCHAR},
|
|
|
#{ancestorsNames,jdbcType=VARCHAR}, #{accountant,jdbcType=VARCHAR}, #{remarks,jdbcType=VARCHAR},
|
|
|
- #{totalAmount,jdbcType=DECIMAL}, #{membersCount,jdbcType=INTEGER})
|
|
|
+ #{totalAmount,jdbcType=DECIMAL}, #{membersCount,jdbcType=INTEGER}, #{received,jdbcType=DECIMAL},
|
|
|
+ #{foreign,jdbcType=DECIMAL}, #{surplus,jdbcType=DECIMAL})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.AmbSystem" useGeneratedKeys="true">
|
|
|
insert into amb_system
|
|
|
@@ -104,6 +109,15 @@
|
|
|
<if test="membersCount != null">
|
|
|
members_count,
|
|
|
</if>
|
|
|
+ <if test="received != null">
|
|
|
+ received,
|
|
|
+ </if>
|
|
|
+ <if test="foreign != null">
|
|
|
+ `foreign`,
|
|
|
+ </if>
|
|
|
+ <if test="surplus != null">
|
|
|
+ surplus,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="parentId != null">
|
|
|
@@ -157,6 +171,15 @@
|
|
|
<if test="membersCount != null">
|
|
|
#{membersCount,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
+ <if test="received != null">
|
|
|
+ #{received,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="foreign != null">
|
|
|
+ #{foreign,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="surplus != null">
|
|
|
+ #{surplus,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.AmbSystem">
|
|
|
@@ -213,6 +236,15 @@
|
|
|
<if test="membersCount != null">
|
|
|
members_count = #{membersCount,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
+ <if test="received != null">
|
|
|
+ received = #{received,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="foreign != null">
|
|
|
+ `foreign` = #{foreign,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="surplus != null">
|
|
|
+ surplus = #{surplus,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=BIGINT}
|
|
|
</update>
|
|
|
@@ -234,7 +266,10 @@
|
|
|
accountant = #{accountant,jdbcType=VARCHAR},
|
|
|
remarks = #{remarks,jdbcType=VARCHAR},
|
|
|
total_amount = #{totalAmount,jdbcType=DECIMAL},
|
|
|
- members_count = #{membersCount,jdbcType=INTEGER}
|
|
|
+ members_count = #{membersCount,jdbcType=INTEGER},
|
|
|
+ received = #{received,jdbcType=DECIMAL},
|
|
|
+ `foreign` = #{foreign,jdbcType=DECIMAL},
|
|
|
+ surplus = #{surplus,jdbcType=DECIMAL}
|
|
|
where id = #{id,jdbcType=BIGINT}
|
|
|
</update>
|
|
|
<update id="updateAncestorsNames">
|