| | |
| | | return ServerResponse.createByErrorMsg("Operation failed. View logs"); |
| | | } |
| | | |
| | | public ServerResponse agentDelete(Integer userId, HttpServletRequest request) { |
| | | String loginToken = CookieUtils.readLoginToken(request, PropertiesUtil.getProperty("agent.cookie.name")); |
| | | String agentJson = RedisShardedPoolUtils.get(loginToken); |
| | | AgentUser agentUser = (AgentUser) JsonUtil.string2Obj(agentJson, AgentUser.class); |
| | | log.info("管理员 {} 删除用户 {}", StringUtils.isBlank(agentUser.getAgentName())?agentUser.getAgentPhone():agentUser.getAgentName(), userId); |
| | | |
| | | |
| | | int delChargeCount = this.iUserRechargeService.deleteByUserId(userId); |
| | | if (delChargeCount > 0) { |
| | | log.info("删除 充值 记录成功"); |
| | | } else { |
| | | log.info("删除 充值 记录失败"); |
| | | } |
| | | |
| | | |
| | | int delWithdrawCount = this.iUserWithdrawService.deleteByUserId(userId); |
| | | if (delWithdrawCount > 0) { |
| | | log.info("删除 提现 记录成功"); |
| | | } else { |
| | | log.info("删除 提现 记录失败"); |
| | | } |
| | | |
| | | |
| | | int delCashCount = this.iUserCashDetailService.deleteByUserId(userId); |
| | | if (delCashCount > 0) { |
| | | log.info("删除 资金 记录成功"); |
| | | } else { |
| | | log.info("删除 资金 记录成功"); |
| | | } |
| | | |
| | | |
| | | int delPositionCount = this.iUserPositionService.deleteByUserId(userId); |
| | | if (delPositionCount > 0) { |
| | | log.info("删除 持仓 记录成功"); |
| | | } else { |
| | | log.info("删除 持仓 记录失败"); |
| | | } |
| | | |
| | | |
| | | int delLogCount = this.iSiteLoginLogService.deleteByUserId(userId); |
| | | if (delLogCount > 0) { |
| | | log.info("删除 登录 记录成功"); |
| | | } else { |
| | | log.info("删除 登录 记录失败"); |
| | | } |
| | | |
| | | |
| | | int delUserCount = this.userMapper.deleteById(userId); |
| | | if (delUserCount > 0) { |
| | | return ServerResponse.createBySuccessMsg("Successful operation"); |
| | | } |
| | | return ServerResponse.createByErrorMsg("Operation failed. View logs"); |
| | | } |
| | | |
| | | |
| | | public int CountUserSize(Integer accountType) { |
| | | return this.userMapper.CountUserSize(accountType); |