|
|
@@ -15,12 +15,13 @@
|
|
|
<result column="gross_profit" property="grossProfit" jdbcType="INTEGER" />
|
|
|
<result column="net_profit" property="netProfit" jdbcType="INTEGER" />
|
|
|
<result column="sales_revenue" property="salesRevenue" jdbcType="INTEGER" />
|
|
|
+ <result column="year" property="year" jdbcType="INTEGER" />
|
|
|
<result column="finance_url" property="financeUrl" jdbcType="VARCHAR" />
|
|
|
<result column="deleted_sign" property="deletedSign" jdbcType="INTEGER" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List" >
|
|
|
id, uid, main_business_income, management_cost, operating_profit, various_tax, current_asset,
|
|
|
- net_fixed_asset, total_asset, net_asset, gross_profit, net_profit, sales_revenue,
|
|
|
+ net_fixed_asset, total_asset, net_asset, gross_profit, net_profit, sales_revenue, year,
|
|
|
finance_url, deleted_sign
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
|
|
@@ -38,12 +39,13 @@
|
|
|
management_cost, operating_profit, various_tax,
|
|
|
current_asset, net_fixed_asset, total_asset,
|
|
|
net_asset, gross_profit, net_profit,
|
|
|
- sales_revenue, finance_url, deleted_sign)
|
|
|
+ sales_revenue, year, finance_url, deleted_sign)
|
|
|
values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{mainBusinessIncome,jdbcType=INTEGER},
|
|
|
#{managementCost,jdbcType=INTEGER}, #{operatingProfit,jdbcType=INTEGER}, #{variousTax,jdbcType=INTEGER},
|
|
|
#{currentAsset,jdbcType=INTEGER}, #{netFixedAsset,jdbcType=INTEGER}, #{totalAsset,jdbcType=INTEGER},
|
|
|
#{netAsset,jdbcType=INTEGER}, #{grossProfit,jdbcType=INTEGER}, #{netProfit,jdbcType=INTEGER},
|
|
|
- #{salesRevenue,jdbcType=INTEGER}, #{financeUrl,jdbcType=VARCHAR}, #{deletedSign,jdbcType=INTEGER})
|
|
|
+ #{salesRevenue,jdbcType=INTEGER}, #{year,jdbcType=INTEGER}, #{financeUrl,jdbcType=VARCHAR},
|
|
|
+ #{deletedSign,jdbcType=INTEGER})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.goafanti.common.model.OrgFinance" >
|
|
|
insert into org_finance
|
|
|
@@ -87,6 +89,9 @@
|
|
|
<if test="salesRevenue != null" >
|
|
|
sales_revenue,
|
|
|
</if>
|
|
|
+ <if test="year != null" >
|
|
|
+ year,
|
|
|
+ </if>
|
|
|
<if test="financeUrl != null" >
|
|
|
finance_url,
|
|
|
</if>
|
|
|
@@ -134,6 +139,9 @@
|
|
|
<if test="salesRevenue != null" >
|
|
|
#{salesRevenue,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
+ <if test="year != null" >
|
|
|
+ #{year,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
<if test="financeUrl != null" >
|
|
|
#{financeUrl,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
@@ -181,6 +189,9 @@
|
|
|
<if test="salesRevenue != null" >
|
|
|
sales_revenue = #{salesRevenue,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
+ <if test="year != null" >
|
|
|
+ year = #{year,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
<if test="financeUrl != null" >
|
|
|
finance_url = #{financeUrl,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
@@ -204,15 +215,39 @@
|
|
|
gross_profit = #{grossProfit,jdbcType=INTEGER},
|
|
|
net_profit = #{netProfit,jdbcType=INTEGER},
|
|
|
sales_revenue = #{salesRevenue,jdbcType=INTEGER},
|
|
|
+ year = #{year,jdbcType=INTEGER},
|
|
|
finance_url = #{financeUrl,jdbcType=VARCHAR},
|
|
|
deleted_sign = #{deletedSign,jdbcType=INTEGER}
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
|
|
|
- <select id="selectOrgFinanceByUid" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
|
|
- select
|
|
|
+ <select id="findOrgFinanceListByPage" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from org_finance
|
|
|
- where uid = #{uid,jdbcType=VARCHAR}
|
|
|
+ where deleted_sign = 0
|
|
|
+ <if test="uid != null">
|
|
|
+ and uid = #{uid,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="year != null">
|
|
|
+ and year = #{year,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ order by year desc
|
|
|
+ <if test="page_sql != null">
|
|
|
+ ${page_sql}
|
|
|
+ </if>
|
|
|
+
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="findOrgFinanceCount" resultType="java.lang.Integer" parameterType="String">
|
|
|
+ select count(1)
|
|
|
+ from org_finance
|
|
|
+ where deleted_sign = 0
|
|
|
+ <if test="uid != null">
|
|
|
+ and uid = #{uid,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="year != null">
|
|
|
+ and year = #{year,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
</mapper>
|