generated from root/miduo_server
自动开服功能修改
parent
b3ef45f960
commit
8c3b8a48a9
|
@ -125,8 +125,13 @@ public class ServerInfoDaoImpl implements ServerInfoDao {
|
|||
if (serverInfo.getCoreName() != null && !"".equals(serverInfo.getCoreName())){
|
||||
update.set("coreName",serverInfo.getCoreName());
|
||||
}
|
||||
update.set("isSlave",serverInfo.getIsSlave());
|
||||
|
||||
if (serverInfo.getChannel() != null && !"".equals(serverInfo.getChannel())){
|
||||
update.set("channel",serverInfo.getChannel());
|
||||
}
|
||||
if (serverInfo.getSub_channel() != null && !"".equals(serverInfo.getSub_channel())){
|
||||
update.set("sub_channel",serverInfo.getSub_channel());
|
||||
}
|
||||
// update.set("isSlave",serverInfo.getIsSlave());
|
||||
MongoTemplate mongoTemplate = connect.getMongoTemplete(dbName);
|
||||
Query query = new Query(Criteria.where("server_id").is(serverInfo.getServer_id()));
|
||||
mongoTemplate.updateMulti(query, update, ServerInfo.class);
|
||||
|
|
|
@ -66,6 +66,22 @@
|
|||
<input type="text" name="port" placeholder="" th:value="*{getPort()}" class="input-text"/>
|
||||
</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="text" name="channel" placeholder="" th:value="*{getChannel()}" class="input-text"/>
|
||||
</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="text" name="subChannel" placeholder="" th:value="*{getSub_channel()}" class="input-text"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row cl">
|
||||
<label class="form-label col-xs-4 col-sm-2">
|
||||
<span class="c-red">*</span>
|
||||
|
@ -191,16 +207,18 @@
|
|||
};
|
||||
|
||||
function updateServerInfo() {
|
||||
var server_id = $("input[name='server_id']").val();
|
||||
var ip = $("input[name='ip']").val();
|
||||
var port = $("input[name='port']").val();
|
||||
var coreName = $("input[name='coreName']").val();
|
||||
var name = $("input[name='name']").val();
|
||||
var status = $("#status option:selected").val();
|
||||
var is_new = $("#is_new option:selected").val();
|
||||
var register_state = $("#register_state option:selected").val();
|
||||
var groupId = $("input[name='groupId']").val();
|
||||
var openTime = $("input[name='openTime']").val();
|
||||
let server_id = $("input[name='server_id']").val();
|
||||
let ip = $("input[name='ip']").val();
|
||||
let port = $("input[name='port']").val();
|
||||
let channel = $("input[name='channel']").val();
|
||||
let subChannel = $("input[name='subChannel']").val();
|
||||
let coreName = $("input[name='coreName']").val();
|
||||
let name = $("input[name='name']").val();
|
||||
let status = $("#status option:selected").val();
|
||||
let is_new = $("#is_new option:selected").val();
|
||||
let register_state = $("#register_state option:selected").val();
|
||||
let groupId = $("input[name='groupId']").val();
|
||||
let openTime = $("input[name='openTime']").val();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data:
|
||||
|
@ -208,6 +226,8 @@
|
|||
"server_id": server_id,
|
||||
"ip":ip,
|
||||
"port":port,
|
||||
"channel":channel,
|
||||
"sub_channel":subChannel,
|
||||
"coreName":coreName,
|
||||
"name": name,
|
||||
"status": status,
|
||||
|
|
Loading…
Reference in New Issue