Commit 67e1879a8fb305d6a26ee2b73147a2ffb2b8f743

Authored by YunaiV
1 parent 837345ed

system:将 biz 的方法名的负数都换成 List

Showing 13 changed files with 16 additions and 16 deletions
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/tenant/TenantApiImpl.java
... ... @@ -19,7 +19,7 @@ public class TenantApiImpl implements TenantApi {
19 19  
20 20 @Override
21 21 public List<Long> getTenantIdList() {
22   - return tenantService.getTenantIds();
  22 + return tenantService.getTenantIdList();
23 23 }
24 24  
25 25 @Override
... ...
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/AuthController.java
... ... @@ -108,7 +108,7 @@ public class AuthController {
108 108  
109 109 @GetMapping("/list-menus")
110 110 @ApiOperation("获得登录用户的菜单列表")
111   - public CommonResult<List<AuthMenuRespVO>> getMenus() {
  111 + public CommonResult<List<AuthMenuRespVO>> getMenuList() {
112 112 // 获得角色列表
113 113 Set<Long> roleIds = permissionService.getUserRoleIdsFromCache(getLoginUserId(), singleton(CommonStatusEnum.ENABLE.getStatus()));
114 114 // 获得用户拥有的菜单列表
... ...
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/DeptController.java
... ... @@ -57,7 +57,7 @@ public class DeptController {
57 57 @GetMapping("/list")
58 58 @ApiOperation("获取部门列表")
59 59 @PreAuthorize("@ss.hasPermission('system:dept:query')")
60   - public CommonResult<List<DeptRespVO>> listDepts(DeptListReqVO reqVO) {
  60 + public CommonResult<List<DeptRespVO>> getDeptList(DeptListReqVO reqVO) {
61 61 List<DeptDO> list = deptService.getDeptList(reqVO);
62 62 list.sort(Comparator.comparing(DeptDO::getSort));
63 63 return success(DeptConvert.INSTANCE.convertList(list));
... ... @@ -65,7 +65,7 @@ public class DeptController {
65 65  
66 66 @GetMapping("/list-all-simple")
67 67 @ApiOperation(value = "获取部门精简信息列表", notes = "只包含被开启的部门,主要用于前端的下拉选项")
68   - public CommonResult<List<DeptSimpleRespVO>> getSimpleDepts() {
  68 + public CommonResult<List<DeptSimpleRespVO>> getSimpleDeptList() {
69 69 // 获得部门列表,只要开启状态的
70 70 DeptListReqVO reqVO = new DeptListReqVO();
71 71 reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus());
... ...
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/PostController.java
... ... @@ -70,7 +70,7 @@ public class PostController {
70 70  
71 71 @GetMapping("/list-all-simple")
72 72 @ApiOperation(value = "获取岗位精简信息列表", notes = "只包含被开启的岗位,主要用于前端的下拉选项")
73   - public CommonResult<List<PostSimpleRespVO>> getSimplePosts() {
  73 + public CommonResult<List<PostSimpleRespVO>> getSimplePostList() {
74 74 // 获得岗位列表,只要开启状态的
75 75 List<PostDO> list = postService.getPostList(null, Collections.singleton(CommonStatusEnum.ENABLE.getStatus()));
76 76 // 排序后,返回给前端
... ...
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictDataController.java
... ... @@ -61,7 +61,7 @@ public class DictDataController {
61 61 @GetMapping("/list-all-simple")
62 62 @ApiOperation(value = "获得全部字典数据列表", notes = "一般用于管理后台缓存字典数据在本地")
63 63 // 无需添加权限认证,因为前端全局都需要
64   - public CommonResult<List<DictDataSimpleRespVO>> getSimpleDictDatas() {
  64 + public CommonResult<List<DictDataSimpleRespVO>> getSimpleDictDataList() {
65 65 List<DictDataDO> list = dictDataService.getDictDataList();
66 66 return success(DictDataConvert.INSTANCE.convertList(list));
67 67 }
... ...
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictTypeController.java
... ... @@ -76,7 +76,7 @@ public class DictTypeController {
76 76 @GetMapping("/list-all-simple")
77 77 @ApiOperation(value = "获得全部字典类型列表", notes = "包括开启 + 禁用的字典类型,主要用于前端的下拉选项")
78 78 // 无需添加权限认证,因为前端全局都需要
79   - public CommonResult<List<DictTypeSimpleRespVO>> listSimpleDictTypes() {
  79 + public CommonResult<List<DictTypeSimpleRespVO>> getSimpleDictTypeList() {
80 80 List<DictTypeDO> list = dictTypeService.getDictTypeList();
81 81 return success(DictTypeConvert.INSTANCE.convertList(list));
82 82 }
... ...
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/SensitiveWordController.java
... ... @@ -90,8 +90,8 @@ public class SensitiveWordController {
90 90 @GetMapping("/get-tags")
91 91 @ApiOperation("获取所有敏感词的标签数组")
92 92 @PreAuthorize("@ss.hasPermission('system:sensitive-word:query')")
93   - public CommonResult<Set<String>> getSensitiveWordTags() throws IOException {
94   - return success(sensitiveWordService.getSensitiveWordTags());
  93 + public CommonResult<Set<String>> getSensitiveWordTagSet() {
  94 + return success(sensitiveWordService.getSensitiveWordTagSet());
95 95 }
96 96  
97 97 @GetMapping("/validate-text")
... ...
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/sensitiveword/SensitiveWordService.java
... ... @@ -81,7 +81,7 @@ public interface SensitiveWordService {
81 81 *
82 82 * @return 标签数组
83 83 */
84   - Set<String> getSensitiveWordTags();
  84 + Set<String> getSensitiveWordTagSet();
85 85  
86 86 /**
87 87 * 获得文本所包含的不合法的敏感词数组
... ...
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/sensitiveword/SensitiveWordServiceImpl.java
... ... @@ -182,7 +182,7 @@ public class SensitiveWordServiceImpl implements SensitiveWordService {
182 182 }
183 183  
184 184 @Override
185   - public Set<String> getSensitiveWordTags() {
  185 + public Set<String> getSensitiveWordTagSet() {
186 186 return sensitiveWordTagsCache;
187 187 }
188 188  
... ...
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/tenant/TenantService.java
... ... @@ -120,7 +120,7 @@ public interface TenantService {
120 120 *
121 121 * @return 租户编号数组
122 122 */
123   - List<Long> getTenantIds();
  123 + List<Long> getTenantIdList();
124 124  
125 125 /**
126 126 * 校验租户是否合法
... ...
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/tenant/TenantServiceImpl.java
... ... @@ -75,7 +75,7 @@ public class TenantServiceImpl implements TenantService {
75 75 private PermissionService permissionService;
76 76  
77 77 @Override
78   - public List<Long> getTenantIds() {
  78 + public List<Long> getTenantIdList() {
79 79 List<TenantDO> tenants = tenantMapper.selectList();
80 80 return CollectionUtils.convertList(tenants, TenantDO::getId);
81 81 }
... ...
yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/sensitiveword/SensitiveWordServiceImplTest.java
... ... @@ -60,7 +60,7 @@ public class SensitiveWordServiceImplTest extends BaseDbUnitTest {
60 60 // 调用
61 61 sensitiveWordService.initLocalCache();
62 62 // 断言 sensitiveWordTagsCache 缓存
63   - assertEquals(SetUtils.asSet("论坛", "蔬菜"), sensitiveWordService.getSensitiveWordTags());
  63 + assertEquals(SetUtils.asSet("论坛", "蔬菜"), sensitiveWordService.getSensitiveWordTagSet());
64 64 // 断言 tagSensitiveWordTries 缓存
65 65 assertNotNull(sensitiveWordService.getDefaultSensitiveWordTrie());
66 66 assertEquals(2, sensitiveWordService.getTagSensitiveWordTries().size());
... ...
yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/tenant/TenantServiceImplTest.java
... ... @@ -81,13 +81,13 @@ public class TenantServiceImplTest extends BaseDbUnitTest {
81 81 }
82 82  
83 83 @Test
84   - public void testGetTenantIds() {
  84 + public void testGetTenantIdList() {
85 85 // mock 数据
86 86 TenantDO tenant = randomPojo(TenantDO.class, o -> o.setId(1L));
87 87 tenantMapper.insert(tenant);
88 88  
89 89 // 调用,并断言业务异常
90   - List<Long> result = tenantService.getTenantIds();
  90 + List<Long> result = tenantService.getTenantIdList();
91 91 assertEquals(Collections.singletonList(1L), result);
92 92 }
93 93  
... ...