puzhibing
2023-08-16 d5b3e5a413bcfccba294793ee093722f31b2448a
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TSystemBulletinUserServiceImpl.java
@@ -1,10 +1,15 @@
package com.stylefeng.guns.modular.system.service.impl;
import com.stylefeng.guns.modular.system.model.TSystemBulletinUser;
import com.stylefeng.guns.modular.system.dao.TSystemBulletinUserMapper;
import com.stylefeng.guns.modular.system.service.ITSystemBulletinUserService;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.stylefeng.guns.modular.system.dao.TSystemBulletinUserMapper;
import com.stylefeng.guns.modular.system.enums.StatusEnum;
import com.stylefeng.guns.modular.system.model.TSystemBulletinUser;
import com.stylefeng.guns.modular.system.service.ITSystemBulletinUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
 * <p>
@@ -17,4 +22,13 @@
@Service
public class TSystemBulletinUserServiceImpl extends ServiceImpl<TSystemBulletinUserMapper, TSystemBulletinUser> implements ITSystemBulletinUserService {
    @Autowired
    private TSystemBulletinUserMapper tSystemBulletinUserMapper;
    @Override
    public void deleteBulletinUser(Integer bulletinId) {
        List<TSystemBulletinUser> tSystemBulletinUsers = tSystemBulletinUserMapper.selectList(new EntityWrapper<TSystemBulletinUser>().eq("systemBulletinId", bulletinId));
        tSystemBulletinUsers.forEach(bulletin->bulletin.setStatus(StatusEnum.DELETE.getCode()));
        this.updateBatchById(tSystemBulletinUsers);
    }
}