|
@@ -2,25 +2,25 @@
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.fuint.repository.mapper.MtOrderMapper">
|
|
|
<select id="getOrderCount" resultType="java.math.BigDecimal">
|
|
|
- select count(*) from mt_order t where t.STATUS != 'G'
|
|
|
+ select count(*) from mt_order t where t.STATUS not in('C', 'G', 'H')
|
|
|
<if test="merchantId != null and merchantId > 0">
|
|
|
AND t.MERCHANT_ID = #{merchantId}
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
<select id="getStoreOrderCount" resultType="java.math.BigDecimal">
|
|
|
- select count(*) from mt_order t where t.STORE_ID = #{storeId} and t.STATUS != 'G'
|
|
|
+ select count(*) from mt_order t where t.STORE_ID = #{storeId} and t.STATUS not in('C', 'G', 'H')
|
|
|
</select>
|
|
|
|
|
|
<select id="getOrderCountByTime" resultType="java.math.BigDecimal">
|
|
|
- select count(0) from mt_order t where t.CREATE_TIME >= #{beginTime} and t.CREATE_TIME < #{endTime} and t.STATUS != 'G'
|
|
|
+ select count(0) from mt_order t where t.CREATE_TIME >= #{beginTime} and t.CREATE_TIME < #{endTime} and t.STATUS not in('C', 'G', 'H')
|
|
|
<if test="merchantId != null and merchantId > 0">
|
|
|
AND t.MERCHANT_ID = #{merchantId}
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
<select id="getStoreOrderCountByTime" resultType="java.math.BigDecimal">
|
|
|
- select count(0) from mt_order t where t.STORE_ID = #{storeId} and t.CREATE_TIME < #{endTime} and t.CREATE_TIME >= #{beginTime} and t.STATUS != 'G'
|
|
|
+ select count(0) from mt_order t where t.STORE_ID = #{storeId} and t.CREATE_TIME < #{endTime} and t.CREATE_TIME >= #{beginTime} and t.STATUS not in('C', 'G', 'H')
|
|
|
</select>
|
|
|
|
|
|
<select id="findByOrderSn" resultType="com.fuint.repository.model.MtOrder">
|
|
@@ -28,41 +28,41 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="getPayMoney" resultType="java.math.BigDecimal">
|
|
|
- SELECT sum(t.AMOUNT) as num FROM mt_order t where t.PAY_STATUS='B' and t.STATUS != 'G'
|
|
|
+ SELECT sum(t.AMOUNT) as num FROM mt_order t where t.PAY_STATUS='B' and t.STATUS not in('C', 'G', 'H')
|
|
|
<if test="merchantId != null and merchantId > 0">
|
|
|
AND t.MERCHANT_ID = #{merchantId}
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
<select id="getPayMoneyByTime" resultType="java.math.BigDecimal">
|
|
|
- SELECT sum(t.AMOUNT) as num FROM mt_order t where t.PAY_STATUS='B' and t.CREATE_TIME < #{endTime} and t.CREATE_TIME >= #{beginTime} and t.STATUS != 'G'
|
|
|
+ SELECT sum(t.AMOUNT) as num FROM mt_order t where t.PAY_STATUS='B' and t.CREATE_TIME < #{endTime} and t.CREATE_TIME >= #{beginTime} and t.STATUS not in('C', 'G', 'H')
|
|
|
<if test="merchantId != null and merchantId > 0">
|
|
|
AND t.MERCHANT_ID = #{merchantId}
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
<select id="getStorePayMoneyByTime" resultType="java.math.BigDecimal">
|
|
|
- SELECT sum(t.AMOUNT) as num FROM mt_order t where t.STORE_ID = #{storeId} and t.PAY_STATUS='B' and t.CREATE_TIME < #{endTime} and t.CREATE_TIME >= #{beginTime} and t.STATUS != 'G'
|
|
|
+ SELECT sum(t.AMOUNT) as num FROM mt_order t where t.STORE_ID = #{storeId} and t.PAY_STATUS='B' and t.CREATE_TIME < #{endTime} and t.CREATE_TIME >= #{beginTime} and t.STATUS not in('C', 'G', 'H')
|
|
|
</select>
|
|
|
|
|
|
<select id="getStorePayMoney" resultType="java.math.BigDecimal">
|
|
|
- SELECT sum(t.AMOUNT) as num FROM mt_order t where t.STORE_ID = #{storeId} and t.PAY_STATUS='B' and t.STATUS != 'G'
|
|
|
+ SELECT sum(t.AMOUNT) as num FROM mt_order t where t.STORE_ID = #{storeId} and t.PAY_STATUS='B' and t.STATUS not in('C', 'G', 'H')
|
|
|
</select>
|
|
|
|
|
|
<select id="getPayUserCount" resultType="java.lang.Integer">
|
|
|
- SELECT COUNT(DISTINCT t.USER_ID) as num FROM mt_order t where t.PAY_STATUS='B' and t.STATUS != 'G'
|
|
|
+ SELECT COUNT(DISTINCT t.USER_ID) as num FROM mt_order t where t.PAY_STATUS='B' and t.STATUS not in('C', 'G', 'H')
|
|
|
</select>
|
|
|
|
|
|
<select id="getStorePayUserCount" resultType="java.lang.Integer">
|
|
|
- SELECT COUNT(DISTINCT t.USER_ID) as num FROM mt_order t where t.STORE_ID = #{storeId} and t.PAY_STATUS='B' and t.STATUS != 'G'
|
|
|
+ SELECT COUNT(DISTINCT t.USER_ID) as num FROM mt_order t where t.STORE_ID = #{storeId} and t.PAY_STATUS='B' and t.STATUS not in('C', 'G', 'H')
|
|
|
</select>
|
|
|
|
|
|
<select id="getUserPayMoney" resultType="java.math.BigDecimal">
|
|
|
- SELECT sum(t.PAY_AMOUNT) as num FROM mt_order t where t.USER_ID = #{userId} and t.PAY_STATUS='B' and t.STATUS != 'G'
|
|
|
+ SELECT sum(t.PAY_AMOUNT) as num FROM mt_order t where t.USER_ID = #{userId} and t.PAY_STATUS='B' and t.STATUS not in('C', 'G', 'H')
|
|
|
</select>
|
|
|
|
|
|
<select id="getUserPayOrderCount" resultType="java.lang.Integer">
|
|
|
- SELECT COUNT(DISTINCT t.ID) as num FROM mt_order t where t.USER_ID = #{userId} and t.PAY_STATUS='B' and t.STATUS != 'G'
|
|
|
+ SELECT COUNT(DISTINCT t.ID) as num FROM mt_order t where t.USER_ID = #{userId} and t.PAY_STATUS='B' and t.STATUS not in('C', 'G', 'H')
|
|
|
</select>
|
|
|
|
|
|
<select id="getTobeCommissionOrderList" resultType="com.fuint.repository.model.MtOrder">
|