| | |
| | | import com.google.gson.GsonBuilder;
|
| | | import com.google.gson.reflect.TypeToken;
|
| | | import com.yeshi.fanli.controller.admin.utils.AdminUtils;
|
| | | import com.yeshi.fanli.dto.ChartTDO;
|
| | | import com.yeshi.fanli.entity.bus.user.BindingAccount;
|
| | | import com.yeshi.fanli.entity.bus.user.ForbiddenUserIdentifyCode;
|
| | | import com.yeshi.fanli.entity.bus.user.ForbiddenUserIdentifyCode.ForbiddenUserIdentifyCodeTypeEnum;
|
| | | 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.UserInfoExtra;
|
| | | import com.yeshi.fanli.entity.bus.user.UserRank;
|
| | | import com.yeshi.fanli.entity.common.AdminUser;
|
| | | import com.yeshi.fanli.entity.money.UserMoneyDetail;
|
| | | import com.yeshi.fanli.exception.user.ForbiddenUserIdentifyCodeException;
|
| | | import com.yeshi.fanli.service.inter.count.UserInfoCountService;
|
| | | import com.yeshi.fanli.service.inter.hongbao.ThreeSaleSerivce;
|
| | | import com.yeshi.fanli.service.inter.money.UserMoneyDetailService;
|
| | | import com.yeshi.fanli.service.inter.money.extract.BindingAccountService;
|
| | | import com.yeshi.fanli.service.inter.user.ForbiddenUserIdentifyCodeService;
|
| | | import com.yeshi.fanli.service.inter.user.UserAccountService;
|
| | | import com.yeshi.fanli.service.inter.user.UserExtraTaoBaoInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoDeleteRecordService;
|
| | | 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.service.inter.user.invite.ThreeSaleSerivce;
|
| | | import com.yeshi.fanli.service.inter.user.tb.UserExtraTaoBaoInfoService;
|
| | | import com.yeshi.fanli.tag.PageEntity;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
| | |
|
| | | UserInfo find = userInfoService.getUserById(uid);
|
| | | if (find == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("不存在该用户!"));
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("用户被封禁或不存在"));
|
| | | return;
|
| | | }
|
| | |
|
| | |
| | | }
|
| | |
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("解绑成功"));
|
| | |
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
|
| | | }
|
| | | }
|
| | | |
| | | |
| | |
|
| | | /**
|
| | | * 修改用户备注
|
| | | * @param callback
|
| | | * @param uid
|
| | | * @param mark
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping("addUserMark")
|
| | | public void addUserMark(String callback, Long uid, String mark, PrintWriter out) {
|
| | | try {
|
| | | if (uid == null || uid <= 0 || StringUtil.isNullOrEmpty(mark))
|
| | | return;
|
| | | UserInfoExtra userInfoExtra = userInfoExtraService.getUserInfoExtra(uid);
|
| | | if (userInfoExtra == null) |
| | | return;
|
| | | UserInfoExtra updateExtra = new UserInfoExtra();
|
| | | updateExtra.setId(userInfoExtra.getId());
|
| | | updateExtra.setMark(mark);
|
| | | userInfoExtraService.saveUserInfoExtra(updateExtra);
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 删除用户-改变其状态
|
| | | * @param callback
|
| | | * @param idArray
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "deleteUser")
|
| | | public void delete(String callback, String idArray, HttpServletRequest request, PrintWriter out) {
|
| | | try {
|
| | | |
| | | AdminUser admin = (AdminUser) request.getSession().getAttribute(Constant.SESSION_ADMIN);
|
| | | if (admin == null) {
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult("当前账户失效,请重新登陆。")));
|
| | | return;
|
| | | }
|
| | | |
| | | if (StringUtil.isNullOrEmpty(idArray)) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("请选择操作的数据"));
|
| | | return;
|
| | | }
|
| | |
|
| | | Gson gson = new Gson();
|
| | | List<Long> list = gson.fromJson(idArray, new TypeToken<ArrayList<Long>>() {}.getType());
|
| | | if (list == null || list.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("未检测到删除的数据"));
|
| | | return;
|
| | | }
|
| | | |
| | | for (Long id: list) {
|
| | | UserInfo user = new UserInfo(id);
|
| | | user.setState(UserInfo.STATE_DELETE);
|
| | | user.setStateDesc(admin.getId()+" " + admin.getName()+ "后台手动删除");
|
| | | userInfoService.updateByPrimaryKeySelective(user);
|
| | | }
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("成功删除"));
|
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("删除失败"));
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | |
| | | |
| | | |
| | | /**
|
| | | * 封禁用户ID
|
| | | *
|
| | |
| | | JSONArray line_list = new JSONArray();
|
| | | for (String channel : channelList) {
|
| | |
|
| | | List<Map<String, Object>> list = userInfoCountService.countNewUserByDate(channel, dateType, year,
|
| | | List<ChartTDO> list = userInfoCountService.countNewUserByDate(channel, dateType, year,
|
| | | startTime, endTime);
|
| | |
|
| | | if ("all".equalsIgnoreCase(channel)) {
|
| | |
| | | JSONArray line_list = new JSONArray();
|
| | | for (String channel : channelList) {
|
| | |
|
| | | List<Map<String, Object>> list = userInfoCountService.getTodayBuyRate(channel, dateType, year,
|
| | | List<ChartTDO> list = userInfoCountService.getTodayBuyRate(channel, dateType, year,
|
| | | startTime, endTime);
|
| | |
|
| | | if ("all".equalsIgnoreCase(channel)) {
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getGoldTop")
|
| | | public void getGoldTop(String callback, Integer pageIndex, Integer pageSize, Integer type,
|
| | | public void getGoldTop(String callback, Integer pageIndex, Integer pageSize, Integer type, String key,
|
| | | PrintWriter out) {
|
| | | if (type == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("type不能为空"));
|
| | |
| | | long count = 0;
|
| | | List<UserGoldCoinVO> list = null;
|
| | | if (type == 0) {
|
| | | count = userInfoCountService.countByHasGoldCoin();
|
| | | list = userInfoCountService.listByHasGoldCoin((pageIndex - 1) * pageSize, pageSize);
|
| | | count = userInfoCountService.countByHasGoldCoin(key);
|
| | | list = userInfoCountService.listByHasGoldCoin((pageIndex - 1) * pageSize, pageSize, key);
|
| | | } else if (type == 1 || type == 2) {
|
| | | count = userInfoCountService.countByUserGoldCoin(type);
|
| | | list = userInfoCountService.listByUserGoldCoin((pageIndex - 1) * pageSize, pageSize, type);
|
| | | count = userInfoCountService.countByUserGoldCoin(type, key);
|
| | | list = userInfoCountService.listByUserGoldCoin((pageIndex - 1) * pageSize, pageSize, type, key);
|
| | | }
|
| | |
|
| | | if(list == null)
|