Commit 08e831b6 by guanchen

添加奖励类型, 更新sql

parent 4dab8293
......@@ -4,43 +4,21 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.scheduling.annotation.EnableScheduling;
/**
* @author houseme
*/
@SpringBootApplication
@EnableCaching
@EnableScheduling
public class PartnerApplication extends SpringBootServletInitializer {
public class PartnerApplication {
private static Logger logger = LoggerFactory.getLogger(PartnerApplication.class);
public static void main(String[] args) {
try {
SpringApplication.run(PartnerApplication.class, args);
logger.info("PartnerApplication >>>服务启动成功");
Object lock = new Object();
synchronized (lock) {
try {
while (true) {
lock.wait();
}
} catch (InterruptedException e) {
logger.error(e.getMessage(), e);
}
}
SpringApplication.run(PartnerApplication.class, args);
} catch (Exception e) {
logger.error("PartnerApplication>>服务启动失败", e);
// logger.error(e.getMessage(), e);
e.printStackTrace();
}
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
return builder.sources(PartnerApplication.class);
}
}
......@@ -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 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 (30,710,720,210) then amount else 0 end) upgradeBalance,
SUM(case when reward_type in (30,710,720,210,80,230 ,780) 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 (60,760) then amount else 0 end) shareBalance,
SUM(case when reward_type in (300,750) then amount else 0 end) zigoushengBalance,
......@@ -802,8 +802,8 @@
COUNT(reward_type IN (50, 740) OR NULL) AS onlinerechargeNum,
SUM(if(reward_type=40, amount, 0)) AS open_card_cash,
COUNT(reward_type=40 OR NULL) AS open_card_num,
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, 210) OR NULL) AS upgrade_partner_num,
SUM(if(reward_type IN (30, 20, 710, 720, 730, 210, 80, 230 ,780),amount, 0)) AS upgrade_partner_cash,
COUNT(reward_type IN (30, 20, 710, 720, 730, 210, 80, 230 ,780) OR NULL) AS upgrade_partner_num,
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=50, cash_code, 0)) AS recharge_market_cash
......@@ -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 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 (30,710,720,210) then amount else 0 end) upgradeBalance,
SUM(case when reward_type in (30,710,720,210, 80, 230 ,780) 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 (60,760) then amount else 0 end) shareBalance,
SUM(case when reward_type in (300,750) then amount else 0 end) zigoushengBalance,
......@@ -865,8 +865,8 @@
COUNT(reward_type IN (50, 740) OR NULL) AS onlinerechargeNum,
SUM(if(reward_type=40, amount, 0)) AS open_card_cash,
COUNT(reward_type=40 OR NULL) AS open_card_num,
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,210) OR NULL) AS upgrade_partner_num,
SUM(if(reward_type IN (30, 20, 710, 720, 730, 210, 80, 230 ,780),amount, 0)) AS upgrade_partner_cash,
COUNT(reward_type IN (30, 20, 710, 720, 730, 210, 80, 230 ,780) OR NULL) AS upgrade_partner_num,
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=50, cash_code, 0)) AS recharge_market_cash
......
......@@ -874,8 +874,8 @@
0 bank_tax,
SUM(if(reward_type=60 AND is_show_on_client=1, commission_acount, 0)) AS cash,
COUNT(reward_type=60 OR NULL) AS num,
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,210,220, 100)OR NULL) AS upNum,
SUM(if(reward_type IN (70,210,220,320,230, 100) AND is_show_on_client=1,commission_acount, 0)) AS upCash,
COUNT(reward_type IN (70,210,220,320,230, 100)OR NULL) AS upNum,
SUM(if(reward_type=80 AND is_show_on_client=1, commission_acount, 0)) AS icash,
COUNT(reward_type=80 OR NULL) AS inum,
SUM(if(reward_type=90 AND is_show_on_client=1, commission_acount, 0)) AS pcash,
......@@ -916,8 +916,8 @@
0 bank_tax,
SUM(if(reward_type=60 AND is_show_on_client=1, commission_acount, 0)) AS cash,
COUNT(reward_type=60 OR NULL) AS num,
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,210,220, 100)OR NULL) AS upNum,
SUM(if(reward_type IN (70,210,220,320,230, 100) AND is_show_on_client=1,commission_acount, 0)) AS upCash,
COUNT(reward_type IN (70,210,220,320,230, 100)OR NULL) AS upNum,
SUM(if(reward_type=80 AND is_show_on_client=1, commission_acount, 0)) AS icash,
COUNT(reward_type=80 OR NULL) AS inum,
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