update===>:去除多余代码。
This commit is contained in:
parent
7d67518928
commit
b70d796a59
@ -1,7 +1,6 @@
|
||||
package com.xinelu.applet.controller.chatrecord;
|
||||
|
||||
import com.xinelu.applet.dto.chatrecord.ChatRecordDTO;
|
||||
import com.xinelu.applet.dto.chatrecord.MarkReadDto;
|
||||
import com.xinelu.applet.dto.chatrecord.MessageSearchDto;
|
||||
import com.xinelu.applet.service.chatRecord.IChatRecordService;
|
||||
import com.xinelu.applet.vo.chatrecord.MessageCenterVo;
|
||||
@ -13,6 +12,7 @@ import com.xinelu.common.core.domain.R;
|
||||
import com.xinelu.common.enums.BusinessType;
|
||||
import com.xinelu.common.socket.WebSocketUtils;
|
||||
import com.xinelu.manage.domain.chatRecord.ChatRecord;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
@ -35,6 +35,7 @@ import org.springframework.web.multipart.MultipartFile;
|
||||
* @author wanghao
|
||||
* @create 2023/9/26 0026
|
||||
*/
|
||||
@Api(tags = "消息控制器")
|
||||
@RestController
|
||||
@RequestMapping("/nurseApplet/chatRecord")
|
||||
public class ChatRecordController extends BaseController {
|
||||
@ -100,12 +101,6 @@ public class ChatRecordController extends BaseController {
|
||||
return R.ok(chatRecordService.getMegVoList(messageDto));
|
||||
}
|
||||
|
||||
@ApiOperation("标记为已读")
|
||||
@GetMapping("/markRead")
|
||||
public R<String> markRead(MarkReadDto markReadDto) {
|
||||
return chatRecordService.markRead(markReadDto) < 0 ? R.fail() : R.ok();
|
||||
}
|
||||
|
||||
@ApiOperation("删除消息")
|
||||
@GetMapping("/deleteMegs")
|
||||
public R<String> deleteMegs(@RequestBody List<Long> ids) {
|
||||
|
||||
@ -25,7 +25,7 @@ public interface ChatRecordMapper {
|
||||
* @param id 图文咨询-聊天记录主键
|
||||
* @return 图文咨询-聊天记录
|
||||
*/
|
||||
public ChatRecord selectChatRecordById(Long id);
|
||||
ChatRecord selectChatRecordById(Long id);
|
||||
|
||||
/**
|
||||
* 查询图文咨询-聊天记录列表
|
||||
@ -33,7 +33,7 @@ public interface ChatRecordMapper {
|
||||
* @param chatRecord 图文咨询-聊天记录
|
||||
* @return 图文咨询-聊天记录集合
|
||||
*/
|
||||
public List<ChatRecord> selectChatRecordList(ChatRecord chatRecord);
|
||||
List<ChatRecord> selectChatRecordList(ChatRecord chatRecord);
|
||||
|
||||
/**
|
||||
* 新增图文咨询-聊天记录
|
||||
@ -41,7 +41,7 @@ public interface ChatRecordMapper {
|
||||
* @param chatRecord 图文咨询-聊天记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertChatRecord(ChatRecord chatRecord);
|
||||
int insertChatRecord(ChatRecord chatRecord);
|
||||
|
||||
/**
|
||||
* 修改图文咨询-聊天记录
|
||||
@ -49,7 +49,7 @@ public interface ChatRecordMapper {
|
||||
* @param chatRecord 图文咨询-聊天记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateChatRecord(ChatRecord chatRecord);
|
||||
int updateChatRecord(ChatRecord chatRecord);
|
||||
|
||||
/**
|
||||
* 删除图文咨询-聊天记录
|
||||
@ -57,7 +57,7 @@ public interface ChatRecordMapper {
|
||||
* @param id 图文咨询-聊天记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteChatRecordById(Long id);
|
||||
int deleteChatRecordById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除图文咨询-聊天记录
|
||||
@ -65,7 +65,7 @@ public interface ChatRecordMapper {
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteChatRecordByIds(Long[] ids);
|
||||
int deleteChatRecordByIds(Long[] ids);
|
||||
|
||||
Integer updateReadStatus(MarkReadDto markReadDto);
|
||||
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
package com.xinelu.applet.service.chatRecord;
|
||||
|
||||
import com.xinelu.applet.dto.chatrecord.ChatRecordDTO;
|
||||
import com.xinelu.applet.dto.chatrecord.MarkReadDto;
|
||||
import com.xinelu.applet.dto.chatrecord.MessageSearchDto;
|
||||
import com.xinelu.applet.vo.chatrecord.MessageCenterVo;
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
@ -80,7 +79,5 @@ public interface IChatRecordService {
|
||||
|
||||
List<MessageCenterVo> getMegVoList(MessageSearchDto messageDto);
|
||||
|
||||
Integer markRead(MarkReadDto markReadDto);
|
||||
|
||||
Integer deleteMegs(List<Long> ids);
|
||||
}
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
package com.xinelu.applet.service.chatRecord.impl;
|
||||
|
||||
import com.xinelu.applet.dto.chatrecord.ChatRecordDTO;
|
||||
import com.xinelu.applet.dto.chatrecord.MarkReadDto;
|
||||
import com.xinelu.applet.dto.chatrecord.MessageSearchDto;
|
||||
import com.xinelu.applet.mapper.chatrecord.ChatRecordMapper;
|
||||
import com.xinelu.applet.service.chatRecord.IChatRecordService;
|
||||
@ -215,13 +214,6 @@ public class ChatRecordServiceImpl implements IChatRecordService {
|
||||
return messageCenterVos;
|
||||
}
|
||||
|
||||
@Override public Integer markRead(MarkReadDto markReadDto) {
|
||||
if (StringUtils.isBlank(markReadDto.getBindingNo())) {
|
||||
return -1;
|
||||
}
|
||||
return chatRecordMapper.updateReadStatus(markReadDto);
|
||||
}
|
||||
|
||||
@Override public Integer deleteMegs(List<Long> ids) {
|
||||
return chatRecordMapper.deleteMegs(ids);
|
||||
}
|
||||
|
||||
@ -302,7 +302,7 @@
|
||||
<update id="deleteMegs">
|
||||
update chat_record set del_flag = 1
|
||||
<where>
|
||||
<if test="messageNos != null">
|
||||
<if test="ids != null">
|
||||
id in
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user