From b14e82cb4d7a6a7a43174a922f10157e4b21567c Mon Sep 17 00:00:00 2001 From: yujian <yujian> Date: 星期三, 09 一月 2019 09:07:25 +0800 Subject: [PATCH] 奖金统计计算调整 --- fanli/src/main/java/com/yeshi/fanli/mapping/order/CommonOrderMapper.xml | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/mapping/order/CommonOrderMapper.xml b/fanli/src/main/java/com/yeshi/fanli/mapping/order/CommonOrderMapper.xml index c4e3861..08d4b34 100644 --- a/fanli/src/main/java/com/yeshi/fanli/mapping/order/CommonOrderMapper.xml +++ b/fanli/src/main/java/com/yeshi/fanli/mapping/order/CommonOrderMapper.xml @@ -341,7 +341,10 @@ <if test="day != null and day == 4"> <!-- 涓婃湀 --> AND PERIOD_DIFF( DATE_FORMAT(NOW(), '%Y%m'), DATE_FORMAT(tc.`co_create_time`, '%Y%m')) = 1 + <!-- 缁熻宸叉敹璐� --> + AND tc.`co_state` = 2 </if> + GROUP BY tc.`co_order_no`,tc.co_source_type)A </select> @@ -660,10 +663,7 @@ LEFT JOIN yeshi_ec_hongbao_v2 th ON (tr.`ho_hongbao_id` = th.`hb_id` OR th.`hb_pid` = tr.`ho_hongbao_id` ) - WHERE <![CDATA[tc.`co_state` <> 4]]> - <if test="uid != null"> - AND th.`hb_uid` = ${uid} - </if> + WHERE th.`hb_uid` = ${uid} <if test="type != null and type == 1"> <!-- 鑷喘璁㈠崟 --> AND (th.hb_type =1 or th.hb_type =2) </if> @@ -674,7 +674,7 @@ AND (th.`hb_type` = 5 OR th.`hb_type` = 6 OR th.`hb_type` = 7 OR th.`hb_type` = 21 OR th.`hb_type` = 22) </if> <if test="day != null and day == 1"> <!-- 浠婂ぉ --> - AND TO_DAYS(tc.`co_create_time`) = TO_DAYS(NOW()) + AND TO_DAYS(tc.`co_create_time`) = TO_DAYS(NOW()) </if> <if test="day != null and day == 2"> <!-- 鏄ㄥぉ --> AND TO_DAYS(NOW()) - TO_DAYS(tc.`co_create_time`) = 1 @@ -685,7 +685,10 @@ </if> <if test="day != null and day == 4"> <!-- 涓婃湀 --> AND PERIOD_DIFF( DATE_FORMAT(NOW(), '%Y%m'), - DATE_FORMAT(tc.`co_create_time`, '%Y%m')) = 1 + DATE_FORMAT(tc.`co_create_time`, '%Y%m')) = 1 + + <!-- 缁熻宸叉敹璐� --> + AND tc.`co_state` = 2 </if> </select> -- Gitblit v1.8.0