| | |
| | | import com.yeshi.fanli.entity.bus.user.UserExtraTaoBaoInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfoExtra;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInviteValidNum;
|
| | | import com.yeshi.fanli.entity.bus.user.UserRank;
|
| | | import com.yeshi.fanli.entity.bus.user.vip.UserVIPInfo;
|
| | | import com.yeshi.fanli.entity.common.AdminUser;
|
| | |
| | | import com.yeshi.fanli.service.inter.user.UserRankService;
|
| | | import com.yeshi.fanli.service.inter.user.integral.IntegralDetailService;
|
| | | import com.yeshi.fanli.service.inter.user.invite.ThreeSaleSerivce;
|
| | | import com.yeshi.fanli.service.inter.user.invite.UserInviteValidNumService;
|
| | | import com.yeshi.fanli.service.inter.user.tb.UserExtraTaoBaoInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.vip.UserVIPInfoService;
|
| | | import com.yeshi.fanli.tag.PageEntity;
|
| | |
| | | @Resource
|
| | | private IntegralDetailService integralDetailService;
|
| | |
|
| | |
|
| | | @Resource
|
| | | private UserInviteValidNumService userInviteValidNumService;
|
| | | |
| | | @Resource
|
| | | private ThreeSaleSerivce threeSaleSerivce;
|
| | |
|
| | | /**
|
| | | * 查询用户信息列表 正常用户/异常用户
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 用户基础信息查询
|
| | | * @param callback
|
| | | * @param pageIndex
|
| | | * @param pageSize
|
| | | * @param key
|
| | | * @param keyType
|
| | | * @param rank
|
| | | * @param userType
|
| | | * @param days
|
| | | * @param startTime
|
| | | * @param endTime
|
| | | * @param type
|
| | | * @param level
|
| | | * @param activeCode
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "queryInfo")
|
| | | public void queryInfo(String callback, Integer pageIndex, Integer pageSize, String key, Integer keyType, Integer rank,Integer userType,
|
| | | Integer days, String startTime, String endTime, Integer state,String level,
|
| | | Integer activeCode, PrintWriter out) {
|
| | | try {
|
| | | if (pageIndex == null)
|
| | | pageIndex = 1;
|
| | |
|
| | | if (pageSize == null)
|
| | | pageSize = Constant.PAGE_SIZE;
|
| | |
|
| | | String userRank = null;
|
| | | if (rank != null) {
|
| | | switch (rank) {
|
| | | case 1:
|
| | | userRank = "青铜";
|
| | | break;
|
| | | case 2:
|
| | | userRank = "白银";
|
| | | break;
|
| | | case 3:
|
| | | userRank = "黄金";
|
| | | break;
|
| | | case 4:
|
| | | userRank = "铂金";
|
| | | break;
|
| | | default:
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | List<UserInfoVO> userList = userInfoService.queryInfo((pageIndex - 1) * pageSize, pageSize, state, key, keyType,
|
| | | userRank, days, startTime, endTime, userType, level, activeCode);
|
| | |
|
| | | if (userList == null || userList.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无相关数据"));
|
| | | return;
|
| | | }
|
| | |
|
| | | long count = userInfoService.countInfo(state, key, keyType, userRank, days, startTime, endTime,userType, level, activeCode);
|
| | |
|
| | | int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
|
| | | PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage);
|
| | |
|
| | | GsonBuilder gsonBuilder = new GsonBuilder();
|
| | | gsonBuilder.serializeNulls();
|
| | | Gson gson = gsonBuilder.create();
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("pe", pe);
|
| | | data.put("resultList", gson.toJson(userList));
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
|
| | | }
|
| | | }
|
| | | |
| | | |
| | | /**
|
| | | * 统计今日用户总情况
|
| | | *
|
| | |
| | | continue;
|
| | | }
|
| | |
|
| | | |
| | | UserInfo user = userInfoService.selectByPKey(userInfo.getId());
|
| | | if (user != null) {
|
| | | detail.setUserInfo(user);
|
| | |
| | | }
|
| | |
|
| | | long count = userMoneyDetailService.countQuery(key, keyType);
|
| | |
|
| | | int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
|
| | | PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage);
|
| | |
|
| | |
|
| | | GsonBuilder gsonBuilder = new GsonBuilder().setDateFormat("yyyy-MM-dd HH:mm:ss");
|
| | | gsonBuilder.registerTypeAdapter(UserMoneyDetailTypeEnum.class, new JsonSerializer<UserMoneyDetailTypeEnum>() {
|
| | |
| | | }
|
| | | });
|
| | | Gson gson = gsonBuilder.create();
|
| | | |
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("pe", pe);
|
| | |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("查询失败"));
|
| | | }
|
| | | }
|
| | | |
| | | |
| | | |
| | | /**
|
| | | * 用户粉丝统计
|
| | | * |
| | | * @param callback
|
| | | * @param pageIndex
|
| | | * @param pageSize
|
| | | * @param id
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "countTeamFans")
|
| | | public void countTeamFans(String callback, Long uid, PrintWriter out) {
|
| | | int doneFirst = 0;
|
| | | int doneSecond = 0;
|
| | | UserInviteValidNum userInviteValidNum = userInviteValidNumService.selectByPrimaryKey(uid);
|
| | | if (userInviteValidNum != null) {
|
| | | doneFirst = userInviteValidNum.getNumFirst() == null ? 0 : userInviteValidNum.getNumFirst();
|
| | | doneSecond = userInviteValidNum.getNumSecond() == null ? 0 : userInviteValidNum.getNumSecond();
|
| | | }
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("doneFirst", doneFirst); |
| | | data.put("doneSecond", doneSecond); |
| | | data.put("first", threeSaleSerivce.countFirstTeam(uid)); |
| | | data.put("second", threeSaleSerivce.countSecondTeam(uid)); |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | | |
| | | }
|