Explorar o código

告警类型 后台判断 不让前端传了

wangmiaomiao hai 11 meses
pai
achega
58bafd7939

+ 3 - 3
slibra-admin/src/main/java/com/slibra/web/controller/business/GRPCController.java

@@ -89,9 +89,9 @@ public class GRPCController extends BaseController {
         String sessionId = IdUtils.simpleUUID();
         String feedback = chatReq.getFeedback();
         String simulate = chatReq.getSimulate();
-        Integer type = chatReq.getType();
-        if(Objects.isNull(type))
-            throw new RuntimeException("请输入问答类型【决策还是仿真预测】");
+        int type = 3;//仿真预测
+        if(StringUtils.isBlank(simulate) || "{}".equals(simulate))
+            type = 1;//决策
         String warningId = String.valueOf(chatReq.getWarningId());
         //决策请求的业务参数
 //        List<HashMap<String, Object>> list = this.xinyiIndustryMapper.selectLast10RecordsForDecision();