| | |
| | | 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; |
| | |
| | | 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.*; |
| | | |
| | |
| | | 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); |
| | | }); |
| | | } |
| | | } |