<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.sckw.payment.dao.KwpWalletReceiveMapper">
  <resultMap id="BaseResultMap" type="com.sckw.payment.model.KwpWalletReceive">
    <!--@mbg.generated-->
    <!--@Table kwp_wallet_receive-->
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
    <result column="uid" jdbcType="VARCHAR" property="uid" />
    <result column="from_ent" jdbcType="BIGINT" property="fromEnt" />
    <result column="filter" jdbcType="VARCHAR" property="filter" />
    <result column="to_ent" jdbcType="BIGINT" property="toEnt" />
    <result column="channel" jdbcType="VARCHAR" property="channel" />
    <result column="money" jdbcType="DECIMAL" property="money" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="status" jdbcType="INTEGER" property="status" />
    <result column="create_by" jdbcType="BIGINT" property="createBy" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="update_by" jdbcType="BIGINT" property="updateBy" />
    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="del_flag" jdbcType="INTEGER" property="delFlag" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--@mbg.generated-->
    id, order_no, `uid`, from_ent, `filter`, to_ent, channel, money, remark, `status`,
    create_by, create_time, update_by, update_time, del_flag
  </sql>
  <select id="pageList" resultMap="BaseResultMap">
    select *
    from kwp_wallet_transfer kwt
    <where>
      kwt.del_flag = 0
      <if test="moneyPage.channel != null and moneyPage.channel != ''">
        and kwt.channel = #{moneyPage.channel,jdbcType=VARCHAR}
      </if>
      <if test="moneyPage.uid != null and moneyPage.uid != ''">
        and kwt.uid = #{moneyPage.uid,jdbcType=VARCHAR}
      </if>
      <if test="moneyPage.filter != null and moneyPage.filter != ''">
        and kwt.filter = #{moneyPage.filter,jdbcType=VARCHAR}
      </if>
      <if test="moneyPage.keywords != null and moneyPage.keywords != ''">
        and kwt.order_no like concat('%', #{moneyPage.keywords,jdbcType=VARCHAR}, '%')
      </if>
    </where>
  </select>
</mapper>
