Commit 64a2c08b by guanchen

添加奖励类型

parent 97e19480
...@@ -791,7 +791,7 @@ ...@@ -791,7 +791,7 @@
SUM(case when recharge_time < '2019-08-16 12:03:50' and agent_level=4 and reward_type in (60,760,300,750) then amount * 0.06 else 0 end) techChargeOrder, SUM(case when recharge_time < '2019-08-16 12:03:50' and agent_level=4 and reward_type in (60,760,300,750) then amount * 0.06 else 0 end) techChargeOrder,
SUM(case when reward_type in (40) then amount else 0 end) opencardBalance, SUM(case when reward_type in (40) then amount else 0 end) opencardBalance,
SUM(case when reward_type in (50,740) then amount else 0 end) rechargeBalance, SUM(case when reward_type in (50,740) then amount else 0 end) rechargeBalance,
SUM(case when reward_type in (30,710,720) then amount else 0 end) upgradeBalance, SUM(case when reward_type in (30,710,720,210) then amount else 0 end) upgradeBalance,
SUM(case when reward_type in (20,730) then amount else 0 end) upgradeSuperBalance, SUM(case when reward_type in (20,730) then amount else 0 end) upgradeSuperBalance,
SUM(case when reward_type in (60,760) then amount else 0 end) shareBalance, SUM(case when reward_type in (60,760) then amount else 0 end) shareBalance,
SUM(case when reward_type in (300,750) then amount else 0 end) zigoushengBalance, SUM(case when reward_type in (300,750) then amount else 0 end) zigoushengBalance,
...@@ -802,8 +802,8 @@ ...@@ -802,8 +802,8 @@
COUNT(reward_type IN (50, 740) OR NULL) AS onlinerechargeNum, COUNT(reward_type IN (50, 740) OR NULL) AS onlinerechargeNum,
SUM(if(reward_type=40, amount, 0)) AS open_card_cash, SUM(if(reward_type=40, amount, 0)) AS open_card_cash,
COUNT(reward_type=40 OR NULL) AS open_card_num, COUNT(reward_type=40 OR NULL) AS open_card_num,
SUM(if(reward_type IN (30, 20, 710, 720, 730),amount, 0)) AS upgrade_partner_cash, SUM(if(reward_type IN (30, 20, 710, 720, 730, 210),amount, 0)) AS upgrade_partner_cash,
COUNT(reward_type IN (30, 20, 710, 720, 730) OR NULL) AS upgrade_partner_num, COUNT(reward_type IN (30, 20, 710, 720, 730, 210) OR NULL) AS upgrade_partner_num,
SUM(if(reward_type IN (50, 30, 20),cash_code, 0)) AS marketPerformance, SUM(if(reward_type IN (50, 30, 20),cash_code, 0)) AS marketPerformance,
SUM(if(reward_type IN (30, 20),cash_code, 0)) AS upgrade_market_cash, SUM(if(reward_type IN (30, 20),cash_code, 0)) AS upgrade_market_cash,
SUM(if(reward_type=50, cash_code, 0)) AS recharge_market_cash SUM(if(reward_type=50, cash_code, 0)) AS recharge_market_cash
...@@ -854,7 +854,7 @@ ...@@ -854,7 +854,7 @@
SUM(case when recharge_time < '2019-08-16 12:03:50' and agent_level=4 and reward_type in (60,760,300,750) then amount * 0.06 else 0 end) techChargeOrder, SUM(case when recharge_time < '2019-08-16 12:03:50' and agent_level=4 and reward_type in (60,760,300,750) then amount * 0.06 else 0 end) techChargeOrder,
SUM(case when reward_type in (40) then amount else 0 end) opencardBalance, SUM(case when reward_type in (40) then amount else 0 end) opencardBalance,
SUM(case when reward_type in (50,740) then amount else 0 end) rechargeBalance, SUM(case when reward_type in (50,740) then amount else 0 end) rechargeBalance,
SUM(case when reward_type in (30,710,720) then amount else 0 end) upgradeBalance, SUM(case when reward_type in (30,710,720,210) then amount else 0 end) upgradeBalance,
SUM(case when reward_type in (20,730) then amount else 0 end) upgradeSuperBalance, SUM(case when reward_type in (20,730) then amount else 0 end) upgradeSuperBalance,
SUM(case when reward_type in (60,760) then amount else 0 end) shareBalance, SUM(case when reward_type in (60,760) then amount else 0 end) shareBalance,
SUM(case when reward_type in (300,750) then amount else 0 end) zigoushengBalance, SUM(case when reward_type in (300,750) then amount else 0 end) zigoushengBalance,
...@@ -865,8 +865,8 @@ ...@@ -865,8 +865,8 @@
COUNT(reward_type IN (50, 740) OR NULL) AS onlinerechargeNum, COUNT(reward_type IN (50, 740) OR NULL) AS onlinerechargeNum,
SUM(if(reward_type=40, amount, 0)) AS open_card_cash, SUM(if(reward_type=40, amount, 0)) AS open_card_cash,
COUNT(reward_type=40 OR NULL) AS open_card_num, COUNT(reward_type=40 OR NULL) AS open_card_num,
SUM(if(reward_type IN (30, 20, 710, 720, 730),amount, 0)) AS upgrade_partner_cash, SUM(if(reward_type IN (30, 20, 710, 720, 730,210),amount, 0)) AS upgrade_partner_cash,
COUNT(reward_type IN (30, 20, 710, 720, 730) OR NULL) AS upgrade_partner_num, COUNT(reward_type IN (30, 20, 710, 720, 730,210) OR NULL) AS upgrade_partner_num,
SUM(if(reward_type IN (50, 30, 20),cash_code, 0)) AS marketPerformance, SUM(if(reward_type IN (50, 30, 20),cash_code, 0)) AS marketPerformance,
SUM(if(reward_type IN (30, 20),cash_code, 0)) AS upgrade_market_cash, SUM(if(reward_type IN (30, 20),cash_code, 0)) AS upgrade_market_cash,
SUM(if(reward_type=50, cash_code, 0)) AS recharge_market_cash SUM(if(reward_type=50, cash_code, 0)) AS recharge_market_cash
......
...@@ -874,8 +874,8 @@ ...@@ -874,8 +874,8 @@
0 bank_tax, 0 bank_tax,
SUM(if(reward_type=60 AND is_show_on_client=1, commission_acount, 0)) AS cash, SUM(if(reward_type=60 AND is_show_on_client=1, commission_acount, 0)) AS cash,
COUNT(reward_type=60 OR NULL) AS num, COUNT(reward_type=60 OR NULL) AS num,
SUM(if(reward_type IN (70, 100) AND is_show_on_client=1,commission_acount, 0)) AS upCash, SUM(if(reward_type IN (70,210,220, 100) AND is_show_on_client=1,commission_acount, 0)) AS upCash,
COUNT(reward_type IN (70, 100)OR NULL) AS upNum, COUNT(reward_type IN (70,210,220, 100)OR NULL) AS upNum,
SUM(if(reward_type=80 AND is_show_on_client=1, commission_acount, 0)) AS icash, SUM(if(reward_type=80 AND is_show_on_client=1, commission_acount, 0)) AS icash,
COUNT(reward_type=80 OR NULL) AS inum, COUNT(reward_type=80 OR NULL) AS inum,
SUM(if(reward_type=90 AND is_show_on_client=1, commission_acount, 0)) AS pcash, SUM(if(reward_type=90 AND is_show_on_client=1, commission_acount, 0)) AS pcash,
...@@ -916,8 +916,8 @@ ...@@ -916,8 +916,8 @@
0 bank_tax, 0 bank_tax,
SUM(if(reward_type=60 AND is_show_on_client=1, commission_acount, 0)) AS cash, SUM(if(reward_type=60 AND is_show_on_client=1, commission_acount, 0)) AS cash,
COUNT(reward_type=60 OR NULL) AS num, COUNT(reward_type=60 OR NULL) AS num,
SUM(if(reward_type IN (70, 100) AND is_show_on_client=1,commission_acount, 0)) AS upCash, SUM(if(reward_type IN (70,210,220, 100) AND is_show_on_client=1,commission_acount, 0)) AS upCash,
COUNT(reward_type IN (70, 100)OR NULL) AS upNum, COUNT(reward_type IN (70,210,220, 100)OR NULL) AS upNum,
SUM(if(reward_type=80 AND is_show_on_client=1, commission_acount, 0)) AS icash, SUM(if(reward_type=80 AND is_show_on_client=1, commission_acount, 0)) AS icash,
COUNT(reward_type=80 OR NULL) AS inum, COUNT(reward_type=80 OR NULL) AS inum,
SUM(if(reward_type=90 AND is_show_on_client=1, commission_acount, 0)) AS pcash, SUM(if(reward_type=90 AND is_show_on_client=1, commission_acount, 0)) AS pcash,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment