AccountRequestFundsDetailMapper.xml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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.fjhx.account.mapper.account.AccountRequestFundsDetailMapper">
  4. <select id="getPage" resultType="com.fjhx.account.entity.account.vo.AccountRequestFundsDetailVo">
  5. select
  6. arfd.id,
  7. arfd.account_request_funds_id,
  8. arfd.cost_type,
  9. arfd.amount,
  10. arfd.remarks,
  11. arfd.create_user,
  12. arfd.create_time,
  13. arfd.update_user,
  14. arfd.update_time
  15. from account_request_funds_detail arfd
  16. ${ew.customSqlSegment}
  17. </select>
  18. <select id="getListByContractId" resultType="com.fjhx.account.entity.account.vo.AccountRequestFundsDetailVo">
  19. SELECT
  20. t2.currency,
  21. t1.*
  22. FROM
  23. account_request_funds_detail t1
  24. LEFT JOIN account_request_funds t2 ON t1.account_request_funds_id = t2.id
  25. LEFT JOIN account_payment t3 ON t2.id = t3.business_id
  26. WHERE
  27. t1.contract_id = #{contractId}
  28. AND t3.`status` = 20
  29. </select>
  30. <select id="listByAccountRequestFundsId" resultType="com.fjhx.account.entity.account.vo.AccountRequestFundsDetailVo">
  31. SELECT
  32. arfd.*,
  33. c.`code` contractCode
  34. FROM
  35. account_request_funds_detail arfd
  36. LEFT JOIN bytesailing_sale.contract c ON arfd.contract_id = c.id
  37. WHERE
  38. arfd.account_request_funds_id = #{accountRequestFundsId}
  39. GROUP BY
  40. arfd.id
  41. </select>
  42. <select id="getList" resultType="com.fjhx.account.entity.account.po.AccountRequestFundsDetail">
  43. SELECT
  44. fd.*,
  45. sc.code contractCode
  46. FROM
  47. account_request_funds_detail fd
  48. LEFT JOIN bytesailing_sale.contract sc ON fd.contract_id = sc.id
  49. </select>
  50. </mapper>