成长路径图,考试绑定

This commit is contained in:
yang
2024-07-01 10:36:06 +08:00
parent bcdc784e7d
commit e2e0aeb9cb
4 changed files with 70 additions and 4 deletions

View File

@@ -4,6 +4,7 @@ import cn.hutool.core.collection.ListUtil;
import cn.hutool.core.lang.Opt;
import cn.hutool.http.HttpRequest;
import cn.hutool.json.JSONUtil;
import com.alibaba.nacos.shaded.com.google.gson.Gson;
import com.xboe.api.vo.*;
import com.xboe.module.course.vo.StudyCourseVo;
import com.xboe.module.course.vo.TeacherInfoVo;
@@ -11,11 +12,9 @@ import com.xboe.module.course.vo.TeacherVo;
import com.xboe.module.dict.entity.DictDto;
import com.xboe.school.study.entity.StudyCourse;
import com.xboe.system.user.dao.UserDao;
import com.xboe.system.user.entity.User;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Service;
import java.util.*;
import java.util.concurrent.ForkJoinPool;
@@ -63,6 +62,9 @@ public class ThirdApi {
@Value("${userBasic.getUserIdByWorkNum}")
private String getUserIdByWorkNum;
@Value("${coursesuilt.checkBanding}")
private String checkBanding;
//获取例外人员的id
public List<String> getUserId(){
String responseBody = Optional.ofNullable(HttpRequest.get(infarasApiUrl+"?pid=316&type=1").execute() //prod 316
@@ -237,4 +239,15 @@ public class ThirdApi {
HashMap<String, String> result = getUserIdByWorkNumResult.getResult();
return result;
}
public String checkExamBanding(String testId, String token){
String url = checkBanding+"?testId=" + testId;
String resp = Optional.ofNullable(
HttpRequest.get(url).header("token", token).execute().body()).orElseThrow(() -> new RuntimeException("token校验失败"));
Gson gson = new Gson();
CheckExamBandingBean checkExamBandingBean = gson.fromJson(resp, CheckExamBandingBean.class);
return checkExamBandingBean.getData();
}
}