|
@@ -1,9 +1,8 @@
|
|
package com.slibra.web.controller.business;
|
|
package com.slibra.web.controller.business;
|
|
|
|
|
|
-import com.google.protobuf.ByteString;
|
|
|
|
import com.slibra.business.domain.TXinyiChatRecord;
|
|
import com.slibra.business.domain.TXinyiChatRecord;
|
|
|
|
+import com.slibra.business.domain.TXinyiWarningRecord;
|
|
import com.slibra.business.mapper.*;
|
|
import com.slibra.business.mapper.*;
|
|
-import com.slibra.business.res.XinyiIndustrySimple;
|
|
|
|
import com.slibra.business.service.IFrontService;
|
|
import com.slibra.business.service.IFrontService;
|
|
import com.slibra.common.core.controller.BaseController;
|
|
import com.slibra.common.core.controller.BaseController;
|
|
import com.slibra.common.core.domain.AjaxResult;
|
|
import com.slibra.common.core.domain.AjaxResult;
|
|
@@ -11,25 +10,12 @@ import com.slibra.common.core.page.TableDataInfo;
|
|
import com.slibra.common.exception.ServiceException;
|
|
import com.slibra.common.exception.ServiceException;
|
|
import com.slibra.common.utils.SecurityUtils;
|
|
import com.slibra.common.utils.SecurityUtils;
|
|
import com.slibra.common.utils.StringUtils;
|
|
import com.slibra.common.utils.StringUtils;
|
|
-import io.grpc.ManagedChannel;
|
|
|
|
-import io.grpc.ManagedChannelBuilder;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
-import org.pytorch.serve.grpc.inference.InferenceAPIsServiceGrpc;
|
|
|
|
-import org.pytorch.serve.grpc.inference.PredictionResponse;
|
|
|
|
-import org.pytorch.serve.grpc.inference.PredictionsRequest;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
-import javax.servlet.http.HttpServletResponse;
|
|
|
|
-import java.io.IOException;
|
|
|
|
-import java.io.OutputStream;
|
|
|
|
-import java.io.UnsupportedEncodingException;
|
|
|
|
-import java.nio.charset.StandardCharsets;
|
|
|
|
-import java.util.Iterator;
|
|
|
|
-import java.util.List;
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* 前端用户相关接口
|
|
* 前端用户相关接口
|
|
*/
|
|
*/
|
|
@@ -44,7 +30,10 @@ public class FrontController extends BaseController {
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
- private TXinyiChatRecordMapper tXinyiChatRecordMapper;
|
|
|
|
|
|
+ private TXinyiChatRecordMapper xinyiChatRecordMapper;
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private TXinyiWarningRecordMapper xinyiWarningRecordMapper;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -73,7 +62,7 @@ public class FrontController extends BaseController {
|
|
Long userId = SecurityUtils.getUserId();
|
|
Long userId = SecurityUtils.getUserId();
|
|
tXinyiChatRecord.setUserId(String.valueOf(userId));
|
|
tXinyiChatRecord.setUserId(String.valueOf(userId));
|
|
startPage();
|
|
startPage();
|
|
- return getDataTable(tXinyiChatRecordMapper.selectTXinyiChatRecordFirstList(tXinyiChatRecord));
|
|
|
|
|
|
+ return getDataTable(xinyiChatRecordMapper.selectTXinyiChatRecordFirstList(tXinyiChatRecord));
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -93,7 +82,7 @@ public class FrontController extends BaseController {
|
|
//获取登录用户信息
|
|
//获取登录用户信息
|
|
Long userId = SecurityUtils.getUserId();
|
|
Long userId = SecurityUtils.getUserId();
|
|
tXinyiChatRecord.setUserId(String.valueOf(userId));
|
|
tXinyiChatRecord.setUserId(String.valueOf(userId));
|
|
- return AjaxResult.success(tXinyiChatRecordMapper.selectTXinyiChatRecordList(tXinyiChatRecord));
|
|
|
|
|
|
+ return AjaxResult.success(xinyiChatRecordMapper.selectTXinyiChatRecordList(tXinyiChatRecord));
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -138,7 +127,19 @@ public class FrontController extends BaseController {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
+ //报警+预警记录列表 【水质报警 1生化报警 2预测报警】
|
|
|
|
+ /**
|
|
|
|
+ * 分页获取大模型的问答记录
|
|
|
|
+ * @param tXinyiWarningRecord
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @GetMapping("/bigModel/warning/pageList")
|
|
|
|
+ public TableDataInfo warningPageList(TXinyiWarningRecord tXinyiWarningRecord)
|
|
|
|
+ {
|
|
|
|
+ log.info("进入了 分页获取大模型的问答记录 接口");
|
|
|
|
+ startPage();
|
|
|
|
+ return getDataTable(xinyiWarningRecordMapper.selectTXinyiWarningRecordList(tXinyiWarningRecord));
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
|
|
|