| | |
| | | import org.springblade.core.tool.utils.SpringUtil; |
| | | import org.springblade.modules.backblast.entity.BackblastPubPersonEntity; |
| | | import org.springblade.modules.backblast.entity.BackblastPubRecordEntity; |
| | | import org.springblade.modules.backblast.excel.BackblastPubRecordExcel; |
| | | import org.springblade.modules.backblast.service.IBackblastPubPersonService; |
| | | import org.springblade.modules.backblast.vo.BackblastPubRecordVO; |
| | | import org.springblade.modules.backblast.mapper.BackblastPubRecordMapper; |
| | |
| | | public BackblastPubRecordVO getDetail(BackblastPubRecordVO backblastPubRecord) { |
| | | return baseMapper.getDetail(backblastPubRecord); |
| | | } |
| | | |
| | | /** |
| | | * 反炸宣传记录表 删除 |
| | | */ |
| | | @Override |
| | | public boolean removeBackblastPubByIds(List<Long> toLongList) { |
| | | // 先删除对应的宣传记录 |
| | | boolean flag = removeByIds(toLongList); |
| | | // 再删除对应的宣传对象信息 |
| | | if (flag){ |
| | | IBackblastPubPersonService backblastPubPersonService = SpringUtil.getBean(IBackblastPubPersonService.class); |
| | | for (Long id : toLongList) { |
| | | // 删除所有 |
| | | QueryWrapper<BackblastPubPersonEntity> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("backblast_pub_record_id", id); |
| | | backblastPubPersonService.remove(wrapper); |
| | | } |
| | | } |
| | | return flag; |
| | | } |
| | | |
| | | @Override |
| | | public List<BackblastPubRecordExcel> export(BackblastPubRecordVO backblastPubRecord) { |
| | | CommonParamSet commonParamSet = new CommonParamSet<>().invoke(BackblastPubRecordVO.class, backblastPubRecord); |
| | | if (!Strings.isBlank(backblastPubRecord.getRoleName())){ |
| | | backblastPubRecord.setCreateUser(AuthUtil.getUserId()); |
| | | } |
| | | return baseMapper.selectBackblastPubRecordExport(backblastPubRecord, |
| | | commonParamSet.getIsAdministrator(), |
| | | commonParamSet.getRegionChildCodesList(), |
| | | commonParamSet.getGridCodeList()); |
| | | } |
| | | } |