gao
2020-05-27 84d6908d149ba8b0f8a4ea335e71bcc0778d17f0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?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.xcong.excoin.modules.coin.dao.OrderCoinsDao">    
    
    <select id="getOrderCountByToday" resultType="long">
        <![CDATA[  SELECT COUNT(*) from coins_order  WHERE DATE_FORMAT(create_time, '%Y-%m-%d') >= DATE_FORMAT(#{now}, '%Y-%m-%d') 
        and  DATE_FORMAT(create_time, '%Y-%m-%d') <  DATE_FORMAT(#{tomorrow}, '%Y-%m-%d') ]]>
    </select>
    
    <select id="findCoinOrderListByMemberIdAndSysmbol" resultType="com.xcong.excoin.modules.coin.entity.OrderCoinsEntity">
        SELECT * FROM coins_order a where a.member_id= #{memberId} and a.order_status = #{status}
            <if test="symbol != null and symbol !=''">
                 and a.symbol = #{symbol}
            </if>
    </select>
    
    <select id="findWalletCoinOrderByOrderNo" resultType="com.xcong.excoin.modules.coin.entity.OrderCoinsEntity">
        
    SELECT *  FROM coins_order a where a.order_no= #{orderNo}  
    </select>
    
</mapper>