mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-09 10:56:50 +08:00
替换离职人员信息2
This commit is contained in:
@@ -5,6 +5,8 @@ import cn.hutool.core.lang.Opt;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.xboe.api.vo.*;
|
||||
import com.xboe.module.course.vo.TeacherInfoVo;
|
||||
import com.xboe.module.course.vo.TeacherVo;
|
||||
import com.xboe.module.dict.entity.DictDto;
|
||||
import com.xboe.system.user.dao.UserDao;
|
||||
import com.xboe.system.user.entity.User;
|
||||
@@ -52,6 +54,9 @@ public class ThirdApi {
|
||||
@Value("${audience.getOrgUsers}")
|
||||
private String searchOrgUsersUrl;
|
||||
|
||||
@Value("${userBasic.getTeacherIds}")
|
||||
private String getTeacherIds;
|
||||
|
||||
//获取例外人员的id
|
||||
public List<String> getUserId(){
|
||||
String s = Optional.ofNullable(HttpRequest.get(infarasApiUrl).execute()
|
||||
@@ -78,7 +83,31 @@ public class ThirdApi {
|
||||
.body()).orElseThrow(() -> new RuntimeException("token校验失败"));
|
||||
return Opt.ofBlankAble(s).map(t -> JSONUtil.toBean(t, StringResult.class)).map(StringResult::getData).orElseThrow();
|
||||
}
|
||||
|
||||
//获取离职教师信息
|
||||
public List<TeacherVo>getTeacherInfo(List<String> teacherIds, String token){
|
||||
TeacherInfoVo teacherInfoVo=new TeacherInfoVo();
|
||||
teacherInfoVo.setTeacherIds(teacherIds);
|
||||
log.info("获取离职教师信息");
|
||||
log.info(JSONUtil.toJsonStr(teacherInfoVo));
|
||||
String resp = Optional.ofNullable(
|
||||
HttpRequest.post(getTeacherIds).body(JSONUtil.toJsonStr(teacherInfoVo)).header("token", token).execute()
|
||||
.body()).orElseThrow(() -> new RuntimeException("token校验失败"));
|
||||
GetTeacherIdsResult getTeacherIdsResult = JSONUtil.toBean(resp, GetTeacherIdsResult.class);
|
||||
log.info("getTeacherIdsResult = " + getTeacherIdsResult.getResult());
|
||||
return getTeacherIdsResult.getResult();
|
||||
}
|
||||
public List<TeacherVo>getTeacherInfoByCode(List<String> teacherCode,String token){
|
||||
TeacherInfoVo teacherInfoVo=new TeacherInfoVo();
|
||||
teacherInfoVo.setTeacherIds(teacherCode);
|
||||
log.info("获取离职教师信息");
|
||||
log.info("参数为"+JSONUtil.toJsonStr(teacherCode));
|
||||
String resp = Optional.ofNullable(
|
||||
HttpRequest.post(getTeacherIds).body(JSONUtil.toJsonStr(teacherInfoVo)).header("token", token).execute()
|
||||
.body()).orElseThrow(() -> new RuntimeException("token校验失败"));
|
||||
GetTeacherIdsResult getTeacherIdsResult = JSONUtil.toBean(resp, GetTeacherIdsResult.class);
|
||||
log.info("getTeacherIdsResult = " + getTeacherIdsResult);
|
||||
return getTeacherIdsResult.getResult();
|
||||
}
|
||||
public List<UserInfoListVo> getAllUserList(UserListParam userListParam, String token) {
|
||||
log.info("获取用户:url:{}", searchOrgUsersUrl);
|
||||
log.info("获取用户:params:{}", JSONUtil.toJsonStr(userListParam));
|
||||
|
||||
Reference in New Issue
Block a user