|
@@ -3,6 +3,7 @@ package com.yixin.ms.service.impl;
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
import cn.hutool.core.lang.UUID;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
+import cn.hutool.http.HttpUtil;
|
|
|
import com.alibaba.excel.util.CollectionUtils;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
@@ -35,6 +36,7 @@ import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.nio.charset.Charset;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
import java.util.concurrent.Executor;
|
|
@@ -96,6 +98,17 @@ public class HealthCodeServiceImpl implements HealthCodeService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ if(StrUtil.isNotEmpty(shortTermDTO.getHealthCode()) && (HttpUtil.isHttp(shortTermDTO.getHealthCode()) || HttpUtil.isHttps(shortTermDTO.getHealthCode()))){
|
|
|
+ log.info("请求健康码参数信息: {}", shortTermDTO.getHealthCode());
|
|
|
+
|
|
|
+ String barCode = HttpUtil.decodeParamMap(shortTermDTO.getHealthCode().toLowerCase(), Charset.defaultCharset()).get("statecouncilbarcode");
|
|
|
+ if(StrUtil.isEmpty(barCode)){
|
|
|
+ throw new ServiceException("请打开支付宝选择杭州健康码重试");
|
|
|
+ }else {
|
|
|
+ shortTermDTO.setHealthCode(barCode);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if (StringUtils.isBlank(shortTermDTO.getToken())) {
|
|
|
throw new ServiceException(700, "token为空哦");
|
|
|
}
|