需求:gm可查询最早晋升神尊11、12级得三人

master
duhui 2022-12-08 16:34:30 +08:00
parent 9486175d82
commit e2824cc5f7
9 changed files with 365 additions and 63 deletions

View File

@ -6,6 +6,7 @@ import com.jmfy.dao.impl.GSUserDaoImpl;
import com.jmfy.model.*;
import com.jmfy.model.vo.CUserVo;
import com.jmfy.model.vo.Hero;
import com.jmfy.model.vo.UserGodLvVo;
import com.jmfy.redisProperties.RedisUserKey;
import com.jmfy.utils.DateUtil;
import com.jmfy.utils.JsonUtil;
@ -23,10 +24,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.*;
/**
* Created by huangds on 2017/10/24.
@ -65,59 +63,6 @@ public class UserInfoController {
return "sendMails";
}
@RequestMapping(value = "/getAllUserId", method = {RequestMethod.POST, RequestMethod.GET})
public String getAllUserId(HttpSession session, ModelMap map, HttpServletRequest request) throws Exception {
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request);
// String openId = parameterMap.get("userId");
// List<CUserInfo> userInfos = userInfoDao.findUserInfo(openId);
// List<RoleVo> roleVos = new ArrayList<>();
// for (CUserInfo cUserInfo : userInfos) {
// int serverid = cUserInfo.getServerid();
// int userId = cUserInfo.getUserId();
// RoleVo roleVo = new RoleVo();
//
// CUser cUser = userInfoDao.findCuserInfo(serverid, userId);
// if (cUser == null) {
// continue;
// }
// roleVo.setServerId(cUserInfo.getServerid());
// roleVo.setUserId(cUserInfo.getUserId());
// roleVo.setUserName(cUser.getUserName());
// CUserPrivilegeInfo cUserPrivilegeInfo = userInfoDao.getCUserPrivilegeInfo(serverid, userId);
// roleVo.setSave_amt(cUserPrivilegeInfo.getSave_amt());
// CFamilyUser cFamilyUser = familyDao.getCFamilyUserById(serverid, userId);
// if (cFamilyUser != null) {
// roleVo.setFamilyId(String.valueOf(cFamilyUser.getFamilyId()));
// } else {
// roleVo.setFamilyId(String.valueOf(0));
// }
// roleVos.add(roleVo);
// }
// map.put("RoleVos", roleVos);
return "roleList";
}
// @RequestMapping(value = "/getUserInfoByName", method = {RequestMethod.POST, RequestMethod.GET})
// public String getUserInfoByName(HttpSession session, ModelMap map, HttpServletRequest request) throws Exception {
// HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request);
// int serverId = Integer.parseInt(parameterMap.get("serverId"));
// String userName = parameterMap.get("userName");
// List<RoleVo> roleVos = new ArrayList<>();
// CUser cUser = userInfoDao.findCuserByName(serverId, userName);
// if (cUser != null) {
// CUserInfo cUserInfo = userInfoDao.findUserInfoByUserId(cUser.getId());
// RoleVo roleVo = new RoleVo();
// roleVo.setUserName(cUser.getUserName());
// roleVo.setUserId(cUser.getId());
// roleVo.setOpenId(cUserInfo.getOpenId());
// roleVo.setServerId(cUserInfo.getServerid());
// roleVos.add(roleVo);
// }
// map.put("RoleVos", roleVos);
// return "roleList1";
// }
@RequestMapping(value = "/getUserRoleInfo", method = {RequestMethod.POST, RequestMethod.GET})
public String getUserInfo(ModelMap map, HttpServletRequest request) throws Exception {
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request);
@ -194,7 +139,7 @@ public class UserInfoController {
return "发送成功";
}
private CUserVo getcUserVo(GSUser gsUser) throws Exception {
private CUserVo getcUserVo(GSUser gsUser) {
CUserVo cUserVo = new CUserVo();
if (gsUser == null) {
cUserVo.setIsData(0);
@ -223,8 +168,6 @@ public class UserInfoController {
return cUserVo;
}
@RequestMapping(value = "/addWhiteList", method = {RequestMethod.POST, RequestMethod.GET})
public @ResponseBody
int addWhiteList(HttpSession session, HttpServletRequest request) throws Exception {
@ -280,4 +223,38 @@ public class UserInfoController {
out.flush();
}
/**
*
* @param map
* @param map
* @return
*/
@RequestMapping(value = "/toFindGodLv", method = {RequestMethod.POST, RequestMethod.GET})
public String toFindGodLv(ModelMap map) throws Exception {
List<ServerInfo> serverInfos = serverInfoDao.getAllServerInfo();
map.addAttribute("serverInfos", serverInfos);
return "findGodLv";
}
/**
*
* @param request
* @param map
* @return
*/
@RequestMapping(value = "/findGodLv", method = {RequestMethod.POST, RequestMethod.GET})
public String findGodLv(HttpServletRequest request, ModelMap map) {
String serverId = request.getParameter("serverId");
String lv = request.getParameter("lv");
String[] split = serverId.split(",");
ArrayList<UserGodLvVo> godLvVos = new ArrayList<>();
for (String id : split) {
String key = RedisUserKey.GOD_LEVEL_UP_TIME + ":" + id + ":" + lv;
Map<String, UserGodLvVo> lvMap = RedisUtil.getInstence().getMap(key, UserGodLvVo.class, -1);
godLvVos.addAll(lvMap.values());
}
map.addAttribute("godLvVos", godLvVos);
return "GodLvInfo";
}
}

View File

@ -72,6 +72,7 @@ public enum PowersEnum {
*/
INFO_MANAGER(700,"信息管理",700,1,""),
USER_INFO_QUERY(701,"角色信息查询",700,1,"toGetuserInfoPage"),
GOD_LV_QUERY(702,"神尊等级查询",700,1,"toFindGodLv"),
/**
* 800-899
*/

View File

@ -0,0 +1,84 @@
package com.jmfy.model.vo;
import com.jmfy.model.ServerInfo;
import com.jmfy.redisProperties.RedisUserKey;
import com.jmfy.utils.RedisUtil;
import java.util.Map;
/**
* @Author hj
* @Date 2022/12/8 16:00:38
* @Description:
* @Version 1.0
*/
public class UserGodLvVo {
//角色id
private int uid;
//角色名称
private String name;
//区服id
private String serverId;
//创角时间
private String createTime;
//神尊等级
private int godLv;
//神尊等级到达时间
private String upTime;
public int getUid() {
return uid;
}
public void setUid(int uid) {
this.uid = uid;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getServerId() {
return serverId;
}
public void setServerId(String serverId) {
this.serverId = serverId;
}
public String getServerName(){
ServerInfo serverInfo = RedisUtil.getInstence().getMapValue(RedisUserKey.SERVER_INFO, serverId, ServerInfo.class);
if (serverInfo == null){
return serverId;
}
return serverInfo.getName();
}
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime;
}
public int getGodLv() {
return godLv;
}
public void setGodLv(int godLv) {
this.godLv = godLv;
}
public String getUpTime() {
return upTime;
}
public void setUpTime(String upTime) {
this.upTime = upTime;
}
}

View File

@ -44,7 +44,7 @@ public class RedisUserKey {
public static final String GM_ACTIVITY_INFO = "GM_ACTIVITY_INFO";// GM活动信息
public static final String GM_ACTIVITY_UPDATE = "GM_ACTIVITY_UPDATE";// GM活动更新
public static final String GOD_LEVEL_UP_TIME = "GOD_LEVEL_UP_TIME";//晋升神尊等级排序
public static String getKey(String type, String key, int serverId) {
if (serverId==0) {

View File

@ -261,6 +261,20 @@ public class RedisUtil {
return null;
}
public <T> T getMapValue(String key, String mapKey, Class<T> clazz) {
try {
Object valueStr = redisObjectTemplate.opsForHash().get(key,mapKey);
if (valueStr == null) {
return null;
}
return gson.fromJson((String) valueStr, clazz);
} catch (RedisConnectionFailureException e) {
e.printStackTrace();
LOGGER.error("------------------Redis 连接失败---------------msg={}", e);
}
return null;
}
/**
* MaphashKey
*

View File

@ -31,8 +31,7 @@
</nav>
<div class="page-container" style="text-align: center">
<h1><span style="color: red">添加白名单账号</span></h1>
<form class="form form-horizontal" id="form-article-add" action="/getAllUserId" method="post"
onsubmit="return getUserInfo()">
<form class="form form-horizontal" id="form-article-add">
<div class="row cl">
<label class="form-label col-xs-4 col-sm-2">
<span class="c-red">*</span>

View File

@ -0,0 +1,82 @@
<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8"/>
<meta name="renderer" content="webkit|ie-comp|ie-stand"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="viewport"
content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
<meta http-equiv="Cache-Control" content="no-siteapp"/>
<script type="text/javascript" src="lib/html5shiv.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="h-ui/css/H-ui.min.css"/>
<link rel="stylesheet" type="text/css" href="h-ui.admin/css/H-ui.admin.css"/>
<link rel="stylesheet" type="text/css" href="lib/Hui-iconfont/1.0.8/iconfont.css"/>
<link rel="stylesheet" type="text/css" href="h-ui.admin/skin/default/skin.css" id="skin"/>
<link rel="stylesheet" type="text/css" href="h-ui.admin/css/style.css"/>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js"></script>
<script>DD_belatedPNG.fix('*');</script>
<title>神尊等级展示</title>
</head>
<body>
<nav class="breadcrumb">
<i class="Hui-iconfont">&#xe67f;</i> 神尊等级展示
<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
</nav>
<h2 class="mt-20" style="text-align: center"><span style="color:red;">神尊等级展示</span></h2>
<div class="page-container" style="text-align: center">
<div class="text-c">
<div class="mt-20">
<table class="table table-border table-bordered table-bg table-hover table-sort table-responsive">
<thead>
<tr class="text-c">
<th width="100">角色id</th>
<th width="100">角色名称</th>
<th width="60">神尊等级</th>
<th width="200">晋升时间</th>
<th width="100">区服名称</th>
<th width="200">创角时间</th>
</tr>
</thead>
<tbody>
<tr th:each="obj:${godLvVos}">
<td th:text="${obj.getUid()}" style="text-align: center;"></td>
<td th:text="${obj.getName()}" style="text-align: center;"></td>
<td th:text="${obj.getGodLv()}" style="text-align: center;"></td>
<td th:text="${obj.getUpTime()}" style="text-align: center;"></td>
<td th:text="${obj.getServerName()}" style="text-align: center;"></td>
<td th:text="${obj.getCreateTime()}" style="text-align: center;"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="h-ui/js/H-ui.min.js"></script>
<script type="text/javascript" src="h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->
<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="lib/laypage/1.2/laypage.js"></script>
<!--多选框-->
<script src="../static/xmSelect/js/xm-select.js"></script>
<script th:inline="javascript">
$('.table-sort').dataTable({
"aaSorting": [[3, "desc"]],//默认第几个排序
"bStateSave": true,//状态保存
"pading": false,
"aoColumnDefs": [
//{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
{"orderable": false, "aTargets": [0, 1]}// 不参与排序的列
]
});
</script>
</body>
</html>

View File

@ -0,0 +1,144 @@
<!--_meta 作为公共模版分离出去-->
<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8"/>
<meta name="renderer" content="webkit|ie-comp|ie-stand"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="Bookmark" href="../favicon.ico" />
<link rel="Shortcut Icon" href="../favicon.ico" />
<!--[if lt IE 9]>
<script type="text/javascript" src="../static/lib/html5shiv.js"></script>
<script type="text/javascript" src="../static/lib/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="../static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="../static/lib/Hui-iconfont/1.0.8/iconfont.css" />
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/css/style.css" />
<!--[if IE 6]>
<script type="text/javascript" src="../static/lib/DD_belatedPNG_0.0.8a-min.js"></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<!--/meta 作为公共模版分离出去-->
<title>神尊等级查询</title>
</head>
<body>
<nav class="breadcrumb">
<i class="Hui-iconfont">&#xe67f;</i> 首页
<span class="c-gray en">&gt;</span> 信息查询
<span class="c-gray en">&gt;</span> 神尊等级查询
<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
</nav>
<div class="page-container">
<form class="form form-horizontal" id="form-article-add">
<div id="tab-system" class="HuiTab">
<div class="tabBar cl">
<span>神尊等级查询</span>
</div>
<div class="tabCon">
<div class="row cl">
<label class="form-label col-xs-4 col-sm-2">
<span class="c-red">*</span>区服id</label>
<div class="formControls col-xs-8 col-sm-9">
<div th:id="serverIds" style="float: left;width: 230px;"></div>
</div>
</div>
<div class="row cl">
<label class="form-label col-xs-4 col-sm-2">
<span class="c-red">*</span>
神尊等级:</label>
<div class="formControls col-xs-8 col-sm-9">
<input type="number" id="lv" placeholder="" value="" class="input-text"/>
</div>
</div>
</div>
</div>
<div class="row cl">
<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
<button class="btn btn-secondary radius" style="margin-left: 10px;height: 40px;line-height: 40px;" type="button" onclick="findGodLv()">查询</button>
</div>
</div>
</form>
</div>
<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="../static/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="../static/lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="../static/h-ui/js/H-ui.min.js"></script>
<script type="text/javascript" src="../static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->
<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="../static/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="../static/lib/jquery.validation/1.14.0/jquery.validate.js"></script>
<script type="text/javascript" src="../static/lib/jquery.validation/1.14.0/validate-methods.js"></script>
<script type="text/javascript" src="../static/lib/jquery.validation/1.14.0/messages_zh.js"></script>
<!--多选框-->
<script src="../static/xmSelect/js/xm-select.js"></script>
<script th:inline="javascript">
$(function () {
$('.skin-minimal input').iCheck({
checkboxClass: 'icheckbox-blue',
radioClass: 'iradio-blue',
increaseArea: '20%'
});
$("#tab-system").Huitab({
index: 0
});
});
var serverInfos = xmSelect.render({
el: '#serverIds', // div的id值
template({name, value}){
return name + '<span style="position: absolute; right: 10px; color: #8799a3">'+value+'</span>'
},
toolbar: { // 工具条【‘全选’,‘清空’】
show: true, // 开启工具条
showIcon: false, // 隐藏工具条的图标
},
tips: '选择服务器', // 让默认值不是“请选择”,而是“选择校区”
filterable: true, // 开启搜索模式默认按照name进行搜索
height:'260px',
model: {
label: {
type: 'block',
block: {
//最大显示数量, 0:不限制
showCount: 1,
//是否显示删除图标
showIcon: true,
}
}
},
prop: {
name: 'name',
value: 'server_id',
},
data: function () {
var infos = [[${serverInfos}]];
for (var i = infos.length - 1; i >= 0; i--) {
// 删除掉所有为2的元素
if(infos[i].statusInt == -2) {
infos.splice(i, 1);
}
}
return infos;
},
});
function findGodLv() {
let serverId = serverInfos.getValue('valueStr');
let lv = document.getElementById("lv").value;
window.location.href = "/findGodLv?serverId="+serverId+"&lv="+lv;
}
</script>
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>

View File

@ -3,6 +3,7 @@
+ ### 2022-12-8
1. 返利活动新增开服累充类型活动
2. 活动返利添加界面:服务器类型新增”全部“类型,选中后全部服务器可用,包括之后开启得服务器
3. 信息管理页签下添加子页签,查询神尊等级信息功能
+ ### 2022-10-25
1. 游戏管理主页签下添加自动返利活动功能,可以配置自动返利功能信息