| | |
| | | </select> |
| | | |
| | | |
| | | <select id="countLostNum" resultType="java.util.HashMap"> |
| | | 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> |
| | | |
| | | |
| | | <select id="countAppealMoney" resultType="java.util.HashMap"> |
| | | 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> |
| | | |
| | | |
| | | </mapper> |