|
@@ -5,12 +5,13 @@ import java.util.Map;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import com.smartsanitation.common.response.ResultWrapper;
|
|
|
import com.tidecloud.dataacceptance.response.CommandCopy;
|
|
|
-import com.tidecloud.dataacceptance.service.impl.DiscardServerHandler;
|
|
|
+import com.tidecloud.dataacceptance.service.impl.WatchServerHandler;
|
|
|
|
|
|
import io.netty.buffer.ByteBuf;
|
|
|
import io.netty.buffer.Unpooled;
|
|
@@ -27,10 +28,10 @@ public class WatchController {
|
|
|
|
|
|
private static final Logger logger = LoggerFactory.getLogger(WatchController.class);
|
|
|
|
|
|
- @RequestMapping(value = "setting/uploadtime")
|
|
|
+ @RequestMapping(value = "setting/uploadtime", method = RequestMethod.GET)
|
|
|
public ResultWrapper<CommandCopy> sendCommand2Device(@RequestParam String commandStr,
|
|
|
@RequestParam String socketId){
|
|
|
- Map<String, Channel> channelMap = DiscardServerHandler.manageChannelMap;
|
|
|
+ Map<String, Channel> channelMap = WatchServerHandler.manageChannelMap;
|
|
|
if (channelMap.isEmpty()) {
|
|
|
return ResultWrapper.ok(new CommandCopy());
|
|
|
}
|