OrgFinanceMapper.xml 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
  3. <mapper namespace="com.goafanti.common.dao.OrgFinanceMapper" >
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.OrgFinance" >
  5. <id column="id" property="id" jdbcType="VARCHAR" />
  6. <result column="uid" property="uid" jdbcType="VARCHAR" />
  7. <result column="main_business_income" property="mainBusinessIncome" jdbcType="INTEGER" />
  8. <result column="management_cost" property="managementCost" jdbcType="INTEGER" />
  9. <result column="operating_profit" property="operatingProfit" jdbcType="INTEGER" />
  10. <result column="various_tax" property="variousTax" jdbcType="INTEGER" />
  11. <result column="current_asset" property="currentAsset" jdbcType="INTEGER" />
  12. <result column="net_fixed_asset" property="netFixedAsset" jdbcType="INTEGER" />
  13. <result column="total_asset" property="totalAsset" jdbcType="INTEGER" />
  14. <result column="net_asset" property="netAsset" jdbcType="INTEGER" />
  15. <result column="gross_profit" property="grossProfit" jdbcType="INTEGER" />
  16. <result column="net_profit" property="netProfit" jdbcType="INTEGER" />
  17. <result column="sales_revenue" property="salesRevenue" jdbcType="INTEGER" />
  18. </resultMap>
  19. <resultMap id="ResultMapWithBLOBs" type="com.goafanti.common.model.OrgFinance" extends="BaseResultMap" >
  20. <result column="finance_url" property="financeUrl" jdbcType="LONGVARCHAR" />
  21. </resultMap>
  22. <sql id="Base_Column_List" >
  23. id, uid, main_business_income, management_cost, operating_profit, various_tax, current_asset,
  24. net_fixed_asset, total_asset, net_asset, gross_profit, net_profit, sales_revenue
  25. </sql>
  26. <sql id="Blob_Column_List" >
  27. finance_url
  28. </sql>
  29. <select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.String" >
  30. select
  31. <include refid="Base_Column_List" />
  32. ,
  33. <include refid="Blob_Column_List" />
  34. from org_finance
  35. where id = #{id,jdbcType=VARCHAR}
  36. </select>
  37. <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
  38. delete from org_finance
  39. where id = #{id,jdbcType=VARCHAR}
  40. </delete>
  41. <insert id="insert" parameterType="com.goafanti.common.model.OrgFinance" >
  42. insert into org_finance (id, uid, main_business_income,
  43. management_cost, operating_profit, various_tax,
  44. current_asset, net_fixed_asset, total_asset,
  45. net_asset, gross_profit, net_profit,
  46. sales_revenue, finance_url)
  47. values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{mainBusinessIncome,jdbcType=INTEGER},
  48. #{managementCost,jdbcType=INTEGER}, #{operatingProfit,jdbcType=INTEGER}, #{variousTax,jdbcType=INTEGER},
  49. #{currentAsset,jdbcType=INTEGER}, #{netFixedAsset,jdbcType=INTEGER}, #{totalAsset,jdbcType=INTEGER},
  50. #{netAsset,jdbcType=INTEGER}, #{grossProfit,jdbcType=INTEGER}, #{netProfit,jdbcType=INTEGER},
  51. #{salesRevenue,jdbcType=INTEGER}, #{financeUrl,jdbcType=LONGVARCHAR})
  52. </insert>
  53. <insert id="insertSelective" parameterType="com.goafanti.common.model.OrgFinance" >
  54. insert into org_finance
  55. <trim prefix="(" suffix=")" suffixOverrides="," >
  56. <if test="id != null" >
  57. id,
  58. </if>
  59. <if test="uid != null" >
  60. uid,
  61. </if>
  62. <if test="mainBusinessIncome != null" >
  63. main_business_income,
  64. </if>
  65. <if test="managementCost != null" >
  66. management_cost,
  67. </if>
  68. <if test="operatingProfit != null" >
  69. operating_profit,
  70. </if>
  71. <if test="variousTax != null" >
  72. various_tax,
  73. </if>
  74. <if test="currentAsset != null" >
  75. current_asset,
  76. </if>
  77. <if test="netFixedAsset != null" >
  78. net_fixed_asset,
  79. </if>
  80. <if test="totalAsset != null" >
  81. total_asset,
  82. </if>
  83. <if test="netAsset != null" >
  84. net_asset,
  85. </if>
  86. <if test="grossProfit != null" >
  87. gross_profit,
  88. </if>
  89. <if test="netProfit != null" >
  90. net_profit,
  91. </if>
  92. <if test="salesRevenue != null" >
  93. sales_revenue,
  94. </if>
  95. <if test="financeUrl != null" >
  96. finance_url,
  97. </if>
  98. </trim>
  99. <trim prefix="values (" suffix=")" suffixOverrides="," >
  100. <if test="id != null" >
  101. #{id,jdbcType=VARCHAR},
  102. </if>
  103. <if test="uid != null" >
  104. #{uid,jdbcType=VARCHAR},
  105. </if>
  106. <if test="mainBusinessIncome != null" >
  107. #{mainBusinessIncome,jdbcType=INTEGER},
  108. </if>
  109. <if test="managementCost != null" >
  110. #{managementCost,jdbcType=INTEGER},
  111. </if>
  112. <if test="operatingProfit != null" >
  113. #{operatingProfit,jdbcType=INTEGER},
  114. </if>
  115. <if test="variousTax != null" >
  116. #{variousTax,jdbcType=INTEGER},
  117. </if>
  118. <if test="currentAsset != null" >
  119. #{currentAsset,jdbcType=INTEGER},
  120. </if>
  121. <if test="netFixedAsset != null" >
  122. #{netFixedAsset,jdbcType=INTEGER},
  123. </if>
  124. <if test="totalAsset != null" >
  125. #{totalAsset,jdbcType=INTEGER},
  126. </if>
  127. <if test="netAsset != null" >
  128. #{netAsset,jdbcType=INTEGER},
  129. </if>
  130. <if test="grossProfit != null" >
  131. #{grossProfit,jdbcType=INTEGER},
  132. </if>
  133. <if test="netProfit != null" >
  134. #{netProfit,jdbcType=INTEGER},
  135. </if>
  136. <if test="salesRevenue != null" >
  137. #{salesRevenue,jdbcType=INTEGER},
  138. </if>
  139. <if test="financeUrl != null" >
  140. #{financeUrl,jdbcType=LONGVARCHAR},
  141. </if>
  142. </trim>
  143. </insert>
  144. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrgFinance" >
  145. update org_finance
  146. <set >
  147. <if test="uid != null" >
  148. uid = #{uid,jdbcType=VARCHAR},
  149. </if>
  150. <if test="mainBusinessIncome != null" >
  151. main_business_income = #{mainBusinessIncome,jdbcType=INTEGER},
  152. </if>
  153. <if test="managementCost != null" >
  154. management_cost = #{managementCost,jdbcType=INTEGER},
  155. </if>
  156. <if test="operatingProfit != null" >
  157. operating_profit = #{operatingProfit,jdbcType=INTEGER},
  158. </if>
  159. <if test="variousTax != null" >
  160. various_tax = #{variousTax,jdbcType=INTEGER},
  161. </if>
  162. <if test="currentAsset != null" >
  163. current_asset = #{currentAsset,jdbcType=INTEGER},
  164. </if>
  165. <if test="netFixedAsset != null" >
  166. net_fixed_asset = #{netFixedAsset,jdbcType=INTEGER},
  167. </if>
  168. <if test="totalAsset != null" >
  169. total_asset = #{totalAsset,jdbcType=INTEGER},
  170. </if>
  171. <if test="netAsset != null" >
  172. net_asset = #{netAsset,jdbcType=INTEGER},
  173. </if>
  174. <if test="grossProfit != null" >
  175. gross_profit = #{grossProfit,jdbcType=INTEGER},
  176. </if>
  177. <if test="netProfit != null" >
  178. net_profit = #{netProfit,jdbcType=INTEGER},
  179. </if>
  180. <if test="salesRevenue != null" >
  181. sales_revenue = #{salesRevenue,jdbcType=INTEGER},
  182. </if>
  183. <if test="financeUrl != null" >
  184. finance_url = #{financeUrl,jdbcType=LONGVARCHAR},
  185. </if>
  186. </set>
  187. where id = #{id,jdbcType=VARCHAR}
  188. </update>
  189. <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.goafanti.common.model.OrgFinance" >
  190. update org_finance
  191. set uid = #{uid,jdbcType=VARCHAR},
  192. main_business_income = #{mainBusinessIncome,jdbcType=INTEGER},
  193. management_cost = #{managementCost,jdbcType=INTEGER},
  194. operating_profit = #{operatingProfit,jdbcType=INTEGER},
  195. various_tax = #{variousTax,jdbcType=INTEGER},
  196. current_asset = #{currentAsset,jdbcType=INTEGER},
  197. net_fixed_asset = #{netFixedAsset,jdbcType=INTEGER},
  198. total_asset = #{totalAsset,jdbcType=INTEGER},
  199. net_asset = #{netAsset,jdbcType=INTEGER},
  200. gross_profit = #{grossProfit,jdbcType=INTEGER},
  201. net_profit = #{netProfit,jdbcType=INTEGER},
  202. sales_revenue = #{salesRevenue,jdbcType=INTEGER},
  203. finance_url = #{financeUrl,jdbcType=LONGVARCHAR}
  204. where id = #{id,jdbcType=VARCHAR}
  205. </update>
  206. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.OrgFinance" >
  207. update org_finance
  208. set uid = #{uid,jdbcType=VARCHAR},
  209. main_business_income = #{mainBusinessIncome,jdbcType=INTEGER},
  210. management_cost = #{managementCost,jdbcType=INTEGER},
  211. operating_profit = #{operatingProfit,jdbcType=INTEGER},
  212. various_tax = #{variousTax,jdbcType=INTEGER},
  213. current_asset = #{currentAsset,jdbcType=INTEGER},
  214. net_fixed_asset = #{netFixedAsset,jdbcType=INTEGER},
  215. total_asset = #{totalAsset,jdbcType=INTEGER},
  216. net_asset = #{netAsset,jdbcType=INTEGER},
  217. gross_profit = #{grossProfit,jdbcType=INTEGER},
  218. net_profit = #{netProfit,jdbcType=INTEGER},
  219. sales_revenue = #{salesRevenue,jdbcType=INTEGER}
  220. where id = #{id,jdbcType=VARCHAR}
  221. </update>
  222. <select id="selectOrgFinanceByUid" resultMap="ResultMapWithBLOBs" parameterType="java.lang.String" >
  223. select
  224. <include refid="Base_Column_List" />
  225. ,
  226. <include refid="Blob_Column_List" />
  227. from org_finance
  228. where uid = #{uid,jdbcType=VARCHAR}
  229. </select>
  230. </mapper>