|
|
@@ -275,6 +275,20 @@ public class MirrorController {
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(carInfoList);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 根据userToken获取车队历史记录
|
|
|
+ */
|
|
|
+ @GetMapping("/gpt/car/history")
|
|
|
+ public Result<SearchResult<ChatGptUserConversationRecordHistoryView>> getCarHistory(String userToken) {
|
|
|
+ ChatgptUser carChatGptUser = chatGptAccountService.getCarChatGptUserWithToken(userToken);
|
|
|
+ if (carChatGptUser == null) {
|
|
|
+ throw BusinessRuntimeException.getInstance("车票出现了异常.");
|
|
|
+ }
|
|
|
+ MapBuilder builder = MapUtils.flatBuilder(request.getParameterMap()).field("userToken", carChatGptUser.getUserToken());
|
|
|
+ SearchResult<ChatGptUserConversationRecordHistoryView> search = beanSearcher.search(ChatGptUserConversationRecordHistoryView.class, builder.build());
|
|
|
+ return GatewayResponse.SUCCESS.newBuilder().toResult(search);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
|
|
|
}
|