mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-09-24 07:19:46 +08:00
@ -97,7 +97,7 @@ public class SysClientController extends BaseController {
|
||||
@Log(title = "客户端管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/changeStatus")
|
||||
public R<Void> changeStatus(@RequestBody SysClientBo bo) {
|
||||
return toAjax(sysClientService.updateUserStatus(bo.getClientId(), bo.getStatus()));
|
||||
return toAjax(sysClientService.updateClientStatus(bo.getClientId(), bo.getStatus()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -218,7 +218,7 @@ public class SysUserController extends BaseController {
|
||||
@GetMapping("/optionselect")
|
||||
public R<List<SysUserVo>> optionselect(@RequestParam(required = false) Long[] userIds,
|
||||
@RequestParam(required = false) Long deptId) {
|
||||
return R.ok(userService.selectUserByIds(userIds == null ? null : List.of(userIds), deptId));
|
||||
return R.ok(userService.selectUserByIds(ArrayUtil.isEmpty(userIds) ? null : List.of(userIds), deptId));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -50,7 +50,7 @@ public interface ISysClientService {
|
||||
/**
|
||||
* 修改状态
|
||||
*/
|
||||
int updateUserStatus(String clientId, String status);
|
||||
int updateClientStatus(String clientId, String status);
|
||||
|
||||
/**
|
||||
* 校验并批量删除客户端管理信息
|
||||
|
@ -123,7 +123,7 @@ public class SysClientServiceImpl implements ISysClientService {
|
||||
*/
|
||||
@CacheEvict(cacheNames = CacheNames.SYS_CLIENT, key = "#clientId")
|
||||
@Override
|
||||
public int updateUserStatus(String clientId, String status) {
|
||||
public int updateClientStatus(String clientId, String status) {
|
||||
return baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<SysClient>()
|
||||
.set(SysClient::getStatus, status)
|
||||
|
@ -110,7 +110,7 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
|
||||
.setName(dept.getDeptName())
|
||||
.setWeight(dept.getOrderNum())
|
||||
.putExtra("disabled", SystemConstants.DISABLE.equals(dept.getStatus())));
|
||||
Tree<Long> tree = trees.stream().filter(it -> it.getId().longValue() == d.getDeptId()).findFirst().get();
|
||||
Tree<Long> tree = StreamUtils.findFirst(trees, it -> it.getId().longValue() == d.getDeptId());
|
||||
treeList.add(tree);
|
||||
}
|
||||
}
|
||||
|
@ -118,8 +118,7 @@ public class SysLogininforServiceImpl implements ISysLogininforService {
|
||||
.between(params.get("beginTime") != null && params.get("endTime") != null,
|
||||
SysLogininfor::getLoginTime, params.get("beginTime"), params.get("endTime"));
|
||||
if (StringUtils.isBlank(pageQuery.getOrderByColumn())) {
|
||||
pageQuery.setOrderByColumn("info_id");
|
||||
pageQuery.setIsAsc("desc");
|
||||
lqw.orderByDesc(SysLogininfor::getInfoId);
|
||||
}
|
||||
Page<SysLogininforVo> page = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(page);
|
||||
|
@ -53,8 +53,7 @@ public class SysOperLogServiceImpl implements ISysOperLogService {
|
||||
public TableDataInfo<SysOperLogVo> selectPageOperLogList(SysOperLogBo operLog, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<SysOperLog> lqw = buildQueryWrapper(operLog);
|
||||
if (StringUtils.isBlank(pageQuery.getOrderByColumn())) {
|
||||
pageQuery.setOrderByColumn("oper_id");
|
||||
pageQuery.setIsAsc("desc");
|
||||
lqw.orderByDesc(SysOperLog::getOperId);
|
||||
}
|
||||
Page<SysOperLogVo> page = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(page);
|
||||
|
Reference in New Issue
Block a user