| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?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.cyksj.mapper.manage.statistics.StatisticsUserDataMapper">
- <select id="getExportStreamingAccountData"
- resultType="com.cyksj.model.excel.statistics.ExcelStreamingAccountData">
- select count(distinct user_id) as numOfUser, count(*) as numOfOrder,ifnull(sum(money)/100,0) as money from
- `order_don`
- where sku_id in (select id from `goods_don_sku` where goods_id = #{goodsId})
- and status not in ('close','noPayment','refund')
- <if test="isDis!=null and isDis">
- and is_distribute = 1
- </if>
- <if test="isCode!=null and isCode">
- and `type` = 'EX_CODE'
- </if>
- and created_time between #{start} and #{end}
- </select>
- <select id="getTypeData" resultType="java.lang.Integer">
- select count(*) as numOfOrder from `order_don` od where
- sku_id in (select id from `goods_don_sku` where goods_id = #{goodsId} and spec_val like '%${type}%%'
- <if test="type =='月'.toString()">
- and spec_val not like '%年%'
- </if>)
- and status not in ('close','noPayment','refund')
- and created_time between #{start} and #{end}
- </select>
- <select id="getExportRealData" resultType="com.cyksj.model.excel.statistics.ExcelRealGoodsData">
- select count(distinct user_id) as numOfUser, count(*) as numOfOrder, ifnull(sum(money) / 100, 0) as money
- from `order_don`
- where sku_id = #{skuId}
- and status not in ('close', 'noPayment', 'refund')
- and created_time between #{start} and #{end}
- </select>
- <select id="getPlatformHasPaymentOrders" resultType="com.cyksj.model.entity.RegisterOrderDon">
- select id,
- platform,
- money,
- user_id
- from `register_order_don`
- where platform = #{platform}
- and created_time between #{start} and #{end}
- and status not in ('close', 'noPayment', 'refund')
- </select>
- </mapper>
|