IMOrderStatictisMapper.xml
1.4 KB
<?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.sibu.orderHelper.integral.dao.IMOrderStatictisDao">
<select id="statisticsOrderNum" resultMap="orderCountResult" parameterType="java.util.Map">
select count(1) cou, order_status
from ${doingOrderTable} where member_id = #{memberId} and delete_flag = 1 GROUP BY order_status
</select>
<select id="statisticsEvaluateNum" resultMap="orderCountResult" parameterType="java.util.Map">
select count(1) cou, order_status
from ${doingOrderTable} where member_id = #{memberId} and delete_flag = 1 and order_status = 5 and if_evaluate = ${ifEvaluate}
</select>
<resultMap type="com.sibu.orderHelper.integral.vo.OrderCount" id="orderCountResult">
<id column="cou" property="cou"/>
<result column="order_status" property="orderStatus" />
</resultMap>
<!-- 新计算待支付与兑换的订单数量 -->
<select id="statisticsPayWaitNum" parameterType="map" resultMap="orderCountResult">
select count(1) cou from (
select *
from ${doingOrderTable} where member_id = #{memberId} and delete_flag = 1 AND order_status = 1
and order_from = #{orderFrom}
GROUP BY main_order_code) orderlist
</select>
</mapper>