|
@@ -0,0 +1,80 @@
|
|
|
|
|
+package cn.tr.module.mobile.controller;
|
|
|
|
|
+
|
|
|
|
|
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
|
|
|
+import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
|
|
|
+import cn.tr.core.validation.Insert;
|
|
|
|
|
+import cn.tr.core.validation.Update;
|
|
|
|
|
+import cn.tr.core.pojo.CommonResult;
|
|
|
|
|
+import lombok.AllArgsConstructor;
|
|
|
|
|
+import io.swagger.annotations.Api;
|
|
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
|
|
+import org.springframework.validation.annotation.Validated;
|
|
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
+import cn.tr.module.mobile.dto.ImMsgReceivedDTO;
|
|
|
|
|
+import cn.tr.module.mobile.service.IImMsgReceivedService;
|
|
|
|
|
+import cn.tr.module.mobile.dto.ImMsgReceivedQueryDTO;
|
|
|
|
|
+import java.util.*;
|
|
|
|
|
+import cn.tr.plugin.mybatis.base.BaseController;
|
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
+import cn.tr.module.api.sys.log.annotation.OperateLog;
|
|
|
|
|
+import cn.tr.core.pojo.TableDataInfo;
|
|
|
|
|
+/**
|
|
|
|
|
+ * 发送消息表,保存某个用户发送了哪些消息,用于复现用户聊天场景(消息漫游功能需要)。控制器
|
|
|
|
|
+ *
|
|
|
|
|
+ * @author lf
|
|
|
|
|
+ * @date 2025/08/20 10:14
|
|
|
|
|
+ */
|
|
|
|
|
+@Api(tags = "发送消息表,保存某个用户发送了哪些消息,用于复现用户聊天场景(消息漫游功能需要)。")
|
|
|
|
|
+@RestController
|
|
|
|
|
+@RequestMapping("/mobile/msgReceived")
|
|
|
|
|
+@AllArgsConstructor
|
|
|
|
|
+public class ImMsgReceivedController extends BaseController{
|
|
|
|
|
+
|
|
|
|
|
+ private final IImMsgReceivedService imMsgReceivedService;
|
|
|
|
|
+
|
|
|
|
|
+ @ApiOperationSupport(author = "lf",order = 1)
|
|
|
|
|
+ @ApiOperation(value="根据条件查询发送消息表,保存某个用户发送了哪些消息,用于复现用户聊天场景(消息漫游功能需要)。",notes = "权限: 无")
|
|
|
|
|
+ @PostMapping("/query/page")
|
|
|
|
|
+ public TableDataInfo<ImMsgReceivedDTO> selectList(@RequestBody ImMsgReceivedQueryDTO query) {
|
|
|
|
|
+ startPage();
|
|
|
|
|
+ return getDataTable(imMsgReceivedService.selectImMsgReceivedList(query));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @ApiOperationSupport(author = "lf",order = 2)
|
|
|
|
|
+ @ApiOperation(value = "根据id查询发送消息表,保存某个用户发送了哪些消息,用于复现用户聊天场景(消息漫游功能需要)。",notes = "权限: mobile:msgReceived:query")
|
|
|
|
|
+ @GetMapping("/detail/{id}")
|
|
|
|
|
+ @SaCheckPermission("mobile:msgReceived:query")
|
|
|
|
|
+ public CommonResult<ImMsgReceivedDTO> findById(@PathVariable("id") String id){
|
|
|
|
|
+ return CommonResult.success(imMsgReceivedService.selectImMsgReceivedById(id));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @ApiOperationSupport(author = "lf",order = 3)
|
|
|
|
|
+ @ApiOperation(value="添加发送消息表,保存某个用户发送了哪些消息,用于复现用户聊天场景(消息漫游功能需要)。",notes = "权限: mobile:msgReceived:add")
|
|
|
|
|
+ @PostMapping("/add")
|
|
|
|
|
+ @OperateLog
|
|
|
|
|
+ @SaCheckPermission("mobile:msgReceived:add")
|
|
|
|
|
+ public CommonResult<Boolean> add(@RequestBody@Validated(Insert.class) ImMsgReceivedDTO source) {
|
|
|
|
|
+ return CommonResult.success(imMsgReceivedService.insertImMsgReceived(source));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @ApiOperationSupport(author = "lf",order = 4)
|
|
|
|
|
+ @ApiOperation(value="通过主键id编辑发送消息表,保存某个用户发送了哪些消息,用于复现用户聊天场景(消息漫游功能需要)。",notes = "权限: mobile:msgReceived:edit")
|
|
|
|
|
+ @PostMapping("/edit")
|
|
|
|
|
+ @OperateLog
|
|
|
|
|
+ @SaCheckPermission("mobile:msgReceived:edit")
|
|
|
|
|
+ public CommonResult<Boolean> edit(@RequestBody@Validated(Update.class) ImMsgReceivedDTO source) {
|
|
|
|
|
+ return CommonResult.success(imMsgReceivedService.updateImMsgReceivedById(source));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @ApiOperationSupport(author = "lf",order = 5)
|
|
|
|
|
+ @ApiOperation(value="删除发送消息表,保存某个用户发送了哪些消息,用于复现用户聊天场景(消息漫游功能需要)。",notes = "权限: mobile:msgReceived:remove")
|
|
|
|
|
+ @PostMapping("/removeByIds")
|
|
|
|
|
+ @OperateLog
|
|
|
|
|
+ @SaCheckPermission("mobile:msgReceived:remove")
|
|
|
|
|
+ public CommonResult<Integer> delete(@RequestBody Collection<String> ids) {
|
|
|
|
|
+ return CommonResult.success(imMsgReceivedService.removeImMsgReceivedByIds(ids));
|
|
|
|
|
+ }
|
|
|
|
|
+}
|