【还原】还原类型强转

【还原】还原类型强转
pull/150/head
eddy 3 years ago
parent d2aadc520c
commit 957d05159a

@ -29,7 +29,7 @@ public class PermissionServiceImpl implements PermissionService {
@Override
public IPage<PermissionRespDTO> listPermission(int pageNo, int pageSize) {
PermissionQueryPageReqDTO queryPage = new PermissionQueryPageReqDTO(pageNo, pageSize);
IPage<PermissionInfo> selectPage = permissionMapper.selectPage((IPage)queryPage, null);
IPage<PermissionInfo> selectPage = permissionMapper.selectPage(queryPage, null);
return selectPage.convert(each -> BeanUtil.toBean(each, PermissionRespDTO.class));
}

@ -36,7 +36,7 @@ public class RoleServiceImpl implements RoleService {
@Override
public IPage<RoleRespDTO> listRole(int pageNo, int pageSize) {
RoleQueryPageReqDTO queryPage = new RoleQueryPageReqDTO(pageNo, pageSize);
IPage<RoleInfo> selectPage = roleMapper.selectPage((IPage)queryPage, null);
IPage<RoleInfo> selectPage = roleMapper.selectPage(queryPage, null);
return selectPage.convert(each -> BeanUtil.toBean(each, RoleRespDTO.class));
}

@ -44,7 +44,7 @@ public class UserServiceImpl implements UserService {
public IPage<UserRespDTO> listUser(UserQueryPageReqDTO reqDTO) {
LambdaQueryWrapper<UserInfo> queryWrapper = Wrappers.lambdaQuery(UserInfo.class)
.eq(StringUtil.isNotBlank(reqDTO.getUserName()), UserInfo::getUserName, reqDTO.getUserName());
IPage<UserInfo> selectPage = userMapper.selectPage((IPage)reqDTO, queryWrapper);
IPage<UserInfo> selectPage = userMapper.selectPage(reqDTO, queryWrapper);
return selectPage.convert(each -> BeanUtil.toBean(each, UserRespDTO.class));
}

@ -46,7 +46,7 @@ public class ItemServiceImpl implements ItemService {
.eq(!StringUtils.isEmpty(reqDTO.getTenantId()), ItemInfo::getTenantId, reqDTO.getTenantId())
.eq(!StringUtils.isEmpty(reqDTO.getOwner()), ItemInfo::getOwner, reqDTO.getOwner());
Page<ItemInfo> resultPage = itemInfoMapper.selectPage((Page)reqDTO, wrapper);
Page<ItemInfo> resultPage = itemInfoMapper.selectPage(reqDTO, wrapper);
return resultPage.convert(each -> BeanUtil.convert(each, ItemRespDTO.class));
}

@ -32,7 +32,7 @@ public class LogRecordBizServiceImpl implements LogRecordBizService {
.eq(StrUtil.isNotBlank(pageQuery.getCategory()), LogRecordInfo::getCategory, pageQuery.getCategory())
.eq(StrUtil.isNotBlank(pageQuery.getOperator()), LogRecordInfo::getOperator, pageQuery.getOperator())
.orderByDesc(LogRecordInfo::getCreateTime);
IPage<LogRecordInfo> selectPage = logRecordMapper.selectPage((IPage)pageQuery, queryWrapper);
IPage<LogRecordInfo> selectPage = logRecordMapper.selectPage(pageQuery, queryWrapper);
return selectPage.convert(each -> BeanUtil.convert(each, LogRecordRespDTO.class));
}

@ -63,7 +63,7 @@ public class NotifyServiceImpl implements NotifyService {
.eq(StrUtil.isNotBlank(reqDTO.getTpId()), NotifyInfo::getTpId, reqDTO.getTpId())
.orderByDesc(NotifyInfo::getGmtCreate);
IPage<NotifyInfo> resultPage = notifyInfoMapper.selectPage((IPage)reqDTO, queryWrapper);
IPage<NotifyInfo> resultPage = notifyInfoMapper.selectPage(reqDTO, queryWrapper);
return resultPage.convert(each -> BeanUtil.convert(each, NotifyRespDTO.class));
}

@ -62,7 +62,7 @@ public class TenantServiceImpl implements TenantService {
.eq(!StringUtils.isEmpty(reqDTO.getTenantName()), TenantInfo::getTenantName, reqDTO.getTenantName())
.eq(!StringUtils.isEmpty(reqDTO.getOwner()), TenantInfo::getOwner, reqDTO.getOwner());
Page resultPage = tenantInfoMapper.selectPage((Page)reqDTO, wrapper);
Page resultPage = tenantInfoMapper.selectPage(reqDTO, wrapper);
return resultPage.convert(each -> BeanUtil.convert(each, TenantRespDTO.class));
}

@ -43,7 +43,7 @@ public class ThreadPoolServiceImpl implements ThreadPoolService {
.eq(ConfigAllInfo::getDelFlag, DelEnum.NORMAL)
.orderByDesc(ConfigAllInfo::getGmtCreate);
return configInfoMapper.selectPage((IPage)reqDTO, wrapper).convert(each -> BeanUtil.convert(each, ThreadPoolRespDTO.class));
return configInfoMapper.selectPage(reqDTO, wrapper).convert(each -> BeanUtil.convert(each, ThreadPoolRespDTO.class));
}
@Override

@ -47,7 +47,7 @@ public class ThreadPoolStatusHandler {
Method runStateAtLeast = ReflectUtil.getMethodByName(ThreadPoolExecutor.class, "runStateAtLeast");
cn.hippo4j.common.toolkit.ReflectUtil.setAccessible(runStateAtLeast);
int terminated = (int) ReflectUtil.getFieldValue(executor, "TERMINATED");
String resultStatus = (boolean)ReflectUtil.invoke(executor, runStateAtLeast, ctl.get(), terminated) ? TERMINATED : SHUTTING_DOWN;
String resultStatus = ReflectUtil.invoke(executor, runStateAtLeast, ctl.get(), terminated) ? TERMINATED : SHUTTING_DOWN;
return resultStatus;
} catch (Exception ex) {
log.error("Failed to get thread pool status.", ex);

Loading…
Cancel
Save