| | |
| | | // .eq(zfProperty.getHappenTime()!=null,ZfProperty::getHappenTime,zfProperty.getHappenTime()) |
| | | // .between(zfProperty.getHappenStartTime() != null && zfProperty.getHappenEndTime() != null, ZfProperty::getHappenTime, zfProperty.getHappenStartTime(), zfProperty.getHappenEndTime()); |
| | | // lqw.orderByDesc(ZfProperty::getCreateTime); |
| | | if(userId==1) |
| | | if(archiveRecords.getOrderByColumn()==null) { |
| | | if (userId == 1) |
| | | |
| | | lqw.orderByDesc(ArchiveRecords::getCreateTime); |
| | | lqw.orderByDesc(ArchiveRecords::getCreateTime); |
| | | }else |
| | | { |
| | | System.out.println(archiveRecords.getOrderByColumn()); |
| | | if("recordId".equals(archiveRecords.getOrderByColumn())) { |
| | | if (archiveRecords.getIsAsc().equals("asc")) |
| | | lqw.orderByAsc(ArchiveRecords::getRecordId); |
| | | else |
| | | lqw.orderByDesc(ArchiveRecords::getRecordId); |
| | | } |
| | | if("recordStatus".equals(archiveRecords.getOrderByColumn())) |
| | | { |
| | | if (archiveRecords.getIsAsc().equals("asc")) |
| | | lqw.orderByAsc(ArchiveRecords::getRecordStatus); |
| | | else |
| | | lqw.orderByDesc(ArchiveRecords::getRecordStatus); |
| | | } |
| | | } |
| | | // else |
| | | // lqw.eq(userId!=null, ArchiveRecords::getUserId, userId); |
| | | System.out.println("ssssssssssssddd0000000000000000"); |
| | |
| | | |
| | | @Override |
| | | public int updateArchiveById(String status, Long id) { |
| | | LocalDateTime time = LocalDateTime.now(); |
| | | |
| | | Date date = Date.from(time.atZone(ZoneId.systemDefault()).toInstant()); |
| | | // 获取当前用户ID |
| | | Long userId = SecurityUtils.getUserId(); |
| | | // 可以在这里使用userId进行授权操作 |
| | | archiverecordstouserService.deleteArchiverecordstouserByRecordId(id, userId); |
| | | this.baseMapper.updateStatusById(status, id); |
| | | this.baseMapper.updateStatusById(status, id, date); |
| | | return 0; |
| | | } |
| | | |
| | | @Override |
| | | public int updateStatusByIds(Long[] ids) { |
| | | LocalDateTime time = LocalDateTime.now(); |
| | | |
| | | Date date = Date.from(time.atZone(ZoneId.systemDefault()).toInstant()); |
| | | for(Long id : ids) |
| | | this.baseMapper.updateStatusById("录入完成",id); |
| | | this.baseMapper.updateStatusById("录入完成",id, date); |
| | | return 0; |
| | | } |
| | | |