即时通信嵌入开发完成,期待下次开发将ui嵌入navbar中,以及完成拉起群聊以及群聊系统开发
This commit is contained in:
@@ -42,7 +42,6 @@ public class SocketContactController extends BaseController {
|
||||
/**
|
||||
* 查询通信目录列表
|
||||
*/
|
||||
@SaCheckPermission("system:contact:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<SocketContactVo> list(SocketContactBo bo, PageQuery pageQuery) {
|
||||
return iSocketContactService.queryPageList(bo, pageQuery);
|
||||
@@ -51,7 +50,6 @@ public class SocketContactController extends BaseController {
|
||||
/**
|
||||
* 导出通信目录列表
|
||||
*/
|
||||
@SaCheckPermission("system:contact:export")
|
||||
@Log(title = "通信目录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(SocketContactBo bo, HttpServletResponse response) {
|
||||
@@ -64,17 +62,16 @@ public class SocketContactController extends BaseController {
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("system:contact:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<SocketContactVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(iSocketContactService.queryById(id));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增通信目录
|
||||
*/
|
||||
@SaCheckPermission("system:contact:add")
|
||||
@Log(title = "通信目录", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
@@ -85,7 +82,6 @@ public class SocketContactController extends BaseController {
|
||||
/**
|
||||
* 修改通信目录
|
||||
*/
|
||||
@SaCheckPermission("system:contact:edit")
|
||||
@Log(title = "通信目录", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
@@ -98,7 +94,6 @@ public class SocketContactController extends BaseController {
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("system:contact:remove")
|
||||
@Log(title = "通信目录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
package com.ruoyi.system.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import com.ruoyi.common.core.validate.QueryGroup;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.system.domain.vo.SocketMessageVo;
|
||||
import com.ruoyi.system.domain.bo.SocketMessageBo;
|
||||
import com.ruoyi.system.service.ISocketMessageService;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 对话信息
|
||||
*
|
||||
* @author hdka
|
||||
* @date 2024-10-27
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/system/message")
|
||||
public class SocketMessageController extends BaseController {
|
||||
|
||||
private final ISocketMessageService iSocketMessageService;
|
||||
|
||||
/**
|
||||
* 查询对话信息列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<SocketMessageVo> list(SocketMessageBo bo, PageQuery pageQuery) {
|
||||
return iSocketMessageService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出对话信息列表
|
||||
*/
|
||||
@Log(title = "对话信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(SocketMessageBo bo, HttpServletResponse response) {
|
||||
List<SocketMessageVo> list = iSocketMessageService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "对话信息", SocketMessageVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取对话信息详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@GetMapping("/{id}")
|
||||
public R<SocketMessageVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(iSocketMessageService.queryById(id));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增对话信息
|
||||
*/
|
||||
@Log(title = "对话信息", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody SocketMessageBo bo) {
|
||||
return toAjax(iSocketMessageService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改对话信息
|
||||
*/
|
||||
@Log(title = "对话信息", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody SocketMessageBo bo) {
|
||||
return toAjax(iSocketMessageService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除对话信息
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@Log(title = "对话信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(iSocketMessageService.deleteWithValidByIds(Arrays.asList(ids), true));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user