| | |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.domain.ArchiveRecords; |
| | | import com.ruoyi.domain.Archiverecordstouser; |
| | | import com.ruoyi.domain.vo.AnalysisResult; |
| | | import com.ruoyi.domain.vo.ArchiveInfoVo; |
| | | import com.ruoyi.domain.vo.ArchiveRecordSmall; |
| | | import com.ruoyi.mapper.ArchiveRecordsMapper; |
| | | import com.ruoyi.mapper.ArchiverecordstouserMapper; |
| | | import com.ruoyi.service.IArchiveRecordsService; |
| | | import com.ruoyi.service.IArchiverecordstouserService; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | // @Autowired |
| | | // private ArchiveRecordsMapper archiveRecordsMapper; |
| | | |
| | | |
| | | @Autowired |
| | | private IArchiverecordstouserService archiverecordstouserService; |
| | | @Autowired |
| | | private ArchiverecordstouserMapper archiverecordstouserMapper; |
| | | |
| | |
| | | |
| | | @Override |
| | | public int updateArchiveById(String status, Long id) { |
| | | |
| | | // 获取当前用户ID |
| | | Long userId = SecurityUtils.getUserId(); |
| | | // 可以在这里使用userId进行授权操作 |
| | | archiverecordstouserService.deleteArchiverecordstouserByRecordId(id, userId); |
| | | this.baseMapper.updateStatusById(status, id); |
| | | return 0; |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public AjaxResult mySave(ArchiveRecords archiveRecords) { |
| | | |
| | | |
| | | //检查是否有重复数据插入 |
| | | // 检查是否有重复数据插入 |
| | | LambdaQueryWrapper<ArchiveRecords> lqw = new LambdaQueryWrapper<>(); |
| | | lqw.eq(!StringUtils.isEmpty(archiveRecords.getRecordId()), ArchiveRecords::getRecordId,archiveRecords.getRecordId()); |
| | | List<ArchiveRecords> list = list(lqw); |
| | |
| | | return this.baseMapper.whether(recordId); |
| | | } |
| | | } |
| | | |