PromptLetter.xml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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.fuzamei.mapperInterface.PromptLetterMapper">
  4. <!--提示函 管理人接收列表 -->
  5. <select id="queryPromptLetterByAdmin" resultType="com.fuzamei.entity.PromptLetter">
  6. select
  7. t.prompt_letter_id,
  8. f.attachment_name,
  9. f.url,
  10. t.receive_time
  11. from
  12. prompt_letter t
  13. left join
  14. attachment f
  15. on
  16. t.prompt_letter_id=f.attachment_id
  17. <where>
  18. receive_person=#{receiverId}
  19. <if test="startTime!=null and endTime != null">
  20. and receive_time between #{startTime} and #{endTime}
  21. </if>
  22. </where>
  23. order by
  24. receive_time desc
  25. limit #{startPage},#{rowNum}
  26. </select>
  27. <!-- 根据条件查出符合条件的所有信息条数 -->
  28. <select id="findAllInformation" resultType="int">
  29. select
  30. count(*)
  31. from
  32. prompt_letter
  33. <where>
  34. <if test="receiverId!=null">
  35. receive_person=#{receiverId}
  36. </if>
  37. <if test="startTime!=null and endTime != null">
  38. and receive_time between #{startTime} and #{endTime}
  39. </if>
  40. </where>
  41. </select>
  42. <!--提示函上传 插入数据到提示函表 -->
  43. <insert id="insertIntoPromptLetterTable" parameterType="java.util.Map">
  44. insert into
  45. prompt_letter(prompt_letter_id,
  46. prompt_letter_name,
  47. send_person,
  48. receive_person,
  49. send_time,
  50. receive_time,
  51. hash)
  52. values(
  53. #{prompt_letter_id},
  54. #{prompt_letter_name},
  55. #{send_person},
  56. #{receive_person},
  57. #{send_time},
  58. #{receive_time},
  59. #{hash}
  60. )
  61. </insert>
  62. <!-- 提示函上传 往附件表也插入数据信息 -->
  63. <insert id="insertIntoAttachmentTable">
  64. insert into
  65. attachment(attachment_id,
  66. attachment_name,
  67. url,
  68. upload_person_id,
  69. create_time)
  70. values(#{attachmentId},
  71. #{attachmentName},
  72. #{url},
  73. #{upload_person_id},
  74. #{create_time})
  75. </insert>
  76. <!-- 提示函上传 往操作记录表也插入数据信息 -->
  77. <insert id="insertOperationHistory">
  78. insert into
  79. operation_history(operator_type_id,
  80. operator_account,
  81. operator_role,
  82. operator_person,
  83. operator_time,
  84. hash)
  85. values(#{operatorTypeId},
  86. #{operatorAccount},
  87. #{operatorRole},
  88. #{operatorPerson},
  89. #{operatorTime},
  90. #{hash})
  91. </insert>
  92. <!--发送记录查询风险提示函 ,省分行托管中心风管岗 发送时间列biao-->
  93. <select id="queryPromptLetterByVenture" resultType="com.fuzamei.entity.PromptLetter">
  94. select
  95. t.prompt_letter_id,
  96. y.person_name,
  97. f.attachment_name,
  98. f.url,
  99. t.send_time
  100. from
  101. prompt_letter t
  102. left join
  103. attachment f
  104. on
  105. t.prompt_letter_id=f.attachment_id
  106. left join
  107. t_user y
  108. on
  109. t.receive_person=y.user_id
  110. <where>
  111. <if test="startTime!=null and endTime != null">
  112. t.send_time between #{startTime} and #{endTime}
  113. </if>
  114. </where>
  115. order by
  116. send_time desc
  117. limit #{startPage},#{rowNum}
  118. </select>
  119. </mapper>