KwpWalletTransferMapper.xml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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.sckw.payment.dao.KwpWalletTransferMapper">
  4. <resultMap id="BaseResultMap" type="com.sckw.payment.model.KwpWalletTransfer">
  5. <!--@mbg.generated-->
  6. <!--@Table kwp_wallet_transfer-->
  7. <id column="id" jdbcType="BIGINT" property="id"/>
  8. <result column="order_no" jdbcType="VARCHAR" property="orderNo"/>
  9. <result column="uid" jdbcType="VARCHAR" property="uid"/>
  10. <result column="from_ent" jdbcType="BIGINT" property="fromEnt"/>
  11. <result column="filter" jdbcType="VARCHAR" property="filter"/>
  12. <result column="to_ent" jdbcType="BIGINT" property="toEnt"/>
  13. <result column="channel" jdbcType="VARCHAR" property="channel"/>
  14. <result column="money" jdbcType="DECIMAL" property="money"/>
  15. <result column="remark" jdbcType="VARCHAR" property="remark"/>
  16. <result column="create_by" jdbcType="BIGINT" property="createBy"/>
  17. <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
  18. <result column="update_by" jdbcType="BIGINT" property="updateBy"/>
  19. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
  20. <result column="del_flag" jdbcType="INTEGER" property="delFlag"/>
  21. <result column="status" jdbcType="INTEGER" property="status"/>
  22. </resultMap>
  23. <sql id="Base_Column_List">
  24. <!--@mbg.generated-->
  25. id,
  26. order_no,
  27. `uid`,
  28. from_ent,
  29. `filter`,
  30. to_ent,
  31. channel,
  32. money,
  33. remark,
  34. create_by,
  35. create_time,
  36. update_by,
  37. update_time,
  38. del_flag,
  39. `status`
  40. </sql>
  41. <select id="pageList" resultMap="BaseResultMap">
  42. select *
  43. from kwp_wallet_transfer kwt
  44. <where>
  45. kwt.del_flag = 0
  46. <if test="moneyPage.channel != null and moneyPage.channel != ''">
  47. and kwt.channel = #{moneyPage.channel,jdbcType=VARCHAR}
  48. </if>
  49. <if test="moneyPage.uid != null and moneyPage.uid != ''">
  50. and kwt.uid = #{moneyPage.uid,jdbcType=VARCHAR}
  51. </if>
  52. <if test="moneyPage.filter != null and moneyPage.filter != ''">
  53. and kwt.filter = #{moneyPage.filter,jdbcType=VARCHAR}
  54. </if>
  55. <if test="moneyPage.keywords != null and moneyPage.keywords != ''">
  56. and kwt.order_no like concat('%', #{moneyPage.keywords,jdbcType=VARCHAR}, '%')
  57. </if>
  58. </where>
  59. </select>
  60. <select id="sumMoney" resultType="java.math.BigDecimal">
  61. select ifnull(sum(kwt.money), 0)
  62. from kwp_wallet_transfer kwt
  63. <where>
  64. kwt.del_flag = 0
  65. and kwt.status = 2
  66. <if test="fundVo.channel != null and fundVo.channel != ''">
  67. and kwt.channel = #{fundVo.channel,jdbcType=VARCHAR}
  68. </if>
  69. <if test="fundVo.uid != null and fundVo.uid != ''">
  70. and kwt.uid = #{fundVo.uid,jdbcType=VARCHAR}
  71. </if>
  72. <if test="fundVo.filter != null and fundVo.filter != ''">
  73. and kwt.filter = #{fundVo.filter,jdbcType=VARCHAR}
  74. </if>
  75. </where>
  76. </select>
  77. </mapper>