浏览代码

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

YunaiV 2 年之前
父节点
当前提交
67e1879a8f
共有 13 个文件被更改,包括 16 次插入16 次删除
  1. 1 1
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/tenant/TenantApiImpl.java
  2. 1 1
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/AuthController.java
  3. 2 2
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/DeptController.java
  4. 1 1
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/PostController.java
  5. 1 1
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictDataController.java
  6. 1 1
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictTypeController.java
  7. 2 2
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/SensitiveWordController.java
  8. 1 1
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/sensitiveword/SensitiveWordService.java
  9. 1 1
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/sensitiveword/SensitiveWordServiceImpl.java
  10. 1 1
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/tenant/TenantService.java
  11. 1 1
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/tenant/TenantServiceImpl.java
  12. 1 1
      yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/sensitiveword/SensitiveWordServiceImplTest.java
  13. 2 2
      yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/tenant/TenantServiceImplTest.java

+ 1 - 1
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 {
 
     @Override
     public List<Long> getTenantIdList() {
-        return tenantService.getTenantIds();
+        return tenantService.getTenantIdList();
     }
 
     @Override

+ 1 - 1
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 {
 
     @GetMapping("/list-menus")
     @ApiOperation("获得登录用户的菜单列表")
-    public CommonResult<List<AuthMenuRespVO>> getMenus() {
+    public CommonResult<List<AuthMenuRespVO>> getMenuList() {
         // 获得角色列表
         Set<Long> roleIds = permissionService.getUserRoleIdsFromCache(getLoginUserId(), singleton(CommonStatusEnum.ENABLE.getStatus()));
         // 获得用户拥有的菜单列表

+ 2 - 2
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 {
     @GetMapping("/list")
     @ApiOperation("获取部门列表")
     @PreAuthorize("@ss.hasPermission('system:dept:query')")
-    public CommonResult<List<DeptRespVO>> listDepts(DeptListReqVO reqVO) {
+    public CommonResult<List<DeptRespVO>> getDeptList(DeptListReqVO reqVO) {
         List<DeptDO> list = deptService.getDeptList(reqVO);
         list.sort(Comparator.comparing(DeptDO::getSort));
         return success(DeptConvert.INSTANCE.convertList(list));
@@ -65,7 +65,7 @@ public class DeptController {
 
     @GetMapping("/list-all-simple")
     @ApiOperation(value = "获取部门精简信息列表", notes = "只包含被开启的部门,主要用于前端的下拉选项")
-    public CommonResult<List<DeptSimpleRespVO>> getSimpleDepts() {
+    public CommonResult<List<DeptSimpleRespVO>> getSimpleDeptList() {
         // 获得部门列表,只要开启状态的
         DeptListReqVO reqVO = new DeptListReqVO();
         reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus());

+ 1 - 1
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 {
 
     @GetMapping("/list-all-simple")
     @ApiOperation(value = "获取岗位精简信息列表", notes = "只包含被开启的岗位,主要用于前端的下拉选项")
-    public CommonResult<List<PostSimpleRespVO>> getSimplePosts() {
+    public CommonResult<List<PostSimpleRespVO>> getSimplePostList() {
         // 获得岗位列表,只要开启状态的
         List<PostDO> list = postService.getPostList(null, Collections.singleton(CommonStatusEnum.ENABLE.getStatus()));
         // 排序后,返回给前端

+ 1 - 1
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 {
     @GetMapping("/list-all-simple")
     @ApiOperation(value = "获得全部字典数据列表", notes = "一般用于管理后台缓存字典数据在本地")
     // 无需添加权限认证,因为前端全局都需要
-    public CommonResult<List<DictDataSimpleRespVO>> getSimpleDictDatas() {
+    public CommonResult<List<DictDataSimpleRespVO>> getSimpleDictDataList() {
         List<DictDataDO> list = dictDataService.getDictDataList();
         return success(DictDataConvert.INSTANCE.convertList(list));
     }

+ 1 - 1
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 {
     @GetMapping("/list-all-simple")
     @ApiOperation(value = "获得全部字典类型列表", notes = "包括开启 + 禁用的字典类型,主要用于前端的下拉选项")
     // 无需添加权限认证,因为前端全局都需要
-    public CommonResult<List<DictTypeSimpleRespVO>> listSimpleDictTypes() {
+    public CommonResult<List<DictTypeSimpleRespVO>> getSimpleDictTypeList() {
         List<DictTypeDO> list = dictTypeService.getDictTypeList();
         return success(DictTypeConvert.INSTANCE.convertList(list));
     }

+ 2 - 2
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 {
     @GetMapping("/get-tags")
     @ApiOperation("获取所有敏感词的标签数组")
     @PreAuthorize("@ss.hasPermission('system:sensitive-word:query')")
-    public CommonResult<Set<String>> getSensitiveWordTags() throws IOException {
-        return success(sensitiveWordService.getSensitiveWordTags());
+    public CommonResult<Set<String>> getSensitiveWordTagSet() {
+        return success(sensitiveWordService.getSensitiveWordTagSet());
     }
 
     @GetMapping("/validate-text")

+ 1 - 1
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 {
      *
      * @return 标签数组
      */
-    Set<String> getSensitiveWordTags();
+    Set<String> getSensitiveWordTagSet();
 
     /**
      * 获得文本所包含的不合法的敏感词数组

+ 1 - 1
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 {
     }
 
     @Override
-    public Set<String> getSensitiveWordTags() {
+    public Set<String> getSensitiveWordTagSet() {
         return sensitiveWordTagsCache;
     }
 

+ 1 - 1
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 {
      *
      * @return 租户编号数组
      */
-    List<Long> getTenantIds();
+    List<Long> getTenantIdList();
 
     /**
      * 校验租户是否合法

+ 1 - 1
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 {
     private PermissionService permissionService;
 
     @Override
-    public List<Long> getTenantIds() {
+    public List<Long> getTenantIdList() {
         List<TenantDO> tenants = tenantMapper.selectList();
         return CollectionUtils.convertList(tenants, TenantDO::getId);
     }

+ 1 - 1
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 {
         // 调用
         sensitiveWordService.initLocalCache();
         // 断言 sensitiveWordTagsCache 缓存
-        assertEquals(SetUtils.asSet("论坛", "蔬菜"), sensitiveWordService.getSensitiveWordTags());
+        assertEquals(SetUtils.asSet("论坛", "蔬菜"), sensitiveWordService.getSensitiveWordTagSet());
         // 断言 tagSensitiveWordTries 缓存
         assertNotNull(sensitiveWordService.getDefaultSensitiveWordTrie());
         assertEquals(2, sensitiveWordService.getTagSensitiveWordTries().size());

+ 2 - 2
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 {
     }
 
     @Test
-    public void testGetTenantIds() {
+    public void testGetTenantIdList() {
         // mock 数据
         TenantDO tenant = randomPojo(TenantDO.class, o -> o.setId(1L));
         tenantMapper.insert(tenant);
 
         // 调用,并断言业务异常
-        List<Long> result = tenantService.getTenantIds();
+        List<Long> result = tenantService.getTenantIdList();
         assertEquals(Collections.singletonList(1L), result);
     }