|
@@ -60,7 +60,7 @@ public class DeviceController {
|
|
|
@RequestMapping(value = "/feign")
|
|
|
public void Feigh(HttpServletRequest request, HttpServletResponse response,
|
|
|
@RequestParam("idChannel")String idChannel, @RequestParam("mobile")String mobile){
|
|
|
- String ip = HttpUtil.getRemortIP(request);
|
|
|
+ String ip = HttpUtil.getIpAddress(request);
|
|
|
System.out.println("start:"+ip);
|
|
|
String res = userHttp.Register(UUID.randomUUID().toString().substring(0, 31),
|
|
|
idChannel, ip, mobile, mobile);
|
|
@@ -184,12 +184,12 @@ public class DeviceController {
|
|
|
String idDevice = request.getParameter("idDevice");
|
|
|
String idChannel = request.getParameter("idChannel");
|
|
|
List<Device> list = new ArrayList<>();
|
|
|
- if(idDevice==null && idChannel==null)
|
|
|
+ if((idDevice==null || idDevice.length()==0) && (idChannel==null || idChannel.length()==0))
|
|
|
list = deviceService.SearchAll();
|
|
|
else{
|
|
|
- if(idDevice==null)
|
|
|
+ if(idDevice==null || idDevice.length()==0)
|
|
|
idDevice = "0";
|
|
|
- if(idChannel==null)
|
|
|
+ if(idChannel==null || idChannel.length()==0)
|
|
|
idChannel = "0";
|
|
|
list = deviceService.Search(Long.valueOf(idChannel), Long.valueOf(idDevice));
|
|
|
}
|