| | |
| | | <if test="handleType != null and handleType != 0">AND (d.state = 1 or d.state = 2)</if>
|
| | | <if test="type != null">AND d.type = #{type}</if>
|
| | | </select>
|
| | | <select id="countLostNum" resultMap="ChartMap">
|
| | | SELECT COUNT(t.`id`) AS showValue,
|
| | | <if test="dateType == 1">FROM_UNIXTIME(t.`createTime`/1000,'%Y-%m-%d') AS
|
| | | 'showDate'
|
| | | </if>
|
| | | <if test="dateType == 2">FROM_UNIXTIME(t.`createTime`/1000,'%m') AS 'showDate'</if>
|
| | | <if test="dateType == 3">FROM_UNIXTIME(t.`createTime`/1000,'%Y') AS 'showDate'</if>
|
| | | FROM `yeshi_ec_lost_order` t WHERE t.`createTime`IS NOT NULL
|
| | | <if test="startTime != null and startTime != '' ">
|
| | | AND FROM_UNIXTIME(t.`createTime`/1000,'%Y-%m-%d')<![CDATA[ >= ]]>'${startTime}'
|
| | | </if>
|
| | | <if test="endTime != null and endTime != '' ">
|
| | | AND FROM_UNIXTIME(t.`createTime`/1000,'%Y-%m-%d') <![CDATA[ <= ]]>
|
| | | '${endTime}'
|
| | | </if>
|
| | | <if test="year != null and year != '' ">AND FROM_UNIXTIME(t.`createTime`/1000,'%Y') = '${year}'
|
| | | </if>
|
| | | <if test="resultCode != null and resultCode != 0 ">AND t.`result_code` = ${resultCode}</if>
|
| | | <if test="dateType == 1">GROUP BY FROM_UNIXTIME(t.`createTime`/1000,'%Y-%m-%d')
|
| | | </if>
|
| | | <if test="dateType == 2">GROUP BY FROM_UNIXTIME(t.`createTime`/1000,'%Y-%m')</if>
|
| | | <if test="dateType == 3">GROUP BY FROM_UNIXTIME(t.`createTime`/1000,'%Y')</if>
|
| | | ORDER BY t.`createTime`
|
| | | |
| | | <select id="countLostOrderNum" resultType="Integer">
|
| | | SELECT COUNT(1) FROM (SELECT COUNT(t.`id`) FROM `yeshi_ec_lost_order` t |
| | | WHERE FROM_UNIXTIME(t.`createTime`/1000,'%Y-%m-%d') = #{preDay}
|
| | | GROUP BY t.`orderId`,t.`orderType`)A
|
| | | </select>
|
| | | <select id="countAppealMoney" resultMap="ChartMap">
|
| | | SELECT CAST(SUM(v.`hb_money`)AS DECIMAL(19,2)) AS showValue,
|
| | | <if test="dateType == 1">FROM_UNIXTIME(t.`createTime`/1000,'%Y-%m-%d') AS
|
| | | 'showDate'
|
| | | </if>
|
| | | <if test="dateType == 2">FROM_UNIXTIME(t.`createTime`/1000,'%m') AS 'showDate'</if>
|
| | | <if test="dateType == 3">FROM_UNIXTIME(t.`createTime`/1000,'%Y') AS 'showDate'</if>
|
| | | FROM `yeshi_ec_lost_order` t LEFT JOIN `yeshi_ec_common_order` tc ON
|
| | | tc.`co_order_no` = t.`orderId` LEFT JOIN `yeshi_ec_hongbao_order` h ON
|
| | | h.`ho_order_id` = tc.`co_id` LEFT JOIN `yeshi_ec_hongbao_v2`v ON
|
| | | h.`ho_hongbao_id` = v.`hb_id` WHERE t.`createTime`IS NOT NULL AND
|
| | | t.`result_code` = 2 AND (v.`hb_type` =1 OR v.`hb_type` = 2)
|
| | | <if test="startTime != null and startTime != '' ">
|
| | | AND FROM_UNIXTIME(t.`createTime`/1000,'%Y-%m-%d')<![CDATA[ >= ]]>'${startTime}'
|
| | | </if>
|
| | | <if test="endTime != null and endTime != '' ">
|
| | | AND FROM_UNIXTIME(t.`createTime`/1000,'%Y-%m-%d') <![CDATA[ <= ]]>
|
| | | '${endTime}'
|
| | | </if>
|
| | | <if test="year != null and year != '' ">AND FROM_UNIXTIME(t.`createTime`/1000,'%Y') = '${year}'
|
| | | </if>
|
| | | <if test="dateType == 1">GROUP BY FROM_UNIXTIME(t.`createTime`/1000,'%Y-%m-%d')
|
| | | </if>
|
| | | <if test="dateType == 2">GROUP BY FROM_UNIXTIME(t.`createTime`/1000,'%Y-%m')</if>
|
| | | <if test="dateType == 3">GROUP BY FROM_UNIXTIME(t.`createTime`/1000,'%Y')</if>
|
| | | ORDER BY t.`createTime`
|
| | | |
| | | <select id="countAppealMoney" resultType="BigDecimal">
|
| | | SELECT SUM(IFNULL(co.`co_eIncome`,co.`co_estimate`)) FROM `yeshi_ec_lost_order` t |
| | | LEFT JOIN yeshi_ec_common_order co ON (co.`co_order_no` = t.`orderId` AND co.`co_source_type` = t.`orderType`)
|
| | | WHERE FROM_UNIXTIME(t.`createTime`/1000,'%Y-%m-%d') = #{preDay} AND (co.`co_state`=1 OR co.`co_state`=2) |
| | | </select>
|
| | |
|
| | |
|
| | |
|
| | | <select id="listByMaxHandleTimeAndStateAndResultCode" resultMap="BaseResultMap">
|