generated from root/miduo_server
Merge branch 'jieling' into dh_dev_gm0621
commit
7abc044d0c
|
|
@ -191,6 +191,7 @@ public class GameTitleController {
|
||||||
try {
|
try {
|
||||||
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request);
|
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request);
|
||||||
String jsonString = JSON.toJSONString(parameterMap);
|
String jsonString = JSON.toJSONString(parameterMap);
|
||||||
|
LOGGER.info("天眼封禁json=>{}",jsonString);
|
||||||
JSONObject jsonObject = JSON.parseObject(jsonString);
|
JSONObject jsonObject = JSON.parseObject(jsonString);
|
||||||
BaseHandler handler = ManagerManager.getInstance().getBaseHandler("gm");
|
BaseHandler handler = ManagerManager.getInstance().getBaseHandler("gm");
|
||||||
if(handler.skyEyeExecute(jsonObject,session,map)){
|
if(handler.skyEyeExecute(jsonObject,session,map)){
|
||||||
|
|
@ -224,11 +225,12 @@ public class GameTitleController {
|
||||||
BigInteger bigInt = new BigInteger(1, md5sum);
|
BigInteger bigInt = new BigInteger(1, md5sum);
|
||||||
String newsign = String.format("%032X", bigInt).toLowerCase();
|
String newsign = String.format("%032X", bigInt).toLowerCase();
|
||||||
map.put("message","sign:"+sign+" newSign:"+newsign);
|
map.put("message","sign:"+sign+" newSign:"+newsign);
|
||||||
LOGGER.info("message,sign=>{},new sign=>{}",sign,newsign);
|
LOGGER.info("天眼message,sign=>{},new sign=>{}",sign,newsign);
|
||||||
return newsign.equalsIgnoreCase(sign); // MD5前面会补零
|
return newsign.equalsIgnoreCase(sign); // MD5前面会补零
|
||||||
|
|
||||||
} catch (NoSuchAlgorithmException | UnsupportedEncodingException e)
|
} catch (NoSuchAlgorithmException | UnsupportedEncodingException e)
|
||||||
{
|
{
|
||||||
|
e.printStackTrace();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ public class GmController {
|
||||||
|
|
||||||
String cmd = request.getParameter("content");
|
String cmd = request.getParameter("content");
|
||||||
if(cmd.equals("recharge")){
|
if(cmd.equals("recharge")){
|
||||||
recharge();
|
// recharge();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
String serverId = request.getParameter("serverId");
|
String serverId = request.getParameter("serverId");
|
||||||
|
|
@ -226,7 +226,29 @@ public class GmController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void recharge() throws IOException {
|
// public void recharge() throws IOException {
|
||||||
|
// String osName = System.getProperty("os.name");
|
||||||
|
// String filePath = "";
|
||||||
|
// Gson gson = new Gson();
|
||||||
|
// if (osName.matches("^(?i)Windows.*$")) {// Window 系统
|
||||||
|
// filePath = "conf/";
|
||||||
|
// } else {// Linux 系统
|
||||||
|
// filePath = "../config/";
|
||||||
|
// }
|
||||||
|
// BufferedReader in = new BufferedReader(new FileReader(filePath+"rechargeImport.txt"));
|
||||||
|
// BufferedWriter out = new BufferedWriter(new FileWriter(filePath+"recharge.json"));
|
||||||
|
// String str;
|
||||||
|
// while ((str = in.readLine()) != null) {
|
||||||
|
// String[] s = str.split("\t");
|
||||||
|
// RechargeInfo rechargeInfo = new RechargeInfo(s[0], Double.valueOf(s[1]), 0);
|
||||||
|
// String json = gson.toJson(rechargeInfo);
|
||||||
|
// System.out.println(s[0]+"||"+s[1]);
|
||||||
|
// out.write(json+"\n");
|
||||||
|
// }
|
||||||
|
// in.close();
|
||||||
|
// out.close();
|
||||||
|
// }
|
||||||
|
public static void main(String[] args) throws IOException {
|
||||||
String osName = System.getProperty("os.name");
|
String osName = System.getProperty("os.name");
|
||||||
String filePath = "";
|
String filePath = "";
|
||||||
Gson gson = new Gson();
|
Gson gson = new Gson();
|
||||||
|
|
@ -235,18 +257,18 @@ public class GmController {
|
||||||
} else {// Linux 系统
|
} else {// Linux 系统
|
||||||
filePath = "../config/";
|
filePath = "../config/";
|
||||||
}
|
}
|
||||||
BufferedReader in = new BufferedReader(new FileReader(filePath+"rechargeImport.txt"));
|
BufferedReader in = new BufferedReader(new FileReader(filePath+"rank.txt"));
|
||||||
BufferedWriter out = new BufferedWriter(new FileWriter(filePath+"recharge.json"));
|
|
||||||
String str;
|
String str;
|
||||||
|
int i = 568;
|
||||||
while ((str = in.readLine()) != null) {
|
while ((str = in.readLine()) != null) {
|
||||||
String[] s = str.split("\t");
|
int value = Integer.valueOf(str);
|
||||||
RechargeInfo rechargeInfo = new RechargeInfo(s[0], Double.valueOf(s[1]), 0);
|
int i1 = value % 50;
|
||||||
String json = gson.toJson(rechargeInfo);
|
if(i1==16||i1==2||i1==38){
|
||||||
System.out.println(s[0]+"||"+s[1]);
|
System.out.println(value+" "+i);
|
||||||
out.write(json+"\n");
|
}
|
||||||
|
i--;
|
||||||
}
|
}
|
||||||
in.close();
|
in.close();
|
||||||
out.close();
|
|
||||||
}
|
}
|
||||||
static class CPayOrder {
|
static class CPayOrder {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -391,6 +391,7 @@ public class OrderInfoController {
|
||||||
}
|
}
|
||||||
return "findOrder";
|
return "findOrder";
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "toExporOrderPage",method = RequestMethod.GET)
|
@RequestMapping(value = "toExporOrderPage",method = RequestMethod.GET)
|
||||||
public String toExporOrderPage(ModelMap map){
|
public String toExporOrderPage(ModelMap map){
|
||||||
List<gameName> allGameName = null;
|
List<gameName> allGameName = null;
|
||||||
|
|
@ -403,15 +404,11 @@ public class OrderInfoController {
|
||||||
return "exporOrder";
|
return "exporOrder";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private static boolean isNumeric(String str) {
|
private static boolean isNumeric(String str) {
|
||||||
try {
|
try {
|
||||||
new BigDecimal(str).toString();
|
new BigDecimal(str).toString();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return false;//异常
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,9 @@ import com.jmfy.model.CServerOpenTime;
|
||||||
import com.jmfy.model.ServerInfo;
|
import com.jmfy.model.ServerInfo;
|
||||||
import com.jmfy.model.vo.ServerInfoVo;
|
import com.jmfy.model.vo.ServerInfoVo;
|
||||||
import com.jmfy.redisProperties.RedisUserKey;
|
import com.jmfy.redisProperties.RedisUserKey;
|
||||||
import com.jmfy.utils.Constants;
|
import com.jmfy.utils.*;
|
||||||
import com.jmfy.utils.JsonUtil;
|
import org.slf4j.Logger;
|
||||||
import com.jmfy.utils.RedisUtil;
|
import org.slf4j.LoggerFactory;
|
||||||
import com.jmfy.utils.SeqUtils;
|
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.ModelMap;
|
import org.springframework.ui.ModelMap;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
|
@ -19,7 +18,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpSession;
|
import javax.servlet.http.HttpSession;
|
||||||
import java.io.IOException;
|
import java.io.*;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
@ -28,6 +27,8 @@ import java.util.List;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
public class ServerInfoController {
|
public class ServerInfoController {
|
||||||
|
private static final Logger LOGGER = LoggerFactory.getLogger(ServerInfoController.class);
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ServerInfoDao serverInfoDao;
|
private ServerInfoDao serverInfoDao;
|
||||||
|
|
||||||
|
|
@ -68,9 +69,9 @@ public class ServerInfoController {
|
||||||
}else if(serverInfo.getOpen_type()!=null&&serverInfo.getOpen_type().equals(Constants.SERVEROPEN_NUM)) {
|
}else if(serverInfo.getOpen_type()!=null&&serverInfo.getOpen_type().equals(Constants.SERVEROPEN_NUM)) {
|
||||||
openT = "按量开服";
|
openT = "按量开服";
|
||||||
}
|
}
|
||||||
if(null!=openT)
|
if(null!=openT) {
|
||||||
serverInfoVo.setOpen_type(openT);
|
serverInfoVo.setOpen_type(openT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
map.addAttribute("serverInfos", serverInfoVos);
|
map.addAttribute("serverInfos", serverInfoVos);
|
||||||
return "findServerInfo";
|
return "findServerInfo";
|
||||||
|
|
@ -128,11 +129,10 @@ public class ServerInfoController {
|
||||||
String register_state = request.getParameter("register_state");
|
String register_state = request.getParameter("register_state");
|
||||||
|
|
||||||
ServerInfo info = serverInfoDao.getServerinfo(server_id);
|
ServerInfo info = serverInfoDao.getServerinfo(server_id);
|
||||||
|
|
||||||
|
// 未运营状态的服务器需要进行清库处理
|
||||||
if (info != null && "-2".equals(info.getStatus())){
|
if (info != null && "-2".equals(info.getStatus())){
|
||||||
int delUser = delUser(info);
|
ThreadPoolManager.getInstance().execute(() -> delUser(info));
|
||||||
if (delUser != 0){
|
|
||||||
return "404";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
serverInfoDao.updateServerInfo(server_id, status, 0, isnew, name,register_state);
|
serverInfoDao.updateServerInfo(server_id, status, 0, isnew, name,register_state);
|
||||||
|
|
@ -252,23 +252,35 @@ public class ServerInfoController {
|
||||||
* @param serverInfo
|
* @param serverInfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private int delUser(ServerInfo serverInfo){
|
private void delUser(ServerInfo serverInfo){
|
||||||
int wait = -1;
|
|
||||||
String path = "/data/jieling/deluser.sh";
|
String path = "/data/jieling/deluser.sh";
|
||||||
|
|
||||||
if (serverInfo.getIP() == null || "".equals(serverInfo.getIP())
|
if (serverInfo.getIP() == null || "".equals(serverInfo.getIP())
|
||||||
|| serverInfo.getServer_id() == null || "".equals(serverInfo.getServer_id())
|
|| serverInfo.getServer_id() == null || "".equals(serverInfo.getServer_id())
|
||||||
|| serverInfo.getCoreName() == null || "".equals(serverInfo.getCoreName())){
|
|| serverInfo.getCoreName() == null || "".equals(serverInfo.getCoreName())){
|
||||||
System.err.printf("删除操作参数不全,执行失败:参数:%s",serverInfo.toString());
|
LOGGER.error("删除操作参数不全,执行失败:参数:{}",serverInfo.toString());
|
||||||
return wait;
|
return;
|
||||||
}
|
}
|
||||||
String command = "sh " + path + " 210 " + serverInfo.getIP() + " " + serverInfo.getServer_id() + " " + serverInfo.getCoreName();
|
|
||||||
|
String command = "sh " + path + " 500 " + serverInfo.getIP() + " " + serverInfo.getServer_id() + " " + serverInfo.getCoreName();
|
||||||
|
LOGGER.info("=================清库命令:{}",command);
|
||||||
|
|
||||||
|
Process exec = null;
|
||||||
try {
|
try {
|
||||||
wait = Runtime.getRuntime().exec(command).waitFor();
|
exec = Runtime.getRuntime().exec(command);
|
||||||
System.out.printf("删除操作完成:命令:{%s},结果{%d}\n",command,wait);
|
|
||||||
} catch (InterruptedException | IOException e) {
|
LOGGER.info("========================== 停服脚本执行结果开始 ===========================");
|
||||||
System.err.printf("删除操作失败:命令:{%s},报错:{%s}\n",command,e.getMessage());
|
new DealProcessSream(exec.getInputStream(),true).start();
|
||||||
|
new DealProcessSream(exec.getErrorStream(),false).start();
|
||||||
|
LOGGER.info("=========================== 停服脚本执行结果结束 ==========================");
|
||||||
|
|
||||||
|
exec.waitFor();
|
||||||
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
} finally {
|
||||||
|
if (exec != null) {
|
||||||
|
exec.destroy();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return wait;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,128 @@
|
||||||
|
package com.jmfy.controller;
|
||||||
|
|
||||||
|
import com.jmfy.dao.impl.HandInDaoImpl;
|
||||||
|
import com.jmfy.model.TishenServerInfo;
|
||||||
|
import com.jmfy.utils.JsonUtil;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.ModelMap;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lvxinran
|
||||||
|
* @date 2021/6/21
|
||||||
|
* @discribe
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
public class TishenController {
|
||||||
|
private static final Logger LOGGER = LoggerFactory.getLogger(TishenController.class);
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
HandInDaoImpl handInDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 跳转到提审服信息页面
|
||||||
|
* @param map
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/tishenInfoList", method = RequestMethod.GET)
|
||||||
|
public String toTishenInfoManagerPage(ModelMap map){
|
||||||
|
try {
|
||||||
|
|
||||||
|
List<TishenServerInfo> handInInfos = handInDao.getAllHandInInfo();
|
||||||
|
map.addAttribute("handInInfos", handInInfos);
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return "tishenInfoManager";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加提审信息页面
|
||||||
|
* @param map
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/toInsertTiShenInfo", method = RequestMethod.GET)
|
||||||
|
public String toInsertTishenInfoManagerPage(ModelMap map){
|
||||||
|
return "insertTiShenInfoPage";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加提审服
|
||||||
|
* @param info
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/addTishenServer", method = RequestMethod.POST)
|
||||||
|
@ResponseBody
|
||||||
|
public int addTishenServer(@RequestBody TishenServerInfo info){
|
||||||
|
|
||||||
|
try {
|
||||||
|
handInDao.addHandIn(info);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/deleteTiShenServer", method = RequestMethod.POST)
|
||||||
|
@ResponseBody
|
||||||
|
public int deleteTiShenServer(HttpServletRequest request){
|
||||||
|
|
||||||
|
try {
|
||||||
|
HashMap<String, String> map = JsonUtil.getInstence().getParameterMap(request);
|
||||||
|
|
||||||
|
TishenServerInfo tishenServerInfo = new TishenServerInfo();
|
||||||
|
tishenServerInfo.set_id(map.get("tiShenId"));
|
||||||
|
handInDao.removeHandInInfo(tishenServerInfo);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/toUpdateTishenServer", method = RequestMethod.GET)
|
||||||
|
public String toUpdateTishenServer(ModelMap map,HttpServletRequest request){
|
||||||
|
|
||||||
|
try {
|
||||||
|
String id = request.getParameter("id");
|
||||||
|
TishenServerInfo handInInfoById = handInDao.getHandInInfoById(id);
|
||||||
|
map.addAttribute("tishenInfo",handInInfoById);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
return "updateTishenPage";
|
||||||
|
}
|
||||||
|
@RequestMapping(value = "/doUpdateTishenServerInfo", method = RequestMethod.POST)
|
||||||
|
public String doUpdateTishenServerInfo(ModelMap map,HttpServletRequest request){
|
||||||
|
|
||||||
|
try {
|
||||||
|
String id = request.getParameter("id");
|
||||||
|
String serverInfo = request.getParameter("serverInfo");
|
||||||
|
|
||||||
|
String remark = request.getParameter("remark");
|
||||||
|
TishenServerInfo info = new TishenServerInfo(id,remark,Integer.valueOf(serverInfo));
|
||||||
|
handInDao.updateHandInfo(info);
|
||||||
|
List<TishenServerInfo> allHandInInfo = handInDao.getAllHandInInfo();
|
||||||
|
map.addAttribute("handInInfos", allHandInInfo);
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
return "tishenInfoManager";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.jmfy.dao;
|
||||||
|
|
||||||
|
import com.jmfy.model.TishenServerInfo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lvxinran
|
||||||
|
* @date 2021/6/21
|
||||||
|
* @discribe
|
||||||
|
*/
|
||||||
|
public interface HandInDao {
|
||||||
|
|
||||||
|
//添加
|
||||||
|
void addHandIn(TishenServerInfo info) throws Exception;
|
||||||
|
|
||||||
|
//获取所有
|
||||||
|
List<TishenServerInfo> getAllHandInInfo() throws Exception;
|
||||||
|
//删除
|
||||||
|
int removeHandInInfo (TishenServerInfo info) throws Exception;
|
||||||
|
//修改
|
||||||
|
void updateHandInfo(TishenServerInfo info) throws Exception;
|
||||||
|
|
||||||
|
TishenServerInfo getHandInInfoById(String id) throws Exception;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,64 @@
|
||||||
|
package com.jmfy.dao.impl;
|
||||||
|
|
||||||
|
import com.jmfy.dao.HandInDao;
|
||||||
|
import com.jmfy.model.Constant;
|
||||||
|
import com.jmfy.model.TishenServerInfo;
|
||||||
|
import com.jmfy.utils.Connect;
|
||||||
|
import com.mongodb.WriteResult;
|
||||||
|
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||||
|
import org.springframework.data.mongodb.core.query.Criteria;
|
||||||
|
import org.springframework.data.mongodb.core.query.Query;
|
||||||
|
import org.springframework.data.mongodb.core.query.Update;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lvxinran
|
||||||
|
* @date 2021/6/21
|
||||||
|
* @discribe
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class HandInDaoImpl implements HandInDao {
|
||||||
|
@Resource
|
||||||
|
private Connect connect;
|
||||||
|
public static final String colon = ":";
|
||||||
|
@Override
|
||||||
|
public void addHandIn(TishenServerInfo info) throws Exception {
|
||||||
|
MongoTemplate mongoTemplate = connect.getMongoTemplete(Constant.dbName);
|
||||||
|
|
||||||
|
mongoTemplate.insert(info, "hand_in");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<TishenServerInfo> getAllHandInInfo() throws Exception {
|
||||||
|
MongoTemplate mongoTemplate = connect.getMongoTemplete(Constant.dbName);
|
||||||
|
Query query = new Query();
|
||||||
|
return mongoTemplate.find(query, TishenServerInfo.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int removeHandInInfo(TishenServerInfo info) throws Exception {
|
||||||
|
MongoTemplate mongoTemplate = connect.getMongoTemplete(Constant.dbName);
|
||||||
|
mongoTemplate.remove(info);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateHandInfo(TishenServerInfo info) throws Exception {
|
||||||
|
Update update = new Update();
|
||||||
|
update.set("remark",info.getRemark());
|
||||||
|
update.set("serverInfo",info.getServerInfo());
|
||||||
|
MongoTemplate mongoTemplate = connect.getMongoTemplete(Constant.dbName);
|
||||||
|
Query query = new Query(Criteria.where("_id").is(info.get_id()));
|
||||||
|
mongoTemplate.updateMulti(query, update, TishenServerInfo.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TishenServerInfo getHandInInfoById(String id) throws Exception {
|
||||||
|
MongoTemplate mongoTemplate = connect.getMongoTemplete(Constant.dbName);
|
||||||
|
TishenServerInfo info = mongoTemplate.findById(id, TishenServerInfo.class);
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -140,19 +140,23 @@ public class GMHandler extends BaseHandler {
|
||||||
jsonBan.put("dsid",zoneId);
|
jsonBan.put("dsid",zoneId);
|
||||||
jsonBan.put("treat_type","7");
|
jsonBan.put("treat_type","7");
|
||||||
jsonBan.put("banReason",content);
|
jsonBan.put("banReason",content);
|
||||||
|
LOGGER.info("message","ty,userId:{},zoneId:{},content:{},time:{}",userId,zoneId,content,time);
|
||||||
CUserInfo coreUserInfo = userInfoDao.findUserInfoByUserId(Integer.valueOf(userId));
|
CUserInfo coreUserInfo = userInfoDao.findUserInfoByUserId(Integer.valueOf(userId));
|
||||||
if (coreUserInfo == null) {
|
if (coreUserInfo == null) {
|
||||||
map.put("message","帐号不存在"+userId);
|
map.put("message","帐号不存在"+userId);
|
||||||
|
LOGGER.error("message","天眼帐号不存在userId:{}",userId);
|
||||||
throw new Exception("帐号不存在");
|
throw new Exception("帐号不存在");
|
||||||
} else {
|
} else {
|
||||||
ServerInfo coreServerList = serverListDao.getServerinfo(String.valueOf(coreUserInfo.getServerid()));
|
ServerInfo coreServerList = serverListDao.getServerinfo(String.valueOf(coreUserInfo.getServerid()));
|
||||||
|
|
||||||
if (null == coreServerList) {
|
if (null == coreServerList) {
|
||||||
map.put("message","服务器不存在");
|
map.put("message","服务器不存在");
|
||||||
|
LOGGER.error("天眼服务器不存在");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!coreServerList.getServer_id().equals(String.valueOf(zoneId))) {
|
if (!coreServerList.getServer_id().equals(String.valueOf(zoneId))) {
|
||||||
map.put("message","服务器不存在"+zoneId);
|
map.put("message","服务器不存在"+zoneId);
|
||||||
|
LOGGER.error("天眼服务器不存在{}",zoneId);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -162,22 +166,23 @@ public class GMHandler extends BaseHandler {
|
||||||
String rpcString = RedisUtil.getInstence().getObject(RedisUserKey.LOGIC_SERVER_INFO, String.valueOf(coreServerList.getServer_id()), String.class, -1);
|
String rpcString = RedisUtil.getInstence().getObject(RedisUserKey.LOGIC_SERVER_INFO, String.valueOf(coreServerList.getServer_id()), String.class, -1);
|
||||||
if (null == rpcString) {
|
if (null == rpcString) {
|
||||||
map.put("message","Exception send err rpcString dsid="+coreUserInfo.getServerid()+",uid="+userId);
|
map.put("message","Exception send err rpcString dsid="+coreUserInfo.getServerid()+",uid="+userId);
|
||||||
LOGGER.error("Exception send err rpcString dsid=>{},uid=>{},cmd=>{}", coreUserInfo.getServerid(), userId, cmd);
|
LOGGER.error("天眼Exception send err rpcString dsid=>{},uid=>{},cmd=>{}", coreUserInfo.getServerid(), userId, cmd);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
String thriftIp = rpcString.split(":")[0];
|
String thriftIp = rpcString.split(":")[0];
|
||||||
String thriftPort = rpcString.split(":")[1];
|
String thriftPort = rpcString.split(":")[1];
|
||||||
if (thriftIp == null || thriftIp.isEmpty() || null == thriftPort || thriftPort.isEmpty()) {
|
if (thriftIp == null || thriftIp.isEmpty() || null == thriftPort || thriftPort.isEmpty()) {
|
||||||
map.put("message","thriftIp == null || thriftIp.isEmpty() || null == thriftPort || thriftPort.isEmpty()");
|
map.put("message","thriftIp == null || thriftIp.isEmpty() || null == thriftPort || thriftPort.isEmpty()");
|
||||||
|
LOGGER.error("天眼thriftIp == null || thriftIp.isEmpty() || null == thriftPort || thriftPort.isEmpty()");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Result result = RPCClient.gmSend(cmd, thriftIp, thriftPort);
|
Result result = RPCClient.gmSend(cmd, thriftIp, thriftPort);
|
||||||
// 异常或者错误
|
// 异常或者错误
|
||||||
if (result.getResultCode() != 0) {
|
if (result.getResultCode() != 0) {
|
||||||
LOGGER.error("Exception send err dsid=>{},uid=>{},cmd=>{}", coreUserInfo.getServerid(), userId, cmd);
|
LOGGER.error("天眼Exception send err dsid=>{},uid=>{},cmd=>{}", coreUserInfo.getServerid(), userId, cmd);
|
||||||
}else {
|
}else {
|
||||||
// 封禁入库
|
// 封禁入库
|
||||||
LOGGER.info("封禁入库,serverid=>{},uid=>{}", zoneId, userId);
|
LOGGER.info("天眼封禁入库,serverid=>{},uid=>{}", zoneId, userId);
|
||||||
updateUserBanner(coreUserInfo,session,jsonBan);
|
updateUserBanner(coreUserInfo,session,jsonBan);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -244,6 +249,11 @@ public class GMHandler extends BaseHandler {
|
||||||
int type = jsonObject.getIntValue("treat_type");
|
int type = jsonObject.getIntValue("treat_type");
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case GMHandler.SKYEYE_BAN:
|
case GMHandler.SKYEYE_BAN:
|
||||||
|
UserBanned skyeyebanned = userBannedDao.getUserBannedByBannedType(cUser.getUserId(),type);
|
||||||
|
if(skyeyebanned != null){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case GMHandler.BANNED_TO_POST:
|
case GMHandler.BANNED_TO_POST:
|
||||||
case GMHandler.BANNED_LOGIN:
|
case GMHandler.BANNED_LOGIN:
|
||||||
// 封禁用户
|
// 封禁用户
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
package com.jmfy.model;
|
||||||
|
|
||||||
|
import org.springframework.data.annotation.Id;
|
||||||
|
import org.springframework.data.mongodb.core.mapping.Document;
|
||||||
|
import org.springframework.data.mongodb.core.mapping.Field;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lvxinran
|
||||||
|
* @date 2021/6/21
|
||||||
|
* @discribe
|
||||||
|
*/
|
||||||
|
@Document(collection = "hand_in")
|
||||||
|
public class TishenServerInfo {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
private String _id;
|
||||||
|
|
||||||
|
@Field("remark")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@Field("serverInfo")
|
||||||
|
private int serverInfo;
|
||||||
|
|
||||||
|
|
||||||
|
public TishenServerInfo(String _id, String remark, int serverInfo) {
|
||||||
|
this._id = _id;
|
||||||
|
this.remark = remark;
|
||||||
|
this.serverInfo = serverInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public TishenServerInfo() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public String get_id() {
|
||||||
|
return _id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void set_id(String _id) {
|
||||||
|
this._id = _id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRemark() {
|
||||||
|
return remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRemark(String remark) {
|
||||||
|
this.remark = remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getServerInfo() {
|
||||||
|
return serverInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setServerInfo(int serverInfo) {
|
||||||
|
this.serverInfo = serverInfo;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -44,8 +44,9 @@ public enum PowersEnum {
|
||||||
CHANNEL_NAME_MANAGER(415,"渠道管理",400),
|
CHANNEL_NAME_MANAGER(415,"渠道管理",400),
|
||||||
ADD_CHANNEL_PERMISSIONS(416,"权限: 添加渠道",400),
|
ADD_CHANNEL_PERMISSIONS(416,"权限: 添加渠道",400),
|
||||||
DELETE_CHANNEL_PERMISSIONS(417,"权限: 删除渠道",400),
|
DELETE_CHANNEL_PERMISSIONS(417,"权限: 删除渠道",400),
|
||||||
GAME_AGREEMENT_MANAGER(418,"游戏协议管理",400),
|
HAND_IN_MANAGER(418,"提审服管理",400),
|
||||||
ADD_GAME_AGREEMENT_PERMISSIONS(419,"权限: 操作游戏协议(增,删,改)",400),
|
GAME_AGREEMENT_MANAGER(419,"游戏协议管理",400),
|
||||||
|
ADD_GAME_AGREEMENT_PERMISSIONS(420,"权限: 操作游戏协议(增,删,改)",400),
|
||||||
|
|
||||||
// 流水日志管理500-599
|
// 流水日志管理500-599
|
||||||
BILL_LOG(500,"流水日志管理",500),
|
BILL_LOG(500,"流水日志管理",500),
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
package com.jmfy.utils;
|
||||||
|
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author hj
|
||||||
|
* @Date 2021/6/24 11:55
|
||||||
|
* @Description:
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public class DealProcessSream extends Thread {
|
||||||
|
private InputStream inputStream;
|
||||||
|
|
||||||
|
private boolean judge;
|
||||||
|
|
||||||
|
public DealProcessSream(InputStream inputStream, boolean judge) {
|
||||||
|
this.inputStream = inputStream;
|
||||||
|
this.judge = judge;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
InputStreamReader inputStreamReader = null;
|
||||||
|
BufferedReader br = null;
|
||||||
|
try {
|
||||||
|
inputStreamReader = new InputStreamReader(
|
||||||
|
inputStream);
|
||||||
|
br = new BufferedReader(inputStreamReader);
|
||||||
|
// 打印信息
|
||||||
|
String line = null;
|
||||||
|
if (judge){
|
||||||
|
while ((line = br.readLine()) != null) {
|
||||||
|
System.out.println(line);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
while (br.readLine() != null);
|
||||||
|
}
|
||||||
|
} catch (IOException ioe) {
|
||||||
|
ioe.printStackTrace();
|
||||||
|
}finally {
|
||||||
|
try {
|
||||||
|
if (br != null){
|
||||||
|
br.close();
|
||||||
|
}
|
||||||
|
if (inputStreamReader != null){
|
||||||
|
inputStreamReader.close();
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
package com.jmfy.utils;
|
||||||
|
|
||||||
|
import java.util.concurrent.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author hj
|
||||||
|
* @Date 2021/6/24 14:23
|
||||||
|
* @Description:
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public class ThreadPoolManager {
|
||||||
|
|
||||||
|
private static ThreadPoolExecutor executor;
|
||||||
|
|
||||||
|
public static ThreadPoolExecutor getInstance() {
|
||||||
|
if (executor == null) {
|
||||||
|
synchronized (ThreadPoolManager.class) {
|
||||||
|
if (executor == null) {
|
||||||
|
executor = executorService();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return executor;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static ThreadPoolExecutor executorService(){
|
||||||
|
return new ThreadPoolExecutor(1,//池中保持线程数
|
||||||
|
5,//最大线程数
|
||||||
|
10,//当线程数大于核心时,终止前多余空闲线程等待时间
|
||||||
|
TimeUnit.SECONDS,//时间单位为秒
|
||||||
|
new LinkedBlockingDeque<>(10),//池内队列最高10个线程
|
||||||
|
Executors.defaultThreadFactory(),//执行程序创建新线程使用默认工厂
|
||||||
|
new ThreadPoolExecutor.DiscardPolicy());//出现阻塞时使用处理程序
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
<body>
|
<body>
|
||||||
<header class="navbar-wrapper">
|
<header class="navbar-wrapper">
|
||||||
<div class="navbar navbar-fixed-top">
|
<div class="navbar navbar-fixed-top">
|
||||||
<div class="container-fluid cl"><a class="logo navbar-logo f-l mr-10 hidden-xs">戒灵管理平台</a> <a
|
<div class="container-fluid cl"><a class="logo navbar-logo f-l mr-10 hidden-xs">太初行管理平台</a> <a
|
||||||
class="logo navbar-logo-m f-l mr-10 visible-xs">H-ui</a>
|
class="logo navbar-logo-m f-l mr-10 visible-xs">H-ui</a>
|
||||||
<span class="logo navbar-slogan f-l mr-10 hidden-xs">v3.1</span>
|
<span class="logo navbar-slogan f-l mr-10 hidden-xs">v3.1</span>
|
||||||
<a aria-hidden="false" class="nav-toggle Hui-iconfont visible-xs" href="javascript:;"></a>
|
<a aria-hidden="false" class="nav-toggle Hui-iconfont visible-xs" href="javascript:;"></a>
|
||||||
|
|
@ -136,7 +136,9 @@
|
||||||
href="javascript:;">公会列表管理</a></li>
|
href="javascript:;">公会列表管理</a></li>
|
||||||
<li th:if="${#lists.contains(pos.powers,415)} "><a data-href="channelInfoList" data-title="渠道管理"
|
<li th:if="${#lists.contains(pos.powers,415)} "><a data-href="channelInfoList" data-title="渠道管理"
|
||||||
href="javascript:;">渠道管理</a></li>
|
href="javascript:;">渠道管理</a></li>
|
||||||
<li th:if="${#lists.contains(pos.powers,418)} "><a data-href="gameAgreementList" data-title="游戏协议管理"
|
<li th:if="${#lists.contains(pos.powers,418)} "><a data-href="tishenInfoList" data-title="提审服管理"
|
||||||
|
href="javascript:;">提审服管理</a></li>
|
||||||
|
<li th:if="${#lists.contains(pos.powers,419)} "><a data-href="gameAgreementList" data-title="游戏协议管理"
|
||||||
href="javascript:;">游戏协议管理</a></li>
|
href="javascript:;">游戏协议管理</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,157 @@
|
||||||
|
<!--_meta 作为公共模版分离出去-->
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html>
|
||||||
|
<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"></i> 首页
|
||||||
|
<span class="c-gray en">></span>
|
||||||
|
提审服管理
|
||||||
|
<span class="c-gray en">></span>
|
||||||
|
创建提审服信息
|
||||||
|
</nav>
|
||||||
|
<div class="page-container">
|
||||||
|
<form class="form form-horizontal" id="form-article-add" action="http://60.1.1.212:9076/idip/manager" method="post">
|
||||||
|
<div id="tab-system" class="HuiTab">
|
||||||
|
<div class="tabBar cl">
|
||||||
|
<span>创建提审服标识</span>
|
||||||
|
</div>
|
||||||
|
<div class="tabCon">
|
||||||
|
|
||||||
|
<span class="ERRINFO"></span>
|
||||||
|
|
||||||
|
<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">
|
||||||
|
<input type="text" name="_id" style="width: 100px;" placeholder="" 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="hidden" id="serverInfoInput"/>-->
|
||||||
|
<select name="serverInfo" class="input-text" id="serverInfo"><!--下拉列表-->
|
||||||
|
<option value="0" selected="selected">正式服</option>
|
||||||
|
<option value="1" >提审服</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row cl">
|
||||||
|
<label class="form-label col-xs-4 col-sm-2">
|
||||||
|
备注:</label>
|
||||||
|
<div class="formControls col-xs-8 col-sm-9">
|
||||||
|
<input type="text" name="remark" placeholder="" 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 onClick="return addTishenInfo();" class="btn btn-primary radius" type="button"><i
|
||||||
|
class="Hui-iconfont"></i> 添加
|
||||||
|
</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 type="text/javascript">
|
||||||
|
$(function () {
|
||||||
|
$('.skin-minimal input').iCheck({
|
||||||
|
checkboxClass: 'icheckbox-blue',
|
||||||
|
radioClass: 'iradio-blue',
|
||||||
|
increaseArea: '20%'
|
||||||
|
});
|
||||||
|
$("#tab-system").Huitab({
|
||||||
|
index: 0
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
function addTishenInfo() {
|
||||||
|
var erroCode = $('.ERRINFO');
|
||||||
|
var _id = $("input[name='_id']").val();
|
||||||
|
// var serverInfo = $("#serverInfoInput").val();
|
||||||
|
var serverInfo = document.getElementById("serverInfo").value;
|
||||||
|
|
||||||
|
var remark = $("input[name='remark']").val();
|
||||||
|
|
||||||
|
if (_id === '' || _id == null) {
|
||||||
|
erroCode.html('<span style="color: red; ">提审服标识不能为空!</span>');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
data:
|
||||||
|
JSON.stringify({
|
||||||
|
"_id": _id,
|
||||||
|
"remark":remark,
|
||||||
|
"serverInfo": serverInfo,
|
||||||
|
})
|
||||||
|
,
|
||||||
|
url: "/addTishenServer",
|
||||||
|
dataType: "json",
|
||||||
|
contentType: 'application/json',
|
||||||
|
|
||||||
|
success: function (data) {
|
||||||
|
if (data === 0) {
|
||||||
|
layer.msg('添加失败!', {icon: 6, time: 1000});
|
||||||
|
}
|
||||||
|
if (data === 1) {
|
||||||
|
|
||||||
|
layer.msg('添加成功!', {icon: 6, time: 1000});
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<!--/请在上方写此页面业务相关的脚本-->
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,124 @@
|
||||||
|
<!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="../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" />
|
||||||
|
|
||||||
|
<script type="text/javascript" src="../static/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"></i> 首页
|
||||||
|
<span class="c-gray en">></span> gm功能
|
||||||
|
<span class="c-gray en">></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"></i></a>
|
||||||
|
</nav>
|
||||||
|
<div class="page-container" style="text-align: center">
|
||||||
|
<h2><span style="color:red;">提审服管理</span></h2>
|
||||||
|
<div style="text-align: left">
|
||||||
|
<!--<input type="text" name="channel" id="channel" placeholder="" value="" class="input-text"-->
|
||||||
|
<!--style="width: 300px;"/>-->
|
||||||
|
<a href="toInsertTiShenInfo" class="btn btn-primary">添加提审服标识</a>
|
||||||
|
</div>
|
||||||
|
<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" style="width: 300px;">
|
||||||
|
<th width="200">提审ID</th>
|
||||||
|
<th width="200">提审服务器值</th>
|
||||||
|
<th width="200">备注</th>
|
||||||
|
<th width="200">操作</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr th:each="obj:${handInInfos}">
|
||||||
|
<!--<td><input type="checkbox" value="" name=""/></td>-->
|
||||||
|
<td th:text="${obj._id}" style="text-align: center;"></td>
|
||||||
|
<td th:switch="${obj.serverInfo}" style="text-align: center;">
|
||||||
|
<span th:case=0> 正式服</span>
|
||||||
|
<span th:case=1> 提审服</span>
|
||||||
|
</td>
|
||||||
|
<td th:text="${obj.remark}" style="text-align: center;"></td>
|
||||||
|
|
||||||
|
<td style="text-align: center; width: 300px">
|
||||||
|
<a href="javascript:;"
|
||||||
|
th:href="@{/toUpdateTishenServer(id =${obj._id})}"
|
||||||
|
class="btn btn-success"> <i class="Hui-iconfont"></i> 修改
|
||||||
|
</a>
|
||||||
|
<button type="button" th:id="${obj._id}" class="btn btn-primary"
|
||||||
|
onclick="return deleteChannel(this)"><i class="Hui-iconfont"></i> 删除
|
||||||
|
</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</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 type="text/javascript" src="../static/searchableSelect/js/jquery.searchableSelect.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
// $('.table-sort').dataTable({
|
||||||
|
// "aaSorting": [[1, "desc"]],//默认第几个排序
|
||||||
|
// "bStateSave": true,//状态保存
|
||||||
|
// "pading": false,
|
||||||
|
// "aoColumnDefs": [
|
||||||
|
// //{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
|
||||||
|
// {"orderable": false, "aTargets": [2]}// 不参与排序的列
|
||||||
|
// ]
|
||||||
|
// });
|
||||||
|
|
||||||
|
function deleteChannel(obj) {
|
||||||
|
var id = $(obj).attr("id");
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
data: {
|
||||||
|
"tiShenId": id
|
||||||
|
},
|
||||||
|
url: "/deleteTiShenServer",
|
||||||
|
success: function (data) {
|
||||||
|
if (data === 1) {
|
||||||
|
layer.msg('操作成功!', {icon: 6, time: 1000});
|
||||||
|
// window.location.reload();
|
||||||
|
}
|
||||||
|
if (data === 0) {
|
||||||
|
layer.msg('操作失败,数据不存在!', {icon: 6, time: 1000});
|
||||||
|
}
|
||||||
|
if (data === 2) {
|
||||||
|
layer.msg('没有权限', {icon: 6, time: 1000});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,115 @@
|
||||||
|
<!--_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"></i> 首页
|
||||||
|
<span class="c-gray en">></span>
|
||||||
|
提审服管理
|
||||||
|
<span class="c-gray en">></span>
|
||||||
|
修改提审服信息
|
||||||
|
</nav>
|
||||||
|
<div class="page-container">
|
||||||
|
<form class="form form-horizontal" th:object="${tishenInfo}" id="form-article-add" action="/doUpdateTishenServerInfo" method="post">
|
||||||
|
<div id="tab-system" class="HuiTab">
|
||||||
|
<div class="tabBar cl">
|
||||||
|
<span>修改提审服信息</span>
|
||||||
|
</div>
|
||||||
|
<div class="tabCon">
|
||||||
|
|
||||||
|
<span class="ERRINFO"></span>
|
||||||
|
|
||||||
|
<div class="row cl">
|
||||||
|
<label class="form-label col-xs-4 col-sm-2">
|
||||||
|
<span class="c-red">*</span>
|
||||||
|
提审服标识id(id不支持修改):</label>
|
||||||
|
<div class="formControls col-xs-8 col-sm-9">
|
||||||
|
<input type="text" name="id" placeholder="" th:value="*{_id}" class="input-text" readonly/>
|
||||||
|
</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="serverInfoInput"/>-->
|
||||||
|
<select name="serverInfo" class="input-text" id="serverInfo" th:value="*{serverInfo}"><!--下拉列表-->
|
||||||
|
<option value="0" th:selected="*{serverInfo eq 0}">正式服</option>
|
||||||
|
<option value="1" th:selected="*{serverInfo eq 1}">提审服</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row cl">
|
||||||
|
<label class="form-label col-xs-4 col-sm-2">
|
||||||
|
备注:</label>
|
||||||
|
<div class="formControls col-xs-8 col-sm-9">
|
||||||
|
<input type="text" name="remark" placeholder="" th:value="*{remark}" 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-primary radius" type="submit"><i
|
||||||
|
class="Hui-iconfont"></i> 确认修改
|
||||||
|
</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 type="text/javascript">
|
||||||
|
$(function () {
|
||||||
|
$('.skin-minimal input').iCheck({
|
||||||
|
checkboxClass: 'icheckbox-blue',
|
||||||
|
radioClass: 'iradio-blue',
|
||||||
|
increaseArea: '20%'
|
||||||
|
});
|
||||||
|
$("#tab-system").Huitab({
|
||||||
|
index: 0
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<!--/请在上方写此页面业务相关的脚本-->
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Loading…
Reference in New Issue