ValuationTableMapper.xml 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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.simuwang.base.mapper.ValuationTableMapper">
  4. <resultMap id="BaseResultMap" type="com.simuwang.base.pojo.dos.ValuationTableDO">
  5. <id column="id" property="id"/>
  6. <result column="file_id" property="fileId"/>
  7. <result column="fund_id" property="fundId"/>
  8. <result column="title" property="title"/>
  9. <result column="valuation_date" property="valuationDate"/>
  10. <result column="head_info" property="headInfo"/>
  11. <result column="tail_info" property="tailInfo"/>
  12. <result column="original_file" property="originalFile"/>
  13. <result column="converted_file" property="convertedFile"/>
  14. <result column="file_url" property="fileUrl"/>
  15. <result column="table_type" property="tableType"/>
  16. <result column="is_analyzed" property="isAnalyzed"/>
  17. <result column="total_market_value" property="totalMarketValue"/>
  18. <result column="net_assets_value" property="netAssetsValue"/>
  19. <result column="nav" property="nav"/>
  20. <result column="increment" property="increment"/>
  21. <result column="from_email" property="fromEmail"/>
  22. <result column="has_stock" property="hasStock"/>
  23. <result column="has_bond" property="hasBond"/>
  24. <result column="has_future" property="hasFuture"/>
  25. <result column="isvalid" property="isvalid"/>
  26. <result column="creatorid" property="creatorId"/>
  27. <result column="createtime" property="createTime"/>
  28. <result column="updaterid" property="updaterId"/>
  29. <result column="updatetime" property="updateTime"/>
  30. </resultMap>
  31. <update id="unValid">
  32. update PPW_EMAIL.valuation_table
  33. set isvalid = 0
  34. where file_id = #{fileId}
  35. </update>
  36. <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.simuwang.base.pojo.dos.ValuationTableDO" useGeneratedKeys="true">
  37. <!--@mbg.generated-->
  38. insert into PPW_EMAIL.valuation_table (fund_id,file_id,
  39. title, valuation_date, nav,
  40. head_info, tail_info, original_file,
  41. converted_file, file_url, table_type,
  42. isvalid, creatorid, createtime,
  43. updaterid, updatetime, is_analyzed,
  44. total_market_value,net_assets_value,increment,from_email)
  45. values (#{fundId,jdbcType=VARCHAR},#{fileId,jdbcType=INTEGER},
  46. #{title,jdbcType=VARCHAR}, #{valuationDate,jdbcType=DATE}, #{nav,jdbcType=DECIMAL},
  47. #{headInfo,jdbcType=VARCHAR}, #{tailInfo,jdbcType=VARCHAR}, #{originalFile,jdbcType=VARCHAR},
  48. #{convertedFile,jdbcType=VARCHAR}, #{fileUrl,jdbcType=VARCHAR}, #{tableType,jdbcType=TINYINT},
  49. #{isvalid,jdbcType=INTEGER}, #{creatorId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
  50. #{updaterId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, #{isAnalyzed,jdbcType=TINYINT},
  51. #{totalMarketValue,jdbcType=DECIMAL},#{netAssetsValue,jdbcType=DECIMAL},#{increment,jdbcType=DECIMAL},
  52. #{fromEmail,jdbcType=TINYINT})
  53. </insert>
  54. <update id="updateUpdateAnalyzed">
  55. update PPW_EMAIL.valuation_table
  56. set is_analyzed = 1,
  57. has_stock = #{hasStock},
  58. has_bond = #{hasBond},
  59. has_future = #{hasFuture}
  60. where valuation_date = #{valuationDate}
  61. and fund_id = #{fundId}
  62. and isvalid = 1
  63. </update>
  64. </mapper>