<?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') <= #{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 <= #{id}
|
order by a.id desc
|
limit 20
|
</select>
|
|
|
</mapper>
|