<?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.gear.swx.mapper.SwxSmartOrderMapper">
|
|
<select id="countByMarketId" resultType="integer">
|
select count(*) from swx_smart_order so
|
where `status`=0
|
and so.user_id = #{userId} and so.market_id = #{marketId} and so.all_day = #{allDay,jdbcType=INTEGER}
|
</select>
|
|
<update id="updateSmartById">
|
update swx_smart_order set
|
`status` = #{status},
|
all_profit = #{allProfit},
|
current_profit = #{currentProfit},
|
current_day = #{currentDay},
|
next_profit_time = #{nextProfitTime}
|
where id = #{id}
|
</update>
|
|
<select id="getProfitCompensateList" resultType="com.gear.swx.domain.SwxSmartOrder">
|
select * from swx_smart_order where `status`=0 and TIMESTAMPDIFF(MINUTE, next_profit_time, sysdate()) > 29
|
</select>
|
</mapper>
|