You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
2.8 KiB
Java

package com.ibeetl.jlw.util;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.ibeetl.admin.core.util.user.ZYUserInfo;
import com.ibeetl.jlw.entity.SchoolClass;
import com.ibeetl.jlw.entity.Student;
import com.ibeetl.jlw.enums.SubsystemName;
import com.ibeetl.jlw.service.StudentService;
import com.ibeetl.jlw.web.query.SchoolClassQuery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class SubsystemUserUtil {
private static final String PEVC_USER_INSERT_API_URL="http://120.79.161.177:8029/account/saveNewUsersFromZhiyunPlatform";
private static final String MNJY_USER_INSERT_API_URL="http://120.79.161.177:8091/account/saveNewUsersFromZhiyunPlatform";
private static final String SZJJ_USER_INSERT_API_URL="http://112.74.160.81:9909/api/user/synchronizationStudentInfoByAuto";
private static final String QKL_USER_INSERT_API_URL="http://120.79.54.255:8800/account/checkOrCreateForexSimulationUser";
private static final String JRDSJ_USER_INSERT_API_URL="http://120.78.220.29:8838/tea/user/checkOrCreateForexSimulationUser";
public static void subsystemUserCreate(List<ZYUserInfo> zyUserInfos, List<String> applications) throws JsonProcessingException {
if (zyUserInfos != null && zyUserInfos.size() > 0) {
ObjectMapper objectMapper = new ObjectMapper();
String json = objectMapper.writeValueAsString(zyUserInfos);
if (applications.contains(SubsystemName.INVESTMENT_BANK.getText())) {
//PEVC系统新增用户信息
HttpUtil.sendPostRequest(PEVC_USER_INSERT_API_URL, json, "application/json");
}
if (applications.contains(SubsystemName.SECURITIES_TRADING.getText())) {
//MNJY系统新增用户信息
HttpUtil.sendPostRequest(MNJY_USER_INSERT_API_URL, json, "application/json");
}
if (applications.contains(SubsystemName.CSRC.getText())) {
//MNJY系统新增用户信息
HttpUtil.sendPostRequest(SZJJ_USER_INSERT_API_URL, json, "application/json");
}
if (applications.contains(SubsystemName.BLOCKCHAIN_TECHNOLOGY.getText())) {
//MNJY系统新增用户信息
HttpUtil.sendPostRequest(QKL_USER_INSERT_API_URL, json, "application/json");
}
if (applications.contains(SubsystemName.BIG_DATA_STORAGE.getText())) {
//MNJY系统新增用户信息
HttpUtil.sendPostRequest(JRDSJ_USER_INSERT_API_URL, json, "application/json");
}
}
}
}