123
This commit is contained in:
@@ -11,6 +11,7 @@ import com.ruoyi.cai.dto.admin.query.UserUpdateAdminReq;
|
||||
import com.ruoyi.cai.dto.admin.vo.UserAdminVo;
|
||||
import com.ruoyi.cai.dto.admin.vo.UserFullAdminVo;
|
||||
import com.ruoyi.cai.dto.app.query.IdReq;
|
||||
import com.ruoyi.cai.im.ImManager;
|
||||
import com.ruoyi.cai.manager.UserAdminManager;
|
||||
import com.ruoyi.cai.manager.UserForbidManager;
|
||||
import com.ruoyi.cai.service.UserService;
|
||||
@@ -168,4 +169,36 @@ public class UserController extends BaseController {
|
||||
userService.bindInviteUser(userId,inviteUsercode);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@SaCheckPermission("cai:user:im")
|
||||
@Log(title = "封禁IM", businessType = BusinessType.OTHER)
|
||||
@GetMapping("/lockIm")
|
||||
public R<Void> lockIm(Long userId){
|
||||
userService.lockIm(userId);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@SaCheckPermission("cai:user:im")
|
||||
@Log(title = "解封IM", businessType = BusinessType.OTHER)
|
||||
@GetMapping("/unLockIm")
|
||||
public R<Void> unLockIm(Long userId){
|
||||
userService.unLockIm(userId);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@SaCheckPermission("cai:user:im")
|
||||
@Log(title = "禁言", businessType = BusinessType.OTHER)
|
||||
@GetMapping("/noSpeckIm")
|
||||
public R<Void> noSpeckIm(Long userId){
|
||||
userService.noSpeckIm(userId);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@SaCheckPermission("cai:user:im")
|
||||
@Log(title = "解除禁言", businessType = BusinessType.OTHER)
|
||||
@GetMapping("/enSpeckIm")
|
||||
public R<Void> enSpeckIm(Long userId){
|
||||
userService.enSpeckIm(userId);
|
||||
return R.ok();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,14 +18,15 @@ import org.springframework.boot.test.context.SpringBootTest;
|
||||
@SpringBootTest
|
||||
@Slf4j
|
||||
public class RoomTest {
|
||||
// @Autowired
|
||||
// private RoomCheckJobService roomCheckJobService;
|
||||
|
||||
@Test
|
||||
public void test(){
|
||||
// Long roomId = 1761964822147088386L;
|
||||
// JobResp resp = roomCheckJobService.checkRoom(roomId);
|
||||
// log.error(JSON.toJSONString(resp));
|
||||
Long userId = 15040L;
|
||||
// 封号
|
||||
// userService.lockIm(userId);
|
||||
// userService.unLockIm(userId);
|
||||
// userService.noSpeckIm(userId);
|
||||
userService.enSpeckIm(userId);
|
||||
}
|
||||
|
||||
@Autowired
|
||||
|
||||
Reference in New Issue
Block a user