AiChatHistoryController.java 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. //package com.backendsys.controller.Ai;
  2. //
  3. //import com.backendsys.aspect.HttpRequestAspect;
  4. //import com.backendsys.aspect.QueryNullCheck;
  5. //import com.backendsys.entity.Ai.AiChatHistoryDTO;
  6. //import com.backendsys.entity.PageDTO;
  7. //import com.backendsys.service.Ai.AiChatHistoryService;
  8. //import com.backendsys.utils.response.Result;
  9. //
  10. //import org.springframework.beans.factory.annotation.Autowired;
  11. //import org.springframework.security.access.prepost.PreAuthorize;
  12. //import org.springframework.validation.annotation.Validated;
  13. //import org.springframework.web.bind.annotation.*;
  14. //
  15. ///**
  16. // * Ai 对话框
  17. // */
  18. //@Validated
  19. //@RestController
  20. //public class AiChatHistoryController {
  21. //
  22. // @Autowired
  23. // private HttpRequestAspect httpRequestAspect;
  24. //
  25. // @Autowired
  26. // private AiChatHistoryService AiChatHistoryService;
  27. //
  28. // /**
  29. // * 获得 我的对话历史记录列表
  30. // * @param pageDTO
  31. // * @param aiChatHistoryDTO
  32. // * @return
  33. // */
  34. // @PreAuthorize("@sr.hasPermission('31')")
  35. // @GetMapping("/api/ai/chat/getMyAiChatHistory")
  36. // public Result getMyAiChatHistory(@Validated PageDTO pageDTO, @Validated AiChatHistoryDTO aiChatHistoryDTO) {
  37. //
  38. // // [查询] 自身 UserId
  39. // Long user_id = httpRequestAspect.getUserId();
  40. // aiChatHistoryDTO.setUser_id(user_id);
  41. //
  42. // return Result.success(AiChatHistoryService.queryAiChatHistoryList(pageDTO.getPage_num(), pageDTO.getPage_size(), aiChatHistoryDTO));
  43. // }
  44. //
  45. // @PreAuthorize("@sr.hasPermission('31')")
  46. // @QueryNullCheck(serviceClass = AiChatHistoryService.class, serviceMethod = "queryAiChatHistoryByCode", argField = "history_code", message = "对话记录不存在")
  47. // @DeleteMapping("/api/ai/chat/deleteAiChatHistory")
  48. // public Result deleteAiChatHistory(@Validated(AiChatHistoryDTO.Delete.class) @RequestBody AiChatHistoryDTO aiChatHistoryDTO) {
  49. // return Result.success(AiChatHistoryService.deleteAiChatHistory(aiChatHistoryDTO), "删除成功");
  50. // }
  51. //}