Explorar el Código

:feat:投手总数据增加三个字段

zhangxianyu hace 10 meses
padre
commit
4a87275456

+ 10 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/vo/PitcherDataTotalVO.java

@@ -233,6 +233,16 @@ public class PitcherDataTotalVO {
     @ApiModelProperty(value = "单日付费100+成本")
     private BigDecimal hundredUserNumCost;
 
+
+    @ApiModelProperty(value = "支付宝新用户累计充值金额")
+    private BigDecimal newUserTotalZfbAmount;
+
+    @ApiModelProperty(value = "微信新用户累计充值金额")
+    private BigDecimal newUserTotalWxAmount;
+
+    @ApiModelProperty(value = "米大师新用户累计充值金额")
+    private BigDecimal newUserTotalMdsAmount;
+
     /**
      * 买量新用户累计充值金额
      */

+ 11 - 3
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/PitcherDataServiceImpl.java

@@ -509,6 +509,8 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
         } else {
             sql = Sqls.create(pitcherDataTotalSqlForParent(criA, criB, criAmount, criNewUser, criRoleNum) + orderByCri);
         }
+        // 打印SQL
+        System.out.println("Executing SQL: " + sql.getSourceSql());
         //设置自定义回显对象
         sql.setCallback(Sqls.callback.entities());
         sql.setEntity(dao.getEntity(PitcherDataTotalVO.class));
@@ -3090,7 +3092,10 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
                 	ROUND(IF(new_user_total_amount_num > 0, IFNULL(new_user_order_again, 0) / new_user_total_amount_num, 0), 4) as new_user_again_rate,
                 	IFNULL(role_num, 0) as role_num,
                 	ROUND(IF(register_num > 0, IFNULL(role_num, 0) / register_num, 0), 4) as role_num_rate,
-                	ROUND(IF(role_num > 0, IFNULL(cost, 0) / role_num, 0), 2) as role_num_cost
+                	ROUND(IF(role_num > 0, IFNULL(cost, 0) / role_num, 0), 2) as role_num_cost,
+                	new_user_total_zfb_amount,
+                 	new_user_total_wx_amount,
+                 	new_user_total_mds_amount
                 FROM (
                 	SELECT
                 		pitcher_id,
@@ -3145,7 +3150,10 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
                             SUM(m6) / SUM(IF(DATE_ADD(dt, INTERVAL 179 day) <= LocalDate.now(), cost, 0)), 0), 4) as roi180,
                         ROUND(IF(SUM(IF(DATE_ADD(dt, INTERVAL 1 year) <= LocalDate.now(), cost, 0)) > 0 ,
                             SUM(m12) / SUM(IF(DATE_ADD(dt, INTERVAL 1 year) <= LocalDate.now(), cost, 0)), 0), 4) as roi1yaer,
-                    	ROUND(IF(SUM(cost) > 0 , SUM(total) / SUM(cost), 0), 4) as roi_total
+                    	ROUND(IF(SUM(cost) > 0 , SUM(total) / SUM(cost), 0), 4) as roi_total,
+                    	SUM(new_user_total_zfb_amount) AS new_user_total_zfb_amount,
+                         	SUM(new_user_total_wx_amount) AS new_user_total_wx_amount,
+                         	SUM(new_user_total_mds_amount) AS new_user_total_mds_amount
                     FROM
                     	game_ads.ads_pitcher_day
                 """ + criA +
@@ -3211,7 +3219,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
                                 user_zx_pitcher_id as f_pitcher_id,
                                 COUNT(DISTINCT role_user_id) as role_num
                             FROM
-                                dw_create_role_detail
+                                game_ads.dw_create_role_detail
                             """ + criRoleNum +
                 """
                                 AND NOT user_agent_id = 0