InvAccountCardMapper.xml 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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.jzg.organization.mapper.InvAccountCardMapper">
  6. <resultMap id="BaseResultMap" type="com.jzg.commons.entity.account.po.InvAccountCard">
  7. <id property="id" column="id" jdbcType="BIGINT"/>
  8. <result property="cardName" column="card_name" jdbcType="VARCHAR"/>
  9. <result property="bankCardNum" column="bank_card_num" jdbcType="VARCHAR"/>
  10. <result property="accountId" column="account_id" jdbcType="BIGINT"/>
  11. <result property="accountQuality" column="account_quality" jdbcType="INTEGER"/>
  12. <result property="bankName" column="bank_name" jdbcType="VARCHAR"/>
  13. <result property="bank" column="bank" jdbcType="VARCHAR"/>
  14. <result property="bankNum" column="bank_num" jdbcType="VARCHAR"/>
  15. <result property="startCertExpirationDate" column="start_cert_expiration_date" jdbcType="TIMESTAMP"/>
  16. <result property="endCertExpirationDate" column="end_cert_expiration_date" jdbcType="TIMESTAMP"/>
  17. <result property="balance" column="balance" jdbcType="VARCHAR"/>
  18. <result property="spend" column="spend" jdbcType="VARCHAR"/>
  19. <result property="dayStrokeNum" column="day_stroke_num" jdbcType="VARCHAR"/>
  20. <result property="dayStrokeNumExcess" column="day_stroke_num_excess" jdbcType="VARCHAR"/>
  21. <result property="priDayLines" column="pri_day_lines" jdbcType="VARCHAR"/>
  22. <result property="priSingleLines" column="pri_single_lines" jdbcType="VARCHAR"/>
  23. <result property="priDayLinesExcess" column="pri_day_lines_excess" jdbcType="VARCHAR"/>
  24. <result property="priYearLines" column="pri_year_lines" jdbcType="VARCHAR"/>
  25. <result property="priYearExcess" column="pri_year_excess" jdbcType="VARCHAR"/>
  26. <result property="pubSingleLines" column="pub_single_lines" jdbcType="VARCHAR"/>
  27. <result property="pubYearLines" column="pub_year_lines" jdbcType="VARCHAR"/>
  28. <result property="pubDayLines" column="pub_day_lines" jdbcType="VARCHAR"/>
  29. <result property="pubYearExcess" column="pub_year_excess" jdbcType="VARCHAR"/>
  30. <result property="pubDayLinesExcess" column="pub_day_lines_excess" jdbcType="VARCHAR"/>
  31. <result property="createBy" column="create_by" jdbcType="VARCHAR"/>
  32. <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
  33. <result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
  34. <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
  35. <result property="isDelete" column="is_delete" jdbcType="TINYINT"/>
  36. </resultMap>
  37. <sql id="Base_Column_List">
  38. iac.id,iac.card_name,iac.bank_card_num,
  39. iac.account_id,iac.account_quality,iac.bank_name,
  40. iac.bank,iac.bank_num,iac.start_cert_expiration_date,
  41. iac.end_cert_expiration_date,iac.balance,spend,
  42. iac.day_stroke_num,iac.day_stroke_num_excess,iac.pri_day_lines,
  43. iac.pri_single_lines,iac.pri_day_lines_excess,iac.pri_year_lines,
  44. iac.pri_year_excess,iac.pub_single_lines,iac.pub_year_lines,
  45. iac.pub_day_lines,iac.pub_year_excess,iac.pub_day_lines_excess,
  46. iac.create_by,iac.create_time,iac.update_by,
  47. iac.update_time,iac.is_delete,ia.account_name
  48. </sql>
  49. <select id="queryPage" resultType="com.jzg.commons.entity.account.vo.AccountCardVo">
  50. select <include refid="Base_Column_List"/>
  51. FROM inv_account_card iac
  52. LEFT JOIN inv_account ia on ia.id = iac.account_id
  53. <where>
  54. iac.is_delete = 0
  55. <if test="param.accountName != null and param.accountName != ''">
  56. and ia.account_name like CONCAT('%',#{param.accountName}, '%')
  57. </if>
  58. <if test="param.cardName != null and param.cardName != ''">
  59. and iac.card_name = #{param.cardName}
  60. </if>
  61. <if test="param.accountQuality != null ">
  62. and iac.account_quality = #{param.accountQuality}
  63. </if>
  64. <if test="param.bankCardNum != null and param.bankCardNum != ''">
  65. and iac.bank_card_num = #{param.bankCardNum}
  66. </if>
  67. </where>
  68. ORDER BY iac.create_time DESC
  69. </select>
  70. <select id="queryById" resultType="com.jzg.commons.entity.account.vo.AccountCardVo">
  71. select <include refid="Base_Column_List"/>
  72. FROM inv_account_card iac
  73. LEFT JOIN inv_account ia on ia.id = iac.account_id
  74. <where>
  75. iac.is_delete = 0
  76. <if test="id != null and id != ''">
  77. and iac.id = #{id}
  78. </if>
  79. </where>
  80. </select>
  81. <!-- 查询业务员提现银行卡信息 lipf 2026年6月8日15:16:59 -->
  82. <select id="queryByAccountId" resultType="com.jzg.commons.entity.account.po.InvAccountCard">
  83. select * from inv_account_card iac where iac.account_id = #{accountId} and iac.system_code = #{systemCode}
  84. </select>
  85. </mapper>