| | |
| | | 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;
|
| | |
| | |
|
| | | 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
|
| | | *
|
| | |
| | | * @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)
|