Expose salary transfer in country dashboard
This commit is contained in:
parent
d53728e874
commit
7e70b3809c
@ -375,6 +375,7 @@ public class CountryDashboardServiceImpl implements CountryDashboardService {
|
||||
row.setGoogleRecharge(add(row.getGoogleRecharge(), metric.getGoogleRecharge()));
|
||||
row.setDealerRecharge(add(row.getDealerRecharge(), metric.getDealerRecharge()));
|
||||
row.setSalaryExchange(add(row.getSalaryExchange(), metric.getSalaryExchange()));
|
||||
row.setSalaryTransfer(add(row.getSalaryTransfer(), metric.getSalaryTransfer()));
|
||||
row.setGiftConsume(add(row.getGiftConsume(), metric.getGiftConsume()));
|
||||
row.setLuckyGiftTotalFlow(add(row.getLuckyGiftTotalFlow(), metric.getLuckyGiftTotalFlow()));
|
||||
row.setLuckyGiftUser(row.getLuckyGiftUser() + safeLong(metric.getLuckyGiftUser()));
|
||||
|
||||
@ -36,6 +36,8 @@ public class CountryDashboardDailyMetricDTO {
|
||||
|
||||
private BigDecimal salaryExchange;
|
||||
|
||||
private BigDecimal salaryTransfer;
|
||||
|
||||
private BigDecimal giftConsume;
|
||||
|
||||
private BigDecimal luckyGiftTotalFlow;
|
||||
|
||||
@ -35,6 +35,8 @@ public class CountryDashboardMetricDTO {
|
||||
|
||||
private BigDecimal salaryExchange;
|
||||
|
||||
private BigDecimal salaryTransfer;
|
||||
|
||||
private BigDecimal giftConsume;
|
||||
|
||||
private BigDecimal luckyGiftTotalFlow;
|
||||
|
||||
@ -46,6 +46,8 @@ public class CountryDashboardPeriodMetricDTO {
|
||||
|
||||
private BigDecimal salaryExchange;
|
||||
|
||||
private BigDecimal salaryTransfer;
|
||||
|
||||
private BigDecimal giftConsume;
|
||||
|
||||
private BigDecimal luckyGiftTotalFlow;
|
||||
|
||||
@ -26,6 +26,7 @@
|
||||
`google_recharge` decimal(20,2) NOT NULL DEFAULT 0.00 COMMENT 'Google充值',
|
||||
`dealer_recharge` decimal(20,2) NOT NULL DEFAULT 0.00 COMMENT '代理充值',
|
||||
`salary_exchange` decimal(20,2) NOT NULL DEFAULT 0.00 COMMENT '工资兑换',
|
||||
`salary_transfer` decimal(20,2) NOT NULL DEFAULT 0.00 COMMENT '工资转移',
|
||||
`gift_consume` decimal(20,2) NOT NULL DEFAULT 0.00 COMMENT '礼物消耗',
|
||||
`lucky_gift_total_flow` decimal(20,2) NOT NULL DEFAULT 0.00 COMMENT '幸运礼物流水',
|
||||
`lucky_gift_user` bigint NOT NULL DEFAULT 0 COMMENT '幸运礼物用户数',
|
||||
@ -64,6 +65,7 @@
|
||||
`google_recharge` decimal(20,2) NOT NULL DEFAULT 0.00 COMMENT 'Google充值',
|
||||
`dealer_recharge` decimal(20,2) NOT NULL DEFAULT 0.00 COMMENT '代理充值',
|
||||
`salary_exchange` decimal(20,2) NOT NULL DEFAULT 0.00 COMMENT '工资兑换',
|
||||
`salary_transfer` decimal(20,2) NOT NULL DEFAULT 0.00 COMMENT '工资转移',
|
||||
`gift_consume` decimal(20,2) NOT NULL DEFAULT 0.00 COMMENT '礼物消耗',
|
||||
`lucky_gift_total_flow` decimal(20,2) NOT NULL DEFAULT 0.00 COMMENT '幸运礼物流水',
|
||||
`lucky_gift_user` bigint NOT NULL DEFAULT 0 COMMENT '幸运礼物用户数',
|
||||
@ -581,6 +583,21 @@
|
||||
SET @country_dashboard_value_columns_schema_lock = GET_LOCK('country_dashboard_value_columns_schema', 60);
|
||||
SET @current_schema = DATABASE();
|
||||
|
||||
SET @ddl = IF(
|
||||
@country_dashboard_value_columns_schema_lock = 1
|
||||
AND NOT EXISTS (
|
||||
SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE TABLE_SCHEMA = @current_schema
|
||||
AND TABLE_NAME = 'country_dashboard_daily_metric'
|
||||
AND COLUMN_NAME = 'salary_transfer'
|
||||
),
|
||||
'ALTER TABLE `country_dashboard_daily_metric` ADD COLUMN `salary_transfer` decimal(20,2) NOT NULL DEFAULT 0.00 COMMENT ''工资转移'' AFTER `salary_exchange`',
|
||||
'SELECT 1'
|
||||
);
|
||||
PREPARE stmt FROM @ddl;
|
||||
EXECUTE stmt;
|
||||
DEALLOCATE PREPARE stmt;
|
||||
|
||||
SET @ddl = IF(
|
||||
@country_dashboard_value_columns_schema_lock = 1
|
||||
AND NOT EXISTS (
|
||||
@ -596,6 +613,21 @@
|
||||
EXECUTE stmt;
|
||||
DEALLOCATE PREPARE stmt;
|
||||
|
||||
SET @ddl = IF(
|
||||
@country_dashboard_value_columns_schema_lock = 1
|
||||
AND NOT EXISTS (
|
||||
SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE TABLE_SCHEMA = @current_schema
|
||||
AND TABLE_NAME = 'country_dashboard_period_metric'
|
||||
AND COLUMN_NAME = 'salary_transfer'
|
||||
),
|
||||
'ALTER TABLE `country_dashboard_period_metric` ADD COLUMN `salary_transfer` decimal(20,2) NOT NULL DEFAULT 0.00 COMMENT ''工资转移'' AFTER `salary_exchange`',
|
||||
'SELECT 1'
|
||||
);
|
||||
PREPARE stmt FROM @ddl;
|
||||
EXECUTE stmt;
|
||||
DEALLOCATE PREPARE stmt;
|
||||
|
||||
SET @ddl = IF(
|
||||
@country_dashboard_value_columns_schema_lock = 1
|
||||
AND NOT EXISTS (
|
||||
@ -1058,6 +1090,7 @@
|
||||
IFNULL(SUM(t.google_recharge), 0) AS googleRecharge,
|
||||
IFNULL(SUM(t.dealer_recharge), 0) AS dealerRecharge,
|
||||
IFNULL(SUM(t.salary_exchange), 0) AS salaryExchange,
|
||||
IFNULL(SUM(t.salary_transfer), 0) AS salaryTransfer,
|
||||
IFNULL(SUM(t.gift_consume), 0) AS giftConsume,
|
||||
IFNULL(SUM(t.lucky_gift_total_flow), 0) AS luckyGiftTotalFlow,
|
||||
IFNULL(SUM(t.lucky_gift_user), 0) AS luckyGiftUser,
|
||||
@ -1116,6 +1149,7 @@
|
||||
IFNULL(SUM(t.google_recharge), 0) AS googleRecharge,
|
||||
IFNULL(SUM(t.dealer_recharge), 0) AS dealerRecharge,
|
||||
IFNULL(SUM(t.salary_exchange), 0) AS salaryExchange,
|
||||
IFNULL(SUM(t.salary_transfer), 0) AS salaryTransfer,
|
||||
IFNULL(SUM(t.gift_consume), 0) AS giftConsume,
|
||||
IFNULL(SUM(t.lucky_gift_total_flow), 0) AS luckyGiftTotalFlow,
|
||||
IFNULL(SUM(t.lucky_gift_user), 0) AS luckyGiftUser,
|
||||
@ -1200,6 +1234,7 @@
|
||||
google_recharge,
|
||||
dealer_recharge,
|
||||
salary_exchange,
|
||||
salary_transfer,
|
||||
gift_consume,
|
||||
lucky_gift_total_flow,
|
||||
lucky_gift_user,
|
||||
@ -1225,6 +1260,7 @@
|
||||
IFNULL(#{item.googleRecharge}, 0),
|
||||
IFNULL(#{item.dealerRecharge}, 0),
|
||||
IFNULL(#{item.salaryExchange}, 0),
|
||||
IFNULL(#{item.salaryTransfer}, 0),
|
||||
IFNULL(#{item.giftConsume}, 0),
|
||||
IFNULL(#{item.luckyGiftTotalFlow}, 0),
|
||||
IFNULL(#{item.luckyGiftUser}, 0),
|
||||
@ -1245,6 +1281,7 @@
|
||||
google_recharge = VALUES(google_recharge),
|
||||
dealer_recharge = VALUES(dealer_recharge),
|
||||
salary_exchange = VALUES(salary_exchange),
|
||||
salary_transfer = VALUES(salary_transfer),
|
||||
gift_consume = VALUES(gift_consume),
|
||||
lucky_gift_total_flow = VALUES(lucky_gift_total_flow),
|
||||
lucky_gift_user = VALUES(lucky_gift_user),
|
||||
@ -1285,6 +1322,7 @@
|
||||
google_recharge,
|
||||
dealer_recharge,
|
||||
salary_exchange,
|
||||
salary_transfer,
|
||||
gift_consume,
|
||||
lucky_gift_total_flow,
|
||||
lucky_gift_user,
|
||||
@ -1321,6 +1359,7 @@
|
||||
IFNULL(#{item.googleRecharge}, 0),
|
||||
IFNULL(#{item.dealerRecharge}, 0),
|
||||
IFNULL(#{item.salaryExchange}, 0),
|
||||
IFNULL(#{item.salaryTransfer}, 0),
|
||||
IFNULL(#{item.giftConsume}, 0),
|
||||
IFNULL(#{item.luckyGiftTotalFlow}, 0),
|
||||
IFNULL(#{item.luckyGiftUser}, 0),
|
||||
@ -1351,6 +1390,7 @@
|
||||
google_recharge = VALUES(google_recharge),
|
||||
dealer_recharge = VALUES(dealer_recharge),
|
||||
salary_exchange = VALUES(salary_exchange),
|
||||
salary_transfer = VALUES(salary_transfer),
|
||||
gift_consume = VALUES(gift_consume),
|
||||
lucky_gift_total_flow = VALUES(lucky_gift_total_flow),
|
||||
lucky_gift_user = VALUES(lucky_gift_user),
|
||||
@ -1623,6 +1663,7 @@
|
||||
IFNULL(SUM(t.google_recharge), 0) AS googleRecharge,
|
||||
IFNULL(SUM(t.dealer_recharge), 0) AS dealerRecharge,
|
||||
IFNULL(SUM(t.salary_exchange), 0) AS salaryExchange,
|
||||
IFNULL(SUM(t.salary_transfer), 0) AS salaryTransfer,
|
||||
IFNULL(SUM(t.gift_consume), 0) AS giftConsume,
|
||||
IFNULL(SUM(t.lucky_gift_total_flow), 0) AS luckyGiftTotalFlow,
|
||||
IFNULL(SUM(t.lucky_gift_payout), 0) AS luckyGiftPayout,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user