Browse Source

feat: [用户管理] 角色变更历史

master
memorylkf 2 months ago
parent
commit
b95e305e90
2 changed files with 9 additions and 19 deletions
  1. +5
    -19
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/RoleChangeController.java
  2. +4
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/RoleChangeServiceImpl.java

+ 5
- 19
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/RoleChangeController.java View File

@ -2,6 +2,8 @@ package com.hxhq.business.controller;
import java.util.Arrays;
import java.util.List;
import com.hxhq.common.security.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.hxhq.business.domain.RoleChange;
@ -28,6 +30,7 @@ public class RoleChangeController extends BaseController
* 查询角色变更历史列表
*/
@GetMapping("/list")
@RequiresPermissions("system:user:roleChange")
public TableDataInfo list(RoleChange roleChange)
{
startPage();
@ -36,29 +39,12 @@ public class RoleChangeController extends BaseController
}
/**
* 获取角色变更历史详细信息
*/
@GetMapping(value = "/info")
public AjaxResult getInfo(Long id)
{
return AjaxResult.success(roleChangeService.getById(id));
}
/**
* 新增角色变更历史信息
*/
@PostMapping("/save")
@PostMapping("/export")
@RequiresPermissions("system:user:roleChange")
public AjaxResult save(@RequestBody RoleChange roleChange)
{
return toAjax(roleChangeService.saveOrUpdate(roleChange));
}
/**
* 删除角色变更历史信息
*/
@PostMapping("/delete")
public AjaxResult delete(@RequestBody Long[] ids)
{
return toAjax(roleChangeService.removeByIds(Arrays.asList(ids)));
}
}

+ 4
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/RoleChangeServiceImpl.java View File

@ -30,6 +30,10 @@ public class RoleChangeServiceImpl extends ServiceImpl
public List<RoleChange> queryList(RoleChange roleChange)
{
QueryWrapper<RoleChange> queryWrapper = Wrappers.query();
if(roleChange.getUserId()!=null && roleChange.getUserId().longValue()>0){
queryWrapper.eq("user_id",roleChange.getUserId());
}
queryWrapper.orderByDesc("id");
return this.list(queryWrapper);
}

Loading…
Cancel
Save