|
@@ -77,19 +77,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
and school_name like concat('%', #{schoolName}, '%')
|
|
|
</if>
|
|
|
<if test="startTime != null">
|
|
|
- and DATE_FORMAT(create_time,'%Y%m%d')<![CDATA[ >= ]]> #{startTime}
|
|
|
+ and DATE_FORMAT(create_time,'%Y%m%d%H%i%S')<![CDATA[ >= ]]> #{startTime}
|
|
|
</if>
|
|
|
<if test="endTime != null">
|
|
|
- and DATE_FORMAT(create_time,'%Y%m%d') <![CDATA[ < ]]> #{endTime}
|
|
|
+ and DATE_FORMAT(create_time,'%Y%m%d%H%i%S') <![CDATA[ <= ]]> #{endTime}
|
|
|
</if>
|
|
|
</where>
|
|
|
group by school,school_name
|
|
|
|
|
|
</select>
|
|
|
|
|
|
- <select id="getTotalMoney" resultType="string">
|
|
|
+ <select id="getTotalMoney" resultType="java.lang.Integer">
|
|
|
select
|
|
|
- sum(total) as orderTotal
|
|
|
+ IFNULL(sum(total),0) as orderTotal
|
|
|
from order_info
|
|
|
<where>
|
|
|
<if test="isShare != null">
|
|
@@ -105,10 +105,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
and school_name like concat('%', #{schoolName}, '%')
|
|
|
</if>
|
|
|
<if test="startTime != null">
|
|
|
- and DATE_FORMAT(create_time,'%Y%m%d')<![CDATA[ >= ]]> #{startTime}
|
|
|
+ and DATE_FORMAT(create_time,'%Y%m%d%H%i%S')<![CDATA[ >= ]]> #{startTime}
|
|
|
</if>
|
|
|
<if test="endTime != null">
|
|
|
- and DATE_FORMAT(create_time,'%Y%m%d') <![CDATA[ < ]]> #{endTime}
|
|
|
+ and DATE_FORMAT(create_time,'%Y%m%d%H%i%S') <![CDATA[ <= ]]> #{endTime}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getCommissionMoney" resultType="java.lang.Integer">
|
|
|
+ select
|
|
|
+ IFNULL(sum(school_commission),0) as commission
|
|
|
+ from order_info
|
|
|
+ <where>
|
|
|
+ <if test="isShare != null">
|
|
|
+ and is_share = #{isShare }
|
|
|
+ </if>
|
|
|
+ <if test="tradeType != null">
|
|
|
+ and trade_type = #{tradeType }
|
|
|
+ </if>
|
|
|
+ <if test="dqbh != null and dqbh != ''">
|
|
|
+ and dqbh = #{dqbh}
|
|
|
+ </if>
|
|
|
+ <if test="schoolName != null and schoolName != ''">
|
|
|
+ and school_name like concat('%', #{schoolName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="startTime != null">
|
|
|
+ and DATE_FORMAT(create_time,'%Y%m%d%H%i%S')<![CDATA[ >= ]]> #{startTime}
|
|
|
+ </if>
|
|
|
+ <if test="endTime != null">
|
|
|
+ and DATE_FORMAT(create_time,'%Y%m%d%H%i%S') <![CDATA[ <= ]]> #{endTime}
|
|
|
</if>
|
|
|
</where>
|
|
|
|
|
@@ -128,10 +155,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
and school_name like concat('%', #{schoolName}, '%')
|
|
|
</if>
|
|
|
<if test="startTime != null">
|
|
|
- and DATE_FORMAT(create_time,'%Y%m%d')<![CDATA[ >= ]]> #{startTime}
|
|
|
+ and DATE_FORMAT(create_time,'%Y%m%d%H%i%S')<![CDATA[ >= ]]> #{startTime}
|
|
|
</if>
|
|
|
<if test="endTime != null">
|
|
|
- and DATE_FORMAT(create_time,'%Y%m%d') <![CDATA[ < ]]> #{endTime}
|
|
|
+ and DATE_FORMAT(create_time,'%Y%m%d%H%i%S') <![CDATA[ <= ]]> #{endTime}
|
|
|
</if>
|
|
|
</where>
|
|
|
order by success_time desc
|
|
@@ -141,9 +168,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
select * from order_info where out_trade_no =#{outTradeNo}
|
|
|
</select>
|
|
|
|
|
|
- <select id="getByOutTradeNo" parameterType="string" resultType="com.miaxis.order.domain.OrderInfo">
|
|
|
- select * from order_info where out_trade_no =#{outTradeNo}
|
|
|
- </select>
|
|
|
|
|
|
|
|
|
</mapper>
|