Files
real-time/src/main/java/com/realtime/controller/ChatListController.java
2025-12-01 10:08:41 +08:00

48 lines
1.6 KiB
Java

package com.realtime.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.realtime.model.pojo.ChatList;
import com.realtime.model.query.ChatListPageQueryReq;
import com.realtime.service.ChatListService;
import com.realtime.sysconst.Result;
import com.realtime.vo.ChatListInfoVo;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@Slf4j
@RestController
@RequestMapping("/chatList")
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class ChatListController {
private final ChatListService chatListService;
@PostMapping("/getChatFriend")
Result<IPage<ChatListInfoVo>> getChatFriend(@RequestBody ChatListPageQueryReq chatListPageQueryReq){
return chatListService.getChatList(chatListPageQueryReq);
}
@PostMapping("/save")
Result<String> saveChatList(@RequestBody List<ChatList> chatList){
return chatListService.saveSignChatList(chatList);
}
@PostMapping("/delete")
Result<String> deleteChatList(@RequestBody ChatList ids){
return chatListService.deleteSignChatList(ids);
}
@PostMapping("/update")
Result<String> updateChatList(@RequestBody List<ChatList> chatList){
return chatListService.updateChatListFName(chatList);
}
}