xiaoyong931011
2023-02-09 e92b00089d8d57899df380135d79864dade09837
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?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="cc.mrbird.febs.dapp.mapper.DappOnHookAwardDao">
 
    <select id="selectByRecordNumAndStateLimit" resultType="cc.mrbird.febs.dapp.entity.DappOnHookAward">
        select
            a.*
        from dapp_on_hook_award a
        where a.record_num like concat(#{recordNum},'%')
        and a.state = #{state}
        order by a.id asc
        limit #{limit}
    </select>
 
    <select id="selectByByAwardTime" resultType="cc.mrbird.febs.dapp.entity.DappOnHookAward">
        select
            a.*
        from dapp_on_hook_award a
        where
           date_format(a.award_time, '%Y-%m-%d %H:%i') = #{awardTime}
        limit 1
    </select>
 
    <select id="selectInfoByByAwardTime" resultType="cc.mrbird.febs.dapp.entity.DappOnHookAward">
        select
            a.*
        from dapp_on_hook_award a
        where
           date_format(a.award_time, '%Y-%m-%d %H:%i') &lt;= #{awardTime}
        order by a.id desc
        limit 20
    </select>
 
    <select id="selectByIdLimitTT" resultType="cc.mrbird.febs.dapp.entity.DappOnHookAward">
        select
            a.*
        from dapp_on_hook_award a
            where
           a.id   &lt;= #{id}
        order by a.id desc
            limit 20
    </select>
 
 
</mapper>