refactor: 方法命名优化

This commit is contained in:
郝先瑞 2022-06-29 23:34:31 +08:00
parent 894c1ab9a1
commit 883bde7488
18 changed files with 28 additions and 28 deletions

View File

@ -28,15 +28,15 @@ public class SysDeptController {
@ApiOperation(value = "部门列表")
@GetMapping
public Result<List<DeptVO>> listDepartments(DeptQuery queryParams) {
List<DeptVO> list = deptService.listDepartments(queryParams);
public Result<List<DeptVO>> listDepts(DeptQuery queryParams) {
List<DeptVO> list = deptService.listDepts(queryParams);
return Result.success(list);
}
@ApiOperation(value = "部门下拉列表")
@GetMapping("/select_list")
public Result listTreeSelectDepartments() {
List<Option> list = deptService.listTreeSelectDepartments();
public Result lisetDeptOptions() {
List<Option> list = deptService.lisetDeptOptions();
return Result.success(list);
}

View File

@ -26,8 +26,8 @@ public class SysDictItemController {
@ApiOperation(value = "字典数据项分页列表")
@GetMapping
public PageResult<DictItemPageVO> listPageDictItems(DictItemPageQuery queryParams) {
Page<DictItemPageVO> result = dictItemService.listPageDictItems(queryParams);
public PageResult<DictItemPageVO> listDictItemPages(DictItemPageQuery queryParams) {
Page<DictItemPageVO> result = dictItemService.listDictItemPages(queryParams);
return PageResult.success(result);
}

View File

@ -23,8 +23,8 @@ public class SysDictTypeController {
@ApiOperation(value = "字典类型分页列表")
@GetMapping
public PageResult<DictTypePageVO> listPageDictTypes(DictTypePageQuery queryParams) {
Page<DictTypePageVO> result = dictTypeService.listPageDictTypes(queryParams);
public PageResult<DictTypePageVO> listDictTypePages(DictTypePageQuery queryParams) {
Page<DictTypePageVO> result = dictTypeService.listDictTypePages(queryParams);
return PageResult.success(result);
}

View File

@ -26,8 +26,8 @@ public class SysOauthClientController {
@ApiOperation(value = "客户端分页列表")
@GetMapping
public PageResult<ClientPageVO> listPageClients(ClientPageQuery queryParams) {
IPage<ClientPageVO> result = clientService.listPageClients(queryParams);
public PageResult<ClientPageVO> listClientPages(ClientPageQuery queryParams) {
IPage<ClientPageVO> result = clientService.listClientPages(queryParams);
return PageResult.success(result);
}

View File

@ -25,8 +25,8 @@ public class SysPermissionController {
@ApiOperation(value = "权限分页列表")
@GetMapping("/page")
public PageResult<PermPageVO> listPagePerms(PermPageQuery permPageQuery) {
IPage<PermPageVO> result = sysPermissionService.listPagePerms(permPageQuery);
public PageResult<PermPageVO> listPermPages(PermPageQuery permPageQuery) {
IPage<PermPageVO> result = sysPermissionService.listPermPages(permPageQuery);
return PageResult.success(result);
}

View File

@ -19,7 +19,7 @@ public interface SysPermissionMapper extends BaseMapper<SysPermission> {
* @param queryParams
* @return
*/
List<PermPageVO> listPagePerms(Page<PermPageVO> page, PermPageQuery queryParams);
List<PermPageVO> listPermPages(Page<PermPageVO> page, PermPageQuery queryParams);
/**
* 权限<->有权限的角色集合

View File

@ -15,7 +15,7 @@ public class ResourceVO {
@ApiModelProperty("菜单列表")
private List<MenuOption> menus;
@ApiModelProperty
@ApiModelProperty("按钮权限列表")
private List<PermOption> perms;
@Data

View File

@ -20,14 +20,14 @@ public interface SysDeptService extends IService<SysDept> {
*
* @return
*/
List<DeptVO> listDepartments(DeptQuery queryParams);
List<DeptVO> listDepts(DeptQuery queryParams);
/**
* 部门树形下拉TreeSelect层级列表
*
* @return
*/
List<Option> listTreeSelectDepartments();
List<Option> lisetDeptOptions();
/**
* 新增/修改部门

View File

@ -25,7 +25,7 @@ public interface SysDictItemService extends IService<SysDictItem> {
* @param queryParams
* @return
*/
Page<DictItemPageVO> listPageDictItems(DictItemPageQuery queryParams);
Page<DictItemPageVO> listDictItemPages(DictItemPageQuery queryParams);
/**
* 字典数据项表单详情

View File

@ -22,7 +22,7 @@ public interface SysDictTypeService extends IService<SysDictType> {
* @param queryParams 分页查询对象
* @return
*/
Page<DictTypePageVO> listPageDictTypes(DictTypePageQuery queryParams);
Page<DictTypePageVO> listDictTypePages(DictTypePageQuery queryParams);
/**

View File

@ -20,7 +20,7 @@ public interface SysOauthClientService extends IService<SysOauthClient> {
* @param queryParams
* @return
*/
IPage<ClientPageVO> listPageClients(ClientPageQuery queryParams);
IPage<ClientPageVO> listClientPages(ClientPageQuery queryParams);
void cleanCache();

View File

@ -42,5 +42,5 @@ public interface SysPermissionService extends IService<SysPermission> {
* @param permPageQuery
* @return
*/
IPage<PermPageVO> listPagePerms(PermPageQuery permPageQuery);
IPage<PermPageVO> listPermPages(PermPageQuery permPageQuery);
}

View File

@ -40,7 +40,7 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
* @return
*/
@Override
public List<DeptVO> listDepartments(DeptQuery queryParams) {
public List<DeptVO> listDepts(DeptQuery queryParams) {
// 查询参数
String keywords = queryParams.getKeywords();
Integer status = queryParams.getStatus();
@ -117,7 +117,7 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
* @return
*/
@Override
public List<Option> listTreeSelectDepartments() {
public List<Option> lisetDeptOptions() {
List<SysDept> deptList = this.list(new LambdaQueryWrapper<SysDept>()
.eq(SysDept::getStatus, GlobalConstants.STATUS_YES)
.orderByAsc(SysDept::getSort)

View File

@ -39,7 +39,7 @@ public class SysDictItemServiceImpl extends ServiceImpl<SysDictItemMapper, SysDi
* @return
*/
@Override
public Page<DictItemPageVO> listPageDictItems(DictItemPageQuery queryParams) {
public Page<DictItemPageVO> listDictItemPages(DictItemPageQuery queryParams) {
// 查询参数
int pageNum = queryParams.getPageNum();
int pageSize = queryParams.getPageSize();

View File

@ -44,7 +44,7 @@ public class SysDictTypeTypeServiceImpl extends ServiceImpl<SysDictTypeMapper, S
* @return
*/
@Override
public Page<DictTypePageVO> listPageDictTypes(DictTypePageQuery queryParams) {
public Page<DictTypePageVO> listDictTypePages(DictTypePageQuery queryParams) {
// 查询参数
int pageNum = queryParams.getPageNum();
int pageSize = queryParams.getPageSize();

View File

@ -38,7 +38,7 @@ public class SysOauthClientServiceImpl extends ServiceImpl<SysOauthClientMapper,
* @return
*/
@Override
public IPage<ClientPageVO> listPageClients(ClientPageQuery queryParams) {
public IPage<ClientPageVO> listClientPages(ClientPageQuery queryParams) {
// 参数构建
int pageNum = queryParams.getPageNum();

View File

@ -41,9 +41,9 @@ public class SysPermissionServiceImpl extends ServiceImpl<SysPermissionMapper, S
* @return
*/
@Override
public IPage<PermPageVO> listPagePerms(PermPageQuery queryParams) {
public IPage<PermPageVO> listPermPages(PermPageQuery queryParams) {
Page<PermPageVO> page = new Page<>(queryParams.getPageNum(), queryParams.getPageSize());
List<PermPageVO> list = this.baseMapper.listPagePerms(page, queryParams);
List<PermPageVO> list = this.baseMapper.listPermPages(page, queryParams);
page.setRecords(list);
return page;
}

View File

@ -18,7 +18,7 @@
</resultMap>
<!-- 获取权限分页列表 -->
<select id="listPagePerms" resultType="com.youlai.admin.pojo.vo.perm.PermPageVO">
<select id="listPermPages" resultType="com.youlai.admin.pojo.vo.perm.PermPageVO">
SELECT
t1.id,
t1.menu_id,