<?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.xzx.gc.system.mapper.AccountLogMapper"> 
 | 
  
 | 
    <select id="findByChannelType" resultType="com.xzx.gc.entity.AccountLog"> 
 | 
          select a.account_id "accountId",a.old_money "oldMoney",a.new_money "newMoney",a.create_time "createTime",b.user_id "userId" from  xzx_account_log a 
 | 
          inner  join  xzx_account_info b on a.account_id=b.account_id 
 | 
        where a.channel_type=#{channelType} 
 | 
    </select> 
 | 
  
 | 
    <select id="findByChannelTypeAndTime" resultType="com.xzx.gc.entity.AccountLog"> 
 | 
        select a.account_id "accountId",a.old_money "oldMoney",a.new_money "newMoney",a.create_time "createTime",b.user_id "userId" from  xzx_account_log a 
 | 
            inner  join  xzx_account_info b on a.account_id=b.account_id 
 | 
        where a.channel_type=#{channelType} and DATE_FORMAT(a.create_time,'%Y-%m-%d')=date_sub(CURRENT_DATE(), interval 1 day) 
 | 
    </select> 
 | 
  
 | 
</mapper> 
 |