<?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.ssm.manage.mapper.SsmStoreAccountOutinMapper">
<resultMap id="retrueMap" type="com.ssm.manage.entity.RechargeAccountOutin">
    <result property="id" column="id" jdbcType="BIGINT"/>
    <result property="docDate" column="doc_date" jdbcType="DATE"/>
    <result property="accountId" column="account_id" jdbcType="BIGINT"/>
    <result property="outMemberId" column="out_member_id" jdbcType="BIGINT"/>
    <result property="outMemberName" column="out_member_name" jdbcType="VARCHAR"/>
    <result property="outGiftConsumeMoney" column="out_gift_consume_money" jdbcType="DECIMAL"/>
    <result property="rechargeTypeId" column="recharge_type_id" jdbcType="BIGINT"/>
    <result property="rechargeTypeName" column="recharge_type_name" jdbcType="VARCHAR"/>
    <result property="outStoreNum" column="out_store_num" jdbcType="VARCHAR"/>
    <result property="outStoreId" column="out_store_id" jdbcType="BIGINT"/>
    <result property="outStoreName" column="out_store_name" jdbcType="VARCHAR"/>
    <result property="inStoreNum" column="in_store_num" jdbcType="VARCHAR"/>
    <result property="inStoreId" column="in_store_id" jdbcType="BIGINT"/>
    <result property="inStoreName" column="in_store_name" jdbcType="VARCHAR"/>
    <result property="state" column="state" jdbcType="INTEGER"/>
    <result property="rechargeNum" column="recharge_num" jdbcType="INTEGER"/>
    <result property="outMemberNum" column="out_member_num" jdbcType="VARCHAR"/>
    <result property="rechargeStoreNum" column="recharge_store_num" jdbcType="VARCHAR"/>
    <result property="inputId" column="input_id" jdbcType="BIGINT"/>
    <result property="inputName" column="input_name" jdbcType="VARCHAR"/>
    <result property="inputNum" column="input_num" jdbcType="VARCHAR"/>
    <result property="auditId" column="audit_id" jdbcType="BIGINT"/>
    <result property="auditName" column="audit_name" jdbcType="VARCHAR"/>
    <result property="auditNum" column="audit_num" jdbcType="VARCHAR"/>
    <result property="auditDate" column="audit_date" jdbcType="TIMESTAMP"/>
    <result property="inputDate" column="input_date" jdbcType="TIMESTAMP"/>
</resultMap>
<select id="selectPage" resultMap="retrueMap" parameterType="com.ssm.manage.query.RechargeAccountOutinRequest">
select * from recharge_account_outin
<where>
    <if test="date != null">
        and doc_date like concat( #{date, jdbcType = VARCHAR}, '%')
    </if>
    <if test="outMemberId != null ">
        and out_member_id = #{outMemberId}
    </if>
    <if test="outStoreId!=null">
        and out_store_id = #{outStoreId}
    </if>
    <if test="inStoreId!=null">
        and in_store_id = #{inStoreId}
    </if>
</where>
    order by doc_date desc
</select>
    <select id="getDocNum" parameterType="com.ssm.manage.entity.RechargeAccountOutin"  resultMap="retrueMap">
        select * from recharge_account_outin
                 where recharge_store_num like concat(#{rechargeStoreNum,jdbcType = VARCHAR},'%')
        order by recharge_store_num desc
    </select>





</mapper>

