package org.jeecg.modules.system.service.impl;

import org.jeecg.modules.system.entity.MaterialBag;
import org.jeecg.modules.system.mapper.MaterialBagMapper;
import org.jeecg.modules.system.service.IMaterialBagService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

/**
 * @Description: 资料袋
 * @Author: jeecg-boot
 * @Date:   2023-11-20
 * @Version: V1.0
 */
@Service
public class MaterialBagServiceImpl extends ServiceImpl<MaterialBagMapper, MaterialBag> implements IMaterialBagService {

    @Autowired
    private  IMaterialBagService materialBagService;


    @Override
    public void cancel(List<String> ids) {
        List<MaterialBag> materialBags = materialBagService.listByIds(ids);
        materialBags.stream().forEach(materialBag -> {
            materialBag.setStatus(2);
        });
        materialBagService.updateBatchById(materialBags);
    }
}
