|
|
@@ -16,21 +16,34 @@
|
|
|
*/
|
|
|
package com.trade.purchase.extra.service.impl;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.trade.purchase.extra.entity.Claim;
|
|
|
import com.trade.purchase.extra.entity.ClaimItem;
|
|
|
+import com.trade.purchase.extra.entity.JdModule;
|
|
|
+import com.trade.purchase.extra.entity.JdTenant;
|
|
|
import com.trade.purchase.extra.mapper.ClaimItemMapper;
|
|
|
import com.trade.purchase.extra.mapper.ClaimMapper;
|
|
|
+import com.trade.purchase.extra.mapper.JdyModuleMapper;
|
|
|
+import com.trade.purchase.extra.mapper.JdyTenantMapper;
|
|
|
import com.trade.purchase.extra.service.IClaimService;
|
|
|
import com.trade.purchase.extra.vo.ClaimVO;
|
|
|
+import com.trade.purchase.tool.JdyTool;
|
|
|
+import com.trade.purchase.vojo.JDYassist;
|
|
|
+import com.trade.purchase.vojo.JDYentries;
|
|
|
+import com.trade.purchase.vojo.JDYitems;
|
|
|
+import io.seata.spring.annotation.GlobalTransactional;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
+import lombok.Data;
|
|
|
import org.springblade.check.dto.AuditProecessDTO;
|
|
|
import org.springblade.check.entity.AuditPathsActs;
|
|
|
import org.springblade.check.entity.AuditPathsLevels;
|
|
|
import org.springblade.check.feign.ICheckClient;
|
|
|
+import org.springblade.client.entity.CommonFile;
|
|
|
+import org.springblade.client.feign.ICommonFileClient;
|
|
|
import org.springblade.client.feign.ISerialClient;
|
|
|
import org.springblade.core.mp.support.Condition;
|
|
|
import org.springblade.core.mp.support.Query;
|
|
|
@@ -38,13 +51,22 @@ import org.springblade.core.secure.utils.AuthUtil;
|
|
|
import org.springblade.core.tool.api.R;
|
|
|
import org.springblade.core.tool.utils.ObjectUtil;
|
|
|
import org.springblade.core.tool.utils.StringUtil;
|
|
|
+
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
|
|
|
|
|
+import javax.net.ssl.*;
|
|
|
+import java.io.*;
|
|
|
import java.math.BigDecimal;
|
|
|
-import java.util.Date;
|
|
|
-import java.util.List;
|
|
|
+import java.net.HttpURLConnection;
|
|
|
+import java.net.URL;
|
|
|
+import java.net.URLEncoder;
|
|
|
+import java.security.SecureRandom;
|
|
|
+import java.security.cert.X509Certificate;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
+import java.util.*;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* 费用报销表 服务实现类
|
|
|
@@ -56,12 +78,23 @@ import java.util.List;
|
|
|
@AllArgsConstructor
|
|
|
public class ClaimServiceImpl extends ServiceImpl<ClaimMapper, Claim> implements IClaimService {
|
|
|
|
|
|
+ private static final String DEFAULT_CHARSET = "UTF-8";
|
|
|
+
|
|
|
+ private static final String METHOD_POST = "POST";
|
|
|
+
|
|
|
private final ClaimItemMapper claimItemMapper;
|
|
|
|
|
|
private final ISerialClient serialClient;
|
|
|
|
|
|
+ private final ICommonFileClient commonFileClient;
|
|
|
+
|
|
|
private final ICheckClient checkClient;
|
|
|
|
|
|
+ private final JdyTenantMapper jdTenantMapper;
|
|
|
+
|
|
|
+ private final JdyModuleMapper moduleMapper;
|
|
|
+
|
|
|
+
|
|
|
@Override
|
|
|
public IPage<ClaimVO> selectClaimPage(IPage<ClaimVO> page, ClaimVO claim) {
|
|
|
return page.setRecords(baseMapper.selectClaimPage(page, claim));
|
|
|
@@ -71,11 +104,16 @@ public class ClaimServiceImpl extends ServiceImpl<ClaimMapper, Claim> implements
|
|
|
public Claim getDetail(Claim claim) {
|
|
|
Claim detail = baseMapper.selectById(claim.getId());
|
|
|
if (ObjectUtil.isNotEmpty(detail)) {
|
|
|
+ //明细
|
|
|
List<ClaimItem> itemList = claimItemMapper.selectList(new LambdaQueryWrapper<ClaimItem>()
|
|
|
.eq(ClaimItem::getPid, detail.getId())
|
|
|
.eq(ClaimItem::getIsDeleted, 0)
|
|
|
);
|
|
|
detail.setItemList(itemList);
|
|
|
+
|
|
|
+ //附件
|
|
|
+ R<List<CommonFile>> fileList = commonFileClient.getList(claim.getId(), "LAND_CLAIM_FEE");
|
|
|
+ detail.setFileList(fileList.getData());
|
|
|
}
|
|
|
return detail;
|
|
|
}
|
|
|
@@ -135,6 +173,17 @@ public class ClaimServiceImpl extends ServiceImpl<ClaimMapper, Claim> implements
|
|
|
i ++;
|
|
|
}
|
|
|
|
|
|
+ List<CommonFile> fileList = claim.getFileList();
|
|
|
+ if (ObjectUtil.isNotEmpty(fileList)){
|
|
|
+ fileList.forEach(file -> {
|
|
|
+ if (ObjectUtil.isEmpty(file.getId())) {
|
|
|
+ file.setPid(claim.getId());
|
|
|
+ file.setSource("LAND_CLAIM_FEE");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ commonFileClient.saveList(fileList);
|
|
|
+
|
|
|
claim.setTotalAmount(totalAmount);
|
|
|
baseMapper.updateById(claim);
|
|
|
return claimId;
|
|
|
@@ -240,4 +289,363 @@ public class ClaimServiceImpl extends ServiceImpl<ClaimMapper, Claim> implements
|
|
|
);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ @Transactional
|
|
|
+ @GlobalTransactional
|
|
|
+ public Claim modify(Claim claim) {
|
|
|
+ Long id = claim.getId();
|
|
|
+ Claim claimOne = baseMapper.selectById(id);
|
|
|
+
|
|
|
+ if ("681169".equals(AuthUtil.getTenantId())){
|
|
|
+
|
|
|
+ if (claimOne == null) {
|
|
|
+ throw new SecurityException("未查到相关数据,操作失败");
|
|
|
+ }
|
|
|
+
|
|
|
+ //获得明细
|
|
|
+ List<ClaimItem> itemList = claimItemMapper.selectList(new LambdaQueryWrapper<ClaimItem>()
|
|
|
+ .eq(ClaimItem::getPid, claimOne.getId())
|
|
|
+ .eq(ClaimItem::getIsDeleted, 0)
|
|
|
+ );
|
|
|
+ //=============生成凭证所需信息==============
|
|
|
+ String accountName = claim.getBelongToCorpName();
|
|
|
+ if (!"青岛通用沃德轮胎有限公司".equals(accountName)) {
|
|
|
+ accountName="青岛达沃特轮胎有限公司";
|
|
|
+ }
|
|
|
+ LambdaQueryWrapper<JdTenant> jdTenantLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ jdTenantLambdaQueryWrapper
|
|
|
+ .eq(JdTenant::getIsEnable, 1)
|
|
|
+ .eq(JdTenant::getTenantId, AuthUtil.getTenantId())
|
|
|
+ .eq(JdTenant::getAccountName, accountName);
|
|
|
+ JdTenant jdTenant = jdTenantMapper.selectOne(jdTenantLambdaQueryWrapper);
|
|
|
+ if (jdTenant != null)
|
|
|
+ {
|
|
|
+ if (ObjectUtil.isNotEmpty(itemList)){
|
|
|
+ itemList.forEach(item -> {
|
|
|
+ try {
|
|
|
+ //财务保存凭证
|
|
|
+ this.ClaimSaveVoucher(claimOne.getPaymentTime(), item.getSubjectName(), item.getExpenseOwner(), item.getAccountingItemsName(), item.getAmount().toString());
|
|
|
+ } catch (Exception exception) {
|
|
|
+ throw new SecurityException(exception.getMessage());
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ return claim;
|
|
|
+ }
|
|
|
+
|
|
|
+ //财务生成账单
|
|
|
+ public void ClaimSaveVoucher(Date PaymentTime, String accountName, String corpName, String corpNumber, String account) throws Exception {
|
|
|
+ // TODO 临时屏蔽
|
|
|
+
|
|
|
+ //非达沃特用户直接返回
|
|
|
+ if (!"681169".equals(AuthUtil.getTenantId())) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ //如果金额大于0,才生成凭证
|
|
|
+ if (new BigDecimal(account).compareTo(BigDecimal.ZERO) < 1) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ //获取token
|
|
|
+ String token = this.getAccountGroupRequest();
|
|
|
+ //获取套账url
|
|
|
+ String getAccountUrl = "https://api.kingdee.com/jdy/sys/accountGroup?access_token=" + token;
|
|
|
+ Map<String, String> urlParams = new HashMap<>();
|
|
|
+ String result = this.doPost(getAccountUrl, urlParams);
|
|
|
+ JdyTool.getAccountGroup getAccountGroup = JSONObject.parseObject(result, JdyTool.getAccountGroup.class);
|
|
|
+
|
|
|
+ List<JdyTool.AccountGroup> list = new ArrayList<>();
|
|
|
+ if (!CollectionUtils.isNotEmpty(getAccountGroup.getData())) {
|
|
|
+ throw new SecurityException("操作失败,暂无账套信息");
|
|
|
+ }
|
|
|
+ //获取此账号下,全部账套
|
|
|
+ getAccountGroup.getData().forEach(e -> {
|
|
|
+ list.addAll(e.getAccountGroups());
|
|
|
+ });
|
|
|
+ //匹配账套
|
|
|
+ List<JdyTool.AccountGroup> groupList = list.stream().filter(e -> e.getAccountName().equals(accountName)).collect(Collectors.toList());
|
|
|
+ if (!CollectionUtils.isNotEmpty(groupList)) {
|
|
|
+ throw new SecurityException("未找到: " + accountName + " 的账套信息");
|
|
|
+ }
|
|
|
+ JdyTool.AccountGroup group = groupList.get(0);
|
|
|
+ //1.获取租户信息
|
|
|
+ LambdaQueryWrapper<JdTenant> jdTenantLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ jdTenantLambdaQueryWrapper
|
|
|
+ .eq(JdTenant::getIsEnable, 1)
|
|
|
+ .eq(JdTenant::getTenantId, AuthUtil.getTenantId())
|
|
|
+ .eq(JdTenant::getAccountName, accountName);
|
|
|
+ JdTenant jdTenant = jdTenantMapper.selectOne(jdTenantLambdaQueryWrapper);
|
|
|
+ if (jdTenant == null) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ //保存凭证
|
|
|
+ JdyTool.voucher voucher = toSaleCollectionJinDie(PaymentTime,accountName, account, corpName, corpNumber, jdTenant.getAccountId(), group.getGroupName(), jdTenant);
|
|
|
+ if (voucher == null) {
|
|
|
+ throw new SecurityException("获取凭证信息失败");
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ //金蝶保存凭证测试-生成凭证
|
|
|
+ public JdyTool.voucher toSaleCollectionJinDie(Date date,String subjectNumber, String account, String corpName,String corpNumber, String accountId, String groupName, JdTenant jdTenant) {
|
|
|
+ JDYitems item = new JDYitems();
|
|
|
+ item.setDate(new SimpleDateFormat("yyyy-MM-dd").format(date));
|
|
|
+ List<JDYentries> entriesList = new ArrayList<>();
|
|
|
+ List<JDYitems> jdYitems = new ArrayList<>();
|
|
|
+
|
|
|
+ //财务借方
|
|
|
+ JDYentries d = new JDYentries();
|
|
|
+ d.setDc("1");
|
|
|
+ LambdaQueryWrapper<JdModule> dLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ dLambdaQueryWrapper
|
|
|
+ .eq(JdModule::getAccountId, accountId)
|
|
|
+ .eq(JdModule::getModule, "报销")
|
|
|
+ .eq(JdModule::getDc, "1")
|
|
|
+ .last("limit 1")
|
|
|
+ .eq(JdModule::getTenantId, AuthUtil.getTenantId());
|
|
|
+ JdModule dModule = moduleMapper.selectOne(dLambdaQueryWrapper);
|
|
|
+ if (dModule == null) {
|
|
|
+ throw new SecurityException("获取科目号失败");
|
|
|
+ }
|
|
|
+ if (null != subjectNumber && !subjectNumber.equals("")){
|
|
|
+ dModule.setProjectCode(subjectNumber);
|
|
|
+ }else {
|
|
|
+ throw new SecurityException("科目编码为空");
|
|
|
+ }
|
|
|
+ d.setExplanation(dModule.getAbstractStatic() + "-" + corpName);
|
|
|
+ d.setAccount_number(dModule.getProjectCode());
|
|
|
+ d.setDebitamount(account);
|
|
|
+ entriesList.add(d);
|
|
|
+
|
|
|
+ //===========辅助核算=================
|
|
|
+ List<JDYassist> cList = new ArrayList<>();
|
|
|
+
|
|
|
+ JDYassist jdYassist = new JDYassist();
|
|
|
+ jdYassist.setType("bd_employee");
|
|
|
+
|
|
|
+ jdYassist.setNumber(corpNumber);
|
|
|
+
|
|
|
+ cList.add(jdYassist);
|
|
|
+ d.setAssist(cList);
|
|
|
+ //===========辅助核算=================
|
|
|
+
|
|
|
+
|
|
|
+ //财务贷方
|
|
|
+ JDYentries c = new JDYentries();
|
|
|
+ c.setDc("-1");
|
|
|
+
|
|
|
+ LambdaQueryWrapper<JdModule> cLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ cLambdaQueryWrapper
|
|
|
+ .eq(JdModule::getAccountId, accountId)
|
|
|
+ .eq(JdModule::getModule, "报销")
|
|
|
+ .eq(JdModule::getDc, "-1")
|
|
|
+ .last("limit 1")
|
|
|
+ .eq(JdModule::getTenantId, AuthUtil.getTenantId());
|
|
|
+ JdModule cModule = moduleMapper.selectOne(cLambdaQueryWrapper);
|
|
|
+ if (cModule == null) {
|
|
|
+ throw new SecurityException("获取科目号失败");
|
|
|
+ }
|
|
|
+ c.setExplanation(cModule.getAbstractStatic() + "-" + corpName);
|
|
|
+ c.setAccount_number(cModule.getProjectCode());
|
|
|
+ c.setCreditamount(account);
|
|
|
+
|
|
|
+ entriesList.add(c);
|
|
|
+
|
|
|
+ //组装数据
|
|
|
+ item.setEntries(entriesList);
|
|
|
+ jdYitems.add(item);
|
|
|
+ try {
|
|
|
+ String token = this.getAccountGroupRequest();
|
|
|
+ String saveUrl = "http://api.kingdee.com/jdy/gl/voucher_save?access_token=" + token;
|
|
|
+ return JdyTool.testSaveVoucher(token, saveUrl, accountId, groupName, jdYitems);
|
|
|
+ } catch (Exception exception) {
|
|
|
+ throw new SecurityException("操作失败,保存金蝶错误:" + exception.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //测试获取AccountGroupRequest
|
|
|
+ public String getAccountGroupRequest() throws Exception {
|
|
|
+ //校验当前租户配置,如果存在配置,返回token
|
|
|
+ LambdaQueryWrapper<JdTenant> jdTenantLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ jdTenantLambdaQueryWrapper
|
|
|
+ .last("limit 1")
|
|
|
+ .eq(JdTenant::getTenantId, AuthUtil.getTenantId())
|
|
|
+ .eq(JdTenant::getIsEnable, 1);
|
|
|
+ JdTenant jdTenant = jdTenantMapper.selectOne(jdTenantLambdaQueryWrapper);
|
|
|
+ if (jdTenant == null) {
|
|
|
+ throw new SecurityException("当前租户未配置凭证信息");
|
|
|
+ }
|
|
|
+ //获取测试账套token的url
|
|
|
+ String getTokenUrl = "https://api.kingdee.com/auth/user/access_token?client_id=" + jdTenant.getClientId() +
|
|
|
+ "&client_secret=" + jdTenant.getClientSecret() +
|
|
|
+ "&username=" + jdTenant.getUsername() +
|
|
|
+ "&password=" + jdTenant.getPassword();
|
|
|
+ Map<String, String> urlParams = new HashMap<>();
|
|
|
+
|
|
|
+ String result = this.doGet(getTokenUrl, urlParams);
|
|
|
+ tokenDTO tokenDTO = JSONObject.parseObject(result, tokenDTO.class);
|
|
|
+ if (tokenDTO.errcode == 1006) {
|
|
|
+ throw new SecurityException("当前密码错误次数超过限定值");
|
|
|
+ }
|
|
|
+ return tokenDTO.getData().getAccess_token();
|
|
|
+ }
|
|
|
+
|
|
|
+ public String doGet(String url, Map<String, String> urlParams)
|
|
|
+ throws IOException {
|
|
|
+ if (isEmpty(url)) {
|
|
|
+ throw new IllegalArgumentException("The parameter 'url' can not be null or blank.");
|
|
|
+ }
|
|
|
+ url += buildQuery(urlParams, "UTF-8");
|
|
|
+ HttpURLConnection conn = getConnection(new URL(url), "GET");
|
|
|
+ return getResponseAsString(conn);
|
|
|
+ }
|
|
|
+
|
|
|
+ public String doPost(String url, Map<String, String> urlParams) throws IOException {
|
|
|
+ if (isEmpty(url)) {
|
|
|
+ throw new IllegalArgumentException("The parameter 'url' can not be null or blank.");
|
|
|
+ }
|
|
|
+ url += buildQuery(urlParams, DEFAULT_CHARSET);
|
|
|
+ HttpURLConnection conn = getConnection(new URL(url), METHOD_POST);
|
|
|
+ return getResponseAsString(conn);
|
|
|
+ }
|
|
|
+
|
|
|
+ private boolean isEmpty(String str) {
|
|
|
+ return str == null || str.trim().length() == 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String buildQuery(Map<String, String> params, String charset) throws UnsupportedEncodingException {
|
|
|
+ if (params == null || params.isEmpty()) {
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ StringBuilder sb = new StringBuilder();
|
|
|
+ boolean first = true;
|
|
|
+ for (Map.Entry<String, String> entry : params.entrySet()) {
|
|
|
+ if (first) {
|
|
|
+ sb.append("?");
|
|
|
+ first = false;
|
|
|
+ } else {
|
|
|
+ sb.append("&");
|
|
|
+ }
|
|
|
+ String key = entry.getKey();
|
|
|
+ String value = entry.getValue();
|
|
|
+ if (areNotEmpty(key, value)) {
|
|
|
+ sb.append(key).append("=").append(URLEncoder.encode(value, charset));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return sb.toString();
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ public boolean areNotEmpty(String... values) {
|
|
|
+ if (values == null || values.length == 0) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ for (String value : values) {
|
|
|
+ if (isEmpty(value)) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ private HttpURLConnection getConnection(URL url, String method)
|
|
|
+ throws IOException {
|
|
|
+
|
|
|
+ HttpURLConnection conn;
|
|
|
+ if ("https".equals(url.getProtocol())) {
|
|
|
+ SSLContext ctx;
|
|
|
+ try {
|
|
|
+ ctx = SSLContext.getInstance("TLS");
|
|
|
+ ctx.init(new KeyManager[0], new TrustManager[]{new ClaimServiceImpl.DefaultTrustManager()},
|
|
|
+ new SecureRandom());
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new IOException(e);
|
|
|
+ }
|
|
|
+ HttpsURLConnection connHttps = (HttpsURLConnection) url.openConnection();
|
|
|
+ connHttps.setSSLSocketFactory(ctx.getSocketFactory());
|
|
|
+ connHttps.setHostnameVerifier((hostname, session) -> {
|
|
|
+ // 默认都认证通过
|
|
|
+ return true;
|
|
|
+ });
|
|
|
+ conn = connHttps;
|
|
|
+ } else {
|
|
|
+ conn = (HttpURLConnection) url.openConnection();
|
|
|
+ }
|
|
|
+ conn.setRequestMethod(method);
|
|
|
+ conn.setDoInput(true);
|
|
|
+ conn.setDoOutput(true);
|
|
|
+ conn.setRequestProperty("Content-Type", "application/json;charset=UTF-8");
|
|
|
+ conn.setRequestProperty("Connection", "Keep-Alive");
|
|
|
+ return conn;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ private String getResponseAsString(HttpURLConnection conn) throws IOException {
|
|
|
+ InputStream es = conn.getErrorStream();
|
|
|
+ if (es == null) {
|
|
|
+ return getStreamAsString(conn.getInputStream(), "UTF-8");
|
|
|
+ } else {
|
|
|
+ String msg = getStreamAsString(es, "UTF-8");
|
|
|
+ if (isEmpty(msg)) {
|
|
|
+ throw new IOException(conn.getResponseCode() + " : " + conn.getResponseMessage());
|
|
|
+ } else {
|
|
|
+ throw new IOException(msg);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ private String getStreamAsString(InputStream input, String charset) throws IOException {
|
|
|
+ StringBuilder sb = new StringBuilder();
|
|
|
+ try (BufferedReader bf = new BufferedReader(new InputStreamReader(input, charset))) {
|
|
|
+ String str;
|
|
|
+ while ((str = bf.readLine()) != null) {
|
|
|
+ sb.append(str);
|
|
|
+ }
|
|
|
+ return sb.toString();
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ private static class DefaultTrustManager implements X509TrustManager {
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public X509Certificate[] getAcceptedIssuers() {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void checkClientTrusted(X509Certificate[] cert, String oauthType) {
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void checkServerTrusted(X509Certificate[] cert, String oauthType) {
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @Data
|
|
|
+ public static class tokenDTO {
|
|
|
+ private Long errcode;
|
|
|
+
|
|
|
+ private String description;
|
|
|
+
|
|
|
+ private ClaimServiceImpl.tokenData data;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Data
|
|
|
+ public static class tokenData {
|
|
|
+ private String access_token;
|
|
|
+ private String avatar;
|
|
|
+ private String expires;
|
|
|
+ private String expires_in;
|
|
|
+ private String gender;
|
|
|
+ private String nickname;
|
|
|
+ private String uid;
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
}
|