|
@@ -23,6 +23,8 @@ import vip.xiaonuo.disk.mapper.UserFileMapper;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
+import vip.xiaonuo.disk.util.PageQuery;
|
|
|
|
|
+import vip.xiaonuo.disk.util.TableDataInfo;
|
|
|
import vip.xiaonuo.disk.vo.storage.CapacityAuditInfoVo;
|
|
import vip.xiaonuo.disk.vo.storage.CapacityAuditInfoVo;
|
|
|
import vip.xiaonuo.disk.vo.storage.StorageBeanVO;
|
|
import vip.xiaonuo.disk.vo.storage.StorageBeanVO;
|
|
|
|
|
|
|
@@ -129,9 +131,11 @@ public class StorageService extends ServiceImpl<StorageMapper, StorageBean> impl
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public CommonResult<Page<StorageBeanVO>> getUserStorageList(GetUserStorageDTO getUserStorageDTO) {
|
|
|
|
|
- Page<StorageBeanVO> page = new Page<>(getUserStorageDTO.getCurrent(), getUserStorageDTO.getSize());
|
|
|
|
|
- Page<StorageBeanVO> storageBeanList = storageMapper.getUserStorageList(page, getUserStorageDTO);
|
|
|
|
|
|
|
+ public CommonResult<TableDataInfo<StorageBeanVO>> getUserStorageList(GetUserStorageDTO getUserStorageDTO) {
|
|
|
|
|
+ PageQuery pageQuery = new PageQuery();
|
|
|
|
|
+ pageQuery.setPageNum(getUserStorageDTO.getPageNum());
|
|
|
|
|
+ pageQuery.setPageSize(getUserStorageDTO.getPageSize());
|
|
|
|
|
+ Page<StorageBeanVO> storageBeanList = storageMapper.getUserStorageList(pageQuery.build(), getUserStorageDTO);
|
|
|
if (storageBeanList.getRecords() != null && storageBeanList.getSize() > 0) {
|
|
if (storageBeanList.getRecords() != null && storageBeanList.getSize() > 0) {
|
|
|
// 如果查出的数据不为空,关联用户的角色
|
|
// 如果查出的数据不为空,关联用户的角色
|
|
|
for (StorageBeanVO storageBean : storageBeanList.getRecords()) {
|
|
for (StorageBeanVO storageBean : storageBeanList.getRecords()) {
|
|
@@ -142,7 +146,7 @@ public class StorageService extends ServiceImpl<StorageMapper, StorageBean> impl
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- return CommonResult.data(storageBeanList);
|
|
|
|
|
|
|
+ return CommonResult.data(TableDataInfo.build(storageBeanList));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -214,10 +218,12 @@ public class StorageService extends ServiceImpl<StorageMapper, StorageBean> impl
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public CommonResult<IPage<CapacityAuditInfoVo>> getCapacityAuditList(Page<Object> objectPage, Integer auditState, String usernameOrNickname) {
|
|
|
|
|
|
|
+ public CommonResult<TableDataInfo<CapacityAuditInfoVo>> getCapacityAuditList(Integer pageNum, Integer pageSize, Integer auditState, String usernameOrNickname) {
|
|
|
// 查询审核列表
|
|
// 查询审核列表
|
|
|
- Page<CapacityAuditInfoVo> page = new Page<>(objectPage.getCurrent(), objectPage.getSize());
|
|
|
|
|
- Page<CapacityAuditInfoVo> capacityAuditInfos = capacityAuditInfoMapper.getCapacityAuditList(page, auditState, usernameOrNickname);
|
|
|
|
|
|
|
+ PageQuery pageQuery = new PageQuery();
|
|
|
|
|
+ pageQuery.setPageNum(pageNum);
|
|
|
|
|
+ pageQuery.setPageSize(pageSize);
|
|
|
|
|
+ Page<CapacityAuditInfoVo> capacityAuditInfos = capacityAuditInfoMapper.getCapacityAuditList(pageQuery.build(), auditState, usernameOrNickname);
|
|
|
// 关联申请人的角色
|
|
// 关联申请人的角色
|
|
|
if (capacityAuditInfos.getRecords().size() > 0) {
|
|
if (capacityAuditInfos.getRecords().size() > 0) {
|
|
|
for (CapacityAuditInfoVo record : capacityAuditInfos.getRecords()) {
|
|
for (CapacityAuditInfoVo record : capacityAuditInfos.getRecords()) {
|
|
@@ -228,7 +234,7 @@ public class StorageService extends ServiceImpl<StorageMapper, StorageBean> impl
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- return CommonResult.data(capacityAuditInfos);
|
|
|
|
|
|
|
+ return CommonResult.data(TableDataInfo.build(capacityAuditInfos));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -285,11 +291,13 @@ public class StorageService extends ServiceImpl<StorageMapper, StorageBean> impl
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public CommonResult<IPage<CapacityAuditInfoVo>> getUserCapacityAuditList(Page<Object> objectPage, Integer auditState) {
|
|
|
|
|
|
|
+ public CommonResult<TableDataInfo<CapacityAuditInfoVo>> getUserCapacityAuditList(Integer pageNum, Integer pageSize, Integer auditState) {
|
|
|
// 查询审核列表
|
|
// 查询审核列表
|
|
|
- Page<CapacityAuditInfoVo> page = new Page<>(objectPage.getCurrent(), objectPage.getSize());
|
|
|
|
|
|
|
+ PageQuery pageQuery = new PageQuery();
|
|
|
|
|
+ pageQuery.setPageNum(pageNum);
|
|
|
|
|
+ pageQuery.setPageSize(pageSize);
|
|
|
String id = StpLoginUserUtil.getLoginUser().getId();
|
|
String id = StpLoginUserUtil.getLoginUser().getId();
|
|
|
- Page<CapacityAuditInfoVo> capacityAuditInfos = capacityAuditInfoMapper.getUserCapacityAuditList(page, auditState, id);
|
|
|
|
|
|
|
+ Page<CapacityAuditInfoVo> capacityAuditInfos = capacityAuditInfoMapper.getUserCapacityAuditList(pageQuery.build(), auditState, id);
|
|
|
// 关联申请人的角色
|
|
// 关联申请人的角色
|
|
|
if (capacityAuditInfos.getRecords().size() > 0) {
|
|
if (capacityAuditInfos.getRecords().size() > 0) {
|
|
|
for (CapacityAuditInfoVo record : capacityAuditInfos.getRecords()) {
|
|
for (CapacityAuditInfoVo record : capacityAuditInfos.getRecords()) {
|
|
@@ -300,7 +308,7 @@ public class StorageService extends ServiceImpl<StorageMapper, StorageBean> impl
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- return CommonResult.data(capacityAuditInfos);
|
|
|
|
|
|
|
+ return CommonResult.data(TableDataInfo.build(capacityAuditInfos));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|