智能仲裁后端服务

CaseApplicationMapper.xml 8.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper">
  6. <resultMap type="CaseApplication" id="CaseApplicationResult">
  7. <id property="id" column="id" />
  8. <result property="caseNum" column="case_num" />
  9. <result property="caseSubjectAmount" column="case_subject_amount" />
  10. <result property="registerDate" column="register_date" />
  11. <result property="arbitratMethod" column="arbitrat_method" />
  12. <result property="caseStatus" column="case_status" />
  13. <result property="hearDate" column="hear_date" />
  14. <result property="arbitratClaims" column="arbitrat_claims" />
  15. <result property="loanStartDate" column="loan_start_date" />
  16. <result property="loanEndDate" column="loan_end_date" />
  17. <result property="claimPrinciOwed" column="claim_princi_owed" />
  18. <result property="claimInterestOwed" column="claim_interest_owed" />
  19. <result property="claimLiquidDamag" column="claim_liquid_damag" />
  20. <result property="feePayable" column="fee_payable" />
  21. <result property="paidExpenses" column="paid_expenses" />
  22. <result property="beginVideoDate" column="begin_video_date" />
  23. <result property="onlineVideoPerson" column="online_video_person" />
  24. <result property="contractNumber" column="contract_number" />
  25. <result property="createBy" column="create_by" />
  26. <result property="createTime" column="create_time" />
  27. <result property="updateBy" column="update_by" />
  28. <result property="updateTime" column="update_time" />
  29. </resultMap>
  30. <select id="selectCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
  31. select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,c.case_status ,c.hear_date ,c.arbitrat_claims ,
  32. c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
  33. c.paid_expenses ,c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
  34. c.update_by ,c.update_time
  35. from case_application c
  36. <where>
  37. <if test="caseStatus != null and caseStatus != ''">
  38. AND c.case_status = #{caseStatus}
  39. </if>
  40. <if test="caseNum != null and caseNum != ''">
  41. AND c.case_num = #{caseNum}
  42. </if>
  43. </where>
  44. </select>
  45. <select id="selectCaseApplicationCount" parameterType="CaseApplication" resultType="int">
  46. select count(1) from case_application c
  47. <where>
  48. <if test="caseNum != null and caseNum != ''">
  49. AND c.case_num = #{caseNum}
  50. </if>
  51. </where>
  52. </select>
  53. <insert id="insertCaseApplication" parameterType="CaseApplication" useGeneratedKeys="true" keyProperty="id">
  54. insert into case_application(
  55. <if test="caseNum != null and caseNum != ''">case_num,</if>
  56. <if test="caseSubjectAmount != null">case_subject_amount,</if>
  57. <if test="registerDate != null">register_date,</if>
  58. <if test="arbitratMethod != null and arbitratMethod != ''">arbitrat_method,</if>
  59. <if test="caseStatus != null ">case_status,</if>
  60. <if test="hearDate != null ">hear_date,</if>
  61. <if test="arbitratClaims != null and arbitratClaims != ''">arbitrat_claims,</if>
  62. <if test="loanStartDate != null ">loan_start_date,</if>
  63. <if test="loanEndDate != null ">loan_end_date,</if>
  64. <if test="claimPrinciOwed != null ">claim_princi_owed,</if>
  65. <if test="claimInterestOwed != null ">claim_interest_owed,</if>
  66. <if test="claimLiquidDamag != null ">claim_liquid_damag,</if>
  67. <if test="feePayable != null ">fee_payable,</if>
  68. <if test="paidExpenses != null ">paid_expenses,</if>
  69. <if test="beginVideoDate != null ">begin_video_date,</if>
  70. <if test="onlineVideoPerson != null and onlineVideoPerson != ''">online_video_person,</if>
  71. <if test="contractNumber != null and contractNumber != ''">contract_number,</if>
  72. <if test="createBy != null and createBy != ''">create_by,</if>
  73. create_time
  74. )values(
  75. <if test="caseNum != null and caseNum != ''">#{caseNum},</if>
  76. <if test="caseSubjectAmount != null">#{caseSubjectAmount},</if>
  77. <if test="registerDate != null">#{registerDate},</if>
  78. <if test="arbitratMethod != null and arbitratMethod != ''">#{arbitratMethod},</if>
  79. <if test="caseStatus != null ">#{caseStatus},</if>
  80. <if test="hearDate != null ">#{hearDate},</if>
  81. <if test="arbitratClaims != null and arbitratClaims != ''">#{arbitratClaims},</if>
  82. <if test="loanStartDate != null ">#{loanStartDate},</if>
  83. <if test="loanEndDate != null ">#{loanEndDate},</if>
  84. <if test="claimPrinciOwed != null ">#{claimPrinciOwed},</if>
  85. <if test="claimInterestOwed != null ">#{claimInterestOwed},</if>
  86. <if test="claimLiquidDamag != null ">#{claimLiquidDamag},</if>
  87. <if test="feePayable != null ">#{feePayable},</if>
  88. <if test="paidExpenses != null ">#{paidExpenses},</if>
  89. <if test="beginVideoDate != null ">#{beginVideoDate},</if>
  90. <if test="onlineVideoPerson != null and onlineVideoPerson != ''">#{onlineVideoPerson},</if>
  91. <if test="contractNumber != null and contractNumber != ''">#{contractNumber},</if>
  92. <if test="createBy != null and createBy != ''">#{createBy},</if>
  93. sysdate()
  94. )
  95. </insert>
  96. <update id="updataCaseApplication" parameterType="CaseApplication">
  97. update case_application
  98. <set>
  99. <if test="caseSubjectAmount != null">case_subject_amount = #{caseSubjectAmount},</if>
  100. <if test="registerDate != null">register_date = #{registerDate},</if>
  101. <if test="arbitratMethod != null and arbitratMethod != ''">arbitrat_method = #{arbitratMethod},</if>
  102. <if test="hearDate != null ">hear_date = #{hearDate},</if>
  103. <if test="arbitratClaims != null and arbitratClaims != ''">arbitrat_claims = #{arbitratClaims},</if>
  104. <if test="loanStartDate != null ">loan_start_date = #{loanStartDate},</if>
  105. <if test="loanEndDate != null ">loan_end_date = #{loanEndDate},</if>
  106. <if test="loanEndDate != null ">claim_princi_owed = #{claimPrinciOwed},</if>
  107. <if test="claimInterestOwed != null ">claim_interest_owed = #{claimInterestOwed},</if>
  108. <if test="claimLiquidDamag != null ">claim_liquid_damag = #{claimLiquidDamag},</if>
  109. <if test="feePayable != null ">fee_payable = #{feePayable},</if>
  110. <if test="paidExpenses != null ">paid_expenses = #{paidExpenses},</if>
  111. <if test="beginVideoDate != null ">begin_video_date = #{beginVideoDate},</if>
  112. <if test="onlineVideoPerson != null and onlineVideoPerson != ''">online_video_person = #{onlineVideoPerson},</if>
  113. <if test="contractNumber != null and contractNumber != ''">contract_number = #{contractNumber},</if>
  114. <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
  115. update_time = sysdate()
  116. </set>
  117. where id = #{id}
  118. </update>
  119. <update id="submitCaseApplication" parameterType="CaseApplication">
  120. update case_application
  121. <set>
  122. <if test="caseStatus != null">case_status = #{caseStatus},</if>
  123. <if test="arbitratorId != null and arbitratorId != ''">arbitrator_id = #{arbitratorId},</if>
  124. <if test="arbitratorName != null and arbitratorName != ''">arbitrator_name = #{arbitratorName},</if>
  125. <if test="pendingAppointArbotrar != null ">pending_appoint_arbotrar = #{pendingAppointArbotrar},</if>
  126. </set>
  127. where id = #{id}
  128. </update>
  129. <delete id="deletecaseApplication" parameterType="CaseApplication">
  130. delete from case_application where id = #{id}
  131. </delete>
  132. <select id="selectCaseApplication" parameterType="CaseApplication" resultMap="CaseApplicationResult">
  133. select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,c.case_status ,c.hear_date ,c.arbitrat_claims ,
  134. c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
  135. c.paid_expenses ,c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
  136. c.update_by ,c.update_time
  137. from case_application c
  138. <where>
  139. <if test="id != null ">
  140. AND c.id = #{id}
  141. </if>
  142. </where>
  143. </select>
  144. </mapper>