|
|
@@ -1,6 +1,7 @@
|
|
|
package com.fdkankan.ucenter.service.impl;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
@@ -67,6 +68,8 @@ public class InnerServiceImpl implements IInnerService {
|
|
|
|
|
|
@Autowired
|
|
|
private FYunFileServiceInterface fYunFileService;
|
|
|
+ @Autowired
|
|
|
+ IFeedbackOptionService feedbackOptionService;
|
|
|
|
|
|
@Override
|
|
|
public Result createTokenByNum(String num) {
|
|
|
@@ -212,6 +215,28 @@ public class InnerServiceImpl implements IInnerService {
|
|
|
}
|
|
|
return vo;
|
|
|
}
|
|
|
+ if(plus.getFeedbackOptionId() != null){
|
|
|
+ FeedbackOption feedbackOption = feedbackOptionService.getById(plus.getFeedbackOptionId());
|
|
|
+ JSONArray aiOption = feedbackOption.getAiOption();
|
|
|
+ if(aiOption == null || aiOption.isEmpty()){
|
|
|
+ return vo;
|
|
|
+ }
|
|
|
+ List<HashMap<String,Object>> list = new ArrayList<>();
|
|
|
+ for (Object object : aiOption) {
|
|
|
+ Integer id = (Integer) object;
|
|
|
+ FeedbackOption feedbackOption1 = feedbackOptionService.getById(id);
|
|
|
+ if(feedbackOption1 != null && StringUtils.isNotBlank(feedbackOption1.getModelApi())){
|
|
|
+ HashMap<String, Object> map2 = new HashMap<>();
|
|
|
+ map2.put("name",feedbackOption1.getNameCn());
|
|
|
+ map2.put("url",feedbackOption1.getModelApi());
|
|
|
+ map2.put("confidenceLevel",feedbackOption1.getConfidenceLevel());
|
|
|
+ list.add(map2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(!list.isEmpty()){
|
|
|
+ vo.setModels(list);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
throw new BusinessException(ResultCodeMsg.FAILURE_CODE_400002, ResultCodeMsg.FAILURE_MSG_400002);
|
|
|
}
|