| | |
| | | import com.ruoyi.common.signature.AESUtils; |
| | | import com.ruoyi.system.domain.ThAccessAddress; |
| | | import com.ruoyi.system.service.ThAccessAddressService; |
| | | import lombok.extern.log4j.Log4j2; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service("ThStudyRecordManagerService") |
| | | @Log4j2 |
| | | public class ThStudyRecordManagerServiceImpl implements ThStudyRecordManagerService { |
| | | private Logger logger = LoggerFactory.getLogger(ThStudyRecordManagerServiceImpl.class); |
| | | |
| | |
| | | Map<String,String> params = new HashMap<>(); |
| | | params.put("idcard",query.getIdcard()); |
| | | String json = HttpClientUtil.doGet(accessAddress.getUrl(), params); |
| | | log.info("调用机构接口返回结果: "+json); |
| | | |
| | | ReturnVO<String> returnVo = JSONObject.parseObject(json, new TypeReference<ReturnVO<String>>() {}); |
| | | if(returnVo.getCode() == null || returnVo.getCode() != 200){ |
| | | log.info("获得第三方数据:"+returnVo); |
| | | if(returnVo==null || returnVo.getCode() == null || returnVo.getCode() != 200){ |
| | | throw new ServiceException("获取三方数据数据异常"); |
| | | } |
| | | ThPlatformStudentRespDTO thPlatformStudentRespDTO = null; |
| | |
| | | String decrypt = ""; |
| | | try { |
| | | decrypt = AESUtils.decrypt(returnVo.getData()); |
| | | log.info("解密后的数据为:"+decrypt); |
| | | }catch (Exception e){ |
| | | throw new BusinessException(this.getClass(), ResultConstants.SYSTEM_ERROR,"解密异常"); |
| | | } |