Commit 354af979 authored by 赵啸非's avatar 赵啸非

添加批量激活设备

parent 31fa63ac
......@@ -18,6 +18,7 @@ import com.mortals.framework.model.OrderCol;
import com.mortals.framework.service.ICacheService;
import com.mortals.framework.service.ILogService;
import com.mortals.framework.service.impl.FileLogServiceImpl;
import com.mortals.framework.util.DataUtil;
import com.mortals.framework.util.DateUtils;
import com.mortals.xhx.base.framework.annotation.ApiUserAuth;
import com.mortals.xhx.base.login.web.LoginForm;
......@@ -140,8 +141,10 @@ public class DeviceApiController {
@PostMapping("register")
public String register(HttpServletRequest request, @RequestBody DeviceReq req) {
log.info("【设备注册】【请求体】--> " + JSONObject.toJSONString(req));
String serverName = request.getServerName();
Integer serverPort = request.getServerPort();
String serverName = request.getHeader("server-name");
Integer serverPort = DataUtil.converStr2Int(request.getHeader("server-port"),0);
// String serverName = request.getServerName();
// Integer serverPort = request.getServerPort();
String xforwardedfor = request.getHeader("x-forwarded-for");
log.info("request uri:{},request url:{},serverName:{},serverPort:{},xforwardedfor:{}", request.getRequestURI(), request.getRequestURL(), serverName,serverPort,xforwardedfor);
ApiResp<DeviceResp> rsp = new ApiResp<>();
......@@ -363,8 +366,10 @@ public class DeviceApiController {
*/
@PostMapping("deviceUpdate")
public String deviceUpdateApi(HttpServletRequest request,@RequestBody DeviceReq req) {
String serverName = request.getServerName();
int serverPort = request.getServerPort();
String serverName = request.getHeader("server-name");
Integer serverPort = DataUtil.converStr2Int(request.getHeader("server-port"),0);
// String serverName = request.getServerName();
// int serverPort = request.getServerPort();
log.info("【设备前端新增或更新】【请求体】-->{} ,serverName:{}",JSONObject.toJSONString(req),serverName);
ApiResp<DeviceResp> rsp = new ApiResp<>();
rsp.setCode(ApiRespCodeEnum.SUCCESS.getValue());
......@@ -474,8 +479,10 @@ public class DeviceApiController {
*/
@PostMapping("checkVersion")
public String checkVersion(HttpServletRequest request,@RequestBody DeviceReq req) {
String serverName = request.getServerName();
int serverPort = request.getServerPort();
String serverName = request.getHeader("server-name");
Integer serverPort = DataUtil.converStr2Int(request.getHeader("server-port"),0);
// String serverName = request.getServerName();
// int serverPort = request.getServerPort();
log.info("【检查设备最新版本信息】【请求体】--> " + JSONObject.toJSONString(req));
ApiResp<DeviceResp> rsp = new ApiResp<>();
rsp.setCode(ApiRespCodeEnum.SUCCESS.getValue());
......
......@@ -8,7 +8,7 @@
"baseLogin": "http://192.168.0.98:11078/base"
},
"test": {
"baseUrl": "http://192.168.0.98:11078/m",
"baseUrl": "http://192.168.0.98:11091/m",
"baseLogin": "http://192.168.0.98:11078/base"
},
"portal": {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment