diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/RoleChangeController.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/RoleChangeController.java index dca3ce4..9a932dd 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/RoleChangeController.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/RoleChangeController.java @@ -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))); - } } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/RoleChangeServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/RoleChangeServiceImpl.java index e467e11..dcb6afe 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/RoleChangeServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/RoleChangeServiceImpl.java @@ -30,6 +30,10 @@ public class RoleChangeServiceImpl extends ServiceImpl queryList(RoleChange roleChange) { QueryWrapper queryWrapper = Wrappers.query(); + if(roleChange.getUserId()!=null && roleChange.getUserId().longValue()>0){ + queryWrapper.eq("user_id",roleChange.getUserId()); + } + queryWrapper.orderByDesc("id"); return this.list(queryWrapper); }