From c9e48bd2dff2b5766589024cf7264189b5f2a05c Mon Sep 17 00:00:00 2001 From: dengzedong <dengzedong@email> Date: 星期五, 03 一月 2025 14:03:33 +0800 Subject: [PATCH] cpp释放java占用内存 --- iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/service/impl/StScheduleSchemeServiceImpl.java | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-) diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/service/impl/StScheduleSchemeServiceImpl.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/service/impl/StScheduleSchemeServiceImpl.java index bb3ddd6..b395057 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/service/impl/StScheduleSchemeServiceImpl.java +++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/service/impl/StScheduleSchemeServiceImpl.java @@ -1,5 +1,6 @@ package com.iailab.module.model.mcs.sche.service.impl; +import com.baomidou.dynamic.datasource.annotation.DSTransactional; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.iailab.framework.common.pojo.PageResult; import com.iailab.framework.common.service.impl.BaseServiceImpl; @@ -14,6 +15,7 @@ import com.iailab.module.model.mcs.sche.vo.StScheduleSchemePageReqVO; import com.iailab.module.model.mcs.sche.vo.StScheduleSchemeSaveReqVO; import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; import java.util.*; @@ -77,4 +79,32 @@ entity.setScheduleTime(scheduleTime); baseDao.updateById(entity); } + + @Override + @DSTransactional(rollbackFor = Exception.class) + public void enableByIds(String[] ids) { + if (CollectionUtils.isEmpty(Arrays.asList(ids))) { + return; + } + Arrays.asList(ids).forEach(item -> { + StScheduleSchemeEntity entity = new StScheduleSchemeEntity(); + entity.setId(item); + entity.setStatus(0); + baseDao.updateById(entity); + }); + } + + @Override + @DSTransactional(rollbackFor = Exception.class) + public void disableByIds(String[] ids) { + if (CollectionUtils.isEmpty(Arrays.asList(ids))) { + return; + } + Arrays.asList(ids).forEach(item -> { + StScheduleSchemeEntity entity = new StScheduleSchemeEntity(); + entity.setId(item); + entity.setStatus(1); + baseDao.updateById(entity); + }); + } } -- Gitblit v1.9.3