feat: 添加根据codeNo获取代理商公告的接口,更新公告相关数据库操作
This commit is contained in:
@@ -303,22 +303,7 @@ public class ScriptClient {
|
||||
.doOnError(e -> log.warn("获取目标分数失败: machineId={}, error={}", machineId, e.toString()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置次数(生成链接时调用)- 使用 @RepeatCall 注解自动重复执行3次
|
||||
*/
|
||||
@RepeatCall(times = 3, description = "设置次数")
|
||||
public Mono<String> setTimes(String machineId, int times) {
|
||||
String url = String.format(apiBaseUrl + "/yijianwan_netfile/saveMsg?文件名=总次数&%s=%d", machineId, times);
|
||||
log.debug("设置次数: machineId={}, times={}, url={}", machineId, times, url);
|
||||
return webClient.post()
|
||||
.uri(url)
|
||||
.accept(MediaType.TEXT_PLAIN)
|
||||
.retrieve()
|
||||
.bodyToMono(String.class)
|
||||
.timeout(Duration.ofSeconds(10))
|
||||
.doOnSuccess(result -> log.debug("设置次数成功: machineId={}, times={}, result={}", machineId, times, result))
|
||||
.doOnError(e -> log.warn("设置次数失败: machineId={}, times={}, error={}", machineId, times, e.toString()));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 保存总次数(使用f4参数格式)
|
||||
|
||||
@@ -872,8 +872,12 @@ public class LinkStatusService {
|
||||
if ("已上号".equals(loginResult) || "已登录".equals(loginResult)) {
|
||||
try {
|
||||
LinkBatch linkBatch = linkBatchMapper.findById(linkTask.getBatchId());
|
||||
log.info("=============================================");
|
||||
scriptClient.saveTotalTimes(deviceId,linkBatch.getTimes()).block();
|
||||
// saveTotalTimes方法已经包含了详细的日志记录
|
||||
log.info("codeNo:{},deviceId:{}",linkTask.getCodeNo(),deviceId);
|
||||
log.info("=============================================");
|
||||
|
||||
} catch (Exception e) {
|
||||
log.warn("保存总次数接口调用失败: {}", e.getMessage());
|
||||
// 不影响后续流程,只记录警告日志
|
||||
|
||||
Reference in New Issue
Block a user