修改服务器推荐服 以及汉化

master
gaojie 2019-05-27 14:26:23 +08:00
parent f6324ced27
commit 17f23d0666
11 changed files with 104 additions and 26 deletions

View File

@ -0,0 +1,6 @@
{"_id":{"$numberLong":"120"},"name":"銀寶","hero_icon":"i_h3_83","hero_painting":"ui_boss_yindan","description":"聶離發現的神奇妖靈。可作為素材,給妖靈師提供經驗","profession":{"$numberLong":"0"},"rate_type":{"$numberLong":"3"},"init_star":{"$numberLong":"3"},"max_level":{"$numberLong":"1"},"gold_level":{"$numberLong":"216"},"hero_exp":{"$numberLong":"5400"},"same_profession_add_exp":{"$numberLong":"20"},"use":"可以為妖靈師提供大量經驗。全部職業都可以獲得經驗值加成","hero_handbook_id":{"$numberLong":"83"},"drop_model":"fx_m_30016_dlw","dynamic_painting":{"$numberLong":"83"},"hero_model":"h_83_yd_p_ui","re_story":"聶離發現的超稀有妖靈,是蛋蛋家族唯一的女孩子。在穿著打扮方面,銀寶尤其偏愛粉色的東西,並且一直堅持控制體型,她認為這樣可以變得更漂亮。銀寶很在意生活環境,總愛把她的房間收拾的乾乾淨淨——再配上一些自己做的可愛裝飾。在她的努力下,兄弟們的身上都有了一條漂亮的小繩子。\\n銀寶溫和善良。每當紅寶和藍寶吵架她總會成為那個調停的人。每當大哥金寶幫了倒忙也是她跑來善後。一位不知名的召喚師曾說“如果沒了她蛋蛋家族大概會整日雞犬不寧吧。”在那位召喚師的記憶中銀寶只發過一次脾氣那一次紅寶踩髒了銀寶的粉色床單被她追的滿世界跑。"}
{"_id":{"$numberLong":"121"},"name":"傳奇銀寶","hero_icon":"i_h3_83","hero_painting":"ui_boss_yindan","description":"聶離發現的神奇妖靈。可作為素材,給妖靈師提供經驗","profession":{"$numberLong":"0"},"rate_type":{"$numberLong":"3"},"init_star":{"$numberLong":"3"},"max_level":{"$numberLong":"1"},"gold_level":{"$numberLong":"216"},"hero_exp":{"$numberLong":"64500"},"same_profession_add_exp":{"$numberLong":"20"},"use":"可以為妖靈師提供大量經驗。全部職業都可以獲得經驗值加成","hero_handbook_id":{"$numberLong":"83"},"drop_model":"fx_m_30016_dlw","dynamic_painting":{"$numberLong":"83"},"hero_model":"h_83_yd_p_ui","re_story":"聶離發現的超稀有妖靈,是蛋蛋家族唯一的女孩子。在穿著打扮方面,銀寶尤其偏愛粉色的東西,並且一直堅持控制體型,她認為這樣可以變得更漂亮。銀寶很在意生活環境,總愛把她的房間收拾的乾乾淨淨——再配上一些自己做的可愛裝飾。在她的努力下,兄弟們的身上都有了一條漂亮的小繩子。\\n銀寶溫和善良。每當紅寶和藍寶吵架她總會成為那個調停的人。每當大哥金寶幫了倒忙也是她跑來善後。一位不知名的召喚師曾說“如果沒了她蛋蛋家族大概會整日雞犬不寧吧。”在那位召喚師的記憶中銀寶只發過一次脾氣那一次紅寶踩髒了銀寶的粉色床單被她追的滿世界跑。"}
{"_id":{"$numberLong":"130"},"name":"金寶","hero_icon":"i_h3_82","hero_painting":"ui_boss_jindan","description":"聶離發現的神奇妖靈。可作為素材,給妖靈師提供經驗","profession":{"$numberLong":"0"},"rate_type":{"$numberLong":"4"},"init_star":{"$numberLong":"4"},"max_level":{"$numberLong":"1"},"gold_level":{"$numberLong":"3240"},"hero_exp":{"$numberLong":"81000"},"same_profession_add_exp":{"$numberLong":"20"},"use":"可以為妖靈師提供極大量經驗。全部職業都可以獲得經驗值加成","hero_handbook_id":{"$numberLong":"82"},"drop_model":"fx_m_30016_dlw","dynamic_painting":{"$numberLong":"82"},"hero_model":"h_82_jd_p_ui","re_story":"聶離發現的超稀有妖靈,是蛋蛋家族的大哥。金寶活潑開朗,有他在的地方總會變得熱熱鬧鬧。不但如此,金寶還是個熱心腸,看到需要幫助的人會毫不猶豫地沖上去幫忙,也因此鬧出過不少亂子。精力旺盛的金寶,總會在天未亮時就起床健身鍛煉。“不要長太肥,會被吃掉的。”金寶一邊這樣說著,一邊叫醒弟弟妹妹們一同起床鍛煉。\\n受不了他的藍寶抱怨雞還沒叫不願起床。看著少了一人的健身小分隊金寶犯起了難“沒有雞怎麼能怪我呢”他撓撓頭開始了新的嘗試。從此以後每天早上蛋蛋家族的屋子裡都會響起嘎嘎嘎的打鳴聲……\\n你只是單純希望有人陪著你吧金寶"}
{"_id":{"$numberLong":"131"},"name":"傳奇金寶","hero_icon":"i_h3_82","hero_painting":"ui_boss_jindan","description":"聶離發現的神奇妖靈。可作為素材,給妖靈師提供經驗","profession":{"$numberLong":"0"},"rate_type":{"$numberLong":"4"},"init_star":{"$numberLong":"4"},"max_level":{"$numberLong":"1"},"gold_level":{"$numberLong":"1"},"hero_exp":{"$numberLong":"550000"},"same_profession_add_exp":{"$numberLong":"20"},"use":"可以為妖靈師提供極大量經驗。全部職業都可以獲得經驗值加成","hero_handbook_id":{"$numberLong":"82"},"drop_model":"fx_m_30016_dlw","dynamic_painting":{"$numberLong":"82"},"hero_model":"h_82_jd_p_ui","re_story":"聶離發現的超稀有妖靈,是蛋蛋家族的大哥。金寶活潑開朗,有他在的地方總會變得熱熱鬧鬧。不但如此,金寶還是個熱心腸,看到需要幫助的人會毫不猶豫地沖上去幫忙,也因此鬧出過不少亂子。精力旺盛的金寶,總會在天未亮時就起床健身鍛煉。“不要長太肥,會被吃掉的。”金寶一邊這樣說著,一邊叫醒弟弟妹妹們一同起床鍛煉。\\n受不了他的藍寶抱怨雞還沒叫不願起床。看著少了一人的健身小分隊金寶犯起了難“沒有雞怎麼能怪我呢”他撓撓頭開始了新的嘗試。從此以後每天早上蛋蛋家族的屋子裡都會響起嘎嘎嘎的打鳴聲……\\n你只是單純希望有人陪著你吧金寶"}
{"_id":{"$numberLong":"140"},"name":"灰寶","hero_icon":"i_h3_85","hero_painting":"ui_boss_landan","description":"聶離發現的神奇妖靈。可作為素材,提升妖靈師絕技等級","profession":{"$numberLong":"0"},"rate_type":{"$numberLong":"4"},"init_star":{"$numberLong":"5"},"max_level":{"$numberLong":"1"},"gold_level":{"$numberLong":"216"},"hero_exp":{"$numberLong":"5400"},"same_profession_add_exp":{"$numberLong":"20"},"use":"可以為妖靈師提供絕技技能提升","hero_handbook_id":{"$numberLong":"85"},"drop_model":"fx_m_30016_dlw","dynamic_painting":{"$numberLong":"85"},"hero_model":"h_85_ld_p_ui","re_story":"聶離發現的超稀有妖靈,是蛋蛋家族中的頭腦派。灰寶自出生起就擁有極強的學習能力,無論說話還是走路都比兄弟們學得快,是個從小就被看作天才的存在。在大家的期許下,他博覽群書,迅速成為了蛋蛋家族裡的智多星。雖然總被被紅寶嘲諷“只會說些沒用的”,但他一直在為證明自己的價值而努力。\\n最近灰寶迷上了科普的工作苦於遲遲沒有相關的機會灰寶只好私下裡自己用功。每當夜深人靜灰寶就會站在鏡子前模仿著一名科教動畫裡的角色一遍遍地說著經典臺詞做出招牌動作他堅信自己總有一天能向別人講解些什麼。\\n灰寶羡慕並喜歡擔任遊戲助手的清風精靈但從沒和她說過話。"}
{"_id":{"$numberLong":"100001"},"name":"測試專用寶","hero_icon":"i_h3_82","hero_painting":"ui_boss_jindan","description":"測試專用材料。可作為素材,給妖靈師提供經驗","profession":{"$numberLong":"0"},"rate_type":{"$numberLong":"4"},"init_star":{"$numberLong":"5"},"max_level":{"$numberLong":"1"},"gold_level":{"$numberLong":"1000"},"hero_exp":{"$numberLong":"500000"},"same_profession_add_exp":{"$numberLong":"20"},"use":"測試專用材料","hero_handbook_id":{"$numberLong":"82"},"drop_model":"fx_m_30016_dlw","dynamic_painting":{"$numberLong":"82"},"hero_model":"","re_story":""}

View File

@ -74,13 +74,19 @@ public class FindFlowController {
}
private String getItemName(int itemId, int iGoodsType) {
String itemName;
String itemName = "";
switch (iGoodsType) {
case 999:
itemName = getMoneyName(itemId);
break;
case 0:
itemName = STableManager.getInstance().getsItemName(itemId);
if (itemName ==null){
itemName = STableManager.getInstance().getsExpCardName(itemId);
if (itemName == null || itemName.isEmpty()) {
itemName = String.valueOf(itemId);
}
}
break;
case 2:
itemName = STableManager.getInstance().getsHeroName(itemId);
@ -104,8 +110,7 @@ public class FindFlowController {
itemName = STableManager.getInstance().getsMindName(itemId);
break;
default:
itemName = STableManager.getInstance().getsExpCardName(itemId);
if (itemName == null || itemName.isEmpty()) {
if (itemName.isEmpty()) {
itemName = String.valueOf(itemId);
}
}

View File

@ -38,6 +38,7 @@ public class ServerInfoController {
serverInfoVo.setName(serverInfo.getName());
serverInfoVo.setStatus(serverInfo.getStatus());
serverInfoVo.setIsWhite(serverInfo.getIsWhite());
serverInfoVo.setIs_commend(serverInfo.getIs_ommend());
CServerOpenTime cServerOpenTime = RedisUtil.getInstence().getObject(RedisUserKey.SERVER_OPEN_TIME_KEY, Integer.toString(serverInfo.getServer_id()),
CServerOpenTime.class, GlobalsDef.REDIS_OVER_TIME);
if (cServerOpenTime !=null){
@ -59,18 +60,25 @@ public class ServerInfoController {
}
@RequestMapping(value = "/serverEdit", method = {RequestMethod.POST, RequestMethod.GET})
public String toServerInfoEdit(HttpSession session, ModelMap map , HttpServletRequest request) throws Exception {
List<ServerInfo> serverInfos = new ArrayList<>();
List<ServerInfoVo> serverInfoVos = new ArrayList<>();
int status = Integer.parseInt(request.getParameter("status"));
int isWhite = Integer.parseInt(request.getParameter("isWhite"));
int server_id = Integer.parseInt(request.getParameter("server_id"));
serverInfoDao.updateServerInfo(server_id,status,isWhite);
int isCommend = Integer.parseInt(request.getParameter("isCommend"));
serverInfoDao.updateServerInfo(server_id,status,isWhite,isCommend);
ServerInfo serverInfo = serverInfoDao.getServerinfo(server_id);
if (serverInfo != null){
serverInfos.add(serverInfo);
ServerInfoVo serverInfoVo = new ServerInfoVo();
serverInfoVo.setServer_id(serverInfo.getServer_id());
serverInfoVo.setName(serverInfo.getName());
serverInfoVo.setStatus(serverInfo.getStatus());
serverInfoVo.setIsWhite(serverInfo.getIsWhite());
serverInfoVo.setIs_commend(serverInfo.getIs_ommend());
serverInfoVos.add(serverInfoVo);
}else{
return "404";
}
map.addAttribute("serverInfos", serverInfos);
map.addAttribute("serverInfos", serverInfoVos);
return "findServerInfo";
}
@RequestMapping(value = "/closeWhite", method = {RequestMethod.POST, RequestMethod.GET})

View File

@ -14,5 +14,5 @@ public interface ServerInfoDao {
void openServerWhite(int server_id) throws Exception;
void updateServerInfo(int server_id, int status,int isWhite) throws Exception;
void updateServerInfo(int server_id, int status,int isWhite,int isCommend) throws Exception;
}

View File

@ -81,7 +81,7 @@ public class FamilyDaoImpl implements FamilyDao {
return rank + 1;
}
private String getKey(String key,int areaId) {
return areaId + RedisUserKey.Delimiter_colon + key;
private String getKey(String key,int serverId) {
return serverId + RedisUserKey.Delimiter_colon + key;
}
}

View File

@ -54,10 +54,11 @@ public class ServerInfoDaoImpl implements ServerInfoDao {
}
@Override
public void updateServerInfo(int server_id, int status,int isWhite) throws Exception {
public void updateServerInfo(int server_id, int status,int isWhite,int isCommend) throws Exception {
Update update = new Update();
update.set("status",status);
update.set("isWhite",isWhite);
update.set("is_ommend",isCommend);
MongoTemplate mongoTemplate = connect.getMongoTemplete(dbName);
Query query = new Query(Criteria.where("server_id").is(server_id));
mongoTemplate.updateMulti(query, update, ServerInfo.class);

View File

@ -12,6 +12,8 @@ public class ServerInfoVo{
public int isWhite;
public int isCommend;
public void setServer_id(int server_id) {
this.server_id = server_id;
}
@ -31,4 +33,10 @@ public class ServerInfoVo{
public void setIsWhite(int isWhite) {
this.isWhite = isWhite;
}
public void setIs_commend(int is_commend) {
this.isCommend = is_commend;
}
}

View File

@ -5,9 +5,9 @@ spring.thymeleaf.cache=false
spring.thymeleaf.content-type=text/html
spring.thymeleaf.mode =LEGACYHTML5
spring.data.newmongodb.uri = mongodb://60.1.1.14:27017
spring.data.mongodb.uri = mongodb://60.1.1.14:27017/ysj_core
spring.data.oldMongodb.uri= mongodb://60.1.1.14:27017
spring.data.mongodb.uri = mongodb://60.1.1.14/ysj_core
spring.data.gameMongodb.uri = mongodb://60.1.1.14:27017
spring.data.tlogMongodb.uri= mongodb://ysj:ysj666@35.221.215.254:27017
# redis config
spring.redis.host = 60.1.1.14

View File

@ -21,7 +21,9 @@
<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('/toCDKBuild');" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<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('/toCDKBuild');" title="刷新" >
<i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container" style="text-align: center">
<h2><span style="color:red;">序列號生成</span></h2>
<div class="text-c">

View File

@ -23,8 +23,7 @@
<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>
<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace('/findServerInfo');" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container" style="text-align: center">
<h2><span style="color:red;">服务器信息</span></h2>
<div class="text-c">
@ -38,6 +37,7 @@
<th width="200">开启时间</th>
<th width="200">服务器状态</th>
<th width="200">是否白名单</th>
<th width="200">是否推荐服</th>
<th width="200">操作</th>
</tr>
</thead>
@ -57,8 +57,12 @@
<span th:case="0" class="label label-defaunt radius">已关闭</span>
<span th:case="1" class="label label-success radius">已开启</span>
</th>
<th th:switch="${obj.isCommend}" style="text-align: center;">
<span th:case="0" class="label label-defaunt radius"></span>
<span th:case="1" class="label label-success radius"></span>
</th>
<td class="td-manage">
<a title="修改服务器状态" href="javascript:;" th:href="@{/toServerInfoEdit(id =${obj.server_id})}" class="ml-5" style="text-decoration:none">
<a title="修改服务器状态" href="javascript:;" th:href="@{/toServerInfoEdit(id =${obj.server_id},status = ${obj.status} ,isWhite= ${obj.isWhite})}" class="ml-5" style="text-decoration:none">
<i class="Hui-iconfont">&#xe6df;</i></a>
</td>
</tr>
@ -83,7 +87,7 @@ $('.table-sort').dataTable({
"pading":false,
"aoColumnDefs": [
//{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
{"orderable":false,"aTargets":[0,5]}// 不参与排序的列
// {"orderable":false,"aTargets":[0,0]}// 不参与排序的列
]
});
/*开启白名单*/

View File

@ -33,7 +33,7 @@
服务器管理
<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>
<!--<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace('/findServerInfo');" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>-->
</nav>
<div class="page-container">
<form class="form form-horizontal" th:object="${serverInfo}" action="/serverEdit" method="post">
@ -55,11 +55,12 @@
<span class="c-red">*</span>
服务器状态:</label>
<div class="formControls col-xs-8 col-sm-9">
<select th:name="status" class="input-text" th:value="*{status}"><!--下拉列表-->
<option value="1">维护</option>
<option value="2" th:selected="selected">流畅</option>
<option value="3">拥挤</option>
<option value="4">爆满</option>
<input type="hidden" id ="status" th:value="*{status}"/>
<select th:name="status" class="input-text" id="status1"><!--下拉列表-->
<option th:value="1">维护</option>
<option th:value="2">流畅</option>
<option th:value="3">拥挤</option>
<option th:value="4">爆满</option>
</select>
</div>
</div>
@ -68,12 +69,25 @@
<span class="c-red">*</span>
白名单:</label>
<div class="formControls col-xs-8 col-sm-9">
<select th:name="isWhite" class="input-text" th:value="*{status}"><!--下拉列表-->
<input type="hidden" id ="isWhite" th:value="*{isWhite}"/>
<select th:name="isWhite" class="input-text" id="isWhite1"><!--下拉列表-->
<option value="1" th:selected="selected">开启</option>
<option value="0">关闭</option>
</select>
</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="hidden" id ="isCommend" th:value="*{is_ommend}"/>
<select th:name="isCommend" class="input-text" id="isCommend1"><!--下拉列表-->
<option value="1" th:selected="selected"></option>
<option value="0"></option>
</select>
</div>
</div>
</div>
</div>
<div class="row cl">
@ -108,6 +122,36 @@ $(function(){
index:0
});
});
$(document).ready(function(){
var flag =$("#status").val();
//根据值让option选中
if(flag==="4"){
$("#status1 option[value='"+flag+"']").attr("selected","selected");
}else if(flag==="3"){
$("#status1 option[value='"+flag+"']").attr("selected","selected");
}else if(flag==="2"){
$("#status1 option[value='"+flag+"']").attr("selected","selected");
}else if(flag==="1"){
$("#status1 option[value='"+flag+"']").attr("selected","selected");
}
var flag1 =$("#isWhite").val();
//根据值让option选中
if(flag1==="0"){
$("#isWhite1 option[value='"+flag1+"']").attr("selected","selected");
}else if(flag1==="1"){
$("#isWhite1 option[value='"+flag1+"']").attr("selected","selected");
}
var flag2 =$("#isCommend").val();
//根据值让option选中
if(flag2==="0"){
$("#isCommend1 option[value='"+flag2+"']").attr("selected","selected");
}else if(flag2==="1"){
$("#isCommend1 option[value='"+flag2+"']").attr("selected","selected");
}
});
</script>
<!--/请在上方写此页面业务相关的脚本-->
</body>