|
@@ -123,13 +123,13 @@ public class DeviceController {
|
|
|
*/
|
|
|
@RequestMapping(value = "/search" ,method = RequestMethod.POST)
|
|
|
public void Search(HttpServletRequest request, HttpServletResponse response){
|
|
|
- String did = request.getParameter("did");
|
|
|
- String cid = request.getParameter("cid");
|
|
|
- if(did==null || did.length()==0)
|
|
|
- did = "0";
|
|
|
- if(cid==null || cid.length()==0)
|
|
|
- cid = "0";
|
|
|
- List<Device> list = deviceService.Search(Long.valueOf(cid), Long.valueOf(did));
|
|
|
+ String idDevice = request.getParameter("idDevice");
|
|
|
+ String idChannel = request.getParameter("idChannel");
|
|
|
+ if(idDevice==null || idDevice.length()==0)
|
|
|
+ idDevice = "0";
|
|
|
+ if(idChannel==null || idChannel.length()==0)
|
|
|
+ idChannel = "0";
|
|
|
+ List<Device> list = deviceService.Search(Long.valueOf(idChannel), Long.valueOf(idDevice));
|
|
|
|
|
|
if(list==null || list.size()<1){
|
|
|
HttpUtil.responseApiCode(request, response, ApiCode.NOT_FOUND);
|