This commit is contained in:
wanghao
2026-03-18 14:09:25 +08:00
6 changed files with 16 additions and 15 deletions
@@ -36,9 +36,8 @@ public class CustomBatchConfigurer extends BasicBatchConfigurer {
@Override @Override
public void initialize() { public void initialize() {
// 达梦数据库兼容处理:跳过Spring Batch数据库类型自动检测 // 调用父类的 initialize() 方法来初始化 JobRepository 等
// BasicBatchConfigurer.initialize()中DatabaseType.fromProductName()无法识别"DM DBMS"产品名 super.initialize();
// 保持父类默认隔离级别ISOLATION_SERIALIZABLEDM8与此兼容
} }
@Override @Override
@@ -5,7 +5,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration; import org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration;
import org.springframework.cloud.openfeign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
@SpringBootApplication(scanBasePackages = {"com.renkang", "org.jeecg"},exclude = QuartzAutoConfiguration .class) @SpringBootApplication(scanBasePackages = {"com.renkang", "org.jeecg"},exclude = QuartzAutoConfiguration.class)
@EnableFeignClients(basePackages = {"com.renkang", "org.jeecg"}) @EnableFeignClients(basePackages = {"com.renkang", "org.jeecg"})
public class HealthConsultationCloudApplication { public class HealthConsultationCloudApplication {
@@ -613,7 +613,7 @@ public class AsyncImportService {
queryWrapper.eq(WatchBindHis::getWatchNo,device.getWatchNo()); queryWrapper.eq(WatchBindHis::getWatchNo,device.getWatchNo());
queryWrapper.isNull(WatchBindHis::getBindEndDate); queryWrapper.isNull(WatchBindHis::getBindEndDate);
queryWrapper.orderByDesc(WatchBindHis::getCreateDate); queryWrapper.orderByDesc(WatchBindHis::getCreateDate);
queryWrapper.last("limit 1"); queryWrapper.last("FETCH FIRST 1 ROWS ONLY");
//解绑 //解绑
WatchBindHis updateHis = watchBindHisMapper.selectOne(queryWrapper); WatchBindHis updateHis = watchBindHisMapper.selectOne(queryWrapper);
//修改绑定用户 //修改绑定用户
@@ -251,7 +251,7 @@ public class SyncUserStatJob {
.isNotNull(WatchDataStepsHf::getStepCount) .isNotNull(WatchDataStepsHf::getStepCount)
.gt(WatchDataStepsHf::getStepCount, 0) .gt(WatchDataStepsHf::getStepCount, 0)
.orderByDesc(WatchDataStepsHf::getStepCount) .orderByDesc(WatchDataStepsHf::getStepCount)
.last("limit 1"); .last("FETCH FIRST 1 ROWS ONLY");
WatchDataStepsHf latest = watchDataStepsHfServiceService.getOne(queryWrapper); WatchDataStepsHf latest = watchDataStepsHfServiceService.getOne(queryWrapper);
if (ObjectUtil.isNull(latest)) { if (ObjectUtil.isNull(latest)) {
return; return;
@@ -306,21 +306,21 @@ public class SyncUserStatJob {
queryWrapper.isNotNull(WatchDataSteps::getDataValue); queryWrapper.isNotNull(WatchDataSteps::getDataValue);
queryWrapper.gt(WatchDataSteps::getDataValue, 0); queryWrapper.gt(WatchDataSteps::getDataValue, 0);
queryWrapper.orderByDesc(WatchDataSteps::getMaxId); queryWrapper.orderByDesc(WatchDataSteps::getMaxId);
queryWrapper.last("limit 1"); queryWrapper.last("FETCH FIRST 1 ROWS ONLY");
WatchDataSteps list = watchDataStepsService.getOne(queryWrapper); WatchDataSteps list = watchDataStepsService.getOne(queryWrapper);
LambdaQueryWrapper<WatchDataDistance> watchDataDistanceQueryWrapper = getQueryWrapper(userId, dateStr); LambdaQueryWrapper<WatchDataDistance> watchDataDistanceQueryWrapper = getQueryWrapper(userId, dateStr);
watchDataDistanceQueryWrapper.gt(WatchDataDistance::getDataValue, 0); watchDataDistanceQueryWrapper.gt(WatchDataDistance::getDataValue, 0);
watchDataDistanceQueryWrapper.isNotNull(WatchDataDistance::getDataValue); watchDataDistanceQueryWrapper.isNotNull(WatchDataDistance::getDataValue);
watchDataDistanceQueryWrapper.orderByDesc(WatchDataDistance::getMaxId); watchDataDistanceQueryWrapper.orderByDesc(WatchDataDistance::getMaxId);
watchDataDistanceQueryWrapper.last("limit 1"); watchDataDistanceQueryWrapper.last("FETCH FIRST 1 ROWS ONLY");
WatchDataDistance watchDataDistanceList = watchDataDistanceService.getOne(watchDataDistanceQueryWrapper); WatchDataDistance watchDataDistanceList = watchDataDistanceService.getOne(watchDataDistanceQueryWrapper);
LambdaQueryWrapper<WatchDataCalorie> watchDataCalorieQueryWrapper = getQueryWrapper(userId, dateStr); LambdaQueryWrapper<WatchDataCalorie> watchDataCalorieQueryWrapper = getQueryWrapper(userId, dateStr);
watchDataCalorieQueryWrapper.gt(WatchDataCalorie::getDataValue, 0); watchDataCalorieQueryWrapper.gt(WatchDataCalorie::getDataValue, 0);
watchDataCalorieQueryWrapper.isNotNull(WatchDataCalorie::getDataValue); watchDataCalorieQueryWrapper.isNotNull(WatchDataCalorie::getDataValue);
watchDataCalorieQueryWrapper.orderByDesc(WatchDataCalorie::getMaxId); watchDataCalorieQueryWrapper.orderByDesc(WatchDataCalorie::getMaxId);
watchDataCalorieQueryWrapper.last("limit 1"); watchDataCalorieQueryWrapper.last("FETCH FIRST 1 ROWS ONLY");
WatchDataCalorie watchDataCalorieList = watchDataCalorieService.getOne(watchDataCalorieQueryWrapper); WatchDataCalorie watchDataCalorieList = watchDataCalorieService.getOne(watchDataCalorieQueryWrapper);
if (ObjectUtil.isNull(list) && ObjectUtil.isNull(watchDataDistanceList) && ObjectUtil.isNull(watchDataCalorieList)) { if (ObjectUtil.isNull(list) && ObjectUtil.isNull(watchDataDistanceList) && ObjectUtil.isNull(watchDataCalorieList)) {
@@ -833,7 +833,9 @@ public class SyncUserStatJob {
rate.setSilenceMinValue((int) silenceMin); rate.setSilenceMinValue((int) silenceMin);
rate.setSilenceAvgValue((int) silenceSize); rate.setSilenceAvgValue((int) silenceSize);
rate.setNewValue(currentDataValue.intValue()); rate.setNewValue(currentDataValue.intValue());
rate.setSilenceNewValue(watchDataHeartRate.getSilenceValue().intValue()); if(watchDataHeartRate.getSilenceValue() != null){
rate.setSilenceNewValue(watchDataHeartRate.getSilenceValue().intValue());
}
rate.setLastUploadTime(watchDataHeartRate.getTimeStamp()); rate.setLastUploadTime(watchDataHeartRate.getTimeStamp());
SyncUserStatJob bean = SpringContextUtils.getBean(SyncUserStatJob.class); SyncUserStatJob bean = SpringContextUtils.getBean(SyncUserStatJob.class);
@@ -928,7 +930,7 @@ public class SyncUserStatJob {
LambdaQueryWrapper<WatchDevice> deviceWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<WatchDevice> deviceWrapper = new LambdaQueryWrapper<>();
deviceWrapper.eq(WatchDevice::getBindUserId, user.getId()); deviceWrapper.eq(WatchDevice::getBindUserId, user.getId());
deviceWrapper.orderByDesc(WatchDevice::getBindDate); deviceWrapper.orderByDesc(WatchDevice::getBindDate);
deviceWrapper.last("limit 1"); deviceWrapper.last("FETCH FIRST 1 ROWS ONLY");
WatchDevice watchDevice = watchDeviceMapper.selectOne(deviceWrapper); WatchDevice watchDevice = watchDeviceMapper.selectOne(deviceWrapper);
if (watchDevice != null) { if (watchDevice != null) {
watchData.setWatchNo(watchDevice.getWatchNo()); watchData.setWatchNo(watchDevice.getWatchNo());
+2 -2
View File
@@ -50,7 +50,7 @@
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId> <artifactId>spring-boot-maven-plugin</artifactId>
</plugin> </plugin>
<plugin> <!--<plugin>
<groupId>com.google.cloud.tools</groupId> <groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId> <artifactId>jib-maven-plugin</artifactId>
<version>3.4.0</version> <version>3.4.0</version>
@@ -87,7 +87,7 @@
</container> </container>
</configuration> </configuration>
</plugin> </plugin>-->
</plugins> </plugins>
</build> </build>
</profile> </profile>
+2 -2
View File
@@ -699,10 +699,10 @@
</nonFilteredFileExtensions> </nonFilteredFileExtensions>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <!--<plugin>
<groupId>pl.project13.maven</groupId> <groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId> <artifactId>git-commit-id-plugin</artifactId>
</plugin> </plugin>-->
</plugins> </plugins>
<resources> <resources>
<resource> <resource>