|
@@ -1,5 +1,6 @@
|
|
package com.sxtvs.open.api.youmei.service;
|
|
package com.sxtvs.open.api.youmei.service;
|
|
|
|
|
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
import com.github.benmanes.caffeine.cache.Cache;
|
|
import com.github.benmanes.caffeine.cache.Cache;
|
|
@@ -7,10 +8,12 @@ import com.github.benmanes.caffeine.cache.Caffeine;
|
|
import com.sxtvs.open.api.youmei.dto.CheckWordResponse;
|
|
import com.sxtvs.open.api.youmei.dto.CheckWordResponse;
|
|
import com.sxtvs.open.api.youmei.entity.YoumeiAccount;
|
|
import com.sxtvs.open.api.youmei.entity.YoumeiAccount;
|
|
import com.sxtvs.open.api.youmei.mappser.YoumeiAccountMapper;
|
|
import com.sxtvs.open.api.youmei.mappser.YoumeiAccountMapper;
|
|
|
|
+import com.sxtvs.open.core.sls.AliyunLogger;
|
|
import lombok.SneakyThrows;
|
|
import lombok.SneakyThrows;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.apache.hc.client5.http.fluent.Request;
|
|
import org.apache.hc.client5.http.fluent.Request;
|
|
import org.apache.hc.core5.http.message.BasicNameValuePair;
|
|
import org.apache.hc.core5.http.message.BasicNameValuePair;
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
@@ -23,11 +26,11 @@ import java.util.concurrent.TimeUnit;
|
|
@Slf4j
|
|
@Slf4j
|
|
public class YoumeiAccountServiceImpl extends ServiceImpl<YoumeiAccountMapper, YoumeiAccount> implements IYoumeiAccountService {
|
|
public class YoumeiAccountServiceImpl extends ServiceImpl<YoumeiAccountMapper, YoumeiAccount> implements IYoumeiAccountService {
|
|
|
|
|
|
- private final ObjectMapper objectMapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private ObjectMapper objectMapper;
|
|
|
|
|
|
- public YoumeiAccountServiceImpl(ObjectMapper objectMapper) {
|
|
|
|
- this.objectMapper = objectMapper;
|
|
|
|
- }
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private AliyunLogger logger;
|
|
|
|
|
|
|
|
|
|
private final HashMap<Integer, String> belongMap = new HashMap<>() {{
|
|
private final HashMap<Integer, String> belongMap = new HashMap<>() {{
|
|
@@ -97,6 +100,8 @@ public class YoumeiAccountServiceImpl extends ServiceImpl<YoumeiAccountMapper, Y
|
|
.returnContent()
|
|
.returnContent()
|
|
.asString();
|
|
.asString();
|
|
|
|
|
|
|
|
+ logger.info("key", "checkWordResponse", "data", body);
|
|
|
|
+
|
|
CheckWordResponse checkWordDto = objectMapper.readValue(body, CheckWordResponse.class);
|
|
CheckWordResponse checkWordDto = objectMapper.readValue(body, CheckWordResponse.class);
|
|
CheckWordResponse.DataDTO data = checkWordDto.getData();
|
|
CheckWordResponse.DataDTO data = checkWordDto.getData();
|
|
|
|
|