123
This commit is contained in:
@@ -0,0 +1,22 @@
|
|||||||
|
package com.ruoyi.test.business;
|
||||||
|
|
||||||
|
import com.ruoyi.cai.trd.Agora;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
|
||||||
|
@SpringBootTest
|
||||||
|
@Slf4j
|
||||||
|
public class AgoreTest {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private Agora agora;
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void closeChannel(){
|
||||||
|
Long roomId = 1779785009948024833L;
|
||||||
|
agora.closeChannel(roomId);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,9 +1,11 @@
|
|||||||
package com.ruoyi.controller;
|
package com.ruoyi.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaIgnore;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
|
@SaIgnore
|
||||||
public class IndexController {
|
public class IndexController {
|
||||||
@GetMapping("/ok")
|
@GetMapping("/ok")
|
||||||
public String ok(){
|
public String ok(){
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.ruoyi.controller;
|
package com.ruoyi.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaIgnore;
|
||||||
import com.ruoyi.cai.ws.holder.WebSocketSessionHolder;
|
import com.ruoyi.cai.ws.holder.WebSocketSessionHolder;
|
||||||
import com.ruoyi.cai.ws.util.WebSocketUtils;
|
import com.ruoyi.cai.ws.util.WebSocketUtils;
|
||||||
import com.ruoyi.common.core.domain.R;
|
import com.ruoyi.common.core.domain.R;
|
||||||
@@ -10,7 +11,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/cai/test")
|
@RequestMapping("/test")
|
||||||
|
@SaIgnore
|
||||||
public class TestController {
|
public class TestController {
|
||||||
public R getSession(){
|
public R getSession(){
|
||||||
int size = WebSocketSessionHolder.size();
|
int size = WebSocketSessionHolder.size();
|
||||||
|
|||||||
Reference in New Issue
Block a user