吉安感知网项目-后端
xiebin
2026-01-19 4e48664942bbefe70699ca43d25cbbd56ecc8daa
drone-service/drone-fw/src/main/java/org/sxkj/fw/device/service/impl/FwDeviceMaintainPlanServiceImpl.java
@@ -16,6 +16,8 @@
 */
package org.sxkj.fw.device.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import org.sxkj.fw.device.dto.FwDeviceMaintainPlanDTO;
import org.sxkj.fw.device.entity.FwDeviceMaintainPlanEntity;
import org.sxkj.fw.device.vo.FwDeviceMaintainPlanVO;
@@ -58,4 +60,18 @@
      return fwDeviceMaintainPlanList;
   }
   @Override
   public void batchUpdateExpiredPlans(List<Long> planIds) {
      if (planIds == null || planIds.isEmpty()) {
         return;
      }
      // 构建更新条件
      LambdaUpdateWrapper<FwDeviceMaintainPlanEntity> updateWrapper = new LambdaUpdateWrapper<>();
      updateWrapper.in(FwDeviceMaintainPlanEntity::getId, planIds)
            .set(FwDeviceMaintainPlanEntity::getMaintainStatus, 0); // 未维护状态
      // 执行批量更新
      update(updateWrapper);
   }
}