|
@@ -1,20 +1,21 @@
|
|
|
package com.ytpm.service.impl;
|
|
package com.ytpm.service.impl;
|
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
import com.github.pagehelper.PageHelper;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
import com.github.pagehelper.PageInfo;
|
|
|
import com.ytpm.app.model.YtAppUserLoginRecord;
|
|
import com.ytpm.app.model.YtAppUserLoginRecord;
|
|
|
import com.ytpm.app.param.YtAppUserListParam;
|
|
import com.ytpm.app.param.YtAppUserListParam;
|
|
|
|
|
+import com.ytpm.app.view.AppUserStaticsView;
|
|
|
import com.ytpm.app.view.YtAppUserListView;
|
|
import com.ytpm.app.view.YtAppUserListView;
|
|
|
-import com.ytpm.dao.AppUserLoginMapper;
|
|
|
|
|
-import com.ytpm.dao.AppUserMapper;
|
|
|
|
|
-import com.ytpm.dao.AppVideoWatchMapper;
|
|
|
|
|
-import com.ytpm.dao.AppWithdrawMapper;
|
|
|
|
|
|
|
+import com.ytpm.dao.*;
|
|
|
import com.ytpm.general.ResultTable;
|
|
import com.ytpm.general.ResultTable;
|
|
|
import com.ytpm.service.YtAppUserService;
|
|
import com.ytpm.service.YtAppUserService;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
|
|
+import java.util.Arrays;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
import java.util.Objects;
|
|
import java.util.Objects;
|
|
|
|
|
|
|
@@ -32,6 +33,8 @@ public class YtAppUserServiceImpl implements YtAppUserService {
|
|
|
private AppVideoWatchMapper videoWatchMapper;
|
|
private AppVideoWatchMapper videoWatchMapper;
|
|
|
@Resource
|
|
@Resource
|
|
|
private AppWithdrawMapper withdrawMapper;
|
|
private AppWithdrawMapper withdrawMapper;
|
|
|
|
|
+ @Resource
|
|
|
|
|
+ private AgentStaticsMapper staticsMapper;
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -57,6 +60,34 @@ public class YtAppUserServiceImpl implements YtAppUserService {
|
|
|
return ResultTable.resultTableOk(new PageInfo<YtAppUserListView>(views));
|
|
return ResultTable.resultTableOk(new PageInfo<YtAppUserListView>(views));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 查询用户广告数据统计列表
|
|
|
|
|
+ */
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public ResultTable<AppUserStaticsView> staticList() {
|
|
|
|
|
+ List<AppUserStaticsView> list = new ArrayList<>();
|
|
|
|
|
+ AppUserStaticsView view;
|
|
|
|
|
+ List<String> formatList = Arrays.asList("%Y-%m", "%Y-%m-%d");
|
|
|
|
|
+ for (String format : formatList) {
|
|
|
|
|
+ view = new AppUserStaticsView();
|
|
|
|
|
+ view.setStaticsType("%Y-%m".equals(format)?1:2);
|
|
|
|
|
+ //用户数
|
|
|
|
|
+ view.setUserNum(staticsMapper.getUserNum(format));
|
|
|
|
|
+ //封禁用户数
|
|
|
|
|
+ view.setBannedNum(staticsMapper.getBannedNum(format));
|
|
|
|
|
+ //提现用户数
|
|
|
|
|
+ view.setWithdrawNum(staticsMapper.getWithdrawNum(format));
|
|
|
|
|
+ //提现笔数
|
|
|
|
|
+ view.setWithdrawCount(staticsMapper.getWithdrawCount(format));
|
|
|
|
|
+ //已发提现金额
|
|
|
|
|
+ view.setWithdrawAmount(staticsMapper.getWithdrawSum(format));
|
|
|
|
|
+ //总广告数
|
|
|
|
|
+ view.setVideoWatchCount(staticsMapper.getVideoWatchCount(format));
|
|
|
|
|
+ list.add(view);
|
|
|
|
|
+ }
|
|
|
|
|
+ return ResultTable.resultTableOk(new PageInfo<>(list));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 查询用户当日播放视频总数
|
|
* 查询用户当日播放视频总数
|
|
|
*/
|
|
*/
|