更新layer版本:2.5.6→2.5.7

This commit is contained in:
yutou
2020-12-07 11:32:40 +08:00
parent 7ec461ff29
commit e5a7f5a878
29 changed files with 37 additions and 169 deletions

View File

@@ -1,45 +0,0 @@
package com.yutou.tools.web;
import com.yutou.tools.nas.UpdateIp;
import com.yutou.tools.utils.RedisTools;
import com.yutou.tools.utils.Tools;
import org.springframework.stereotype.Controller;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
@Controller
public class ToolsController {
@ResponseBody
@RequestMapping("/tools/openpc.do")
public String open_pc(HttpServletRequest request, String type) {
if (StringUtils.isEmpty(type)) {
if (Tools.checkWebLogin(request) == 1) {
Tools.get("http://" + UpdateIp.nas_ip + ":8000/tools/openpc.do?token=zIrsh9TUZP2lfRW753PannG49E7VJvor&type=nas");
}
} else {
if (type.equals("nas")) {
try {
Process process = Runtime.getRuntime().exec("wakeonlan 00:D8:61:6F:02:2F");
RedisTools.processOut(process.getInputStream());
RedisTools.processOut(process.getErrorStream());
process.destroy();
} catch (IOException e) {
e.printStackTrace();
}
}
}
return "ok";
}
@ResponseBody
@RequestMapping("/tools/server.do")
public String sendServerManager(String title, String msg) {
Tools.sendServer(title, msg);
return "ok";
}
}