|
@@ -24,6 +24,7 @@ import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.time.LocalDate;
|
|
|
import java.time.LocalDateTime;
|
|
|
+import java.time.ZoneId;
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
import java.util.*;
|
|
|
import java.nio.charset.StandardCharsets;
|
|
@@ -444,7 +445,7 @@ public SuggestionVO KeywordForSuggestions(HashMap<String,String> header, String
|
|
|
}
|
|
|
return dealAnswer(answer);
|
|
|
} catch (Exception e) {
|
|
|
- log.error(e.getMessage(), "定性分析接口出错");
|
|
|
+ log.error("定性分析接口出错", e);
|
|
|
throw new Exception("定性分析接口出错", e);
|
|
|
}
|
|
|
}
|
|
@@ -477,7 +478,11 @@ public SuggestionVO KeywordForSuggestions(HashMap<String,String> header, String
|
|
|
public int record(CompanyDTO dto) throws Exception {
|
|
|
// 查询是否达到3次
|
|
|
DateTimeFormatter format = DateTimeFormatter.ofPattern("yyyyMM");
|
|
|
- LocalDateTime currentTime = LocalDateTime.now();
|
|
|
+ Date date = new Date();
|
|
|
+ LocalDateTime currentTime = date
|
|
|
+ .toInstant()
|
|
|
+ .atZone(ZoneId.of("Asia/Shanghai"))
|
|
|
+ .toLocalDateTime();
|
|
|
String month = currentTime.format(format);
|
|
|
CompanyBo bo = new CompanyBo();
|
|
|
bo.setPhone(dto.getPhone());
|