|
@@ -1,12 +1,17 @@
|
|
|
package com.fdkankan.fusion.service.impl;
|
|
|
|
|
|
+import cn.hutool.core.util.ObjUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.fdkankan.fusion.entity.SceneFileBuild;
|
|
|
import com.fdkankan.fusion.mapper.ISceneFileBuildMapper;
|
|
|
import com.fdkankan.fusion.service.ISceneFileBuildService;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.util.Date;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
|
|
@@ -19,6 +24,7 @@ import java.util.List;
|
|
|
* @since 2025-03-05
|
|
|
*/
|
|
|
@Service
|
|
|
+@Slf4j
|
|
|
public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper, SceneFileBuild> implements ISceneFileBuildService {
|
|
|
|
|
|
|
|
@@ -64,4 +70,23 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
|
|
|
|
|
|
return map;
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void updateTimeAndStatus(String sceneCode, int status, Date startTime, Date endTime, String buildType) {
|
|
|
+ LambdaUpdateWrapper<SceneFileBuild> wrapper = Wrappers.lambdaUpdate();
|
|
|
+ wrapper.eq(SceneFileBuild::getSceneNum, sceneCode);
|
|
|
+ wrapper.eq(SceneFileBuild::getBuildType, buildType);
|
|
|
+ wrapper.set(SceneFileBuild::getBuildStatus, status);
|
|
|
+ if (startTime != null) {
|
|
|
+ wrapper.set(SceneFileBuild::getStartBuildTime, startTime);
|
|
|
+ }
|
|
|
+ if (endTime != null) {
|
|
|
+ wrapper.set(SceneFileBuild::getEndBuildTime, endTime);
|
|
|
+ }
|
|
|
+ wrapper.isNull(SceneFileBuild::getDeleteFlag);
|
|
|
+ if (ObjUtil.isNotEmpty(sceneCode)){
|
|
|
+ boolean rows = update(wrapper); // 检查返回的影响行数
|
|
|
+ log.info("更新记录数: {}, sceneCode: {}, buildType: {}", rows, sceneCode, buildType);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|