|
|
@@ -1,6 +1,7 @@
|
|
|
package com.takai.web.controller.bigmodel;
|
|
|
|
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
|
+import com.github.pagehelper.PageHelper;
|
|
|
import com.takai.bigmodel.domain.dto.DialogReqDTO;
|
|
|
import com.takai.bigmodel.domain.dto.DialogRespDTO;
|
|
|
import com.takai.bigmodel.domain.dto.QuestionDTO;
|
|
|
@@ -12,10 +13,13 @@ import com.takai.common.core.controller.BaseController;
|
|
|
import com.takai.common.core.domain.AjaxResult;
|
|
|
import com.takai.common.core.domain.BaseEntity;
|
|
|
import com.takai.common.core.domain.entity.Prompt;
|
|
|
+import com.takai.common.core.page.PageDomain;
|
|
|
import com.takai.common.core.page.TableDataInfo;
|
|
|
+import com.takai.common.core.page.TableSupport;
|
|
|
import com.takai.common.enums.BusinessType;
|
|
|
import com.takai.common.utils.poi.ExcelUtil;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.http.MediaType;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
@@ -463,12 +467,51 @@ public class BigModelController extends BaseController {
|
|
|
return success(bigModelService.getKnowledgeList());
|
|
|
}
|
|
|
|
|
|
-// @GetMapping("/dialog/list/{pageNum}/{pageSize}")
|
|
|
-// public TableDataInfo<BaseEntity> list() {
|
|
|
-// startPage();
|
|
|
-// List<DialogRespDTO> list = bigModelService.selectDialogListByAppId("1803686113584558081");
|
|
|
-// return getDataTable(list);
|
|
|
+ /**
|
|
|
+ * 应用聊天数据
|
|
|
+ * @param appId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+// @PostMapping("/dialog/{appId}")
|
|
|
+// public TableDataInfo list(@PathVariable String appId, @RequestBody PageParams params) {
|
|
|
+// List<Object> s = bigModelService.selectDialogListByAppId(appId);
|
|
|
+// PageHelper.startPage(params.getPageNumber(), params.getPageSize(), "").setReasonable(true);
|
|
|
+// List<Object> list = bigModelService.selectDialogListByAppId(appId);
|
|
|
+// return getDataTableResultTotal(list, Long.valueOf(s.size()));
|
|
|
// }
|
|
|
|
|
|
+ /**
|
|
|
+ * 获取所有应用聊天列表
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+// @PostMapping("/allDialog")
|
|
|
+// public TableDataInfo allList(@RequestBody PageParams params) {
|
|
|
+// List<Object> s = bigModelService.selectDialogListByAppId(null);
|
|
|
+// PageHelper.startPage(params.getPageNumber(), params.getPageSize(), "").setReasonable(true);
|
|
|
+// List<Object> list = bigModelService.selectDialogListByAppId(null);
|
|
|
+// return getDataTableResultTotal(list, Long.valueOf(s.size()));
|
|
|
+// }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取聊天列表
|
|
|
+ * @param params
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @PostMapping("/chatHistory/list")
|
|
|
+ public TableDataInfo dataExportList(@RequestBody PageParams params){
|
|
|
+ if(StringUtils.isNotBlank(params.getAppId())){
|
|
|
+ //获取应用聊天列表
|
|
|
+ List<Object> s = bigModelService.selectDialogListByAppId(params.getAppId());
|
|
|
+ PageHelper.startPage(params.getPageNumber(), params.getPageSize(), "").setReasonable(true);
|
|
|
+ List<Object> list = bigModelService.selectDialogListByAppId(params.getAppId());
|
|
|
+ return getDataTableResultTotal(list, Long.valueOf(s.size()));
|
|
|
+ }else{
|
|
|
+ //获取所有列表
|
|
|
+ List<Object> s = bigModelService.selectDialogListByAppId(null);
|
|
|
+ PageHelper.startPage(params.getPageNumber(), params.getPageSize(), "").setReasonable(true);
|
|
|
+ List<Object> list = bigModelService.selectDialogListByAppId(null);
|
|
|
+ return getDataTableResultTotal(list, Long.valueOf(s.size()));
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
}
|