去掉定位日志

This commit is contained in:
ZLI263
2025-09-24 13:16:33 +08:00
parent 2b04df3b7d
commit ae5035e5d0

View File

@@ -28,6 +28,8 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.ZonedDateTime; import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.util.*; import java.util.*;
@@ -211,7 +213,6 @@ public class TmNameplateCorpusServiceImpl extends ServiceImpl<TmNameplateCorpusM
// 获取许可 - 如果没有可用许可会阻塞等待 // 获取许可 - 如果没有可用许可会阻塞等待
// 修改为带超时的获取许可方式超时时间为1分钟 // 修改为带超时的获取许可方式超时时间为1分钟
if (!semaphore.tryAcquire(5, TimeUnit.MINUTES)) { if (!semaphore.tryAcquire(5, TimeUnit.MINUTES)) {
log.info("istimeout画像业务场景");
log.warn("获取许可超时,跳过执行任务"); log.warn("获取许可超时,跳过执行任务");
return; return;
} }
@@ -226,26 +227,21 @@ public class TmNameplateCorpusServiceImpl extends ServiceImpl<TmNameplateCorpusM
}else { }else {
try { try {
log.info("getNameplateEndTime is not null"); log.info("getNameplateEndTime is not null");
// 定义原始字符串的格式注意CST 在这里是中国标准时间,对应 Asia/Shanghai // 解析为 LocalDateTime假设 CST 是 Asia/Shanghai
SimpleDateFormat inputFormat = new SimpleDateFormat("EEE MMM dd HH:mm:ss 'CST' yyyy"); LocalDateTime ldt = LocalDateTime.parse(item.getNameplateEndTime().toString().replace(" CST ", " "),
inputFormat.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai")); // 设置时区为 CST (China Standard Time) DateTimeFormatter.ofPattern("EEE MMM dd HH:mm:ss yyyy", Locale.ENGLISH));
ZonedDateTime zonedDateTime = ZonedDateTime.parse(item.getNameplateEndTime().toString()); // 转为带时区的时间(可选)
// 定义目标格式 java.time.ZonedDateTime zonedDateTime = ldt.atZone(ZoneId.of("Asia/Shanghai"));
SimpleDateFormat outputFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); // 格式化输出
// 解析原始字符串为 Date 对象 DateTimeFormatter outputFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
Date date = inputFormat.parse(item.getNameplateEndTime().toString()); String formattedDate = zonedDateTime.format(outputFormatter);
// 格式化为目标格式
String formattedDate = outputFormat.format(date);
inputMap2.put("communicateDate", formattedDate); inputMap2.put("communicateDate", formattedDate);
}catch (Exception e){ }catch (Exception e){
log.info("getNameplateEndTime {}", e.getMessage()); log.info("getNameplateEndTime {}", e.getMessage());
} }
} }
log.info("getNameplateEndTime,inputMap2,",inputMap2);
diFyImageReq2.setUser(ConstantStr.corpus_user); diFyImageReq2.setUser(ConstantStr.corpus_user);
inputMap2.put("businessId", item.getCustomerFlowId()); inputMap2.put("businessId", item.getCustomerFlowId());
inputMap2.put("analysisScene", "3"); inputMap2.put("analysisScene", "3");
inputMap2.put("version", 2); inputMap2.put("version", 2);