|
|
@@ -0,0 +1,231 @@
|
|
|
+<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
|
|
+<mapper namespace="com.goafanti.common.dao.OrgFinanceMapper" >
|
|
|
+ <resultMap id="BaseResultMap" type="com.goafanti.common.model.OrgFinance" >
|
|
|
+ <id column="id" property="id" jdbcType="VARCHAR" />
|
|
|
+ <result column="uid" property="uid" jdbcType="VARCHAR" />
|
|
|
+ <result column="main_business_income" property="mainBusinessIncome" jdbcType="INTEGER" />
|
|
|
+ <result column="management_cost" property="managementCost" jdbcType="INTEGER" />
|
|
|
+ <result column="operating_profit" property="operatingProfit" jdbcType="INTEGER" />
|
|
|
+ <result column="various_tax" property="variousTax" jdbcType="INTEGER" />
|
|
|
+ <result column="current_asset" property="currentAsset" jdbcType="INTEGER" />
|
|
|
+ <result column="net_fixed_asset" property="netFixedAsset" jdbcType="INTEGER" />
|
|
|
+ <result column="total_asset" property="totalAsset" jdbcType="INTEGER" />
|
|
|
+ <result column="net_asset" property="netAsset" jdbcType="INTEGER" />
|
|
|
+ <result column="gross_profit" property="grossProfit" jdbcType="INTEGER" />
|
|
|
+ <result column="net_profit" property="netProfit" jdbcType="INTEGER" />
|
|
|
+ <result column="sales_revenue" property="salesRevenue" jdbcType="INTEGER" />
|
|
|
+ </resultMap>
|
|
|
+ <resultMap id="ResultMapWithBLOBs" type="com.goafanti.common.model.OrgFinance" extends="BaseResultMap" >
|
|
|
+ <result column="finance_url" property="financeUrl" jdbcType="LONGVARCHAR" />
|
|
|
+ </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
|
|
|
+ </sql>
|
|
|
+ <sql id="Blob_Column_List" >
|
|
|
+ finance_url
|
|
|
+ </sql>
|
|
|
+ <select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.String" >
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ ,
|
|
|
+ <include refid="Blob_Column_List" />
|
|
|
+ from org_finance
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </select>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
|
|
|
+ delete from org_finance
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" parameterType="com.goafanti.common.model.OrgFinance" >
|
|
|
+ insert into org_finance (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, finance_url)
|
|
|
+ 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=LONGVARCHAR})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.goafanti.common.model.OrgFinance" >
|
|
|
+ insert into org_finance
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides="," >
|
|
|
+ <if test="id != null" >
|
|
|
+ id,
|
|
|
+ </if>
|
|
|
+ <if test="uid != null" >
|
|
|
+ uid,
|
|
|
+ </if>
|
|
|
+ <if test="mainBusinessIncome != null" >
|
|
|
+ main_business_income,
|
|
|
+ </if>
|
|
|
+ <if test="managementCost != null" >
|
|
|
+ management_cost,
|
|
|
+ </if>
|
|
|
+ <if test="operatingProfit != null" >
|
|
|
+ operating_profit,
|
|
|
+ </if>
|
|
|
+ <if test="variousTax != null" >
|
|
|
+ various_tax,
|
|
|
+ </if>
|
|
|
+ <if test="currentAsset != null" >
|
|
|
+ current_asset,
|
|
|
+ </if>
|
|
|
+ <if test="netFixedAsset != null" >
|
|
|
+ net_fixed_asset,
|
|
|
+ </if>
|
|
|
+ <if test="totalAsset != null" >
|
|
|
+ total_asset,
|
|
|
+ </if>
|
|
|
+ <if test="netAsset != null" >
|
|
|
+ net_asset,
|
|
|
+ </if>
|
|
|
+ <if test="grossProfit != null" >
|
|
|
+ gross_profit,
|
|
|
+ </if>
|
|
|
+ <if test="netProfit != null" >
|
|
|
+ net_profit,
|
|
|
+ </if>
|
|
|
+ <if test="salesRevenue != null" >
|
|
|
+ sales_revenue,
|
|
|
+ </if>
|
|
|
+ <if test="financeUrl != null" >
|
|
|
+ finance_url,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
+ <if test="id != null" >
|
|
|
+ #{id,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="uid != null" >
|
|
|
+ #{uid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="mainBusinessIncome != null" >
|
|
|
+ #{mainBusinessIncome,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="managementCost != null" >
|
|
|
+ #{managementCost,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="operatingProfit != null" >
|
|
|
+ #{operatingProfit,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="variousTax != null" >
|
|
|
+ #{variousTax,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="currentAsset != null" >
|
|
|
+ #{currentAsset,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="netFixedAsset != null" >
|
|
|
+ #{netFixedAsset,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="totalAsset != null" >
|
|
|
+ #{totalAsset,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="netAsset != null" >
|
|
|
+ #{netAsset,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="grossProfit != null" >
|
|
|
+ #{grossProfit,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="netProfit != null" >
|
|
|
+ #{netProfit,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="salesRevenue != null" >
|
|
|
+ #{salesRevenue,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="financeUrl != null" >
|
|
|
+ #{financeUrl,jdbcType=LONGVARCHAR},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrgFinance" >
|
|
|
+ update org_finance
|
|
|
+ <set >
|
|
|
+ <if test="uid != null" >
|
|
|
+ uid = #{uid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="mainBusinessIncome != null" >
|
|
|
+ main_business_income = #{mainBusinessIncome,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="managementCost != null" >
|
|
|
+ management_cost = #{managementCost,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="operatingProfit != null" >
|
|
|
+ operating_profit = #{operatingProfit,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="variousTax != null" >
|
|
|
+ various_tax = #{variousTax,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="currentAsset != null" >
|
|
|
+ current_asset = #{currentAsset,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="netFixedAsset != null" >
|
|
|
+ net_fixed_asset = #{netFixedAsset,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="totalAsset != null" >
|
|
|
+ total_asset = #{totalAsset,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="netAsset != null" >
|
|
|
+ net_asset = #{netAsset,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="grossProfit != null" >
|
|
|
+ gross_profit = #{grossProfit,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="netProfit != null" >
|
|
|
+ net_profit = #{netProfit,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="salesRevenue != null" >
|
|
|
+ sales_revenue = #{salesRevenue,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="financeUrl != null" >
|
|
|
+ finance_url = #{financeUrl,jdbcType=LONGVARCHAR},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.goafanti.common.model.OrgFinance" >
|
|
|
+ update org_finance
|
|
|
+ set uid = #{uid,jdbcType=VARCHAR},
|
|
|
+ main_business_income = #{mainBusinessIncome,jdbcType=INTEGER},
|
|
|
+ management_cost = #{managementCost,jdbcType=INTEGER},
|
|
|
+ operating_profit = #{operatingProfit,jdbcType=INTEGER},
|
|
|
+ various_tax = #{variousTax,jdbcType=INTEGER},
|
|
|
+ current_asset = #{currentAsset,jdbcType=INTEGER},
|
|
|
+ net_fixed_asset = #{netFixedAsset,jdbcType=INTEGER},
|
|
|
+ total_asset = #{totalAsset,jdbcType=INTEGER},
|
|
|
+ net_asset = #{netAsset,jdbcType=INTEGER},
|
|
|
+ gross_profit = #{grossProfit,jdbcType=INTEGER},
|
|
|
+ net_profit = #{netProfit,jdbcType=INTEGER},
|
|
|
+ sales_revenue = #{salesRevenue,jdbcType=INTEGER},
|
|
|
+ finance_url = #{financeUrl,jdbcType=LONGVARCHAR}
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.OrgFinance" >
|
|
|
+ update org_finance
|
|
|
+ set uid = #{uid,jdbcType=VARCHAR},
|
|
|
+ main_business_income = #{mainBusinessIncome,jdbcType=INTEGER},
|
|
|
+ management_cost = #{managementCost,jdbcType=INTEGER},
|
|
|
+ operating_profit = #{operatingProfit,jdbcType=INTEGER},
|
|
|
+ various_tax = #{variousTax,jdbcType=INTEGER},
|
|
|
+ current_asset = #{currentAsset,jdbcType=INTEGER},
|
|
|
+ net_fixed_asset = #{netFixedAsset,jdbcType=INTEGER},
|
|
|
+ total_asset = #{totalAsset,jdbcType=INTEGER},
|
|
|
+ net_asset = #{netAsset,jdbcType=INTEGER},
|
|
|
+ gross_profit = #{grossProfit,jdbcType=INTEGER},
|
|
|
+ net_profit = #{netProfit,jdbcType=INTEGER},
|
|
|
+ sales_revenue = #{salesRevenue,jdbcType=INTEGER}
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <select id="selectOrgFinanceByUid" resultMap="ResultMapWithBLOBs" parameterType="java.lang.String" >
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ ,
|
|
|
+ <include refid="Blob_Column_List" />
|
|
|
+ from org_finance
|
|
|
+ where uid = #{uid,jdbcType=VARCHAR}
|
|
|
+ </select>
|
|
|
+</mapper>
|