| | |
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletResponse;
|
| | |
|
| | | import net.sf.json.JSONArray;
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
| | | import org.apache.poi.ss.usermodel.Cell;
|
| | | import org.apache.poi.ss.usermodel.Row;
|
| | |
| | | import com.yeshi.fanli.entity.bus.user.BindingAccount;
|
| | | import com.yeshi.fanli.entity.bus.user.Extract;
|
| | | import com.yeshi.fanli.entity.bus.user.ForbiddenUserIdentifyCode;
|
| | | import com.yeshi.fanli.entity.bus.user.ForbiddenUserIdentifyCode.ForbiddenUserIdentifyCodeTypeEnum;
|
| | | import com.yeshi.fanli.entity.bus.user.HongBao;
|
| | | import com.yeshi.fanli.entity.bus.user.MoneyRecord;
|
| | | import com.yeshi.fanli.entity.bus.user.Order;
|
| | | import com.yeshi.fanli.entity.bus.user.ThreeSale;
|
| | | import com.yeshi.fanli.entity.bus.user.UserExtraTaoBaoInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.ForbiddenUserIdentifyCode.ForbiddenUserIdentifyCodeTypeEnum;
|
| | | import com.yeshi.fanli.entity.bus.user.UserRank;
|
| | | import com.yeshi.fanli.entity.taobao.PidOrder;
|
| | | import com.yeshi.fanli.entity.taobao.ScanHistory;
|
| | | import com.yeshi.fanli.exception.user.ForbiddenUserIdentifyCodeException;
|
| | |
| | | import com.yeshi.fanli.service.inter.user.ScanHistoryService;
|
| | | import com.yeshi.fanli.service.inter.user.UserActiveLogService;
|
| | | import com.yeshi.fanli.service.inter.user.UserExtraTaoBaoInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.UserRankService;
|
| | | import com.yeshi.fanli.tag.PageEntity;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.GsonUtil;
|
| | | import com.yeshi.fanli.util.HongBaoUtil;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | |
|
| | | import net.sf.json.JSONArray;
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | @Controller
|
| | | @RequestMapping("admin/new/api/v1/user")
|
| | |
| | |
|
| | | @Resource
|
| | | private UserExtraTaoBaoInfoService userExtraTaoBaoInfoService;
|
| | | |
| | | @Resource
|
| | | private UserInfoExtraService userInfoExtraService;
|
| | | |
| | | @Resource
|
| | | private UserRankService userRankService;
|
| | |
|
| | | @RequestMapping(value = "getUserList", method = RequestMethod.POST)
|
| | | public void getUserList(int pageIndex, String key, PrintWriter out) {
|
| | |
| | | public void countInfo(String callback, PrintWriter out) {
|
| | | try {
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | |
|
| | | // 累计用户数量
|
| | | long totalUser = userInfoCountService.countNewUser(null, null);
|
| | | // 流失用户数量(180天未使用登录并且无任何资金流动的账号数量)
|
| | | long loseUser = userInfoCountService.countLoseUser(180);
|
| | | // 累计有购买用户数
|
| | | long orderUser = userInfoCountService.countHasOrderUser();
|
| | | |
| | | |
| | | |
| | | |
| | | // 总数-普通用户
|
| | | long countNormal = userInfoCountService.countRank(0);
|
| | | long countNormal = 0;
|
| | | // 总数-铜用户
|
| | | long countCuprum = userInfoCountService.countRank(1);
|
| | | long countCuprum = 0;
|
| | | // 总数-银用户
|
| | | long countSilver = userInfoCountService.countRank(2);
|
| | | long countSilver = 0;
|
| | | // 总数-金用户
|
| | | long countGold = userInfoCountService.countRank(3);
|
| | |
|
| | | long countGold = 0;
|
| | | |
| | | List<UserRank> listRank = userRankService.getAllRank();
|
| | | if (listRank != null && listRank.size() > 0) {
|
| | | for (UserRank userRank: listRank) {
|
| | | Long id = userRank.getId();
|
| | | String name = userRank.getName();
|
| | | if ("青铜".equals(name)) {
|
| | | continue; |
| | | } |
| | | |
| | | long count = userInfoExtraService.countByRankId(id);
|
| | | if ("白银".equals(name)) {
|
| | | countCuprum = count;
|
| | | } else if ("黄金".equals(name)) {
|
| | | countSilver = count;
|
| | | } else if ("铂金".equals(name)) {
|
| | | countGold = count;
|
| | | }
|
| | | }
|
| | | }
|
| | | |
| | | // 普通用户计算
|
| | | countNormal = totalUser - (countCuprum + countSilver + countGold);
|
| | | |
| | | |
| | | JSONObject data = new JSONObject();
|
| | | data.put("totalUser", totalUser);
|
| | | data.put("loseUser", loseUser);
|
| | | data.put("orderUser", orderUser);
|
| | | data.put("countNormal", countNormal);
|
| | | data.put("countCuprum", countCuprum);
|
| | | data.put("countSilver", countSilver);
|
| | |
| | | * data.put("countCanAssets", countCanAssets);
|
| | | */
|
| | |
|
| | | // 累计用户数量
|
| | | long totalUser = userInfoCountService.countNewUser(null, null);
|
| | | // 流失用户数量(180天未使用登录并且无任何资金流动的账号数量)
|
| | | long loseUser = userInfoCountService.countLoseUser(180);
|
| | | // 累计有购买用户数
|
| | | long orderUser = userInfoCountService.countHasOrderUser();
|
| | |
|
| | | data.put("totalUser", totalUser);
|
| | | data.put("loseUser", loseUser);
|
| | | data.put("orderUser", orderUser);
|
| | | |
| | |
|
| | | // 今日新增用户数量
|
| | | long todayUser = userInfoCountService.countNewUser(1, null);
|