From 117914d92b7398b6508d67c1b6f3db898765d7b8 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 29 Jan 2022 21:29:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=9A=E6=A8=A1=E5=9D=97=E9=87=8D=E6=9E=84?= =?UTF-8?q?=204=EF=BC=9Asystem=20=E6=A8=A1=E5=9D=97=E7=9A=84=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=EF=BC=8C=E5=8E=BB=E9=99=A4=20Sys?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- http-client.env.json | 7 +- .../src/main/resources/application.yaml | 6 +- .../YudaoWebSecurityConfigurerAdapter.java | 5 +- .../app/auth/AppAuthController.http | 16 +-- .../app/auth/AppAuthController.java | 9 +- .../app/auth/vo/AppAuthCheckCodeReqVO.java | 2 +- .../app/auth/vo/AppAuthLoginReqVO.java | 2 +- .../app/auth/vo/AppAuthLoginRespVO.java | 2 +- .../auth/vo/AppAuthResetPasswordReqVO.java | 2 +- .../app/auth/vo/AppAuthSendSmsReqVO.java | 2 +- .../app/auth/vo/AppAuthSmsLoginReqVO.java | 2 +- .../app/auth/vo/AppAuthSocialBindReqVO.java | 2 +- .../app/auth/vo/AppAuthSocialLogin2ReqVO.java | 2 +- .../app/auth/vo/AppAuthSocialLoginReqVO.java | 2 +- .../app/auth/vo/AppAuthSocialUnbindReqVO.java | 2 +- .../auth/vo/AppAuthUpdatePasswordReqVO.java | 2 +- .../member/controller/app/package-info.java | 1 - .../app/user/AppUserController.java | 2 +- .../app/user/vo/AppUserInfoRespVO.java | 2 +- .../app/user/vo/AppUserUpdateMobileReqVO.java | 2 +- .../member/controller/package-info.java | 2 +- .../member/service/auth/AuthServiceImpl.java | 2 +- .../member/service/user/UserServiceImpl.java | 2 +- .../auth/AuthController.http} | 16 +-- .../auth/AuthController.java} | 58 ++++----- .../auth/UserSessionController.java} | 22 ++-- .../auth/vo/auth/AuthLoginReqVO.java} | 6 +- .../auth/vo/auth/AuthLoginRespVO.java} | 6 +- .../auth/vo/auth/AuthMenuRespVO.java} | 8 +- .../vo/auth/AuthPermissionInfoRespVO.java} | 6 +- .../auth/vo/auth/AuthSocialBindReqVO.java} | 6 +- .../auth/vo/auth/AuthSocialLogin2ReqVO.java} | 6 +- .../auth/vo/auth/AuthSocialLoginReqVO.java} | 6 +- .../auth/vo/auth/AuthSocialUnbindReqVO.java} | 6 +- .../session/UserSessionPageItemRespVO.java} | 6 +- .../vo/session/UserSessionPageReqVO.java} | 6 +- .../common/CaptchaController.http} | 0 .../common/CaptchaController.java} | 14 +-- .../common/vo/CaptchaImageRespVO.java} | 9 +- .../dept/DeptController.java} | 32 ++--- .../dept/PostController.java} | 38 +++--- .../dept/vo/dept/DeptBaseVO.java} | 4 +- .../dept/vo/dept/DeptCreateReqVO.java} | 6 +- .../dept/vo/dept/DeptListReqVO.java} | 6 +- .../dept/vo/dept/DeptRespVO.java} | 6 +- .../dept/vo/dept/DeptSimpleRespVO.java} | 6 +- .../dept/vo/dept/DeptUpdateReqVO.java} | 6 +- .../dept/vo/post/PostBaseVO.java} | 4 +- .../admin/dept/vo/post/PostCreateReqVO.java | 11 ++ .../dept/vo/post/PostExcelVO.java} | 4 +- .../dept/vo/post/PostExportReqVO.java} | 6 +- .../dept/vo/post/PostListReqVO.java} | 6 +- .../dept/vo/post/PostPageReqVO.java} | 6 +- .../dept/vo/post/PostRespVO.java} | 6 +- .../dept/vo/post/PostSimpleRespVO.java} | 6 +- .../dept/vo/post/PostUpdateReqVO.java} | 6 +- .../dict/DictDataController.http} | 1 + .../dict/DictDataController.java} | 36 +++--- .../dict/DictTypeController.java} | 42 +++---- .../dict/vo/data/DictDataBaseVO.java} | 4 +- .../dict/vo/data/DictDataCreateReqVO.java | 12 ++ .../dict/vo/data/DictDataExcelVO.java} | 4 +- .../dict/vo/data/DictDataExportReqVO.java} | 6 +- .../dict/vo/data/DictDataPageReqVO.java} | 6 +- .../dict/vo/data/DictDataRespVO.java} | 6 +- .../dict/vo/data/DictDataSimpleRespVO.java} | 6 +- .../dict/vo/data/DictDataUpdateReqVO.java} | 6 +- .../dict/vo/type/DictTypeBaseVO.java} | 4 +- .../dict/vo/type/DictTypeCreateReqVO.java} | 6 +- .../dict/vo/type/DictTypeExcelVO.java} | 4 +- .../dict/vo/type/DictTypeExportReqVO.java} | 6 +- .../dict/vo/type/DictTypePageReqVO.java} | 6 +- .../dict/vo/type/DictTypeRespVO.java} | 6 +- .../dict/vo/type/DictTypeSimpleRespVO.java} | 6 +- .../dict/vo/type/DictTypeUpdateReqVO.java} | 6 +- .../errorcode/ErrorCodeController.http} | 5 +- .../errorcode/ErrorCodeController.java} | 40 +++--- .../errorcode/vo/ErrorCodeBaseVO.java} | 4 +- .../errorcode/vo/ErrorCodeCreateReqVO.java} | 6 +- .../errorcode/vo/ErrorCodeExcelVO.java} | 4 +- .../errorcode/vo/ErrorCodeExportReqVO.java} | 6 +- .../errorcode/vo/ErrorCodePageReqVO.java} | 6 +- .../errorcode/vo/ErrorCodeRespVO.java} | 6 +- .../errorcode/vo/ErrorCodeUpdateReqVO.java} | 6 +- .../logger/LoginLogController.java} | 30 ++--- .../logger/OperateLogController.http} | 1 + .../logger/OperateLogController.java} | 42 +++---- .../logger/vo/loginlog/LoginLogBaseVO.java} | 4 +- .../logger/vo/loginlog/LoginLogExcelVO.java} | 4 +- .../vo/loginlog/LoginLogExportReqVO.java} | 6 +- .../vo/loginlog/LoginLogPageReqVO.java} | 6 +- .../logger/vo/loginlog/LoginLogRespVO.java} | 6 +- .../vo/operatelog/OperateLogBaseVO.java} | 4 +- .../vo/operatelog/OperateLogExcelVO.java} | 4 +- .../vo/operatelog/OperateLogExportReqVO.java} | 6 +- .../vo/operatelog/OperateLogPageReqVO.java} | 6 +- .../vo/operatelog/OperateLogRespVO.java} | 6 +- .../notice/NoticeController.java} | 32 ++--- .../notice/vo/NoticeBaseVO.java} | 4 +- .../admin/notice/vo/NoticeCreateReqVO.java | 11 ++ .../notice/vo/NoticePageReqVO.java} | 6 +- .../notice/vo/NoticeRespVO.java} | 6 +- .../notice/vo/NoticeUpdateReqVO.java} | 6 +- .../permission/MenuController.http} | 1 + .../permission/MenuController.java} | 44 +++---- .../permission/PermissionController.java} | 26 ++-- .../permission/RoleController.http} | 6 +- .../permission/RoleController.java} | 36 +++--- .../permission/vo/menu/MenuBaseVO.java} | 4 +- .../permission/vo/menu/MenuCreateReqVO.java | 10 ++ .../permission/vo/menu/MenuListReqVO.java} | 6 +- .../permission/vo/menu/MenuRespVO.java} | 6 +- .../permission/vo/menu/MenuSimpleRespVO.java} | 6 +- .../permission/vo/menu/MenuUpdateReqVO.java} | 6 +- .../PermissionAssignRoleDataScopeReqVO.java} | 6 +- .../PermissionAssignRoleMenuReqVO.java} | 6 +- .../PermissionAssignUserRoleReqVO.java} | 6 +- .../permission/vo/role/RoleBaseVO.java} | 4 +- .../permission/vo/role/RoleCreateReqVO.java | 12 ++ .../permission/vo/role/RoleExcelVO.java} | 4 +- .../permission/vo/role/RoleExportReqVO.java} | 6 +- .../permission/vo/role/RolePageReqVO.java} | 6 +- .../permission/vo/role/RoleRespVO.java} | 6 +- .../permission/vo/role/RoleSimpleRespVO.java} | 6 +- .../permission/vo/role/RoleUpdateReqVO.java} | 6 +- .../vo/role/RoleUpdateStatusReqVO.java} | 10 +- .../sms/SmsCallbackController.java | 4 +- .../sms/SmsChannelController.java} | 30 ++--- .../sms/SmsLogController.java} | 30 ++--- .../sms/SmsTemplateController.http} | 3 +- .../sms/SmsTemplateController.java} | 34 ++--- .../sms/vo/channel/SmsChannelBaseVO.java} | 4 +- .../vo/channel/SmsChannelCreateReqVO.java} | 6 +- .../sms/vo/channel/SmsChannelPageReqVO.java} | 6 +- .../sms/vo/channel/SmsChannelRespVO.java} | 6 +- .../vo/channel/SmsChannelSimpleRespVO.java} | 6 +- .../vo/channel/SmsChannelUpdateReqVO.java} | 6 +- .../sms/vo/log/SmsLogExcelVO.java} | 4 +- .../sms/vo/log/SmsLogExportReqVO.java} | 6 +- .../sms/vo/log/SmsLogPageReqVO.java} | 6 +- .../sms/vo/log/SysSmsLogRespVO.java | 4 +- .../sms/vo/template/SmsTemplateBaseVO.java} | 4 +- .../vo/template/SmsTemplateCreateReqVO.java | 14 +++ .../sms/vo/template/SmsTemplateExcelVO.java} | 4 +- .../vo/template/SmsTemplateExportReqVO.java} | 6 +- .../vo/template/SmsTemplatePageReqVO.java} | 6 +- .../sms/vo/template/SmsTemplateRespVO.java} | 6 +- .../vo/template/SmsTemplateSendReqVO.java} | 6 +- .../vo/template/SmsTemplateUpdateReqVO.java} | 6 +- .../tenant/TenantController.java} | 36 +++--- .../tenant/vo/TenantBaseVO.java} | 4 +- .../admin/tenant/vo/TenantCreateReqVO.java | 12 ++ .../tenant/vo/TenantExcelVO.java} | 4 +- .../tenant/vo/TenantExportReqVO.java} | 6 +- .../tenant/vo/TenantPageReqVO.java} | 6 +- .../tenant/vo/TenantRespVO.java} | 6 +- .../tenant/vo/TenantUpdateReqVO.java} | 6 +- .../user/UserController.http} | 4 +- .../user/UserController.java} | 60 ++++----- .../user/UserProfileController.http} | 3 +- .../user/UserProfileController.java} | 48 ++++---- .../user/vo/profile/UserProfileRespVO.java} | 8 +- .../UserProfileUpdatePasswordReqVO.java} | 6 +- .../vo/profile/UserProfileUpdateReqVO.java} | 6 +- .../user/vo/user/UserBaseVO.java} | 4 +- .../user/vo/user/UserCreateReqVO.java} | 6 +- .../user/vo/user/UserExcelVO.java} | 4 +- .../user/vo/user/UserExportReqVO.java} | 6 +- .../user/vo/user/UserImportExcelVO.java} | 4 +- .../user/vo/user/UserImportRespVO.java} | 6 +- .../user/vo/user/UserPageItemRespVO.java} | 6 +- .../user/vo/user/UserPageReqVO.java} | 6 +- .../user/vo/user/UserRespVO.java} | 6 +- .../user/vo/user/UserSimpleRespVO.java} | 4 +- .../vo/user/UserUpdatePasswordReqVO.java} | 6 +- .../user/vo/user/UserUpdateReqVO.java} | 6 +- .../user/vo/user/UserUpdateStatusReqVO.java} | 6 +- .../system/controller/app/package-info.java | 4 + .../dept/vo/post/SysPostCreateReqVO.java | 11 -- .../dict/vo/data/SysDictDataCreateReqVO.java | 12 -- .../errorcode/vo/SysErrorCodeCreateReqVO.java | 14 --- .../notice/vo/SysNoticeCreateReqVO.java | 11 -- .../system/controller/package-info.java | 6 + .../vo/menu/SysMenuCreateReqVO.java | 10 -- .../vo/role/SysRoleCreateReqVO.java | 12 -- .../tenant/vo/SysTenantCreateReqVO.java | 12 -- .../{SysAuthConvert.java => AuthConvert.java} | 30 ++--- .../convert/auth/SysUserSessionConvert.java | 15 --- .../convert/auth/UserSessionConvert.java | 15 +++ .../system/convert/common/CaptchaConvert.java | 17 +++ .../convert/common/SysCaptchaConvert.java | 17 --- .../system/convert/dept/DeptConvert.java | 28 +++++ .../system/convert/dept/PostConvert.java | 28 +++++ .../system/convert/dept/SysDeptConvert.java | 28 ----- .../system/convert/dept/SysPostConvert.java | 28 ----- .../system/convert/dict/DictDataConvert.java | 34 +++++ .../system/convert/dict/DictTypeConvert.java | 28 +++++ .../convert/dict/SysDictDataConvert.java | 34 ----- .../convert/dict/SysDictTypeConvert.java | 28 ----- .../convert/errorcode/ErrorCodeConvert.java | 42 +++++++ .../errorcode/SysErrorCodeConvert.java | 42 ------- .../convert/logger/LoginLogConvert.java | 21 ++++ ...LogConvert.java => OperateLogConvert.java} | 22 ++-- .../convert/logger/SysLoginLogConvert.java | 21 ---- .../system/convert/notice/NoticeConvert.java | 24 ++++ .../convert/notice/SysNoticeConvert.java | 24 ---- .../convert/permission/MenuConvert.java | 28 +++++ .../convert/permission/RoleConvert.java | 25 ++++ .../convert/permission/SysMenuConvert.java | 28 ----- .../convert/permission/SysRoleConvert.java | 25 ---- .../system/convert/sms/SmsChannelConvert.java | 39 ++++++ ...sSmsLogConvert.java => SmsLogConvert.java} | 10 +- .../convert/sms/SmsTemplateConvert.java | 31 +++++ .../convert/sms/SysSmsChannelConvert.java | 39 ------ .../convert/sms/SysSmsTemplateConvert.java | 31 ----- .../convert/tenant/SysTenantConvert.java | 36 ------ .../system/convert/tenant/TenantConvert.java | 36 ++++++ .../system/convert/user/SysUserConvert.java | 49 -------- .../system/convert/user/UserConvert.java | 49 ++++++++ .../{SysDictTypeDO.java => DictTypeDO.java} | 4 +- .../{SysErrorCodeDO.java => ErrorCodeDO.java} | 8 +- ...SysOperateLogDO.java => OperateLogDO.java} | 4 +- .../{SysNoticeDO.java => NoticeDO.java} | 8 +- .../{SysMenuDO.java => MenuDO.java} | 4 +- .../{SysRoleMenuDO.java => RoleMenuDO.java} | 4 +- .../dal/mysql/auth/SysUserSessionMapper.java | 4 +- .../system/dal/mysql/dept/SysDeptMapper.java | 4 +- .../system/dal/mysql/dept/SysPostMapper.java | 8 +- .../dal/mysql/dict/SysDictDataMapper.java | 8 +- .../dal/mysql/dict/SysDictTypeMapper.java | 24 ++-- .../mysql/errorcode/SysErrorCodeMapper.java | 28 ++--- ...oginLogMapper.java => LoginLogMapper.java} | 20 +-- ...teLogMapper.java => OperateLogMapper.java} | 16 +-- .../dal/mysql/notice/SysNoticeMapper.java | 10 +- .../dal/mysql/permission/SysMenuMapper.java | 24 ++-- .../dal/mysql/permission/SysRoleMapper.java | 8 +- .../mysql/permission/SysRoleMenuMapper.java | 18 +-- .../dal/mysql/sms/SysSmsChannelMapper.java | 4 +- .../system/dal/mysql/sms/SysSmsLogMapper.java | 8 +- .../dal/mysql/sms/SysSmsTemplateMapper.java | 8 +- .../dal/mysql/tenant/SysTenantMapper.java | 8 +- .../system/dal/mysql/user/SysUserMapper.java | 8 +- .../dal/redis/SysRedisKeyConstants.java | 3 +- ...tchaRedisDAO.java => CaptchaRedisDAO.java} | 2 +- ...Constants.java => ErrorCodeConstants.java} | 2 +- ...deTypeEnum.java => ErrorCodeTypeEnum.java} | 4 +- ...LogTypeEnum.java => LoginLogTypeEnum.java} | 2 +- ...inResultEnum.java => LoginResultEnum.java} | 2 +- ...oticeTypeEnum.java => NoticeTypeEnum.java} | 2 +- ...SysRoleTypeEnum.java => RoleTypeEnum.java} | 2 +- ....java => DataPermissionConfiguration.java} | 4 +- .../config/ErrorCodeConfiguration.java | 1 + ...outJob.java => UserSessionTimeoutJob.java} | 6 +- ...Consumer.java => DeptRefreshConsumer.java} | 12 +- ...umer.java => DictDataRefreshConsumer.java} | 8 +- ...endConsumer.java => MailSendConsumer.java} | 7 +- ...Consumer.java => MenuRefreshConsumer.java} | 12 +- ...umer.java => RoleMenuRefreshConsumer.java} | 12 +- ...Consumer.java => RoleRefreshConsumer.java} | 12 +- ...er.java => SmsChannelRefreshConsumer.java} | 12 +- ...SendConsumer.java => SmsSendConsumer.java} | 2 +- ...r.java => SmsTemplateRefreshConsumer.java} | 8 +- ...shMessage.java => DeptRefreshMessage.java} | 2 +- ...ssage.java => DictDataRefreshMessage.java} | 2 +- ...lSendMessage.java => MailSendMessage.java} | 2 +- ...shMessage.java => MenuRefreshMessage.java} | 2 +- ...ssage.java => RoleMenuRefreshMessage.java} | 2 +- ...shMessage.java => RoleRefreshMessage.java} | 2 +- ...age.java => SmsChannelRefreshMessage.java} | 2 +- ...ge.java => SmsTemplateRefreshMessage.java} | 2 +- ...SysDeptProducer.java => DeptProducer.java} | 8 +- ...ataProducer.java => DictDataProducer.java} | 8 +- ...SysMenuProducer.java => MenuProducer.java} | 8 +- ...nProducer.java => PermissionProducer.java} | 8 +- ...SysRoleProducer.java => RoleProducer.java} | 8 +- .../{SysSmsProducer.java => SmsProducer.java} | 14 +-- .../{SysAuthService.java => AuthService.java} | 12 +- ...hServiceImpl.java => AuthServiceImpl.java} | 75 ++++++----- ...onService.java => UserSessionService.java} | 6 +- ...eImpl.java => UserSessionServiceImpl.java} | 19 ++- ...aptchaService.java => CaptchaService.java} | 6 +- ...rviceImpl.java => CaptchaServiceImpl.java} | 15 ++- .../{SysDeptService.java => DeptService.java} | 14 +-- ...tServiceImpl.java => DeptServiceImpl.java} | 27 ++-- .../{SysPostService.java => PostService.java} | 18 +-- ...tServiceImpl.java => PostServiceImpl.java} | 27 ++-- ...tDataService.java => DictDataService.java} | 18 +-- ...viceImpl.java => DictDataServiceImpl.java} | 40 +++--- ...tTypeService.java => DictTypeService.java} | 26 ++-- ...viceImpl.java => DictTypeServiceImpl.java} | 46 +++---- ...CodeService.java => ErrorCodeService.java} | 22 ++-- ...iceImpl.java => ErrorCodeServiceImpl.java} | 57 +++++---- ...inLogService.java => LoginLogService.java} | 10 +- .../service/logger/LoginLogServiceImpl.java | 32 +++++ ...LogService.java => OperateLogService.java} | 12 +- ...ceImpl.java => OperateLogServiceImpl.java} | 29 +++-- .../logger/SysLoginLogServiceImpl.java | 33 ----- ...sNoticeService.java => NoticeService.java} | 18 +-- ...erviceImpl.java => NoticeServiceImpl.java} | 29 +++-- .../{SysMenuService.java => MenuService.java} | 28 ++--- ...uServiceImpl.java => MenuServiceImpl.java} | 64 +++++----- ...ionService.java => PermissionService.java} | 8 +- ...ceImpl.java => PermissionServiceImpl.java} | 36 +++--- .../{SysRoleService.java => RoleService.java} | 18 +-- ...eServiceImpl.java => RoleServiceImpl.java} | 40 +++--- ...nelService.java => SmsChannelService.java} | 14 +-- ...ceImpl.java => SmsChannelServiceImpl.java} | 34 +++-- ...sSmsLogService.java => SmsLogService.java} | 10 +- ...erviceImpl.java => SmsLogServiceImpl.java} | 11 +- ...teService.java => SmsTemplateService.java} | 18 +-- ...eImpl.java => SmsTemplateServiceImpl.java} | 34 +++-- ...sTenantService.java => TenantService.java} | 18 +-- ...erviceImpl.java => TenantServiceImpl.java} | 27 ++-- .../{SysUserService.java => UserService.java} | 22 ++-- ...rServiceImpl.java => UserServiceImpl.java} | 55 ++++----- ...ImplTest.java => AuthServiceImplTest.java} | 70 +++++------ ...t.java => UserSessionServiceImplTest.java} | 16 +-- ...rviceTest.java => CaptchaServiceTest.java} | 14 +-- ...tServiceTest.java => DeptServiceTest.java} | 36 +++--- ...tServiceTest.java => PostServiceTest.java} | 33 +++-- ...viceTest.java => DictDataServiceTest.java} | 43 +++---- ...viceTest.java => DictTypeServiceTest.java} | 58 ++++----- ...iceTest.java => ErrorCodeServiceTest.java} | 92 +++++++------- ...Test.java => LoginLogServiceImplTest.java} | 34 ++--- ...st.java => OperateLogServiceImplTest.java} | 34 ++--- ...plTest.java => NoticeServiceImplTest.java} | 62 +++++----- ...uServiceTest.java => MenuServiceTest.java} | 116 +++++++++--------- ...ceTest.java => PermissionServiceTest.java} | 44 +++---- ...eServiceTest.java => RoleServiceTest.java} | 76 ++++++------ ...ceTest.java => SmsChannelServiceTest.java} | 30 ++--- ...erviceTest.java => SmsLogServiceTest.java} | 14 +-- ...eTest.java => SmsTemplateServiceTest.java} | 32 ++--- ...erviceTest.java => TenantServiceTest.java} | 31 ++--- ...ImplTest.java => UserServiceImplTest.java} | 59 ++++----- 更新日志.md | 3 + 335 files changed, 2481 insertions(+), 2498 deletions(-) delete mode 100644 yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/package-info.java rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{auth/SysAuthController.http => admin/auth/AuthController.http} (61%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{auth/SysAuthController.java => admin/auth/AuthController.java} (73%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{auth/SysUserSessionController.java => admin/auth/UserSessionController.java} (78%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{auth/vo/auth/SysAuthLoginReqVO.java => admin/auth/vo/auth/AuthLoginReqVO.java} (89%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{auth/vo/auth/SysAuthLoginRespVO.java => admin/auth/vo/auth/AuthLoginRespVO.java} (69%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{auth/vo/auth/SysAuthMenuRespVO.java => admin/auth/vo/auth/AuthMenuRespVO.java} (84%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{auth/vo/auth/SysAuthPermissionInfoRespVO.java => admin/auth/vo/auth/AuthPermissionInfoRespVO.java} (81%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{auth/vo/auth/SysAuthSocialBindReqVO.java => admin/auth/vo/auth/AuthSocialBindReqVO.java} (85%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{auth/vo/auth/SysAuthSocialLogin2ReqVO.java => admin/auth/vo/auth/AuthSocialLogin2ReqVO.java} (89%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{auth/vo/auth/SysAuthSocialLoginReqVO.java => admin/auth/vo/auth/AuthSocialLoginReqVO.java} (85%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{auth/vo/auth/SysAuthSocialUnbindReqVO.java => admin/auth/vo/auth/AuthSocialUnbindReqVO.java} (83%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{auth/vo/session/SysUserSessionPageItemRespVO.java => admin/auth/vo/session/UserSessionPageItemRespVO.java} (78%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{auth/vo/session/SysUserSessionPageReqVO.java => admin/auth/vo/session/UserSessionPageReqVO.java} (71%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{common/SysCaptchaController.http => admin/common/CaptchaController.http} (100%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{common/SysCaptchaController.java => admin/common/CaptchaController.java} (61%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{common/vo/SysCaptchaImageRespVO.java => admin/common/vo/CaptchaImageRespVO.java} (64%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{dept/SysDeptController.java => admin/dept/DeptController.java} (73%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{dept/SysPostController.java => admin/dept/PostController.java} (73%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{dept/vo/dept/SysDeptBaseVO.java => admin/dept/vo/dept/DeptBaseVO.java} (94%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{dept/vo/dept/SysDeptCreateReqVO.java => admin/dept/vo/dept/DeptCreateReqVO.java} (52%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{dept/vo/dept/SysDeptListReqVO.java => admin/dept/vo/dept/DeptListReqVO.java} (71%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{dept/vo/dept/SysDeptRespVO.java => admin/dept/vo/dept/DeptRespVO.java} (77%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{dept/vo/dept/SysDeptSimpleRespVO.java => admin/dept/vo/dept/DeptSimpleRespVO.java} (77%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{dept/vo/dept/SysDeptUpdateReqVO.java => admin/dept/vo/dept/DeptUpdateReqVO.java} (69%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{dept/vo/post/SysPostBaseVO.java => admin/dept/vo/post/PostBaseVO.java} (93%) create mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostCreateReqVO.java rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{dept/vo/post/SysPostExcelVO.java => admin/dept/vo/post/PostExcelVO.java} (88%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{dept/vo/post/SysPostExportReqVO.java => admin/dept/vo/post/PostExportReqVO.java} (69%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{dept/vo/post/SysPostListReqVO.java => admin/dept/vo/post/PostListReqVO.java} (72%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{dept/vo/post/SysPostPageReqVO.java => admin/dept/vo/post/PostPageReqVO.java} (78%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{dept/vo/post/SysPostRespVO.java => admin/dept/vo/post/PostRespVO.java} (72%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{dept/vo/post/SysPostSimpleRespVO.java => admin/dept/vo/post/PostSimpleRespVO.java} (73%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{dept/vo/post/SysPostUpdateReqVO.java => admin/dept/vo/post/PostUpdateReqVO.java} (69%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{dict/SysDictDataController.http => admin/dict/DictDataController.http} (80%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{dict/SysDictDataController.java => admin/dict/DictDataController.java} (71%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{dict/SysDictTypeController.java => admin/dict/DictTypeController.java} (66%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{dict/vo/data/SysDictDataBaseVO.java => admin/dict/vo/data/DictDataBaseVO.java} (94%) create mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataCreateReqVO.java rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{dict/vo/data/SysDictDataExcelVO.java => admin/dict/vo/data/DictDataExcelVO.java} (88%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{dict/vo/data/SysDictDataExportReqVO.java => admin/dict/vo/data/DictDataExportReqVO.java} (80%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{dict/vo/data/SysDictDataPageReqVO.java => admin/dict/vo/data/DictDataPageReqVO.java} (81%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{dict/vo/data/SysDictDataRespVO.java => admin/dict/vo/data/DictDataRespVO.java} (75%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{dict/vo/data/SysDictDataSimpleRespVO.java => admin/dict/vo/data/DictDataSimpleRespVO.java} (72%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{dict/vo/data/SysDictDataUpdateReqVO.java => admin/dict/vo/data/DictDataUpdateReqVO.java} (68%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{dict/vo/type/SysDictTypeBaseVO.java => admin/dict/vo/type/DictTypeBaseVO.java} (90%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{dict/vo/type/SysDictTypeCreateReqVO.java => admin/dict/vo/type/DictTypeCreateReqVO.java} (73%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{dict/vo/type/SysDictTypeExcelVO.java => admin/dict/vo/type/DictTypeExcelVO.java} (86%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{dict/vo/type/SysDictTypeExportReqVO.java => admin/dict/vo/type/DictTypeExportReqVO.java} (85%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{dict/vo/type/SysDictTypePageReqVO.java => admin/dict/vo/type/DictTypePageReqVO.java} (87%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{dict/vo/type/SysDictTypeRespVO.java => admin/dict/vo/type/DictTypeRespVO.java} (78%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{dict/vo/type/SysDictTypeSimpleRespVO.java => admin/dict/vo/type/DictTypeSimpleRespVO.java} (76%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{dict/vo/type/SysDictTypeUpdateReqVO.java => admin/dict/vo/type/DictTypeUpdateReqVO.java} (68%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{errorcode/SysErrorCodeController.http => admin/errorcode/ErrorCodeController.http} (64%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{errorcode/SysErrorCodeController.java => admin/errorcode/ErrorCodeController.java} (64%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{errorcode/vo/SysErrorCodeBaseVO.java => admin/errorcode/vo/ErrorCodeBaseVO.java} (89%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{sms/vo/template/SysSmsTemplateCreateReqVO.java => admin/errorcode/vo/ErrorCodeCreateReqVO.java} (51%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{errorcode/vo/SysErrorCodeExcelVO.java => admin/errorcode/vo/ErrorCodeExcelVO.java} (90%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{errorcode/vo/SysErrorCodeExportReqVO.java => admin/errorcode/vo/ErrorCodeExportReqVO.java} (81%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{errorcode/vo/SysErrorCodePageReqVO.java => admin/errorcode/vo/ErrorCodePageReqVO.java} (87%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{errorcode/vo/SysErrorCodeRespVO.java => admin/errorcode/vo/ErrorCodeRespVO.java} (78%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{errorcode/vo/SysErrorCodeUpdateReqVO.java => admin/errorcode/vo/ErrorCodeUpdateReqVO.java} (70%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{logger/SysLoginLogController.java => admin/logger/LoginLogController.java} (62%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{logger/SysOperateLogController.http => admin/logger/OperateLogController.http} (81%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{logger/SysOperateLogController.java => admin/logger/OperateLogController.java} (63%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{logger/vo/loginlog/SysLoginLogBaseVO.java => admin/logger/vo/loginlog/LoginLogBaseVO.java} (93%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{logger/vo/loginlog/SysLoginLogExcelVO.java => admin/logger/vo/loginlog/LoginLogExcelVO.java} (90%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{logger/vo/loginlog/SysLoginLogExportReqVO.java => admin/logger/vo/loginlog/LoginLogExportReqVO.java} (84%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{logger/vo/loginlog/SysLoginLogPageReqVO.java => admin/logger/vo/loginlog/LoginLogPageReqVO.java} (85%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{logger/vo/loginlog/SysLoginLogRespVO.java => admin/logger/vo/loginlog/LoginLogRespVO.java} (82%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{logger/vo/operatelog/SysOperateLogBaseVO.java => admin/logger/vo/operatelog/OperateLogBaseVO.java} (96%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{logger/vo/operatelog/SysOperateLogExcelVO.java => admin/logger/vo/operatelog/OperateLogExcelVO.java} (89%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{logger/vo/operatelog/SysOperateLogExportReqVO.java => admin/logger/vo/operatelog/OperateLogExportReqVO.java} (86%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{logger/vo/operatelog/SysOperateLogPageReqVO.java => admin/logger/vo/operatelog/OperateLogPageReqVO.java} (85%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{logger/vo/operatelog/SysOperateLogRespVO.java => admin/logger/vo/operatelog/OperateLogRespVO.java} (71%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{notice/SysNoticeController.java => admin/notice/NoticeController.java} (63%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{notice/vo/SysNoticeBaseVO.java => admin/notice/vo/NoticeBaseVO.java} (91%) create mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticeCreateReqVO.java rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{notice/vo/SysNoticePageReqVO.java => admin/notice/vo/NoticePageReqVO.java} (74%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{notice/vo/SysNoticeRespVO.java => admin/notice/vo/NoticeRespVO.java} (71%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{notice/vo/SysNoticeUpdateReqVO.java => admin/notice/vo/NoticeUpdateReqVO.java} (69%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{permission/SysMenuController.http => admin/permission/MenuController.http} (78%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{permission/SysMenuController.java => admin/permission/MenuController.java} (63%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{permission/SysPermissionController.java => admin/permission/PermissionController.java} (73%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{permission/SysRoleController.http => admin/permission/RoleController.http} (84%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{permission/SysRoleController.java => admin/permission/RoleController.java} (76%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{permission/vo/menu/SysMenuBaseVO.java => admin/permission/vo/menu/MenuBaseVO.java} (95%) create mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuCreateReqVO.java rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{permission/vo/menu/SysMenuListReqVO.java => admin/permission/vo/menu/MenuListReqVO.java} (70%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{permission/vo/menu/SysMenuRespVO.java => admin/permission/vo/menu/MenuRespVO.java} (79%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{permission/vo/menu/SysMenuSimpleRespVO.java => admin/permission/vo/menu/MenuSimpleRespVO.java} (76%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{permission/vo/menu/SysMenuUpdateReqVO.java => admin/permission/vo/menu/MenuUpdateReqVO.java} (66%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{permission/vo/permission/SysPermissionAssignRoleDataScopeReqVO.java => admin/permission/vo/permission/PermissionAssignRoleDataScopeReqVO.java} (81%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{permission/vo/permission/SysPermissionAssignRoleMenuReqVO.java => admin/permission/vo/permission/PermissionAssignRoleMenuReqVO.java} (73%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{permission/vo/permission/SysPermissionAssignUserRoleReqVO.java => admin/permission/vo/permission/PermissionAssignUserRoleReqVO.java} (73%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{permission/vo/role/SysRoleBaseVO.java => admin/permission/vo/role/RoleBaseVO.java} (92%) create mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleCreateReqVO.java rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{permission/vo/role/SysRoleExcelVO.java => admin/permission/vo/role/RoleExcelVO.java} (88%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{permission/vo/role/SysRoleExportReqVO.java => admin/permission/vo/role/RoleExportReqVO.java} (86%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{permission/vo/role/SysRolePageReqVO.java => admin/permission/vo/role/RolePageReqVO.java} (86%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{permission/vo/role/SysRoleRespVO.java => admin/permission/vo/role/RoleRespVO.java} (86%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{permission/vo/role/SysRoleSimpleRespVO.java => admin/permission/vo/role/RoleSimpleRespVO.java} (72%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{permission/vo/role/SysRoleUpdateReqVO.java => admin/permission/vo/role/RoleUpdateReqVO.java} (68%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{permission/vo/role/SysRoleUpdateStatusReqVO.java => admin/permission/vo/role/RoleUpdateStatusReqVO.java} (56%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{ => admin}/sms/SmsCallbackController.java (95%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{sms/SysSmsChannelController.java => admin/sms/SmsChannelController.java} (72%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{sms/SysSmsLogController.java => admin/sms/SmsLogController.java} (66%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{sms/SysSmsTemplateController.http => admin/sms/SmsTemplateController.http} (69%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{sms/SysSmsTemplateController.java => admin/sms/SmsTemplateController.java} (74%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{sms/vo/channel/SysSmsChannelBaseVO.java => admin/sms/vo/channel/SmsChannelBaseVO.java} (92%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{sms/vo/channel/SysSmsChannelCreateReqVO.java => admin/sms/vo/channel/SmsChannelCreateReqVO.java} (71%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{sms/vo/channel/SysSmsChannelPageReqVO.java => admin/sms/vo/channel/SmsChannelPageReqVO.java} (84%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{sms/vo/channel/SysSmsChannelRespVO.java => admin/sms/vo/channel/SmsChannelRespVO.java} (76%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{sms/vo/channel/SysSmsChannelSimpleRespVO.java => admin/sms/vo/channel/SmsChannelSimpleRespVO.java} (78%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{sms/vo/channel/SysSmsChannelUpdateReqVO.java => admin/sms/vo/channel/SmsChannelUpdateReqVO.java} (69%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{sms/vo/log/SysSmsLogExcelVO.java => admin/sms/vo/log/SmsLogExcelVO.java} (96%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{sms/vo/log/SysSmsLogExportReqVO.java => admin/sms/vo/log/SmsLogExportReqVO.java} (85%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{sms/vo/log/SysSmsLogPageReqVO.java => admin/sms/vo/log/SmsLogPageReqVO.java} (90%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{ => admin}/sms/vo/log/SysSmsLogRespVO.java (96%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{sms/vo/template/SysSmsTemplateBaseVO.java => admin/sms/vo/template/SmsTemplateBaseVO.java} (94%) create mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateCreateReqVO.java rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{sms/vo/template/SysSmsTemplateExcelVO.java => admin/sms/vo/template/SmsTemplateExcelVO.java} (92%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{sms/vo/template/SysSmsTemplateExportReqVO.java => admin/sms/vo/template/SmsTemplateExportReqVO.java} (84%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{sms/vo/template/SysSmsTemplatePageReqVO.java => admin/sms/vo/template/SmsTemplatePageReqVO.java} (89%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{sms/vo/template/SysSmsTemplateRespVO.java => admin/sms/vo/template/SmsTemplateRespVO.java} (79%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{sms/vo/template/SysSmsTemplateSendReqVO.java => admin/sms/vo/template/SmsTemplateSendReqVO.java} (78%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{sms/vo/template/SysSmsTemplateUpdateReqVO.java => admin/sms/vo/template/SmsTemplateUpdateReqVO.java} (68%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{tenant/SysTenantController.java => admin/tenant/TenantController.java} (74%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{tenant/vo/SysTenantBaseVO.java => admin/tenant/vo/TenantBaseVO.java} (90%) create mode 100755 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/TenantCreateReqVO.java rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{tenant/vo/SysTenantExcelVO.java => admin/tenant/vo/TenantExcelVO.java} (89%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{tenant/vo/SysTenantExportReqVO.java => admin/tenant/vo/TenantExportReqVO.java} (82%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{tenant/vo/SysTenantPageReqVO.java => admin/tenant/vo/TenantPageReqVO.java} (87%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{tenant/vo/SysTenantRespVO.java => admin/tenant/vo/TenantRespVO.java} (67%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{tenant/vo/SysTenantUpdateReqVO.java => admin/tenant/vo/TenantUpdateReqVO.java} (64%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{user/SysUserController.http => admin/user/UserController.http} (63%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{user/SysUserController.java => admin/user/UserController.java} (76%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{user/SysUserProfileController.http => admin/user/UserProfileController.http} (61%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{user/SysUserProfileController.java => admin/user/UserProfileController.java} (69%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{user/vo/profile/SysUserProfileRespVO.java => admin/user/vo/profile/UserProfileRespVO.java} (90%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{user/vo/profile/SysUserProfileUpdatePasswordReqVO.java => admin/user/vo/profile/UserProfileUpdatePasswordReqVO.java} (78%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{user/vo/profile/SysUserProfileUpdateReqVO.java => admin/user/vo/profile/UserProfileUpdateReqVO.java} (84%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{user/vo/user/SysUserBaseVO.java => admin/user/vo/user/UserBaseVO.java} (94%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{user/vo/user/SysUserCreateReqVO.java => admin/user/vo/user/UserCreateReqVO.java} (74%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{user/vo/user/SysUserExcelVO.java => admin/user/vo/user/UserExcelVO.java} (92%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{user/vo/user/SysUserExportReqVO.java => admin/user/vo/user/UserExportReqVO.java} (85%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{user/vo/user/SysUserImportExcelVO.java => admin/user/vo/user/UserImportExcelVO.java} (92%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{user/vo/user/SysUserImportRespVO.java => admin/user/vo/user/UserImportRespVO.java} (80%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{user/vo/user/SysUserPageItemRespVO.java => admin/user/vo/user/UserPageItemRespVO.java} (71%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{user/vo/user/SysUserPageReqVO.java => admin/user/vo/user/UserPageReqVO.java} (89%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{user/vo/user/SysUserRespVO.java => admin/user/vo/user/UserRespVO.java} (83%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{user/vo/user/SysUserSimpleRespVO.java => admin/user/vo/user/UserSimpleRespVO.java} (82%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{user/vo/user/SysUserUpdatePasswordReqVO.java => admin/user/vo/user/UserUpdatePasswordReqVO.java} (79%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{user/vo/user/SysUserUpdateReqVO.java => admin/user/vo/user/UserUpdateReqVO.java} (69%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/{user/vo/user/SysUserUpdateStatusReqVO.java => admin/user/vo/user/UserUpdateStatusReqVO.java} (78%) create mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/app/package-info.java delete mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/post/SysPostCreateReqVO.java delete mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/data/SysDictDataCreateReqVO.java delete mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/errorcode/vo/SysErrorCodeCreateReqVO.java delete mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/notice/vo/SysNoticeCreateReqVO.java create mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/package-info.java delete mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/menu/SysMenuCreateReqVO.java delete mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/role/SysRoleCreateReqVO.java delete mode 100755 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/tenant/vo/SysTenantCreateReqVO.java rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/auth/{SysAuthConvert.java => AuthConvert.java} (66%) delete mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/auth/SysUserSessionConvert.java create mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/auth/UserSessionConvert.java create mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/common/CaptchaConvert.java delete mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/common/SysCaptchaConvert.java create mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/dept/DeptConvert.java create mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/dept/PostConvert.java delete mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/dept/SysDeptConvert.java delete mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/dept/SysPostConvert.java create mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/dict/DictDataConvert.java create mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/dict/DictTypeConvert.java delete mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/dict/SysDictDataConvert.java delete mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/dict/SysDictTypeConvert.java create mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/errorcode/ErrorCodeConvert.java delete mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/errorcode/SysErrorCodeConvert.java create mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/logger/LoginLogConvert.java rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/logger/{SysOperateLogConvert.java => OperateLogConvert.java} (54%) delete mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/logger/SysLoginLogConvert.java create mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/notice/NoticeConvert.java delete mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/notice/SysNoticeConvert.java create mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/permission/MenuConvert.java create mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/permission/RoleConvert.java delete mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/permission/SysMenuConvert.java delete mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/permission/SysRoleConvert.java create mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/sms/SmsChannelConvert.java rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/sms/{SysSmsLogConvert.java => SmsLogConvert.java} (62%) create mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/sms/SmsTemplateConvert.java delete mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/sms/SysSmsChannelConvert.java delete mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/sms/SysSmsTemplateConvert.java delete mode 100755 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/tenant/SysTenantConvert.java create mode 100755 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/tenant/TenantConvert.java delete mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/user/SysUserConvert.java create mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/user/UserConvert.java rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/dict/{SysDictTypeDO.java => DictTypeDO.java} (92%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/errorcode/{SysErrorCodeDO.java => ErrorCodeDO.java} (81%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/logger/{SysOperateLogDO.java => OperateLogDO.java} (96%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/notice/{SysNoticeDO.java => NoticeDO.java} (82%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/permission/{SysMenuDO.java => MenuDO.java} (96%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/permission/{SysRoleMenuDO.java => RoleMenuDO.java} (88%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/logger/{SysLoginLogMapper.java => LoginLogMapper.java} (65%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/logger/{SysOperateLogMapper.java => OperateLogMapper.java} (70%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/redis/common/{SysCaptchaRedisDAO.java => CaptchaRedisDAO.java} (96%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/enums/{SysErrorCodeConstants.java => ErrorCodeConstants.java} (99%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/enums/errorcode/{SysErrorCodeTypeEnum.java => ErrorCodeTypeEnum.java} (84%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/enums/logger/{SysLoginLogTypeEnum.java => LoginLogTypeEnum.java} (94%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/enums/logger/{SysLoginResultEnum.java => LoginResultEnum.java} (94%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/enums/notice/{SysNoticeTypeEnum.java => NoticeTypeEnum.java} (90%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/enums/permission/{SysRoleTypeEnum.java => RoleTypeEnum.java} (90%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/framework/datapermission/config/{SysDataPermissionConfiguration.java => DataPermissionConfiguration.java} (90%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/job/auth/{SysUserSessionTimeoutJob.java => UserSessionTimeoutJob.java} (78%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/dept/{SysDeptRefreshConsumer.java => DeptRefreshConsumer.java} (53%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/dict/{SysDictDataRefreshConsumer.java => DictDataRefreshConsumer.java} (66%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/mail/{SysMailSendConsumer.java => MailSendConsumer.java} (56%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/permission/{SysMenuRefreshConsumer.java => MenuRefreshConsumer.java} (52%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/permission/{SysRoleMenuRefreshConsumer.java => RoleMenuRefreshConsumer.java} (51%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/permission/{SysRoleRefreshConsumer.java => RoleRefreshConsumer.java} (52%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/sms/{SysSmsChannelRefreshConsumer.java => SmsChannelRefreshConsumer.java} (50%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/sms/{SysSmsSendConsumer.java => SmsSendConsumer.java} (89%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/sms/{SysSmsTemplateRefreshConsumer.java => SmsTemplateRefreshConsumer.java} (65%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/dept/{SysDeptRefreshMessage.java => DeptRefreshMessage.java} (85%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/dict/{SysDictDataRefreshMessage.java => DictDataRefreshMessage.java} (83%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/mail/{SysMailSendMessage.java => MailSendMessage.java} (93%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/permission/{SysMenuRefreshMessage.java => MenuRefreshMessage.java} (85%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/permission/{SysRoleMenuRefreshMessage.java => RoleMenuRefreshMessage.java} (84%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/permission/{SysRoleRefreshMessage.java => RoleRefreshMessage.java} (85%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/sms/{SysSmsChannelRefreshMessage.java => SmsChannelRefreshMessage.java} (84%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/sms/{SysSmsTemplateRefreshMessage.java => SmsTemplateRefreshMessage.java} (84%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/producer/dept/{SysDeptProducer.java => DeptProducer.java} (65%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/producer/dict/{SysDictDataProducer.java => DictDataProducer.java} (64%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/producer/permission/{SysMenuProducer.java => MenuProducer.java} (64%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/producer/permission/{SysPermissionProducer.java => PermissionProducer.java} (63%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/producer/permission/{SysRoleProducer.java => RoleProducer.java} (66%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/producer/sms/{SysSmsProducer.java => SmsProducer.java} (56%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/auth/{SysAuthService.java => AuthService.java} (69%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/auth/{SysAuthServiceImpl.java => AuthServiceImpl.java} (80%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/auth/{SysUserSessionService.java => UserSessionService.java} (72%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/auth/{SysUserSessionServiceImpl.java => UserSessionServiceImpl.java} (83%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/common/{SysCaptchaService.java => CaptchaService.java} (78%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/common/{SysCaptchaServiceImpl.java => CaptchaServiceImpl.java} (68%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dept/{SysDeptService.java => DeptService.java} (69%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dept/{SysDeptServiceImpl.java => DeptServiceImpl.java} (90%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dept/{SysPostService.java => PostService.java} (76%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dept/{SysPostServiceImpl.java => PostServiceImpl.java} (77%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dict/{SysDictDataService.java => DictDataService.java} (67%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dict/{SysDictDataServiceImpl.java => DictDataServiceImpl.java} (77%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dict/{SysDictTypeService.java => DictTypeService.java} (57%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dict/{SysDictTypeServiceImpl.java => DictTypeServiceImpl.java} (66%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/errorcode/{SysErrorCodeService.java => ErrorCodeService.java} (54%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/errorcode/{SysErrorCodeServiceImpl.java => ErrorCodeServiceImpl.java} (66%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/logger/{SysLoginLogService.java => LoginLogService.java} (58%) create mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/logger/LoginLogServiceImpl.java rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/logger/{SysOperateLogService.java => OperateLogService.java} (51%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/logger/{SysOperateLogServiceImpl.java => OperateLogServiceImpl.java} (71%) delete mode 100644 yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/logger/SysLoginLogServiceImpl.java rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/notice/{SysNoticeService.java => NoticeService.java} (59%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/notice/{SysNoticeServiceImpl.java => NoticeServiceImpl.java} (56%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/{SysMenuService.java => MenuService.java} (64%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/{SysMenuServiceImpl.java => MenuServiceImpl.java} (80%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/{SysPermissionService.java => PermissionService.java} (90%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/{SysPermissionServiceImpl.java => PermissionServiceImpl.java} (93%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/{SysRoleService.java => RoleService.java} (81%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/{SysRoleServiceImpl.java => RoleServiceImpl.java} (86%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/{SysSmsChannelService.java => SmsChannelService.java} (71%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/{SysSmsChannelServiceImpl.java => SmsChannelServiceImpl.java} (77%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/{SysSmsLogService.java => SmsLogService.java} (62%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/{SysSmsLogServiceImpl.java => SmsLogServiceImpl.java} (60%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/{SysSmsTemplateService.java => SmsTemplateService.java} (69%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/{SysSmsTemplateServiceImpl.java => SmsTemplateServiceImpl.java} (80%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/tenant/{SysTenantService.java => TenantService.java} (67%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/tenant/{SysTenantServiceImpl.java => TenantServiceImpl.java} (63%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/user/{SysUserService.java => UserService.java} (78%) rename yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/user/{SysUserServiceImpl.java => UserServiceImpl.java} (86%) rename yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/auth/{SysAuthServiceImplTest.java => AuthServiceImplTest.java} (79%) rename yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/auth/{SysUserSessionServiceImplTest.java => UserSessionServiceImplTest.java} (90%) rename yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/common/{SysCaptchaServiceTest.java => CaptchaServiceTest.java} (77%) rename yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/dept/{SysDeptServiceTest.java => DeptServiceTest.java} (89%) rename yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/dept/{SysPostServiceTest.java => PostServiceTest.java} (86%) rename yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/dict/{SysDictDataServiceTest.java => DictDataServiceTest.java} (86%) rename yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/dict/{SysDictTypeServiceTest.java => DictTypeServiceTest.java} (80%) rename yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/errorcode/{SysErrorCodeServiceTest.java => ErrorCodeServiceTest.java} (69%) rename yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/logger/{SysLoginLogServiceImplTest.java => LoginLogServiceImplTest.java} (77%) rename yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/logger/{SysOperateLogServiceImplTest.java => OperateLogServiceImplTest.java} (84%) rename yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/notice/{SysNoticeServiceImplTest.java => NoticeServiceImplTest.java} (63%) rename yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/permission/{SysMenuServiceTest.java => MenuServiceTest.java} (70%) rename yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/permission/{SysPermissionServiceTest.java => PermissionServiceTest.java} (83%) rename yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/permission/{SysRoleServiceTest.java => RoleServiceTest.java} (72%) rename yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/sms/{SysSmsChannelServiceTest.java => SmsChannelServiceTest.java} (86%) rename yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/sms/{SysSmsLogServiceTest.java => SmsLogServiceTest.java} (94%) rename yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/sms/{SysSmsTemplateServiceTest.java => SmsTemplateServiceTest.java} (92%) rename yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/tenant/{SysTenantServiceTest.java => TenantServiceTest.java} (85%) rename yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/user/{SysUserServiceImplTest.java => UserServiceImplTest.java} (91%) diff --git a/http-client.env.json b/http-client.env.json index 10c1fdd4f..a73a267ef 100644 --- a/http-client.env.json +++ b/http-client.env.json @@ -1,10 +1,11 @@ { "local": { - "baseUrl": "http://127.0.0.1:48080/api", + "baseUrl": "http://127.0.0.1:48080/admin-api", "token": "test1", + "adminTenentId": "1", "userApi": "http://127.0.0.1:48080/app-api", - "userToken": "test1", - "userTenentId": "1" + "appToken": "test1", + "appTenentId": "1" } } diff --git a/yudao-admin-server/src/main/resources/application.yaml b/yudao-admin-server/src/main/resources/application.yaml index 15af12d60..97eb6ac49 100644 --- a/yudao-admin-server/src/main/resources/application.yaml +++ b/yudao-admin-server/src/main/resources/application.yaml @@ -54,11 +54,11 @@ yudao: base-package: cn.iocoder.yudao.coreservice web: admin-api: - prefix: /api - controller: ${yudao.info.base-package} + prefix: /admin-api + controller: cn.iocoder.yudao.module.system.controller.admin # TODO 芋艿:需要改造 app-api: prefix: /app-api - controller: cn.iocoder.yudao.module.member.controller.app + controller: cn.iocoder.yudao.module.member.controller.app # TODO 芋艿:需要改造 swagger: title: 管理后台 diff --git a/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/config/YudaoWebSecurityConfigurerAdapter.java b/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/config/YudaoWebSecurityConfigurerAdapter.java index 312f51e04..ba19b8bd2 100644 --- a/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/config/YudaoWebSecurityConfigurerAdapter.java +++ b/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/config/YudaoWebSecurityConfigurerAdapter.java @@ -123,12 +123,13 @@ public class YudaoWebSecurityConfigurerAdapter extends WebSecurityConfigurerAdap .accessDeniedHandler(accessDeniedHandler).and() // 登出地址的配置 .logout().logoutSuccessHandler(logoutSuccessHandler).logoutRequestMatcher(request -> // 匹配多种用户类型的登出 - StrUtil.equalsAny(request.getRequestURI(), buildAdminApi("/logout"), buildAppApi("/member/logout"))); + StrUtil.equalsAny(request.getRequestURI(), buildAdminApi("/system/logout"), + buildAppApi("/member/logout"))); // 设置每个请求的权限 ①:全局共享规则 httpSecurity.authorizeRequests() // 登录的接口,可匿名访问 - .antMatchers(buildAdminApi("/login")).anonymous() + .antMatchers(buildAdminApi("/system/login"), buildAdminApi("/member/login")).anonymous() // 静态资源,可匿名访问 .antMatchers(HttpMethod.GET, "/*.html", "/**/*.html", "/**/*.css", "/**/*.js").permitAll() // 文件的获取接口,可匿名访问 diff --git a/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/AppAuthController.http b/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/AppAuthController.http index 81f250bd3..d609e8f0c 100644 --- a/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/AppAuthController.http +++ b/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/AppAuthController.http @@ -1,7 +1,7 @@ ### 请求 /login 接口 => 成功 -POST {{userApi}}/member/login +POST {{appApi}}/member/login Content-Type: application/json -tenant-id: {{userTenentId}} +tenant-id: {{appTenentId}} { "mobile": "15601691300", @@ -9,9 +9,9 @@ tenant-id: {{userTenentId}} } ### 请求 /send-sms-code 接口 => 成功 -POST {{userApi}}/member/send-sms-code +POST {{appApi}}/member/send-sms-code Content-Type: application/json -tenant-id: {{userTenentId}} +tenant-id: {{appTenentId}} { "mobile": "15601691399", @@ -19,9 +19,9 @@ tenant-id: {{userTenentId}} } ### 请求 /sms-login 接口 => 成功 -POST {{userApi}}/member/sms-login +POST {{appApi}}/member/sms-login Content-Type: application/json -tenant-id: {{userTenentId}} +tenant-id: {{appTenentId}} { "mobile": "15601691301", @@ -29,7 +29,7 @@ tenant-id: {{userTenentId}} } ### 请求 /logout 接口 => 成功 -POST {{userApi}}/member/logout +POST {{appApi}}/member/logout Content-Type: application/json Authorization: Bearer c1b76bdaf2c146c581caa4d7fd81ee66 -tenant-id: {{userTenentId}} +tenant-id: {{appTenentId}} diff --git a/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/AppAuthController.java b/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/AppAuthController.java index a7c541e1f..fd698e202 100644 --- a/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/AppAuthController.java +++ b/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/AppAuthController.java @@ -14,6 +14,7 @@ import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.web.authentication.logout.LogoutSuccessHandler; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -26,14 +27,15 @@ import static cn.iocoder.yudao.framework.common.util.servlet.ServletUtils.getCli import static cn.iocoder.yudao.framework.common.util.servlet.ServletUtils.getUserAgent; import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; -@Api(tags = "APP 端 - 认证") +@Api(tags = "用户 APP - 认证") @RestController @RequestMapping("/member/") @Validated @Slf4j public class AppAuthController { - @Resource + @Autowired + @SuppressWarnings("SpringJavaAutowiredFieldsWarningInspection") // AuthService 存在重名 private AuthService authService; @Resource @@ -41,9 +43,6 @@ public class AppAuthController { @Resource private SysSocialCoreService socialService; - @Resource - private LogoutSuccessHandler logoutSuccessHandler; - @PostMapping("/login") @ApiOperation("使用手机 + 密码登录") @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 diff --git a/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthCheckCodeReqVO.java b/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthCheckCodeReqVO.java index 6d33b18ed..95fca74af 100644 --- a/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthCheckCodeReqVO.java +++ b/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthCheckCodeReqVO.java @@ -16,7 +16,7 @@ import javax.validation.constraints.NotNull; import javax.validation.constraints.Pattern; // TODO 芋艿:code review 相关逻辑 -@ApiModel("APP 端 - 校验验证码 Request VO") +@ApiModel("用户 APP - 校验验证码 Request VO") @Data @NoArgsConstructor @AllArgsConstructor diff --git a/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthLoginReqVO.java b/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthLoginReqVO.java index 25875fd66..1055e979b 100644 --- a/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthLoginReqVO.java +++ b/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthLoginReqVO.java @@ -11,7 +11,7 @@ import org.hibernate.validator.constraints.Length; import javax.validation.constraints.NotEmpty; -@ApiModel("APP 端 - 手机 + 密码登录 Request VO") +@ApiModel("用户 APP - 手机 + 密码登录 Request VO") @Data @NoArgsConstructor @AllArgsConstructor diff --git a/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthLoginRespVO.java b/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthLoginRespVO.java index 935b3ec52..07ad43118 100644 --- a/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthLoginRespVO.java +++ b/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthLoginRespVO.java @@ -7,7 +7,7 @@ import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -@ApiModel("APP 端 - 手机密码登录 Response VO") +@ApiModel("用户 APP - 手机密码登录 Response VO") @Data @NoArgsConstructor @AllArgsConstructor diff --git a/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthResetPasswordReqVO.java b/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthResetPasswordReqVO.java index 9f48ee624..a6d6ebea4 100644 --- a/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthResetPasswordReqVO.java +++ b/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthResetPasswordReqVO.java @@ -14,7 +14,7 @@ import javax.validation.constraints.NotEmpty; import javax.validation.constraints.Pattern; // TODO 芋艿:code review 相关逻辑 -@ApiModel("APP 端 - 重置密码 Request VO") +@ApiModel("用户 APP - 重置密码 Request VO") @Data @NoArgsConstructor @AllArgsConstructor diff --git a/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthSendSmsReqVO.java b/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthSendSmsReqVO.java index 9e53351fe..41aa36936 100644 --- a/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthSendSmsReqVO.java +++ b/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthSendSmsReqVO.java @@ -10,7 +10,7 @@ import lombok.experimental.Accessors; import javax.validation.constraints.NotNull; -@ApiModel("APP 端 - 发送手机验证码 Response VO") +@ApiModel("用户 APP - 发送手机验证码 Response VO") @Data @Accessors(chain = true) public class AppAuthSendSmsReqVO { diff --git a/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthSmsLoginReqVO.java b/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthSmsLoginReqVO.java index 452e7e825..063caf80d 100644 --- a/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthSmsLoginReqVO.java +++ b/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthSmsLoginReqVO.java @@ -12,7 +12,7 @@ import org.hibernate.validator.constraints.Length; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.Pattern; -@ApiModel("APP 端 - 手机 + 验证码登录 Request VO") +@ApiModel("用户 APP - 手机 + 验证码登录 Request VO") @Data @NoArgsConstructor @AllArgsConstructor diff --git a/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthSocialBindReqVO.java b/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthSocialBindReqVO.java index d595e7428..55e23ac4c 100644 --- a/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthSocialBindReqVO.java +++ b/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthSocialBindReqVO.java @@ -12,7 +12,7 @@ import lombok.NoArgsConstructor; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; -@ApiModel("APP 端 - 社交绑定 Request VO,使用 code 授权码") +@ApiModel("用户 APP - 社交绑定 Request VO,使用 code 授权码") @Data @NoArgsConstructor @AllArgsConstructor diff --git a/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthSocialLogin2ReqVO.java b/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthSocialLogin2ReqVO.java index cc832e371..d6bdaf009 100644 --- a/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthSocialLogin2ReqVO.java +++ b/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthSocialLogin2ReqVO.java @@ -14,7 +14,7 @@ import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import javax.validation.constraints.Pattern; -@ApiModel("APP 端 - 社交登录 Request VO,使用 code 授权码 + 账号密码") +@ApiModel("用户 APP - 社交登录 Request VO,使用 code 授权码 + 账号密码") @Data @NoArgsConstructor @AllArgsConstructor diff --git a/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthSocialLoginReqVO.java b/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthSocialLoginReqVO.java index 3d1562522..b919bf275 100644 --- a/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthSocialLoginReqVO.java +++ b/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthSocialLoginReqVO.java @@ -12,7 +12,7 @@ import lombok.NoArgsConstructor; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; -@ApiModel("APP 端 - 社交登录 Request VO,使用 code 授权码") +@ApiModel("用户 APP - 社交登录 Request VO,使用 code 授权码") @Data @NoArgsConstructor @AllArgsConstructor diff --git a/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthSocialUnbindReqVO.java b/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthSocialUnbindReqVO.java index 9225080f7..ac4308e6a 100644 --- a/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthSocialUnbindReqVO.java +++ b/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthSocialUnbindReqVO.java @@ -12,7 +12,7 @@ import lombok.NoArgsConstructor; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; -@ApiModel("APP 端 - 取消社交绑定 Request VO,使用 code 授权码") +@ApiModel("用户 APP - 取消社交绑定 Request VO,使用 code 授权码") @Data @NoArgsConstructor @AllArgsConstructor diff --git a/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthUpdatePasswordReqVO.java b/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthUpdatePasswordReqVO.java index 4bbecbc31..9addb1046 100644 --- a/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthUpdatePasswordReqVO.java +++ b/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/auth/vo/AppAuthUpdatePasswordReqVO.java @@ -12,7 +12,7 @@ import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotEmpty; // TODO 芋艿:code review 相关逻辑 -@ApiModel("APP 端 - 修改密码 Request VO") +@ApiModel("用户 APP - 修改密码 Request VO") @Data @NoArgsConstructor @AllArgsConstructor diff --git a/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/package-info.java b/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/package-info.java deleted file mode 100644 index 7f013eaa9..000000000 --- a/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/package-info.java +++ /dev/null @@ -1 +0,0 @@ -package cn.iocoder.yudao.module.member.controller.app; diff --git a/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/user/AppUserController.java b/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/user/AppUserController.java index cf5b5348c..9f1d25d78 100644 --- a/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/user/AppUserController.java +++ b/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/user/AppUserController.java @@ -23,7 +23,7 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; import static cn.iocoder.yudao.module.member.enums.MemberErrorCodeConstants.FILE_IS_EMPTY; -@Api(tags = "APP 端 - 用户个人中心") +@Api(tags = "用户 APP - 用户个人中心") @RestController @RequestMapping("/member/user") @Validated diff --git a/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/user/vo/AppUserInfoRespVO.java b/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/user/vo/AppUserInfoRespVO.java index f8d9d20d1..32e684c84 100644 --- a/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/user/vo/AppUserInfoRespVO.java +++ b/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/user/vo/AppUserInfoRespVO.java @@ -6,7 +6,7 @@ import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; -@ApiModel("APP 端 - 用户个人信息 Response VO") +@ApiModel("用户 APP - 用户个人信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor diff --git a/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/user/vo/AppUserUpdateMobileReqVO.java b/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/user/vo/AppUserUpdateMobileReqVO.java index ded94ef1a..1ab6e7c84 100644 --- a/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/user/vo/AppUserUpdateMobileReqVO.java +++ b/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/user/vo/AppUserUpdateMobileReqVO.java @@ -13,7 +13,7 @@ import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.Pattern; -@ApiModel("APP 端 - 修改手机 Request VO") +@ApiModel("用户 APP - 修改手机 Request VO") @Data @NoArgsConstructor @AllArgsConstructor diff --git a/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/package-info.java b/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/package-info.java index ea9687d81..9e2888c69 100644 --- a/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/package-info.java +++ b/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/package-info.java @@ -1,6 +1,6 @@ /** * 提供 RESTful API 给前端: * 1. admin 包:提供给管理后台 yudao-ui-admin 前端项目 - * 2. app 包:提供给用户 APP yudao-ui-app 前端项目 + * 2. app 包:提供给用户 APP yudao-ui-app 前端项目,它的 Controller 和 VO 都要添加 App 前缀,用于和管理后台进行区分 */ package cn.iocoder.yudao.module.member.controller; diff --git a/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/service/auth/AuthServiceImpl.java b/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/service/auth/AuthServiceImpl.java index 6deabba12..dfeb7f040 100644 --- a/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/service/auth/AuthServiceImpl.java +++ b/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/service/auth/AuthServiceImpl.java @@ -51,7 +51,7 @@ import static cn.iocoder.yudao.module.member.enums.SysErrorCodeConstants.*; * * @author 芋道源码 */ -@Service +@Service("memberAuthService") @Slf4j public class AuthServiceImpl implements AuthService { diff --git a/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/service/user/UserServiceImpl.java b/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/service/user/UserServiceImpl.java index a899b79e6..fd0dd0582 100644 --- a/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/service/user/UserServiceImpl.java +++ b/yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/service/user/UserServiceImpl.java @@ -32,7 +32,7 @@ import static cn.iocoder.yudao.module.member.enums.MemberErrorCodeConstants.USER * * @author 芋道源码 */ -@Service +@Service("memberUserService") @Valid @Slf4j public class UserServiceImpl implements UserService { diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/auth/SysAuthController.http b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/AuthController.http similarity index 61% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/auth/SysAuthController.http rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/AuthController.http index f8e32a5b8..25124ca33 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/auth/SysAuthController.http +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/AuthController.http @@ -1,7 +1,7 @@ ### 请求 /login 接口 => 成功 -POST {{baseUrl}}/login +POST {{baseUrl}}/system/login Content-Type: application/json -tenant-id: 1 +tenant-id: {{adminTenentId}} { "username": "admin", @@ -11,16 +11,12 @@ tenant-id: 1 } ### 请求 /get-permission-info 接口 => 成功 -GET {{baseUrl}}/get-permission-info +GET {{baseUrl}}/system/get-permission-info Authorization: Bearer {{token}} -tenant-id: 1 +tenant-id: {{adminTenentId}} ### 请求 /list-menus 接口 => 成功 -GET {{baseUrl}}/list-menus +GET {{baseUrl}}/system/list-menus Authorization: Bearer {{token}} #Authorization: Bearer a6aa7714a2e44c95aaa8a2c5adc2a67a -tenant-id: 1 - -### 请求 /druid/xxx 接口 => 失败 TODO 临时测试 -GET http://127.0.0.1:8080/druid/123 -Authorization: Bearer {{token}} +tenant-id: {{adminTenentId}} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/auth/SysAuthController.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/AuthController.java similarity index 73% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/auth/SysAuthController.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/AuthController.java index 52ca73cf7..6829c6ce9 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/auth/SysAuthController.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/AuthController.java @@ -1,13 +1,13 @@ -package cn.iocoder.yudao.module.system.controller.auth; +package cn.iocoder.yudao.module.system.controller.admin.auth; -import cn.iocoder.yudao.module.system.controller.auth.vo.auth.*; -import cn.iocoder.yudao.module.system.convert.auth.SysAuthConvert; -import cn.iocoder.yudao.module.system.dal.dataobject.permission.SysMenuDO; +import cn.iocoder.yudao.module.system.controller.admin.auth.vo.auth.*; +import cn.iocoder.yudao.module.system.convert.auth.AuthConvert; +import cn.iocoder.yudao.module.system.dal.dataobject.permission.MenuDO; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.permission.SysRoleDO; import cn.iocoder.yudao.module.system.enums.permission.MenuTypeEnum; -import cn.iocoder.yudao.module.system.service.auth.SysAuthService; -import cn.iocoder.yudao.module.system.service.permission.SysPermissionService; -import cn.iocoder.yudao.module.system.service.permission.SysRoleService; +import cn.iocoder.yudao.module.system.service.auth.AuthService; +import cn.iocoder.yudao.module.system.service.permission.PermissionService; +import cn.iocoder.yudao.module.system.service.permission.RoleService; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.user.SysUserDO; import cn.iocoder.yudao.coreservice.modules.system.service.social.SysSocialCoreService; import cn.iocoder.yudao.coreservice.modules.system.service.user.SysUserCoreService; @@ -21,6 +21,7 @@ import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -34,36 +35,37 @@ import static cn.iocoder.yudao.framework.common.util.servlet.ServletUtils.getUse import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserRoleIds; -@Api(tags = "认证") +@Api(tags = "管理后台 - 认证") @RestController -@RequestMapping("/") +@RequestMapping("/system") // 暂时不跟 /auth 结尾 @Validated @Slf4j -public class SysAuthController { +public class AuthController { - @Resource - private SysAuthService authService; + @Autowired + @SuppressWarnings("SpringJavaAutowiredFieldsWarningInspection") // AuthService 存在重名 + private AuthService authService; @Resource private SysUserCoreService userCoreService; @Resource - private SysRoleService roleService; + private RoleService roleService; @Resource - private SysPermissionService permissionService; + private PermissionService permissionService; @Resource private SysSocialCoreService socialCoreService; @PostMapping("/login") @ApiOperation("使用账号密码登录") @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 - public CommonResult login(@RequestBody @Valid SysAuthLoginReqVO reqVO) { + public CommonResult login(@RequestBody @Valid AuthLoginReqVO reqVO) { String token = authService.login(reqVO, getClientIP(), getUserAgent()); // 返回结果 - return success(SysAuthLoginRespVO.builder().token(token).build()); + return success(AuthLoginRespVO.builder().token(token).build()); } @GetMapping("/get-permission-info") @ApiOperation("获取登录用户的权限信息") - public CommonResult getPermissionInfo() { + public CommonResult getPermissionInfo() { // 获得用户信息 SysUserDO user = userCoreService.getUser(getLoginUserId()); if (user == null) { @@ -72,24 +74,24 @@ public class SysAuthController { // 获得角色列表 List roleList = roleService.getRolesFromCache(getLoginUserRoleIds()); // 获得菜单列表 - List menuList = permissionService.getRoleMenusFromCache( + List menuList = permissionService.getRoleMenusFromCache( getLoginUserRoleIds(), // 注意,基于登录的角色,因为后续的权限判断也是基于它 SetUtils.asSet(MenuTypeEnum.DIR.getType(), MenuTypeEnum.MENU.getType(), MenuTypeEnum.BUTTON.getType()), SetUtils.asSet(CommonStatusEnum.ENABLE.getStatus())); // 拼接结果返回 - return success(SysAuthConvert.INSTANCE.convert(user, roleList, menuList)); + return success(AuthConvert.INSTANCE.convert(user, roleList, menuList)); } @GetMapping("list-menus") @ApiOperation("获得登录用户的菜单列表") - public CommonResult> getMenus() { + public CommonResult> getMenus() { // 获得用户拥有的菜单列表 - List menuList = permissionService.getRoleMenusFromCache( + List menuList = permissionService.getRoleMenusFromCache( getLoginUserRoleIds(), // 注意,基于登录的角色,因为后续的权限判断也是基于它 SetUtils.asSet(MenuTypeEnum.DIR.getType(), MenuTypeEnum.MENU.getType()), // 只要目录和菜单类型 SetUtils.asSet(CommonStatusEnum.ENABLE.getStatus())); // 只要开启的 // 转换成 Tree 结构返回 - return success(SysAuthConvert.INSTANCE.buildMenuTree(menuList)); + return success(AuthConvert.INSTANCE.buildMenuTree(menuList)); } // ========== 社交登录相关 ========== @@ -108,31 +110,31 @@ public class SysAuthController { @PostMapping("/social-login") @ApiOperation("社交登录,使用 code 授权码") @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 - public CommonResult socialLogin(@RequestBody @Valid SysAuthSocialLoginReqVO reqVO) { + public CommonResult socialLogin(@RequestBody @Valid AuthSocialLoginReqVO reqVO) { String token = authService.socialLogin(reqVO, getClientIP(), getUserAgent()); // 返回结果 - return success(SysAuthLoginRespVO.builder().token(token).build()); + return success(AuthLoginRespVO.builder().token(token).build()); } @PostMapping("/social-login2") @ApiOperation("社交登录,使用 code 授权码 + 账号密码") @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 - public CommonResult socialLogin2(@RequestBody @Valid SysAuthSocialLogin2ReqVO reqVO) { + public CommonResult socialLogin2(@RequestBody @Valid AuthSocialLogin2ReqVO reqVO) { String token = authService.socialLogin2(reqVO, getClientIP(), getUserAgent()); // 返回结果 - return success(SysAuthLoginRespVO.builder().token(token).build()); + return success(AuthLoginRespVO.builder().token(token).build()); } @PostMapping("/social-bind") @ApiOperation("社交绑定,使用 code 授权码") - public CommonResult socialBind(@RequestBody @Valid SysAuthSocialBindReqVO reqVO) { + public CommonResult socialBind(@RequestBody @Valid AuthSocialBindReqVO reqVO) { authService.socialBind(getLoginUserId(), reqVO); return CommonResult.success(true); } @DeleteMapping("/social-unbind") @ApiOperation("取消社交绑定") - public CommonResult socialUnbind(@RequestBody SysAuthSocialUnbindReqVO reqVO) { + public CommonResult socialUnbind(@RequestBody AuthSocialUnbindReqVO reqVO) { socialCoreService.unbindSocialUser(getLoginUserId(), reqVO.getType(), reqVO.getUnionId(), UserTypeEnum.ADMIN); return CommonResult.success(true); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/auth/SysUserSessionController.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/UserSessionController.java similarity index 78% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/auth/SysUserSessionController.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/UserSessionController.java index f5a68686c..415e5b285 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/auth/SysUserSessionController.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/UserSessionController.java @@ -1,10 +1,10 @@ -package cn.iocoder.yudao.module.system.controller.auth; +package cn.iocoder.yudao.module.system.controller.admin.auth; -import cn.iocoder.yudao.module.system.controller.auth.vo.session.SysUserSessionPageItemRespVO; -import cn.iocoder.yudao.module.system.controller.auth.vo.session.SysUserSessionPageReqVO; -import cn.iocoder.yudao.module.system.convert.auth.SysUserSessionConvert; +import cn.iocoder.yudao.module.system.controller.admin.auth.vo.session.UserSessionPageItemRespVO; +import cn.iocoder.yudao.module.system.controller.admin.auth.vo.session.UserSessionPageReqVO; +import cn.iocoder.yudao.module.system.convert.auth.UserSessionConvert; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.dept.SysDeptDO; -import cn.iocoder.yudao.module.system.service.auth.SysUserSessionService; +import cn.iocoder.yudao.module.system.service.auth.UserSessionService; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.auth.SysUserSessionDO; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.user.SysUserDO; import cn.iocoder.yudao.coreservice.modules.system.service.auth.SysUserSessionCoreService; @@ -28,13 +28,13 @@ import java.util.Map; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; -@Api(tags = "用户 Session") +@Api(tags = "管理后台 - 用户 Session") @RestController @RequestMapping("/system/user-session") -public class SysUserSessionController { +public class UserSessionController { @Resource - private SysUserSessionService userSessionService; + private UserSessionService userSessionService; @Resource private SysUserSessionCoreService userSessionCoreService; @Resource @@ -46,7 +46,7 @@ public class SysUserSessionController { @GetMapping("/page") @ApiOperation("获得 Session 分页列表") @PreAuthorize("@ss.hasPermission('system:user-session:page')") - public CommonResult> getUserSessionPage(@Validated SysUserSessionPageReqVO reqVO) { + public CommonResult> getUserSessionPage(@Validated UserSessionPageReqVO reqVO) { // 获得 Session 分页 PageResult pageResult = userSessionService.getUserSessionPage(reqVO); @@ -56,9 +56,9 @@ public class SysUserSessionController { Map deptMap = deptCoreService.getDeptMap( convertList(userMap.values(), SysUserDO::getDeptId)); // 拼接结果返回 - List sessionList = new ArrayList<>(pageResult.getList().size()); + List sessionList = new ArrayList<>(pageResult.getList().size()); pageResult.getList().forEach(session -> { - SysUserSessionPageItemRespVO respVO = SysUserSessionConvert.INSTANCE.convert(session); + UserSessionPageItemRespVO respVO = UserSessionConvert.INSTANCE.convert(session); sessionList.add(respVO); // 设置用户账号 MapUtils.findAndThen(userMap, session.getUserId(), user -> { diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/auth/vo/auth/SysAuthLoginReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/auth/AuthLoginReqVO.java similarity index 89% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/auth/vo/auth/SysAuthLoginReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/auth/AuthLoginReqVO.java index 2eac3fb4a..8e9eb4ed2 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/auth/vo/auth/SysAuthLoginReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/auth/AuthLoginReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.auth.vo.auth; +package cn.iocoder.yudao.module.system.controller.admin.auth.vo.auth; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -11,12 +11,12 @@ import org.hibernate.validator.constraints.Length; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.Pattern; -@ApiModel("账号密码登录 Request VO") +@ApiModel("管理后台 - 账号密码登录 Request VO") @Data @NoArgsConstructor @AllArgsConstructor @Builder -public class SysAuthLoginReqVO { +public class AuthLoginReqVO { @ApiModelProperty(value = "账号", required = true, example = "yudaoyuanma") @NotEmpty(message = "登录账号不能为空") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/auth/vo/auth/SysAuthLoginRespVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/auth/AuthLoginRespVO.java similarity index 69% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/auth/vo/auth/SysAuthLoginRespVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/auth/AuthLoginRespVO.java index 7e1bea57e..bd13ba377 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/auth/vo/auth/SysAuthLoginRespVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/auth/AuthLoginRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.auth.vo.auth; +package cn.iocoder.yudao.module.system.controller.admin.auth.vo.auth; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -7,12 +7,12 @@ import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -@ApiModel("账号密码登录 Response VO") +@ApiModel("管理后台 - 账号密码登录 Response VO") @Data @NoArgsConstructor @AllArgsConstructor @Builder -public class SysAuthLoginRespVO { +public class AuthLoginRespVO { @ApiModelProperty(value = "token", required = true, example = "yudaoyuanma") private String token; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/auth/vo/auth/SysAuthMenuRespVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/auth/AuthMenuRespVO.java similarity index 84% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/auth/vo/auth/SysAuthMenuRespVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/auth/AuthMenuRespVO.java index 762644e20..1c46ec291 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/auth/vo/auth/SysAuthMenuRespVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/auth/AuthMenuRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.auth.vo.auth; +package cn.iocoder.yudao.module.system.controller.admin.auth.vo.auth; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -9,12 +9,12 @@ import lombok.NoArgsConstructor; import java.util.List; -@ApiModel("登录用户的菜单信息 Response VO") +@ApiModel("管理后台 - 登录用户的菜单信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor @Builder -public class SysAuthMenuRespVO { +public class AuthMenuRespVO { @ApiModelProperty(value = "菜单名称", required = true, example = "芋道") private Long id; @@ -37,6 +37,6 @@ public class SysAuthMenuRespVO { /** * 子路由 */ - private List children; + private List children; } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/auth/vo/auth/SysAuthPermissionInfoRespVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/auth/AuthPermissionInfoRespVO.java similarity index 81% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/auth/vo/auth/SysAuthPermissionInfoRespVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/auth/AuthPermissionInfoRespVO.java index e50bb84cc..bada25205 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/auth/vo/auth/SysAuthPermissionInfoRespVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/auth/AuthPermissionInfoRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.auth.vo.auth; +package cn.iocoder.yudao.module.system.controller.admin.auth.vo.auth; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -9,12 +9,12 @@ import lombok.NoArgsConstructor; import java.util.Set; -@ApiModel(value = "登录用户的权限信息 Response VO", description = "额外包括用户信息和角色列表") +@ApiModel(value = "管理后台 - 登录用户的权限信息 Response VO", description = "额外包括用户信息和角色列表") @Data @NoArgsConstructor @AllArgsConstructor @Builder -public class SysAuthPermissionInfoRespVO { +public class AuthPermissionInfoRespVO { @ApiModelProperty(value = "用户信息", required = true) private UserVO user; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/auth/vo/auth/SysAuthSocialBindReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/auth/AuthSocialBindReqVO.java similarity index 85% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/auth/vo/auth/SysAuthSocialBindReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/auth/AuthSocialBindReqVO.java index d1a48ee77..3bb408c0b 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/auth/vo/auth/SysAuthSocialBindReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/auth/AuthSocialBindReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.auth.vo.auth; +package cn.iocoder.yudao.module.system.controller.admin.auth.vo.auth; import cn.iocoder.yudao.coreservice.modules.system.enums.social.SysSocialTypeEnum; import cn.iocoder.yudao.framework.common.validation.InEnum; @@ -12,12 +12,12 @@ import lombok.NoArgsConstructor; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; -@ApiModel("社交绑定 Request VO,使用 code 授权码") +@ApiModel("管理后台 - 社交绑定 Request VO,使用 code 授权码") @Data @NoArgsConstructor @AllArgsConstructor @Builder -public class SysAuthSocialBindReqVO { +public class AuthSocialBindReqVO { @ApiModelProperty(value = "社交平台的类型", required = true, example = "10", notes = "参见 SysUserSocialTypeEnum 枚举值") @InEnum(SysSocialTypeEnum.class) diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/auth/vo/auth/SysAuthSocialLogin2ReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/auth/AuthSocialLogin2ReqVO.java similarity index 89% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/auth/vo/auth/SysAuthSocialLogin2ReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/auth/AuthSocialLogin2ReqVO.java index 25e0d6551..74955a6c5 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/auth/vo/auth/SysAuthSocialLogin2ReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/auth/AuthSocialLogin2ReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.auth.vo.auth; +package cn.iocoder.yudao.module.system.controller.admin.auth.vo.auth; import cn.iocoder.yudao.coreservice.modules.system.enums.social.SysSocialTypeEnum; import cn.iocoder.yudao.framework.common.validation.InEnum; @@ -14,12 +14,12 @@ import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import javax.validation.constraints.Pattern; -@ApiModel("社交登录 Request VO,使用 code 授权码 + 账号密码") +@ApiModel("管理后台 - 社交登录 Request VO,使用 code 授权码 + 账号密码") @Data @NoArgsConstructor @AllArgsConstructor @Builder -public class SysAuthSocialLogin2ReqVO { +public class AuthSocialLogin2ReqVO { @ApiModelProperty(value = "社交平台的类型", required = true, example = "10", notes = "参见 SysUserSocialTypeEnum 枚举值") @InEnum(SysSocialTypeEnum.class) diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/auth/vo/auth/SysAuthSocialLoginReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/auth/AuthSocialLoginReqVO.java similarity index 85% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/auth/vo/auth/SysAuthSocialLoginReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/auth/AuthSocialLoginReqVO.java index 930fea227..4f7b8d76d 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/auth/vo/auth/SysAuthSocialLoginReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/auth/AuthSocialLoginReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.auth.vo.auth; +package cn.iocoder.yudao.module.system.controller.admin.auth.vo.auth; import cn.iocoder.yudao.coreservice.modules.system.enums.social.SysSocialTypeEnum; import cn.iocoder.yudao.framework.common.validation.InEnum; @@ -12,12 +12,12 @@ import lombok.NoArgsConstructor; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; -@ApiModel("社交登录 Request VO,使用 code 授权码") +@ApiModel("管理后台 - 社交登录 Request VO,使用 code 授权码") @Data @NoArgsConstructor @AllArgsConstructor @Builder -public class SysAuthSocialLoginReqVO { +public class AuthSocialLoginReqVO { @ApiModelProperty(value = "社交平台的类型", required = true, example = "10", notes = "参见 SysUserSocialTypeEnum 枚举值") @InEnum(SysSocialTypeEnum.class) diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/auth/vo/auth/SysAuthSocialUnbindReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/auth/AuthSocialUnbindReqVO.java similarity index 83% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/auth/vo/auth/SysAuthSocialUnbindReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/auth/AuthSocialUnbindReqVO.java index 7bf6c8ef9..b16f1ef77 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/auth/vo/auth/SysAuthSocialUnbindReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/auth/AuthSocialUnbindReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.auth.vo.auth; +package cn.iocoder.yudao.module.system.controller.admin.auth.vo.auth; import cn.iocoder.yudao.coreservice.modules.system.enums.social.SysSocialTypeEnum; import cn.iocoder.yudao.framework.common.validation.InEnum; @@ -12,12 +12,12 @@ import lombok.NoArgsConstructor; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; -@ApiModel("取消社交绑定 Request VO,使用 code 授权码") +@ApiModel("管理后台 - 取消社交绑定 Request VO,使用 code 授权码") @Data @NoArgsConstructor @AllArgsConstructor @Builder -public class SysAuthSocialUnbindReqVO { +public class AuthSocialUnbindReqVO { @ApiModelProperty(value = "社交平台的类型", required = true, example = "10", notes = "参见 SysUserSocialTypeEnum 枚举值") @InEnum(SysSocialTypeEnum.class) diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/auth/vo/session/SysUserSessionPageItemRespVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/session/UserSessionPageItemRespVO.java similarity index 78% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/auth/vo/session/SysUserSessionPageItemRespVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/session/UserSessionPageItemRespVO.java index debdf5998..ad12877ef 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/auth/vo/session/SysUserSessionPageItemRespVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/session/UserSessionPageItemRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.auth.vo.session; +package cn.iocoder.yudao.module.system.controller.admin.auth.vo.session; import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.annotations.ApiModel; @@ -10,12 +10,12 @@ import lombok.NoArgsConstructor; import java.util.Date; -@ApiModel(value = "用户在线 Session Response VO", description = "相比用户基本信息来说,会多部门、用户账号等信息") +@ApiModel(value = "管理后台 - 用户在线 Session Response VO", description = "相比用户基本信息来说,会多部门、用户账号等信息") @Data @NoArgsConstructor @AllArgsConstructor @EqualsAndHashCode(callSuper = true) -public class SysUserSessionPageItemRespVO extends PageParam { +public class UserSessionPageItemRespVO extends PageParam { @ApiModelProperty(value = "Session 编号", required = true, example = "fe50b9f6-d177-44b1-8da9-72ea34f63db7") private String id; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/auth/vo/session/SysUserSessionPageReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/session/UserSessionPageReqVO.java similarity index 71% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/auth/vo/session/SysUserSessionPageReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/session/UserSessionPageReqVO.java index c834f5d8c..7e85c87ba 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/auth/vo/session/SysUserSessionPageReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/session/UserSessionPageReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.auth.vo.session; +package cn.iocoder.yudao.module.system.controller.admin.auth.vo.session; import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.annotations.ApiModel; @@ -6,10 +6,10 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; -@ApiModel("在线用户 Session 分页 Request VO") +@ApiModel("管理后台 - 在线用户 Session 分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) -public class SysUserSessionPageReqVO extends PageParam { +public class UserSessionPageReqVO extends PageParam { @ApiModelProperty(value = "用户 IP", example = "127.0.0.1", notes = "模糊匹配") private String userIp; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/common/SysCaptchaController.http b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/common/CaptchaController.http similarity index 100% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/common/SysCaptchaController.http rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/common/CaptchaController.http diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/common/SysCaptchaController.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/common/CaptchaController.java similarity index 61% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/common/SysCaptchaController.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/common/CaptchaController.java index 317895005..5fc0b0a6b 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/common/SysCaptchaController.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/common/CaptchaController.java @@ -1,8 +1,8 @@ -package cn.iocoder.yudao.module.system.controller.common; +package cn.iocoder.yudao.module.system.controller.admin.common; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.module.system.controller.common.vo.SysCaptchaImageRespVO; -import cn.iocoder.yudao.module.system.service.common.SysCaptchaService; +import cn.iocoder.yudao.module.system.controller.admin.common.vo.CaptchaImageRespVO; +import cn.iocoder.yudao.module.system.service.common.CaptchaService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.web.bind.annotation.GetMapping; @@ -13,17 +13,17 @@ import javax.annotation.Resource; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -@Api(tags = "验证码") +@Api(tags = "管理后台 - 验证码") @RestController @RequestMapping("/system/captcha") -public class SysCaptchaController { +public class CaptchaController { @Resource - private SysCaptchaService captchaService; + private CaptchaService captchaService; @GetMapping("/get-image") @ApiOperation("生成图片验证码") - public CommonResult getCaptchaImage() { + public CommonResult getCaptchaImage() { return success(captchaService.getCaptchaImage()); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/common/vo/SysCaptchaImageRespVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/common/vo/CaptchaImageRespVO.java similarity index 64% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/common/vo/SysCaptchaImageRespVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/common/vo/CaptchaImageRespVO.java index 5c55b16ff..cef5d0845 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/common/vo/SysCaptchaImageRespVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/common/vo/CaptchaImageRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.common.vo; +package cn.iocoder.yudao.module.system.controller.admin.common.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -7,14 +7,15 @@ import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -@ApiModel("验证码图片 Response VO") +@ApiModel("管理后台 - 验证码图片 Response VO") @Data @Builder @NoArgsConstructor @AllArgsConstructor -public class SysCaptchaImageRespVO { +public class CaptchaImageRespVO { - @ApiModelProperty(value = "uuid", required = true, example = "1b3b7d00-83a8-4638-9e37-d67011855968", notes = "通过该 uuid 作为该验证码的标识") + @ApiModelProperty(value = "uuid", required = true, example = "1b3b7d00-83a8-4638-9e37-d67011855968", + notes = "通过该 uuid 作为该验证码的标识") private String uuid; @ApiModelProperty(value = "图片", required = true, notes = "验证码的图片内容,使用 Base64 编码") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/SysDeptController.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/DeptController.java similarity index 73% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/SysDeptController.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/DeptController.java index 70c365560..2459736a5 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/SysDeptController.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/DeptController.java @@ -1,12 +1,12 @@ -package cn.iocoder.yudao.module.system.controller.dept; +package cn.iocoder.yudao.module.system.controller.admin.dept; import cn.iocoder.yudao.coreservice.modules.system.service.dept.SysDeptCoreService; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.module.system.controller.dept.vo.dept.*; -import cn.iocoder.yudao.module.system.convert.dept.SysDeptConvert; +import cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept.*; +import cn.iocoder.yudao.module.system.convert.dept.DeptConvert; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.dept.SysDeptDO; -import cn.iocoder.yudao.module.system.service.dept.SysDeptService; +import cn.iocoder.yudao.module.system.service.dept.DeptService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; @@ -21,14 +21,14 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -@Api(tags = "部门") +@Api(tags = "管理后台 - 部门") @RestController @RequestMapping("/system/dept") @Validated -public class SysDeptController { +public class DeptController { @Resource - private SysDeptService deptService; + private DeptService deptService; @Resource private SysDeptCoreService deptCoreService; @@ -36,7 +36,7 @@ public class SysDeptController { @PostMapping("create") @ApiOperation("创建部门") @PreAuthorize("@ss.hasPermission('system:dept:create')") - public CommonResult createDept(@Valid @RequestBody SysDeptCreateReqVO reqVO) { + public CommonResult createDept(@Valid @RequestBody DeptCreateReqVO reqVO) { Long deptId = deptService.createDept(reqVO); return success(deptId); } @@ -44,7 +44,7 @@ public class SysDeptController { @PutMapping("update") @ApiOperation("更新部门") @PreAuthorize("@ss.hasPermission('system:dept:update')") - public CommonResult updateDept(@Valid @RequestBody SysDeptUpdateReqVO reqVO) { + public CommonResult updateDept(@Valid @RequestBody DeptUpdateReqVO reqVO) { deptService.updateDept(reqVO); return success(true); } @@ -61,30 +61,30 @@ public class SysDeptController { @GetMapping("/list") @ApiOperation("获取部门列表") @PreAuthorize("@ss.hasPermission('system:dept:query')") - public CommonResult> listDepts(SysDeptListReqVO reqVO) { + public CommonResult> listDepts(DeptListReqVO reqVO) { List list = deptService.getSimpleDepts(reqVO); list.sort(Comparator.comparing(SysDeptDO::getSort)); - return success(SysDeptConvert.INSTANCE.convertList(list)); + return success(DeptConvert.INSTANCE.convertList(list)); } @GetMapping("/list-all-simple") @ApiOperation(value = "获取部门精简信息列表", notes = "只包含被开启的部门,主要用于前端的下拉选项") - public CommonResult> getSimpleDepts() { + public CommonResult> getSimpleDepts() { // 获得部门列表,只要开启状态的 - SysDeptListReqVO reqVO = new SysDeptListReqVO(); + DeptListReqVO reqVO = new DeptListReqVO(); reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); List list = deptService.getSimpleDepts(reqVO); // 排序后,返回给前端 list.sort(Comparator.comparing(SysDeptDO::getSort)); - return success(SysDeptConvert.INSTANCE.convertList02(list)); + return success(DeptConvert.INSTANCE.convertList02(list)); } @GetMapping("/get") @ApiOperation("获得部门信息") @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) @PreAuthorize("@ss.hasPermission('system:dept:query')") - public CommonResult getDept(@RequestParam("id") Long id) { - return success(SysDeptConvert.INSTANCE.convert(deptCoreService.getDept(id))); + public CommonResult getDept(@RequestParam("id") Long id) { + return success(DeptConvert.INSTANCE.convert(deptCoreService.getDept(id))); } } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/SysPostController.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/PostController.java similarity index 73% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/SysPostController.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/PostController.java index 762044dad..9191ce25f 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/SysPostController.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/PostController.java @@ -1,14 +1,14 @@ -package cn.iocoder.yudao.module.system.controller.dept; +package cn.iocoder.yudao.module.system.controller.admin.dept; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; -import cn.iocoder.yudao.module.system.controller.dept.vo.post.*; -import cn.iocoder.yudao.module.system.convert.dept.SysPostConvert; +import cn.iocoder.yudao.module.system.controller.admin.dept.vo.post.*; +import cn.iocoder.yudao.module.system.convert.dept.PostConvert; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.dept.SysPostDO; -import cn.iocoder.yudao.module.system.service.dept.SysPostService; +import cn.iocoder.yudao.module.system.service.dept.PostService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; @@ -27,19 +27,19 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; -@Api(tags = "岗位") +@Api(tags = "管理后台 - 岗位") @RestController @RequestMapping("/system/post") -@Valid -public class SysPostController { +@Validated +public class PostController { @Resource - private SysPostService postService; + private PostService postService; @PostMapping("/create") @ApiOperation("创建岗位") @PreAuthorize("@ss.hasPermission('system:post:create')") - public CommonResult createPost(@Valid @RequestBody SysPostCreateReqVO reqVO) { + public CommonResult createPost(@Valid @RequestBody PostCreateReqVO reqVO) { Long postId = postService.createPost(reqVO); return success(postId); } @@ -47,7 +47,7 @@ public class SysPostController { @PutMapping("/update") @ApiOperation("修改岗位") @PreAuthorize("@ss.hasPermission('system:post:update')") - public CommonResult updatePost(@Valid @RequestBody SysPostUpdateReqVO reqVO) { + public CommonResult updatePost(@Valid @RequestBody PostUpdateReqVO reqVO) { postService.updatePost(reqVO); return success(true); } @@ -64,36 +64,36 @@ public class SysPostController { @ApiOperation("获得岗位信息") @ApiImplicitParam(name = "id", value = "岗位编号", required = true, example = "1024", dataTypeClass = Long.class) @PreAuthorize("@ss.hasPermission('system:post:query')") - public CommonResult getPost(@RequestParam("id") Long id) { - return success(SysPostConvert.INSTANCE.convert(postService.getPost(id))); + public CommonResult getPost(@RequestParam("id") Long id) { + return success(PostConvert.INSTANCE.convert(postService.getPost(id))); } @GetMapping("/list-all-simple") @ApiOperation(value = "获取岗位精简信息列表", notes = "只包含被开启的岗位,主要用于前端的下拉选项") - public CommonResult> getSimplePosts() { + public CommonResult> getSimplePosts() { // 获得岗位列表,只要开启状态的 List list = postService.getPosts(null, Collections.singleton(CommonStatusEnum.ENABLE.getStatus())); // 排序后,返回给前端 list.sort(Comparator.comparing(SysPostDO::getSort)); - return success(SysPostConvert.INSTANCE.convertList02(list)); + return success(PostConvert.INSTANCE.convertList02(list)); } @GetMapping("/page") @ApiOperation("获得岗位分页列表") @PreAuthorize("@ss.hasPermission('system:post:query')") - public CommonResult> getPostPage(@Validated SysPostPageReqVO reqVO) { - return success(SysPostConvert.INSTANCE.convertPage(postService.getPostPage(reqVO))); + public CommonResult> getPostPage(@Validated PostPageReqVO reqVO) { + return success(PostConvert.INSTANCE.convertPage(postService.getPostPage(reqVO))); } @GetMapping("/export") @ApiOperation("岗位管理") @PreAuthorize("@ss.hasPermission('system:post:export')") @OperateLog(type = EXPORT) - public void export(HttpServletResponse response, @Validated SysPostExportReqVO reqVO) throws IOException { + public void export(HttpServletResponse response, @Validated PostExportReqVO reqVO) throws IOException { List posts = postService.getPosts(reqVO); - List data = SysPostConvert.INSTANCE.convertList03(posts); + List data = PostConvert.INSTANCE.convertList03(posts); // 输出 - ExcelUtils.write(response, "岗位数据.xls", "岗位列表", SysPostExcelVO.class, data); + ExcelUtils.write(response, "岗位数据.xls", "岗位列表", PostExcelVO.class, data); } } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/dept/SysDeptBaseVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptBaseVO.java similarity index 94% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/dept/SysDeptBaseVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptBaseVO.java index 5e0bc1477..0661a54f9 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/dept/SysDeptBaseVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptBaseVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.dept.vo.dept; +package cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -13,7 +13,7 @@ import javax.validation.constraints.Size; * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 */ @Data -public class SysDeptBaseVO { +public class DeptBaseVO { @ApiModelProperty(value = "菜单名称", required = true, example = "芋道") @NotBlank(message = "部门名称不能为空") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/dept/SysDeptCreateReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptCreateReqVO.java similarity index 52% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/dept/SysDeptCreateReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptCreateReqVO.java index 4909ef8bc..efd6c39a3 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/dept/SysDeptCreateReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptCreateReqVO.java @@ -1,13 +1,13 @@ -package cn.iocoder.yudao.module.system.controller.dept.vo.dept; +package cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept; import io.swagger.annotations.ApiModel; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; -@ApiModel("部门创建 Request VO") +@ApiModel("管理后台 - 部门创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) -public class SysDeptCreateReqVO extends SysDeptBaseVO { +public class DeptCreateReqVO extends DeptBaseVO { } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/dept/SysDeptListReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptListReqVO.java similarity index 71% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/dept/SysDeptListReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptListReqVO.java index 840fb0480..171788b59 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/dept/SysDeptListReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptListReqVO.java @@ -1,12 +1,12 @@ -package cn.iocoder.yudao.module.system.controller.dept.vo.dept; +package cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; -@ApiModel("部门列表 Request VO") +@ApiModel("管理后台 - 部门列表 Request VO") @Data -public class SysDeptListReqVO { +public class DeptListReqVO { @ApiModelProperty(value = "部门名称", example = "芋道", notes = "模糊匹配") private String name; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/dept/SysDeptRespVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptRespVO.java similarity index 77% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/dept/SysDeptRespVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptRespVO.java index edcc455aa..db60a3107 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/dept/SysDeptRespVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.dept.vo.dept; +package cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -7,10 +7,10 @@ import lombok.EqualsAndHashCode; import java.util.Date; -@ApiModel("部门信息 Response VO") +@ApiModel("管理后台 - 部门信息 Response VO") @Data @EqualsAndHashCode(callSuper = true) -public class SysDeptRespVO extends SysDeptBaseVO { +public class DeptRespVO extends DeptBaseVO { @ApiModelProperty(value = "部门编号", required = true, example = "1024") private Long id; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/dept/SysDeptSimpleRespVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptSimpleRespVO.java similarity index 77% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/dept/SysDeptSimpleRespVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptSimpleRespVO.java index b9500ea81..1a3d64f6e 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/dept/SysDeptSimpleRespVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptSimpleRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.dept.vo.dept; +package cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -6,11 +6,11 @@ import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; -@ApiModel("部门精简信息 Response VO") +@ApiModel("管理后台 - 部门精简信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor -public class SysDeptSimpleRespVO { +public class DeptSimpleRespVO { @ApiModelProperty(value = "部门编号", required = true, example = "1024") private Long id; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/dept/SysDeptUpdateReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptUpdateReqVO.java similarity index 69% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/dept/SysDeptUpdateReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptUpdateReqVO.java index c4cd016e3..3e2f13a84 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/dept/SysDeptUpdateReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptUpdateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.dept.vo.dept; +package cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -7,10 +7,10 @@ import lombok.EqualsAndHashCode; import javax.validation.constraints.NotNull; -@ApiModel("部门更新 Request VO") +@ApiModel("管理后台 - 部门更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) -public class SysDeptUpdateReqVO extends SysDeptBaseVO { +public class DeptUpdateReqVO extends DeptBaseVO { @ApiModelProperty(value = "部门编号", required = true, example = "1024") @NotNull(message = "部门编号不能为空") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/post/SysPostBaseVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostBaseVO.java similarity index 93% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/post/SysPostBaseVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostBaseVO.java index e30eedeac..700039646 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/post/SysPostBaseVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostBaseVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.dept.vo.post; +package cn.iocoder.yudao.module.system.controller.admin.dept.vo.post; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -12,7 +12,7 @@ import javax.validation.constraints.Size; * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 */ @Data -public class SysPostBaseVO { +public class PostBaseVO { @ApiModelProperty(value = "岗位名称", required = true, example = "小博主") @NotBlank(message = "岗位名称不能为空") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostCreateReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostCreateReqVO.java new file mode 100644 index 000000000..547739c0d --- /dev/null +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostCreateReqVO.java @@ -0,0 +1,11 @@ +package cn.iocoder.yudao.module.system.controller.admin.dept.vo.post; + +import io.swagger.annotations.ApiModel; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@ApiModel("管理后台 - 岗位创建 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +public class PostCreateReqVO extends PostBaseVO { +} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/post/SysPostExcelVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostExcelVO.java similarity index 88% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/post/SysPostExcelVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostExcelVO.java index 32042a41f..b9c2696df 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/post/SysPostExcelVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostExcelVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.dept.vo.post; +package cn.iocoder.yudao.module.system.controller.admin.dept.vo.post; import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; @@ -10,7 +10,7 @@ import lombok.Data; * 岗位 Excel 导出响应 VO */ @Data -public class SysPostExcelVO { +public class PostExcelVO { @ExcelProperty("岗位序号") private Long id; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/post/SysPostExportReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostExportReqVO.java similarity index 69% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/post/SysPostExportReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostExportReqVO.java index 9b8cd5e89..182449d95 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/post/SysPostExportReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostExportReqVO.java @@ -1,12 +1,12 @@ -package cn.iocoder.yudao.module.system.controller.dept.vo.post; +package cn.iocoder.yudao.module.system.controller.admin.dept.vo.post; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; -@ApiModel(value = "岗位导出 Request VO", description = "参数和 SysPostExcelVO 是一致的") +@ApiModel(value = "管理后台 - 岗位导出 Request VO", description = "参数和 SysPostExcelVO 是一致的") @Data -public class SysPostExportReqVO { +public class PostExportReqVO { @ApiModelProperty(value = "岗位编码", example = "yudao", notes = "模糊匹配") private String code; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/post/SysPostListReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostListReqVO.java similarity index 72% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/post/SysPostListReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostListReqVO.java index a05bed03f..a1369f20f 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/post/SysPostListReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostListReqVO.java @@ -1,14 +1,14 @@ -package cn.iocoder.yudao.module.system.controller.dept.vo.post; +package cn.iocoder.yudao.module.system.controller.admin.dept.vo.post; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; -@ApiModel("岗位列表 Request VO") +@ApiModel("管理后台 - 岗位列表 Request VO") @Data @EqualsAndHashCode(callSuper = true) -public class SysPostListReqVO extends SysPostBaseVO { +public class PostListReqVO extends PostBaseVO { @ApiModelProperty(value = "岗位名称", example = "芋道", notes = "模糊匹配") private String name; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/post/SysPostPageReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostPageReqVO.java similarity index 78% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/post/SysPostPageReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostPageReqVO.java index 49b05c2a9..94c6b9eaa 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/post/SysPostPageReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostPageReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.dept.vo.post; +package cn.iocoder.yudao.module.system.controller.admin.dept.vo.post; import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.annotations.ApiModel; @@ -6,10 +6,10 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; -@ApiModel("岗位分页 Request VO") +@ApiModel("管理后台 - 岗位分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) -public class SysPostPageReqVO extends PageParam { +public class PostPageReqVO extends PageParam { @ApiModelProperty(value = "岗位编码", example = "yudao", notes = "模糊匹配") private String code; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/post/SysPostRespVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostRespVO.java similarity index 72% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/post/SysPostRespVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostRespVO.java index fd95be461..834e68617 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/post/SysPostRespVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.dept.vo.post; +package cn.iocoder.yudao.module.system.controller.admin.dept.vo.post; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -7,10 +7,10 @@ import lombok.EqualsAndHashCode; import java.util.Date; -@ApiModel("岗位信息 Response VO") +@ApiModel("管理后台 - 岗位信息 Response VO") @Data @EqualsAndHashCode(callSuper = true) -public class SysPostRespVO extends SysPostBaseVO { +public class PostRespVO extends PostBaseVO { @ApiModelProperty(value = "岗位序号", required = true, example = "1024") private Long id; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/post/SysPostSimpleRespVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostSimpleRespVO.java similarity index 73% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/post/SysPostSimpleRespVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostSimpleRespVO.java index fdc6636d4..0334a7652 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/post/SysPostSimpleRespVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostSimpleRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.dept.vo.post; +package cn.iocoder.yudao.module.system.controller.admin.dept.vo.post; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -6,11 +6,11 @@ import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; -@ApiModel("岗位精简信息 Response VO") +@ApiModel("管理后台 - 岗位精简信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor -public class SysPostSimpleRespVO { +public class PostSimpleRespVO { @ApiModelProperty(value = "岗位编号", required = true, example = "1024") private Long id; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/post/SysPostUpdateReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostUpdateReqVO.java similarity index 69% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/post/SysPostUpdateReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostUpdateReqVO.java index 0868c6a45..aeb91998b 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/post/SysPostUpdateReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/post/PostUpdateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.dept.vo.post; +package cn.iocoder.yudao.module.system.controller.admin.dept.vo.post; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -7,10 +7,10 @@ import lombok.EqualsAndHashCode; import javax.validation.constraints.NotNull; -@ApiModel("岗位更新 Request VO") +@ApiModel("管理后台 - 岗位更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) -public class SysPostUpdateReqVO extends SysPostBaseVO { +public class PostUpdateReqVO extends PostBaseVO { @ApiModelProperty(value = "岗位编号", required = true, example = "1024") @NotNull(message = "岗位编号不能为空") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/SysDictDataController.http b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictDataController.http similarity index 80% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/SysDictDataController.http rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictDataController.http index f7890dc67..f52431502 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/SysDictDataController.http +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictDataController.http @@ -1,3 +1,4 @@ ### 请求 /menu/list 接口 => 成功 GET {{baseUrl}}/system/dict-data/list-all-simple Authorization: Bearer {{token}} +tenant-id: {{adminTenentId}} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/SysDictDataController.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictDataController.java similarity index 71% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/SysDictDataController.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictDataController.java index d82f5cfec..81d7cc247 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/SysDictDataController.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictDataController.java @@ -1,13 +1,13 @@ -package cn.iocoder.yudao.module.system.controller.dict; +package cn.iocoder.yudao.module.system.controller.admin.dict; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.dict.SysDictDataDO; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; -import cn.iocoder.yudao.module.system.controller.dict.vo.data.*; -import cn.iocoder.yudao.module.system.convert.dict.SysDictDataConvert; -import cn.iocoder.yudao.module.system.service.dict.SysDictDataService; +import cn.iocoder.yudao.module.system.controller.admin.dict.vo.data.*; +import cn.iocoder.yudao.module.system.convert.dict.DictDataConvert; +import cn.iocoder.yudao.module.system.service.dict.DictDataService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; @@ -24,19 +24,19 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; -@Api(tags = "字典数据") +@Api(tags = "管理后台 - 字典数据") @RestController @RequestMapping("/system/dict-data") @Validated -public class SysDictDataController { +public class DictDataController { @Resource - private SysDictDataService dictDataService; + private DictDataService dictDataService; @PostMapping("/create") @ApiOperation("新增字典数据") @PreAuthorize("@ss.hasPermission('system:dict:create')") - public CommonResult createDictData(@Valid @RequestBody SysDictDataCreateReqVO reqVO) { + public CommonResult createDictData(@Valid @RequestBody DictDataCreateReqVO reqVO) { Long dictDataId = dictDataService.createDictData(reqVO); return success(dictDataId); } @@ -44,7 +44,7 @@ public class SysDictDataController { @PutMapping("update") @ApiOperation("修改字典数据") @PreAuthorize("@ss.hasPermission('system:dict:update')") - public CommonResult updateDictData(@Valid @RequestBody SysDictDataUpdateReqVO reqVO) { + public CommonResult updateDictData(@Valid @RequestBody DictDataUpdateReqVO reqVO) { dictDataService.updateDictData(reqVO); return success(true); } @@ -61,35 +61,35 @@ public class SysDictDataController { @GetMapping("/list-all-simple") @ApiOperation(value = "获得全部字典数据列表", notes = "一般用于管理后台缓存字典数据在本地") // 无需添加权限认证,因为前端全局都需要 - public CommonResult> getSimpleDictDatas() { + public CommonResult> getSimpleDictDatas() { List list = dictDataService.getDictDatas(); - return success(SysDictDataConvert.INSTANCE.convertList(list)); + return success(DictDataConvert.INSTANCE.convertList(list)); } @GetMapping("/page") @ApiOperation("/获得字典类型的分页列表") @PreAuthorize("@ss.hasPermission('system:dict:query')") - public CommonResult> getDictTypePage(@Valid SysDictDataPageReqVO reqVO) { - return success(SysDictDataConvert.INSTANCE.convertPage(dictDataService.getDictDataPage(reqVO))); + public CommonResult> getDictTypePage(@Valid DictDataPageReqVO reqVO) { + return success(DictDataConvert.INSTANCE.convertPage(dictDataService.getDictDataPage(reqVO))); } @GetMapping(value = "/get") @ApiOperation("/查询字典数据详细") @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) @PreAuthorize("@ss.hasPermission('system:dict:query')") - public CommonResult getDictData(@RequestParam("id") Long id) { - return success(SysDictDataConvert.INSTANCE.convert(dictDataService.getDictData(id))); + public CommonResult getDictData(@RequestParam("id") Long id) { + return success(DictDataConvert.INSTANCE.convert(dictDataService.getDictData(id))); } @GetMapping("/export") @ApiOperation("导出字典数据") @PreAuthorize("@ss.hasPermission('system:dict:export')") @OperateLog(type = EXPORT) - public void export(HttpServletResponse response, @Valid SysDictDataExportReqVO reqVO) throws IOException { + public void export(HttpServletResponse response, @Valid DictDataExportReqVO reqVO) throws IOException { List list = dictDataService.getDictDatas(reqVO); - List data = SysDictDataConvert.INSTANCE.convertList02(list); + List data = DictDataConvert.INSTANCE.convertList02(list); // 输出 - ExcelUtils.write(response, "字典数据.xls", "数据列表", SysDictDataExcelVO.class, data); + ExcelUtils.write(response, "字典数据.xls", "数据列表", DictDataExcelVO.class, data); } } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/SysDictTypeController.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictTypeController.java similarity index 66% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/SysDictTypeController.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictTypeController.java index 63a4b0898..e7c9b8894 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/SysDictTypeController.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictTypeController.java @@ -1,13 +1,13 @@ -package cn.iocoder.yudao.module.system.controller.dict; +package cn.iocoder.yudao.module.system.controller.admin.dict; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; -import cn.iocoder.yudao.module.system.controller.dict.vo.type.*; -import cn.iocoder.yudao.module.system.convert.dict.SysDictTypeConvert; -import cn.iocoder.yudao.module.system.dal.dataobject.dict.SysDictTypeDO; -import cn.iocoder.yudao.module.system.service.dict.SysDictTypeService; +import cn.iocoder.yudao.module.system.controller.admin.dict.vo.type.*; +import cn.iocoder.yudao.module.system.convert.dict.DictTypeConvert; +import cn.iocoder.yudao.module.system.dal.dataobject.dict.DictTypeDO; +import cn.iocoder.yudao.module.system.service.dict.DictTypeService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; @@ -24,19 +24,19 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; -@Api(tags = "字典类型") +@Api(tags = "管理后台 - 字典类型") @RestController @RequestMapping("/system/dict-type") @Validated -public class SysDictTypeController { +public class DictTypeController { @Resource - private SysDictTypeService dictTypeService; + private DictTypeService dictTypeService; @PostMapping("/create") @ApiOperation("创建字典类型") @PreAuthorize("@ss.hasPermission('system:dict:create')") - public CommonResult createDictType(@Valid @RequestBody SysDictTypeCreateReqVO reqVO) { + public CommonResult createDictType(@Valid @RequestBody DictTypeCreateReqVO reqVO) { Long dictTypeId = dictTypeService.createDictType(reqVO); return success(dictTypeId); } @@ -44,7 +44,7 @@ public class SysDictTypeController { @PutMapping("/update") @ApiOperation("修改字典类型") @PreAuthorize("@ss.hasPermission('system:dict:update')") - public CommonResult updateDictType(@Valid @RequestBody SysDictTypeUpdateReqVO reqVO) { + public CommonResult updateDictType(@Valid @RequestBody DictTypeUpdateReqVO reqVO) { dictTypeService.updateDictType(reqVO); return success(true); } @@ -61,35 +61,35 @@ public class SysDictTypeController { @ApiOperation("/获得字典类型的分页列表") @GetMapping("/page") @PreAuthorize("@ss.hasPermission('system:dict:query')") - public CommonResult> pageDictTypes(@Valid SysDictTypePageReqVO reqVO) { - return success(SysDictTypeConvert.INSTANCE.convertPage(dictTypeService.getDictTypePage(reqVO))); + public CommonResult> pageDictTypes(@Valid DictTypePageReqVO reqVO) { + return success(DictTypeConvert.INSTANCE.convertPage(dictTypeService.getDictTypePage(reqVO))); } @ApiOperation("/查询字典类型详细") @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) @GetMapping(value = "/get") @PreAuthorize("@ss.hasPermission('system:dict:query')") - public CommonResult getDictType(@RequestParam("id") Long id) { - return success(SysDictTypeConvert.INSTANCE.convert(dictTypeService.getDictType(id))); + public CommonResult getDictType(@RequestParam("id") Long id) { + return success(DictTypeConvert.INSTANCE.convert(dictTypeService.getDictType(id))); } @GetMapping("/list-all-simple") @ApiOperation(value = "获得全部字典类型列表", notes = "包括开启 + 禁用的字典类型,主要用于前端的下拉选项") // 无需添加权限认证,因为前端全局都需要 - public CommonResult> listSimpleDictTypes() { - List list = dictTypeService.getDictTypeList(); - return success(SysDictTypeConvert.INSTANCE.convertList(list)); + public CommonResult> listSimpleDictTypes() { + List list = dictTypeService.getDictTypeList(); + return success(DictTypeConvert.INSTANCE.convertList(list)); } @ApiOperation("导出数据类型") @GetMapping("/export") @PreAuthorize("@ss.hasPermission('system:dict:query')") @OperateLog(type = EXPORT) - public void export(HttpServletResponse response, @Valid SysDictTypeExportReqVO reqVO) throws IOException { - List list = dictTypeService.getDictTypeList(reqVO); - List data = SysDictTypeConvert.INSTANCE.convertList02(list); + public void export(HttpServletResponse response, @Valid DictTypeExportReqVO reqVO) throws IOException { + List list = dictTypeService.getDictTypeList(reqVO); + List data = DictTypeConvert.INSTANCE.convertList02(list); // 输出 - ExcelUtils.write(response, "字典类型.xls", "类型列表", SysDictTypeExcelVO.class, data); + ExcelUtils.write(response, "字典类型.xls", "类型列表", DictTypeExcelVO.class, data); } } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/data/SysDictDataBaseVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataBaseVO.java similarity index 94% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/data/SysDictDataBaseVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataBaseVO.java index c67ceb0d2..0292f8437 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/data/SysDictDataBaseVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataBaseVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.dict.vo.data; +package cn.iocoder.yudao.module.system.controller.admin.dict.vo.data; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -12,7 +12,7 @@ import javax.validation.constraints.Size; * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 */ @Data -public class SysDictDataBaseVO { +public class DictDataBaseVO { @ApiModelProperty(value = "显示顺序不能为空", required = true, example = "1024") @NotNull(message = "显示顺序不能为空") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataCreateReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataCreateReqVO.java new file mode 100644 index 000000000..57dc770d0 --- /dev/null +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataCreateReqVO.java @@ -0,0 +1,12 @@ +package cn.iocoder.yudao.module.system.controller.admin.dict.vo.data; + +import io.swagger.annotations.ApiModel; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@ApiModel("管理后台 - 字典数据创建 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +public class DictDataCreateReqVO extends DictDataBaseVO { + +} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/data/SysDictDataExcelVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataExcelVO.java similarity index 88% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/data/SysDictDataExcelVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataExcelVO.java index 19cd76b78..ee907eaa7 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/data/SysDictDataExcelVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataExcelVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.dict.vo.data; +package cn.iocoder.yudao.module.system.controller.admin.dict.vo.data; import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; @@ -10,7 +10,7 @@ import lombok.Data; * 字典数据 Excel 导出响应 VO */ @Data -public class SysDictDataExcelVO { +public class DictDataExcelVO { @ExcelProperty("字典编码") private Long id; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/data/SysDictDataExportReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataExportReqVO.java similarity index 80% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/data/SysDictDataExportReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataExportReqVO.java index 074e02c80..142d45017 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/data/SysDictDataExportReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataExportReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.dict.vo.data; +package cn.iocoder.yudao.module.system.controller.admin.dict.vo.data; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -6,9 +6,9 @@ import lombok.Data; import javax.validation.constraints.Size; -@ApiModel("字典类型导出 Request VO") +@ApiModel("管理后台 - 字典类型导出 Request VO") @Data -public class SysDictDataExportReqVO { +public class DictDataExportReqVO { @ApiModelProperty(value = "字典标签", example = "芋道") @Size(max = 100, message = "字典标签长度不能超过100个字符") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/data/SysDictDataPageReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataPageReqVO.java similarity index 81% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/data/SysDictDataPageReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataPageReqVO.java index 97d6d8f26..a095aac08 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/data/SysDictDataPageReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataPageReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.dict.vo.data; +package cn.iocoder.yudao.module.system.controller.admin.dict.vo.data; import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.annotations.ApiModel; @@ -8,10 +8,10 @@ import lombok.EqualsAndHashCode; import javax.validation.constraints.Size; -@ApiModel("字典类型分页列表 Request VO") +@ApiModel("管理后台 - 字典类型分页列表 Request VO") @Data @EqualsAndHashCode(callSuper = true) -public class SysDictDataPageReqVO extends PageParam { +public class DictDataPageReqVO extends PageParam { @ApiModelProperty(value = "字典标签", example = "芋道") @Size(max = 100, message = "字典标签长度不能超过100个字符") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/data/SysDictDataRespVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataRespVO.java similarity index 75% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/data/SysDictDataRespVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataRespVO.java index e4281ca15..697097008 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/data/SysDictDataRespVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.dict.vo.data; +package cn.iocoder.yudao.module.system.controller.admin.dict.vo.data; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -9,12 +9,12 @@ import lombok.NoArgsConstructor; import java.util.Date; -@ApiModel("字典数据信息 Response VO") +@ApiModel("管理后台 - 字典数据信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor @EqualsAndHashCode(callSuper = true) -public class SysDictDataRespVO extends SysDictDataBaseVO { +public class DictDataRespVO extends DictDataBaseVO { @ApiModelProperty(value = "字典数据编号", required = true, example = "1024") private Long id; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/data/SysDictDataSimpleRespVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataSimpleRespVO.java similarity index 72% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/data/SysDictDataSimpleRespVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataSimpleRespVO.java index 2da4779ba..c3dd56052 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/data/SysDictDataSimpleRespVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataSimpleRespVO.java @@ -1,12 +1,12 @@ -package cn.iocoder.yudao.module.system.controller.dict.vo.data; +package cn.iocoder.yudao.module.system.controller.admin.dict.vo.data; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; -@ApiModel("数据字典精简 Response VO") +@ApiModel("管理后台 - 数据字典精简 Response VO") @Data -public class SysDictDataSimpleRespVO { +public class DictDataSimpleRespVO { @ApiModelProperty(value = "字典类型", required = true, example = "gender") private String dictType; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/data/SysDictDataUpdateReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataUpdateReqVO.java similarity index 68% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/data/SysDictDataUpdateReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataUpdateReqVO.java index 428aa654a..f6f9b81a2 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/data/SysDictDataUpdateReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/data/DictDataUpdateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.dict.vo.data; +package cn.iocoder.yudao.module.system.controller.admin.dict.vo.data; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -7,10 +7,10 @@ import lombok.EqualsAndHashCode; import javax.validation.constraints.NotNull; -@ApiModel("字典数据更新 Request VO") +@ApiModel("管理后台 - 字典数据更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) -public class SysDictDataUpdateReqVO extends SysDictDataBaseVO { +public class DictDataUpdateReqVO extends DictDataBaseVO { @ApiModelProperty(value = "字典数据编号", required = true, example = "1024") @NotNull(message = "字典数据编号不能为空") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/type/SysDictTypeBaseVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeBaseVO.java similarity index 90% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/type/SysDictTypeBaseVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeBaseVO.java index d9e2dfe47..4da6da0b3 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/type/SysDictTypeBaseVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeBaseVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.dict.vo.type; +package cn.iocoder.yudao.module.system.controller.admin.dict.vo.type; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -12,7 +12,7 @@ import javax.validation.constraints.Size; * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 */ @Data -public class SysDictTypeBaseVO { +public class DictTypeBaseVO { @ApiModelProperty(value = "字典名称", required = true, example = "性别") @NotBlank(message = "字典名称不能为空") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/type/SysDictTypeCreateReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeCreateReqVO.java similarity index 73% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/type/SysDictTypeCreateReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeCreateReqVO.java index ea5b0465a..ee2f45ae1 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/type/SysDictTypeCreateReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeCreateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.dict.vo.type; +package cn.iocoder.yudao.module.system.controller.admin.dict.vo.type; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -8,10 +8,10 @@ import lombok.EqualsAndHashCode; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; -@ApiModel("字典类型创建 Request VO") +@ApiModel("管理后台 - 字典类型创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) -public class SysDictTypeCreateReqVO extends SysDictTypeBaseVO { +public class DictTypeCreateReqVO extends DictTypeBaseVO { @ApiModelProperty(value = "字典类型", required = true, example = "sys_common_sex") @NotNull(message = "字典类型不能为空") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/type/SysDictTypeExcelVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeExcelVO.java similarity index 86% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/type/SysDictTypeExcelVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeExcelVO.java index 25c07e6ab..fbda72b2e 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/type/SysDictTypeExcelVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeExcelVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.dict.vo.type; +package cn.iocoder.yudao.module.system.controller.admin.dict.vo.type; import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; @@ -10,7 +10,7 @@ import lombok.Data; * 字典类型 Excel 导出响应 VO */ @Data -public class SysDictTypeExcelVO { +public class DictTypeExcelVO { @ExcelProperty("字典主键") private Long id; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/type/SysDictTypeExportReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeExportReqVO.java similarity index 85% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/type/SysDictTypeExportReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeExportReqVO.java index 440cef8bc..b2f3331b8 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/type/SysDictTypeExportReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeExportReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.dict.vo.type; +package cn.iocoder.yudao.module.system.controller.admin.dict.vo.type; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -9,9 +9,9 @@ import java.util.Date; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("字典类型分页列表 Request VO") +@ApiModel("管理后台 - 字典类型分页列表 Request VO") @Data -public class SysDictTypeExportReqVO { +public class DictTypeExportReqVO { @ApiModelProperty(value = "字典类型名称", example = "芋道", notes = "模糊匹配") private String name; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/type/SysDictTypePageReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypePageReqVO.java similarity index 87% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/type/SysDictTypePageReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypePageReqVO.java index 8cd2c9b82..1c231b0d2 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/type/SysDictTypePageReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypePageReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.dict.vo.type; +package cn.iocoder.yudao.module.system.controller.admin.dict.vo.type; import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.annotations.ApiModel; @@ -12,10 +12,10 @@ import java.util.Date; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("字典类型分页列表 Request VO") +@ApiModel("管理后台 - 字典类型分页列表 Request VO") @Data @EqualsAndHashCode(callSuper = true) -public class SysDictTypePageReqVO extends PageParam { +public class DictTypePageReqVO extends PageParam { @ApiModelProperty(value = "字典类型名称", example = "芋道", notes = "模糊匹配") private String name; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/type/SysDictTypeRespVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeRespVO.java similarity index 78% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/type/SysDictTypeRespVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeRespVO.java index b82e16e16..9cfafdfa4 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/type/SysDictTypeRespVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.dict.vo.type; +package cn.iocoder.yudao.module.system.controller.admin.dict.vo.type; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -9,12 +9,12 @@ import lombok.NoArgsConstructor; import java.util.Date; -@ApiModel("字典类型信息 Response VO") +@ApiModel("管理后台 - 字典类型信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor @EqualsAndHashCode(callSuper = true) -public class SysDictTypeRespVO extends SysDictTypeBaseVO { +public class DictTypeRespVO extends DictTypeBaseVO { @ApiModelProperty(value = "字典类型编号", required = true, example = "1024") private Long id; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/type/SysDictTypeSimpleRespVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeSimpleRespVO.java similarity index 76% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/type/SysDictTypeSimpleRespVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeSimpleRespVO.java index c53154f8c..8cca026a9 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/type/SysDictTypeSimpleRespVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeSimpleRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.dict.vo.type; +package cn.iocoder.yudao.module.system.controller.admin.dict.vo.type; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -6,11 +6,11 @@ import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; -@ApiModel("字典类型精简信息 Response VO") +@ApiModel("管理后台 - 字典类型精简信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor -public class SysDictTypeSimpleRespVO { +public class DictTypeSimpleRespVO { @ApiModelProperty(value = "字典类型编号", required = true, example = "1024") private Long id; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/type/SysDictTypeUpdateReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeUpdateReqVO.java similarity index 68% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/type/SysDictTypeUpdateReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeUpdateReqVO.java index ed812dadc..00955f4fe 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/type/SysDictTypeUpdateReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/vo/type/DictTypeUpdateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.dict.vo.type; +package cn.iocoder.yudao.module.system.controller.admin.dict.vo.type; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -7,10 +7,10 @@ import lombok.EqualsAndHashCode; import javax.validation.constraints.NotNull; -@ApiModel("字典类型更新 Request VO") +@ApiModel("管理后台 - 字典类型更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) -public class SysDictTypeUpdateReqVO extends SysDictTypeBaseVO { +public class DictTypeUpdateReqVO extends DictTypeBaseVO { @ApiModelProperty(value = "字典类型编号", required = true, example = "1024") @NotNull(message = "字典类型编号不能为空") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/errorcode/SysErrorCodeController.http b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/ErrorCodeController.http similarity index 64% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/errorcode/SysErrorCodeController.http rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/ErrorCodeController.http index 76226d18e..06b872318 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/errorcode/SysErrorCodeController.http +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/ErrorCodeController.http @@ -1,7 +1,8 @@ -### +### 创建错误码 POST {{baseUrl}}/inra/error-code/create Authorization: Bearer {{token}} -Content-Type:application/json +Content-Type: application/json +tenant-id: {{adminTenentId}} { "code": 200, diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/errorcode/SysErrorCodeController.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/ErrorCodeController.java similarity index 64% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/errorcode/SysErrorCodeController.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/ErrorCodeController.java index 220789d56..e3161b8aa 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/errorcode/SysErrorCodeController.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/ErrorCodeController.java @@ -1,13 +1,13 @@ -package cn.iocoder.yudao.module.system.controller.errorcode; +package cn.iocoder.yudao.module.system.controller.admin.errorcode; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; -import cn.iocoder.yudao.module.system.convert.errorcode.SysErrorCodeConvert; -import cn.iocoder.yudao.module.system.controller.errorcode.vo.*; -import cn.iocoder.yudao.module.system.dal.dataobject.errorcode.SysErrorCodeDO; -import cn.iocoder.yudao.module.system.service.errorcode.SysErrorCodeService; +import cn.iocoder.yudao.module.system.convert.errorcode.ErrorCodeConvert; +import cn.iocoder.yudao.module.system.controller.admin.errorcode.vo.*; +import cn.iocoder.yudao.module.system.dal.dataobject.errorcode.ErrorCodeDO; +import cn.iocoder.yudao.module.system.service.errorcode.ErrorCodeService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; @@ -24,26 +24,26 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; -@Api(tags = "错误码") +@Api(tags = "管理后台 - 错误码") @RestController @RequestMapping("/system/error-code") @Validated -public class SysErrorCodeController { +public class ErrorCodeController { @Resource - private SysErrorCodeService errorCodeService; + private ErrorCodeService errorCodeService; @PostMapping("/create") @ApiOperation("创建错误码") @PreAuthorize("@ss.hasPermission('system:error-code:create')") - public CommonResult createErrorCode(@Valid @RequestBody SysErrorCodeCreateReqVO createReqVO) { + public CommonResult createErrorCode(@Valid @RequestBody ErrorCodeCreateReqVO createReqVO) { return success(errorCodeService.createErrorCode(createReqVO)); } @PutMapping("/update") @ApiOperation("更新错误码") @PreAuthorize("@ss.hasPermission('system:error-code:update')") - public CommonResult updateErrorCode(@Valid @RequestBody SysErrorCodeUpdateReqVO updateReqVO) { + public CommonResult updateErrorCode(@Valid @RequestBody ErrorCodeUpdateReqVO updateReqVO) { errorCodeService.updateErrorCode(updateReqVO); return success(true); } @@ -61,29 +61,29 @@ public class SysErrorCodeController { @ApiOperation("获得错误码") @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) @PreAuthorize("@ss.hasPermission('system:error-code:query')") - public CommonResult getErrorCode(@RequestParam("id") Long id) { - SysErrorCodeDO errorCode = errorCodeService.getErrorCode(id); - return success(SysErrorCodeConvert.INSTANCE.convert(errorCode)); + public CommonResult getErrorCode(@RequestParam("id") Long id) { + ErrorCodeDO errorCode = errorCodeService.getErrorCode(id); + return success(ErrorCodeConvert.INSTANCE.convert(errorCode)); } @GetMapping("/page") @ApiOperation("获得错误码分页") @PreAuthorize("@ss.hasPermission('system:error-code:query')") - public CommonResult> getErrorCodePage(@Valid SysErrorCodePageReqVO pageVO) { - PageResult pageResult = errorCodeService.getErrorCodePage(pageVO); - return success(SysErrorCodeConvert.INSTANCE.convertPage(pageResult)); + public CommonResult> getErrorCodePage(@Valid ErrorCodePageReqVO pageVO) { + PageResult pageResult = errorCodeService.getErrorCodePage(pageVO); + return success(ErrorCodeConvert.INSTANCE.convertPage(pageResult)); } @GetMapping("/export-excel") @ApiOperation("导出错误码 Excel") @PreAuthorize("@ss.hasPermission('system:error-code:export')") @OperateLog(type = EXPORT) - public void exportErrorCodeExcel(@Valid SysErrorCodeExportReqVO exportReqVO, + public void exportErrorCodeExcel(@Valid ErrorCodeExportReqVO exportReqVO, HttpServletResponse response) throws IOException { - List list = errorCodeService.getErrorCodeList(exportReqVO); + List list = errorCodeService.getErrorCodeList(exportReqVO); // 导出 Excel - List datas = SysErrorCodeConvert.INSTANCE.convertList02(list); - ExcelUtils.write(response, "错误码.xls", "数据", SysErrorCodeExcelVO.class, datas); + List datas = ErrorCodeConvert.INSTANCE.convertList02(list); + ExcelUtils.write(response, "错误码.xls", "数据", ErrorCodeExcelVO.class, datas); } } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/errorcode/vo/SysErrorCodeBaseVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeBaseVO.java similarity index 89% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/errorcode/vo/SysErrorCodeBaseVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeBaseVO.java index f5d1e8d7a..150401aa3 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/errorcode/vo/SysErrorCodeBaseVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeBaseVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.errorcode.vo; +package cn.iocoder.yudao.module.system.controller.admin.errorcode.vo; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -10,7 +10,7 @@ import javax.validation.constraints.NotNull; * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 */ @Data -public class SysErrorCodeBaseVO { +public class ErrorCodeBaseVO { @ApiModelProperty(value = "应用名", required = true, example = "dashboard") @NotNull(message = "应用名不能为空") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/template/SysSmsTemplateCreateReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeCreateReqVO.java similarity index 51% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/template/SysSmsTemplateCreateReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeCreateReqVO.java index f0481861a..a0f36af1a 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/template/SysSmsTemplateCreateReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeCreateReqVO.java @@ -1,14 +1,14 @@ -package cn.iocoder.yudao.module.system.controller.sms.vo.template; +package cn.iocoder.yudao.module.system.controller.admin.errorcode.vo; import io.swagger.annotations.ApiModel; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; -@ApiModel("短信模板创建 Request VO") +@ApiModel("管理后台 - 错误码创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) -public class SysSmsTemplateCreateReqVO extends SysSmsTemplateBaseVO { +public class ErrorCodeCreateReqVO extends ErrorCodeBaseVO { } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/errorcode/vo/SysErrorCodeExcelVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeExcelVO.java similarity index 90% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/errorcode/vo/SysErrorCodeExcelVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeExcelVO.java index 5efbf36dc..a9c317bfb 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/errorcode/vo/SysErrorCodeExcelVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeExcelVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.errorcode.vo; +package cn.iocoder.yudao.module.system.controller.admin.errorcode.vo; import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; @@ -14,7 +14,7 @@ import java.util.Date; * @author 芋道源码 */ @Data -public class SysErrorCodeExcelVO { +public class ErrorCodeExcelVO { @ExcelProperty("错误码编号") private Long id; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/errorcode/vo/SysErrorCodeExportReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeExportReqVO.java similarity index 81% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/errorcode/vo/SysErrorCodeExportReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeExportReqVO.java index 8a46b99dc..9f716152c 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/errorcode/vo/SysErrorCodeExportReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeExportReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.errorcode.vo; +package cn.iocoder.yudao.module.system.controller.admin.errorcode.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -9,9 +9,9 @@ import java.util.Date; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel(value = "错误码 Excel 导出 Request VO", description = "参数和 InfErrorCodePageReqVO 是一致的") +@ApiModel(value = "管理后台 - 错误码 Excel 导出 Request VO", description = "参数和 InfErrorCodePageReqVO 是一致的") @Data -public class SysErrorCodeExportReqVO { +public class ErrorCodeExportReqVO { @ApiModelProperty(value = "错误码类型", example = "1") private Integer type; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/errorcode/vo/SysErrorCodePageReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodePageReqVO.java similarity index 87% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/errorcode/vo/SysErrorCodePageReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodePageReqVO.java index 6273ea192..70eeda41a 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/errorcode/vo/SysErrorCodePageReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodePageReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.errorcode.vo; +package cn.iocoder.yudao.module.system.controller.admin.errorcode.vo; import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.annotations.ApiModel; @@ -12,11 +12,11 @@ import java.util.Date; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("错误码分页 Request VO") +@ApiModel("管理后台 - 错误码分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) -public class SysErrorCodePageReqVO extends PageParam { +public class ErrorCodePageReqVO extends PageParam { @ApiModelProperty(value = "错误码类型", example = "1", notes = "参见 SysErrorCodeTypeEnum 枚举类") private Integer type; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/errorcode/vo/SysErrorCodeRespVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeRespVO.java similarity index 78% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/errorcode/vo/SysErrorCodeRespVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeRespVO.java index 35e4f93d6..c79b6bf8c 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/errorcode/vo/SysErrorCodeRespVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.errorcode.vo; +package cn.iocoder.yudao.module.system.controller.admin.errorcode.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -8,11 +8,11 @@ import lombok.ToString; import java.util.Date; -@ApiModel("错误码 Response VO") +@ApiModel("管理后台 - 错误码 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) -public class SysErrorCodeRespVO extends SysErrorCodeBaseVO { +public class ErrorCodeRespVO extends ErrorCodeBaseVO { @ApiModelProperty(value = "错误码编号", required = true, example = "1024") private Long id; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/errorcode/vo/SysErrorCodeUpdateReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeUpdateReqVO.java similarity index 70% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/errorcode/vo/SysErrorCodeUpdateReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeUpdateReqVO.java index 0d6b9508e..ff16c0283 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/errorcode/vo/SysErrorCodeUpdateReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/errorcode/vo/ErrorCodeUpdateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.errorcode.vo; +package cn.iocoder.yudao.module.system.controller.admin.errorcode.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -8,11 +8,11 @@ import lombok.ToString; import javax.validation.constraints.NotNull; -@ApiModel("错误码更新 Request VO") +@ApiModel("管理后台 - 错误码更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) -public class SysErrorCodeUpdateReqVO extends SysErrorCodeBaseVO { +public class ErrorCodeUpdateReqVO extends ErrorCodeBaseVO { @ApiModelProperty(value = "错误码编号", required = true, example = "1024") @NotNull(message = "错误码编号不能为空") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/logger/SysLoginLogController.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/LoginLogController.java similarity index 62% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/logger/SysLoginLogController.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/LoginLogController.java index 29addebc6..ad7816835 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/logger/SysLoginLogController.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/LoginLogController.java @@ -1,16 +1,16 @@ -package cn.iocoder.yudao.module.system.controller.logger; +package cn.iocoder.yudao.module.system.controller.admin.logger; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.logger.SysLoginLogDO; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; -import cn.iocoder.yudao.module.system.controller.logger.vo.loginlog.SysLoginLogExcelVO; -import cn.iocoder.yudao.module.system.controller.logger.vo.loginlog.SysLoginLogExportReqVO; -import cn.iocoder.yudao.module.system.controller.logger.vo.loginlog.SysLoginLogPageReqVO; -import cn.iocoder.yudao.module.system.controller.logger.vo.loginlog.SysLoginLogRespVO; -import cn.iocoder.yudao.module.system.convert.logger.SysLoginLogConvert; -import cn.iocoder.yudao.module.system.service.logger.SysLoginLogService; +import cn.iocoder.yudao.module.system.controller.admin.logger.vo.loginlog.LoginLogExcelVO; +import cn.iocoder.yudao.module.system.controller.admin.logger.vo.loginlog.LoginLogExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.logger.vo.loginlog.LoginLogPageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.logger.vo.loginlog.LoginLogRespVO; +import cn.iocoder.yudao.module.system.convert.logger.LoginLogConvert; +import cn.iocoder.yudao.module.system.service.logger.LoginLogService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.security.access.prepost.PreAuthorize; @@ -27,33 +27,33 @@ import java.util.List; import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; -@Api(tags = "登录日志") +@Api(tags = "管理后台 - 登录日志") @RestController @RequestMapping("/system/login-log") @Validated -public class SysLoginLogController { +public class LoginLogController { @Resource - private SysLoginLogService loginLogService; + private LoginLogService loginLogService; @GetMapping("/page") @ApiOperation("获得登录日志分页列表") @PreAuthorize("@ss.hasPermission('system:login-log:query')") - public CommonResult> getLoginLogPage(@Valid SysLoginLogPageReqVO reqVO) { + public CommonResult> getLoginLogPage(@Valid LoginLogPageReqVO reqVO) { PageResult page = loginLogService.getLoginLogPage(reqVO); - return CommonResult.success(SysLoginLogConvert.INSTANCE.convertPage(page)); + return CommonResult.success(LoginLogConvert.INSTANCE.convertPage(page)); } @GetMapping("/export") @ApiOperation("导出登录日志 Excel") @PreAuthorize("@ss.hasPermission('system:login-log:export')") @OperateLog(type = EXPORT) - public void exportLoginLog(HttpServletResponse response, @Valid SysLoginLogExportReqVO reqVO) throws IOException { + public void exportLoginLog(HttpServletResponse response, @Valid LoginLogExportReqVO reqVO) throws IOException { List list = loginLogService.getLoginLogList(reqVO); // 拼接数据 - List data = SysLoginLogConvert.INSTANCE.convertList(list); + List data = LoginLogConvert.INSTANCE.convertList(list); // 输出 - ExcelUtils.write(response, "登录日志.xls", "数据列表", SysLoginLogExcelVO.class, data); + ExcelUtils.write(response, "登录日志.xls", "数据列表", LoginLogExcelVO.class, data); } } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/logger/SysOperateLogController.http b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/OperateLogController.http similarity index 81% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/logger/SysOperateLogController.http rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/OperateLogController.http index 3b8871996..f667482da 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/logger/SysOperateLogController.http +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/OperateLogController.http @@ -1,3 +1,4 @@ ### 请求 /system/operate-log/demo 接口 => 成功 GET {{baseUrl}}/system/operate-log/demo Authorization: Bearer {{token}} +tenant-id: {{adminTenentId}} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/logger/SysOperateLogController.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/OperateLogController.java similarity index 63% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/logger/SysOperateLogController.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/OperateLogController.java index f572ed5c2..2eca78fc1 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/logger/SysOperateLogController.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/OperateLogController.java @@ -1,12 +1,12 @@ -package cn.iocoder.yudao.module.system.controller.logger; +package cn.iocoder.yudao.module.system.controller.admin.logger; -import cn.iocoder.yudao.module.system.controller.logger.vo.operatelog.SysOperateLogExcelVO; -import cn.iocoder.yudao.module.system.controller.logger.vo.operatelog.SysOperateLogExportReqVO; -import cn.iocoder.yudao.module.system.controller.logger.vo.operatelog.SysOperateLogPageReqVO; -import cn.iocoder.yudao.module.system.controller.logger.vo.operatelog.SysOperateLogRespVO; -import cn.iocoder.yudao.module.system.convert.logger.SysOperateLogConvert; -import cn.iocoder.yudao.module.system.dal.dataobject.logger.SysOperateLogDO; -import cn.iocoder.yudao.module.system.service.logger.SysOperateLogService; +import cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog.OperateLogExcelVO; +import cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog.OperateLogExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog.OperateLogPageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog.OperateLogRespVO; +import cn.iocoder.yudao.module.system.convert.logger.OperateLogConvert; +import cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogDO; +import cn.iocoder.yudao.module.system.service.logger.OperateLogService; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.user.SysUserDO; import cn.iocoder.yudao.coreservice.modules.system.service.user.SysUserCoreService; import cn.iocoder.yudao.framework.common.pojo.CommonResult; @@ -35,30 +35,30 @@ import java.util.Map; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; -@Api(tags = "操作日志") +@Api(tags = "管理后台 - 操作日志") @RestController @RequestMapping("/system/operate-log") @Validated -public class SysOperateLogController { +public class OperateLogController { @Resource - private SysOperateLogService operateLogService; + private OperateLogService operateLogService; @Resource private SysUserCoreService userCoreService; @GetMapping("/page") @ApiOperation("查看操作日志分页列表") @PreAuthorize("@ss.hasPermission('system:operate-log:query')") - public CommonResult> pageOperateLog(@Valid SysOperateLogPageReqVO reqVO) { - PageResult pageResult = operateLogService.getOperateLogPage(reqVO); + public CommonResult> pageOperateLog(@Valid OperateLogPageReqVO reqVO) { + PageResult pageResult = operateLogService.getOperateLogPage(reqVO); // 获得拼接需要的数据 - Collection userIds = CollectionUtils.convertList(pageResult.getList(), SysOperateLogDO::getUserId); + Collection userIds = CollectionUtils.convertList(pageResult.getList(), OperateLogDO::getUserId); Map userMap = userCoreService.getUserMap(userIds); // 拼接数据 - List list = new ArrayList<>(pageResult.getList().size()); + List list = new ArrayList<>(pageResult.getList().size()); pageResult.getList().forEach(operateLog -> { - SysOperateLogRespVO respVO = SysOperateLogConvert.INSTANCE.convert(operateLog); + OperateLogRespVO respVO = OperateLogConvert.INSTANCE.convert(operateLog); list.add(respVO); // 拼接用户信息 MapUtils.findAndThen(userMap, operateLog.getUserId(), user -> respVO.setUserNickname(user.getNickname())); @@ -70,16 +70,16 @@ public class SysOperateLogController { @GetMapping("/export") @PreAuthorize("@ss.hasPermission('system:operate-log:export')") @OperateLog(type = EXPORT) - public void exportOperateLog(HttpServletResponse response, @Valid SysOperateLogExportReqVO reqVO) throws IOException { - List list = operateLogService.getOperateLogs(reqVO); + public void exportOperateLog(HttpServletResponse response, @Valid OperateLogExportReqVO reqVO) throws IOException { + List list = operateLogService.getOperateLogs(reqVO); // 获得拼接需要的数据 - Collection userIds = CollectionUtils.convertList(list, SysOperateLogDO::getUserId); + Collection userIds = CollectionUtils.convertList(list, OperateLogDO::getUserId); Map userMap = userCoreService.getUserMap(userIds); // 拼接数据 - List excelDataList = SysOperateLogConvert.INSTANCE.convertList(list, userMap); + List excelDataList = OperateLogConvert.INSTANCE.convertList(list, userMap); // 输出 - ExcelUtils.write(response, "操作日志.xls", "数据列表", SysOperateLogExcelVO.class, excelDataList); + ExcelUtils.write(response, "操作日志.xls", "数据列表", OperateLogExcelVO.class, excelDataList); } } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/logger/vo/loginlog/SysLoginLogBaseVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/loginlog/LoginLogBaseVO.java similarity index 93% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/logger/vo/loginlog/SysLoginLogBaseVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/loginlog/LoginLogBaseVO.java index 6b2605796..e99657084 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/logger/vo/loginlog/SysLoginLogBaseVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/loginlog/LoginLogBaseVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.logger.vo.loginlog; +package cn.iocoder.yudao.module.system.controller.admin.logger.vo.loginlog; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -13,7 +13,7 @@ import javax.validation.constraints.Size; * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 */ @Data -public class SysLoginLogBaseVO { +public class LoginLogBaseVO { @ApiModelProperty(value = "日志类型", required = true, example = "1", notes = "参见 SysLoginLogTypeEnum 枚举类") @NotNull(message = "日志类型不能为空") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/logger/vo/loginlog/SysLoginLogExcelVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/loginlog/LoginLogExcelVO.java similarity index 90% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/logger/vo/loginlog/SysLoginLogExcelVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/loginlog/LoginLogExcelVO.java index bda160a3f..2a16454fc 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/logger/vo/loginlog/SysLoginLogExcelVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/loginlog/LoginLogExcelVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.logger.vo.loginlog; +package cn.iocoder.yudao.module.system.controller.admin.logger.vo.loginlog; import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; @@ -12,7 +12,7 @@ import java.util.Date; * 登录日志 Excel 导出响应 VO */ @Data -public class SysLoginLogExcelVO { +public class LoginLogExcelVO { @ExcelProperty("日志主键") private Long id; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/logger/vo/loginlog/SysLoginLogExportReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/loginlog/LoginLogExportReqVO.java similarity index 84% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/logger/vo/loginlog/SysLoginLogExportReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/loginlog/LoginLogExportReqVO.java index 8f936268b..df1a57ea5 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/logger/vo/loginlog/SysLoginLogExportReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/loginlog/LoginLogExportReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.logger.vo.loginlog; +package cn.iocoder.yudao.module.system.controller.admin.logger.vo.loginlog; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -9,9 +9,9 @@ import java.util.Date; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("登录日志分页列表 Request VO") +@ApiModel("管理后台 - 登录日志分页列表 Request VO") @Data -public class SysLoginLogExportReqVO { +public class LoginLogExportReqVO { @ApiModelProperty(value = "用户 IP", example = "127.0.0.1", notes = "模拟匹配") private String userIp; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/logger/vo/loginlog/SysLoginLogPageReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/loginlog/LoginLogPageReqVO.java similarity index 85% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/logger/vo/loginlog/SysLoginLogPageReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/loginlog/LoginLogPageReqVO.java index 7c71730c9..ebefb728e 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/logger/vo/loginlog/SysLoginLogPageReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/loginlog/LoginLogPageReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.logger.vo.loginlog; +package cn.iocoder.yudao.module.system.controller.admin.logger.vo.loginlog; import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.annotations.ApiModel; @@ -11,10 +11,10 @@ import java.util.Date; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("登录日志分页列表 Request VO") +@ApiModel("管理后台 - 登录日志分页列表 Request VO") @Data @EqualsAndHashCode(callSuper = true) -public class SysLoginLogPageReqVO extends PageParam { +public class LoginLogPageReqVO extends PageParam { @ApiModelProperty(value = "用户 IP", example = "127.0.0.1", notes = "模拟匹配") private String userIp; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/logger/vo/loginlog/SysLoginLogRespVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/loginlog/LoginLogRespVO.java similarity index 82% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/logger/vo/loginlog/SysLoginLogRespVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/loginlog/LoginLogRespVO.java index 3f588304b..17177dadf 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/logger/vo/loginlog/SysLoginLogRespVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/loginlog/LoginLogRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.logger.vo.loginlog; +package cn.iocoder.yudao.module.system.controller.admin.logger.vo.loginlog; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -9,11 +9,11 @@ import lombok.ToString; import javax.validation.constraints.NotNull; import java.util.Date; -@ApiModel("登录日志 Response VO") +@ApiModel("管理后台 - 登录日志 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) -public class SysLoginLogRespVO extends SysLoginLogBaseVO { +public class LoginLogRespVO extends LoginLogBaseVO { @ApiModelProperty(value = "日志编号", required = true, example = "1024") private Long id; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/logger/vo/operatelog/SysOperateLogBaseVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogBaseVO.java similarity index 96% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/logger/vo/operatelog/SysOperateLogBaseVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogBaseVO.java index 735e0b198..e66a20e3f 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/logger/vo/operatelog/SysOperateLogBaseVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogBaseVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.logger.vo.operatelog; +package cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -13,7 +13,7 @@ import java.util.Map; * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 */ @Data -public class SysOperateLogBaseVO { +public class OperateLogBaseVO { @ApiModelProperty(value = "链路追踪编号", required = true, example = "89aca178-a370-411c-ae02-3f0d672be4ab") @NotEmpty(message = "链路追踪编号不能为空") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/logger/vo/operatelog/SysOperateLogExcelVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogExcelVO.java similarity index 89% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/logger/vo/operatelog/SysOperateLogExcelVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogExcelVO.java index e5fc3e941..40546b2d9 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/logger/vo/operatelog/SysOperateLogExcelVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogExcelVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.logger.vo.operatelog; +package cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog; import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; @@ -12,7 +12,7 @@ import java.util.Date; * 操作日志 Excel 导出响应 VO */ @Data -public class SysOperateLogExcelVO { +public class OperateLogExcelVO { @ExcelProperty("日志编号") private Long id; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/logger/vo/operatelog/SysOperateLogExportReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogExportReqVO.java similarity index 86% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/logger/vo/operatelog/SysOperateLogExportReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogExportReqVO.java index 1c501acd6..52dc5d99b 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/logger/vo/operatelog/SysOperateLogExportReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogExportReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.logger.vo.operatelog; +package cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -9,9 +9,9 @@ import java.util.Date; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("操作日志分页列表 Request VO") +@ApiModel("管理后台 - 操作日志分页列表 Request VO") @Data -public class SysOperateLogExportReqVO { +public class OperateLogExportReqVO { @ApiModelProperty(value = "操作模块", example = "订单", notes = "模拟匹配") private String module; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/logger/vo/operatelog/SysOperateLogPageReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogPageReqVO.java similarity index 85% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/logger/vo/operatelog/SysOperateLogPageReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogPageReqVO.java index 92efe9738..f94d979f4 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/logger/vo/operatelog/SysOperateLogPageReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogPageReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.logger.vo.operatelog; +package cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog; import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.annotations.ApiModel; @@ -10,9 +10,9 @@ import java.util.Date; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("操作日志分页列表 Request VO") +@ApiModel("管理后台 - 操作日志分页列表 Request VO") @Data -public class SysOperateLogPageReqVO extends PageParam { +public class OperateLogPageReqVO extends PageParam { @ApiModelProperty(value = "操作模块", example = "订单", notes = "模拟匹配") private String module; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/logger/vo/operatelog/SysOperateLogRespVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogRespVO.java similarity index 71% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/logger/vo/operatelog/SysOperateLogRespVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogRespVO.java index fc825d62a..445b40060 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/logger/vo/operatelog/SysOperateLogRespVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/logger/vo/operatelog/OperateLogRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.logger.vo.operatelog; +package cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -6,11 +6,11 @@ import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; -@ApiModel("操作日志 Response VO") +@ApiModel("管理后台 - 操作日志 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) -public class SysOperateLogRespVO extends SysOperateLogBaseVO { +public class OperateLogRespVO extends OperateLogBaseVO { @ApiModelProperty(value = "日志编号", required = true, example = "1024") private Long id; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/notice/SysNoticeController.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/NoticeController.java similarity index 63% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/notice/SysNoticeController.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/NoticeController.java index 7cb255ee5..d14cfb733 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/notice/SysNoticeController.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/NoticeController.java @@ -1,13 +1,13 @@ -package cn.iocoder.yudao.module.system.controller.notice; +package cn.iocoder.yudao.module.system.controller.admin.notice; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.system.controller.notice.vo.SysNoticeCreateReqVO; -import cn.iocoder.yudao.module.system.controller.notice.vo.SysNoticePageReqVO; -import cn.iocoder.yudao.module.system.controller.notice.vo.SysNoticeRespVO; -import cn.iocoder.yudao.module.system.controller.notice.vo.SysNoticeUpdateReqVO; -import cn.iocoder.yudao.module.system.convert.notice.SysNoticeConvert; -import cn.iocoder.yudao.module.system.service.notice.SysNoticeService; +import cn.iocoder.yudao.module.system.controller.admin.notice.vo.NoticeCreateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.notice.vo.NoticePageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.notice.vo.NoticeRespVO; +import cn.iocoder.yudao.module.system.controller.admin.notice.vo.NoticeUpdateReqVO; +import cn.iocoder.yudao.module.system.convert.notice.NoticeConvert; +import cn.iocoder.yudao.module.system.service.notice.NoticeService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; @@ -20,19 +20,19 @@ import javax.validation.Valid; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -@Api(tags = "通知公告") +@Api(tags = "管理后台 - 通知公告") @RestController @RequestMapping("/system/notice") @Validated -public class SysNoticeController { +public class NoticeController { @Resource - private SysNoticeService noticeService; + private NoticeService noticeService; @PostMapping("/create") @ApiOperation("创建通知公告") @PreAuthorize("@ss.hasPermission('system:notice:create')") - public CommonResult createNotice(@Valid @RequestBody SysNoticeCreateReqVO reqVO) { + public CommonResult createNotice(@Valid @RequestBody NoticeCreateReqVO reqVO) { Long noticeId = noticeService.createNotice(reqVO); return success(noticeId); } @@ -40,7 +40,7 @@ public class SysNoticeController { @PutMapping("/update") @ApiOperation("修改通知公告") @PreAuthorize("@ss.hasPermission('system:notice:update')") - public CommonResult updateNotice(@Valid @RequestBody SysNoticeUpdateReqVO reqVO) { + public CommonResult updateNotice(@Valid @RequestBody NoticeUpdateReqVO reqVO) { noticeService.updateNotice(reqVO); return success(true); } @@ -57,16 +57,16 @@ public class SysNoticeController { @GetMapping("/page") @ApiOperation("获取通知公告列表") @PreAuthorize("@ss.hasPermission('system:notice:query')") - public CommonResult> pageNotices(@Validated SysNoticePageReqVO reqVO) { - return success(SysNoticeConvert.INSTANCE.convertPage(noticeService.pageNotices(reqVO))); + public CommonResult> pageNotices(@Validated NoticePageReqVO reqVO) { + return success(NoticeConvert.INSTANCE.convertPage(noticeService.pageNotices(reqVO))); } @GetMapping("/get") @ApiOperation("获得通知公告") @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) @PreAuthorize("@ss.hasPermission('system:notice:query')") - public CommonResult getNotice(@RequestParam("id") Long id) { - return success(SysNoticeConvert.INSTANCE.convert(noticeService.getNotice(id))); + public CommonResult getNotice(@RequestParam("id") Long id) { + return success(NoticeConvert.INSTANCE.convert(noticeService.getNotice(id))); } } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/notice/vo/SysNoticeBaseVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticeBaseVO.java similarity index 91% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/notice/vo/SysNoticeBaseVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticeBaseVO.java index ddbb141cc..48d74dd2b 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/notice/vo/SysNoticeBaseVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticeBaseVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.notice.vo; +package cn.iocoder.yudao.module.system.controller.admin.notice.vo; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -12,7 +12,7 @@ import javax.validation.constraints.Size; * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 */ @Data -public class SysNoticeBaseVO { +public class NoticeBaseVO { @ApiModelProperty(value = "公告标题", required = true, example = "小博主") @NotBlank(message = "公告标题不能为空") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticeCreateReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticeCreateReqVO.java new file mode 100644 index 000000000..49e671ce1 --- /dev/null +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticeCreateReqVO.java @@ -0,0 +1,11 @@ +package cn.iocoder.yudao.module.system.controller.admin.notice.vo; + +import io.swagger.annotations.ApiModel; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@ApiModel("管理后台 - 通知公告创建 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +public class NoticeCreateReqVO extends NoticeBaseVO { +} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/notice/vo/SysNoticePageReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticePageReqVO.java similarity index 74% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/notice/vo/SysNoticePageReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticePageReqVO.java index 6e1932a15..570d53005 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/notice/vo/SysNoticePageReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticePageReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.notice.vo; +package cn.iocoder.yudao.module.system.controller.admin.notice.vo; import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.annotations.ApiModel; @@ -6,10 +6,10 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; -@ApiModel("通知公告分页 Request VO") +@ApiModel("管理后台 - 通知公告分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) -public class SysNoticePageReqVO extends PageParam { +public class NoticePageReqVO extends PageParam { @ApiModelProperty(value = "通知公告名称", example = "芋道", notes = "模糊匹配") private String title; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/notice/vo/SysNoticeRespVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticeRespVO.java similarity index 71% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/notice/vo/SysNoticeRespVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticeRespVO.java index 0cfb78bbb..1f18df030 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/notice/vo/SysNoticeRespVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticeRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.notice.vo; +package cn.iocoder.yudao.module.system.controller.admin.notice.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -7,10 +7,10 @@ import lombok.EqualsAndHashCode; import java.util.Date; -@ApiModel("通知公告信息 Response VO") +@ApiModel("管理后台 - 通知公告信息 Response VO") @Data @EqualsAndHashCode(callSuper = true) -public class SysNoticeRespVO extends SysNoticeBaseVO { +public class NoticeRespVO extends NoticeBaseVO { @ApiModelProperty(value = "通知公告序号", required = true, example = "1024") private Long id; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/notice/vo/SysNoticeUpdateReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticeUpdateReqVO.java similarity index 69% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/notice/vo/SysNoticeUpdateReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticeUpdateReqVO.java index 3d6fdd586..30f4a3720 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/notice/vo/SysNoticeUpdateReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/vo/NoticeUpdateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.notice.vo; +package cn.iocoder.yudao.module.system.controller.admin.notice.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -7,10 +7,10 @@ import lombok.EqualsAndHashCode; import javax.validation.constraints.NotNull; -@ApiModel("岗位公告更新 Request VO") +@ApiModel("管理后台 - 岗位公告更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) -public class SysNoticeUpdateReqVO extends SysNoticeBaseVO { +public class NoticeUpdateReqVO extends NoticeBaseVO { @ApiModelProperty(value = "岗位公告编号", required = true, example = "1024") @NotNull(message = "岗位公告编号不能为空") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/SysMenuController.http b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/MenuController.http similarity index 78% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/SysMenuController.http rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/MenuController.http index c073f7bdc..a90d8b8ab 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/SysMenuController.http +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/MenuController.http @@ -1,3 +1,4 @@ ### 请求 /menu/list 接口 => 成功 GET {{baseUrl}}/system/menu/list Authorization: Bearer {{token}} +tenant-id: {{adminTenentId}} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/SysMenuController.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/MenuController.java similarity index 63% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/SysMenuController.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/MenuController.java index 340b3bff7..8678da529 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/SysMenuController.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/MenuController.java @@ -1,11 +1,11 @@ -package cn.iocoder.yudao.module.system.controller.permission; +package cn.iocoder.yudao.module.system.controller.admin.permission; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.module.system.controller.permission.vo.menu.*; -import cn.iocoder.yudao.module.system.convert.permission.SysMenuConvert; -import cn.iocoder.yudao.module.system.dal.dataobject.permission.SysMenuDO; -import cn.iocoder.yudao.module.system.service.permission.SysMenuService; +import cn.iocoder.yudao.module.system.controller.admin.permission.vo.menu.*; +import cn.iocoder.yudao.module.system.convert.permission.MenuConvert; +import cn.iocoder.yudao.module.system.dal.dataobject.permission.MenuDO; +import cn.iocoder.yudao.module.system.service.permission.MenuService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; @@ -20,19 +20,19 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -@Api(tags = "菜单") +@Api(tags = "管理后台 - 菜单") @RestController @RequestMapping("/system/menu") @Validated -public class SysMenuController { +public class MenuController { @Resource - private SysMenuService menuService; + private MenuService menuService; @PostMapping("/create") @ApiOperation("创建菜单") @PreAuthorize("@ss.hasPermission('system:menu:create')") - public CommonResult createMenu(@Valid @RequestBody SysMenuCreateReqVO reqVO) { + public CommonResult createMenu(@Valid @RequestBody MenuCreateReqVO reqVO) { Long menuId = menuService.createMenu(reqVO); return success(menuId); } @@ -40,7 +40,7 @@ public class SysMenuController { @PutMapping("/update") @ApiOperation("修改菜单") @PreAuthorize("@ss.hasPermission('system:menu:update')") - public CommonResult updateMenu(@Valid @RequestBody SysMenuUpdateReqVO reqVO) { + public CommonResult updateMenu(@Valid @RequestBody MenuUpdateReqVO reqVO) { menuService.updateMenu(reqVO); return success(true); } @@ -57,30 +57,30 @@ public class SysMenuController { @GetMapping("/list") @ApiOperation("获取菜单列表") @PreAuthorize("@ss.hasPermission('system:menu:query')") - public CommonResult> getMenus(SysMenuListReqVO reqVO) { - List list = menuService.getMenus(reqVO); - list.sort(Comparator.comparing(SysMenuDO::getSort)); - return success(SysMenuConvert.INSTANCE.convertList(list)); + public CommonResult> getMenus(MenuListReqVO reqVO) { + List list = menuService.getMenus(reqVO); + list.sort(Comparator.comparing(MenuDO::getSort)); + return success(MenuConvert.INSTANCE.convertList(list)); } @GetMapping("/list-all-simple") @ApiOperation(value = "获取菜单精简信息列表", notes = "只包含被开启的菜单,主要用于前端的下拉选项") - public CommonResult> getSimpleMenus() { + public CommonResult> getSimpleMenus() { // 获得菜单列表,只要开启状态的 - SysMenuListReqVO reqVO = new SysMenuListReqVO(); + MenuListReqVO reqVO = new MenuListReqVO(); reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); - List list = menuService.getMenus(reqVO); + List list = menuService.getMenus(reqVO); // 排序后,返回个诶前端 - list.sort(Comparator.comparing(SysMenuDO::getSort)); - return success(SysMenuConvert.INSTANCE.convertList02(list)); + list.sort(Comparator.comparing(MenuDO::getSort)); + return success(MenuConvert.INSTANCE.convertList02(list)); } @GetMapping("/get") @ApiOperation("获取菜单信息") @PreAuthorize("@ss.hasPermission('system:menu:query')") - public CommonResult getMenu(Long id) { - SysMenuDO menu = menuService.getMenu(id); - return success(SysMenuConvert.INSTANCE.convert(menu)); + public CommonResult getMenu(Long id) { + MenuDO menu = menuService.getMenu(id); + return success(MenuConvert.INSTANCE.convert(menu)); } } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/SysPermissionController.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/PermissionController.java similarity index 73% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/SysPermissionController.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/PermissionController.java index 500f4ac4b..de26fbf08 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/SysPermissionController.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/PermissionController.java @@ -1,10 +1,10 @@ -package cn.iocoder.yudao.module.system.controller.permission; +package cn.iocoder.yudao.module.system.controller.admin.permission; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.module.system.controller.permission.vo.permission.SysPermissionAssignRoleDataScopeReqVO; -import cn.iocoder.yudao.module.system.controller.permission.vo.permission.SysPermissionAssignRoleMenuReqVO; -import cn.iocoder.yudao.module.system.controller.permission.vo.permission.SysPermissionAssignUserRoleReqVO; -import cn.iocoder.yudao.module.system.service.permission.SysPermissionService; +import cn.iocoder.yudao.module.system.controller.admin.permission.vo.permission.PermissionAssignRoleDataScopeReqVO; +import cn.iocoder.yudao.module.system.controller.admin.permission.vo.permission.PermissionAssignRoleMenuReqVO; +import cn.iocoder.yudao.module.system.controller.admin.permission.vo.permission.PermissionAssignUserRoleReqVO; +import cn.iocoder.yudao.module.system.service.permission.PermissionService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; @@ -12,6 +12,7 @@ import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; +import javax.validation.Valid; import java.util.Set; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; @@ -21,13 +22,15 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; * * @author 芋道源码 */ -@Api(tags = "权限") +@Api(tags = "管理后台 - 权限") @RestController @RequestMapping("/system/permission") -public class SysPermissionController { +public class PermissionController { @Resource - private SysPermissionService permissionService; + private PermissionService permissionService; + + // TODO @芋艿:处理下全新啊标识 @ApiOperation("获得角色拥有的菜单编号") @ApiImplicitParam(name = "roleId", value = "角色编号", required = true, dataTypeClass = Long.class) @@ -40,7 +43,7 @@ public class SysPermissionController { @PostMapping("/assign-role-menu") @ApiOperation("赋予角色菜单") // @RequiresPermissions("system:permission:assign-role-resource") - public CommonResult assignRoleMenu(@Validated @RequestBody SysPermissionAssignRoleMenuReqVO reqVO) { + public CommonResult assignRoleMenu(@Validated @RequestBody PermissionAssignRoleMenuReqVO reqVO) { permissionService.assignRoleMenu(reqVO.getRoleId(), reqVO.getMenuIds()); return success(true); } @@ -48,8 +51,7 @@ public class SysPermissionController { @PostMapping("/assign-role-data-scope") @ApiOperation("赋予角色数据权限") // @RequiresPermissions("system:permission:assign-role-data-scope") - public CommonResult assignRoleDataScope( - @Validated @RequestBody SysPermissionAssignRoleDataScopeReqVO reqVO) { + public CommonResult assignRoleDataScope(@Valid @RequestBody PermissionAssignRoleDataScopeReqVO reqVO) { permissionService.assignRoleDataScope(reqVO.getRoleId(), reqVO.getDataScope(), reqVO.getDataScopeDeptIds()); return success(true); } @@ -65,7 +67,7 @@ public class SysPermissionController { @ApiOperation("赋予用户角色") @PostMapping("/assign-user-role") // @RequiresPermissions("system:permission:assign-user-role") - public CommonResult assignUserRole(@Validated @RequestBody SysPermissionAssignUserRoleReqVO reqVO) { + public CommonResult assignUserRole(@Validated @RequestBody PermissionAssignUserRoleReqVO reqVO) { permissionService.assignUserRole(reqVO.getUserId(), reqVO.getRoleIds()); return success(true); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/SysRoleController.http b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/RoleController.http similarity index 84% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/SysRoleController.http rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/RoleController.http index 4e150ac30..c28725d86 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/SysRoleController.http +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/RoleController.http @@ -2,6 +2,7 @@ POST {{baseUrl}}/system/role/create Authorization: Bearer {{token}} Content-Type: application/json +tenant-id: {{adminTenentId}} { "name": "测试角色", @@ -13,7 +14,7 @@ Content-Type: application/json POST {{baseUrl}}/system/role/update Authorization: Bearer {{token}} Content-Type: application/json - +tenant-id: {{adminTenentId}} { "id": 100, @@ -25,6 +26,7 @@ Content-Type: application/json POST {{baseUrl}}/system/role/delete Content-Type: application/x-www-form-urlencoded Authorization: Bearer {{token}} +tenant-id: {{adminTenentId}} roleId=14 @@ -32,10 +34,12 @@ roleId=14 GET {{baseUrl}}/system/role/get?id=100 Content-Type: application/x-www-form-urlencoded Authorization: Bearer {{token}} +tenant-id: {{adminTenentId}} ### /role/page 成功 GET {{baseUrl}}/system/role/page?pageNo=1&pageSize=10 Authorization: Bearer {{token}} +tenant-id: {{adminTenentId}} ### diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/SysRoleController.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/RoleController.java similarity index 76% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/SysRoleController.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/RoleController.java index 7ec11bd56..ac7dce635 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/SysRoleController.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/RoleController.java @@ -1,14 +1,14 @@ -package cn.iocoder.yudao.module.system.controller.permission; +package cn.iocoder.yudao.module.system.controller.admin.permission; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; -import cn.iocoder.yudao.module.system.controller.permission.vo.role.*; -import cn.iocoder.yudao.module.system.convert.permission.SysRoleConvert; +import cn.iocoder.yudao.module.system.controller.admin.permission.vo.role.*; +import cn.iocoder.yudao.module.system.convert.permission.RoleConvert; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.permission.SysRoleDO; -import cn.iocoder.yudao.module.system.service.permission.SysRoleService; +import cn.iocoder.yudao.module.system.service.permission.RoleService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; @@ -27,26 +27,26 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; -@Api(tags = "角色") +@Api(tags = "管理后台 - 角色") @RestController @RequestMapping("/system/role") @Validated -public class SysRoleController { +public class RoleController { @Resource - private SysRoleService roleService; + private RoleService roleService; @PostMapping("/create") @ApiOperation("创建角色") @PreAuthorize("@ss.hasPermission('system:role:create')") - public CommonResult createRole(@Valid @RequestBody SysRoleCreateReqVO reqVO) { + public CommonResult createRole(@Valid @RequestBody RoleCreateReqVO reqVO) { return success(roleService.createRole(reqVO)); } @PutMapping("/update") @ApiOperation("修改角色") @PreAuthorize("@ss.hasPermission('system:role:update')") - public CommonResult updateRole(@Valid @RequestBody SysRoleUpdateReqVO reqVO) { + public CommonResult updateRole(@Valid @RequestBody RoleUpdateReqVO reqVO) { roleService.updateRole(reqVO); return success(true); } @@ -54,7 +54,7 @@ public class SysRoleController { @PutMapping("/update-status") @ApiOperation("修改角色状态") @PreAuthorize("@ss.hasPermission('system:role:update')") - public CommonResult updateRoleStatus(@Valid @RequestBody SysRoleUpdateStatusReqVO reqVO) { + public CommonResult updateRoleStatus(@Valid @RequestBody RoleUpdateStatusReqVO reqVO) { roleService.updateRoleStatus(reqVO.getId(), reqVO.getStatus()); return success(true); } @@ -71,36 +71,36 @@ public class SysRoleController { @GetMapping("/get") @ApiOperation("获得角色信息") @PreAuthorize("@ss.hasPermission('system:role:query')") - public CommonResult getRole(@RequestParam("id") Long id) { + public CommonResult getRole(@RequestParam("id") Long id) { SysRoleDO role = roleService.getRole(id); - return success(SysRoleConvert.INSTANCE.convert(role)); + return success(RoleConvert.INSTANCE.convert(role)); } @GetMapping("/page") @ApiOperation("获得角色分页") @PreAuthorize("@ss.hasPermission('system:role:query')") - public CommonResult> getRolePage(SysRolePageReqVO reqVO) { + public CommonResult> getRolePage(RolePageReqVO reqVO) { return success(roleService.getRolePage(reqVO)); } @GetMapping("/list-all-simple") @ApiOperation(value = "获取角色精简信息列表", notes = "只包含被开启的角色,主要用于前端的下拉选项") - public CommonResult> getSimpleRoles() { + public CommonResult> getSimpleRoles() { // 获得角色列表,只要开启状态的 List list = roleService.getRoles(Collections.singleton(CommonStatusEnum.ENABLE.getStatus())); // 排序后,返回个诶前端 list.sort(Comparator.comparing(SysRoleDO::getSort)); - return success(SysRoleConvert.INSTANCE.convertList02(list)); + return success(RoleConvert.INSTANCE.convertList02(list)); } @GetMapping("/export") @OperateLog(type = EXPORT) @PreAuthorize("@ss.hasPermission('system:role:export')") - public void export(HttpServletResponse response, @Validated SysRoleExportReqVO reqVO) throws IOException { + public void export(HttpServletResponse response, @Validated RoleExportReqVO reqVO) throws IOException { List list = roleService.getRoleList(reqVO); - List data = SysRoleConvert.INSTANCE.convertList03(list); + List data = RoleConvert.INSTANCE.convertList03(list); // 输出 - ExcelUtils.write(response, "角色数据.xls", "角色列表", SysRoleExcelVO.class, data); + ExcelUtils.write(response, "角色数据.xls", "角色列表", RoleExcelVO.class, data); } } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/menu/SysMenuBaseVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuBaseVO.java similarity index 95% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/menu/SysMenuBaseVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuBaseVO.java index 87f2eb7fe..8769f3a1b 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/menu/SysMenuBaseVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuBaseVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.permission.vo.menu; +package cn.iocoder.yudao.module.system.controller.admin.permission.vo.menu; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -12,7 +12,7 @@ import javax.validation.constraints.Size; * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 */ @Data -public class SysMenuBaseVO { +public class MenuBaseVO { @ApiModelProperty(value = "菜单名称", required = true, example = "芋道") @NotBlank(message = "菜单名称不能为空") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuCreateReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuCreateReqVO.java new file mode 100644 index 000000000..a793997ff --- /dev/null +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuCreateReqVO.java @@ -0,0 +1,10 @@ +package cn.iocoder.yudao.module.system.controller.admin.permission.vo.menu; + +import io.swagger.annotations.ApiModel; +import lombok.*; + +@ApiModel("管理后台 - 菜单创建 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +public class MenuCreateReqVO extends MenuBaseVO { +} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/menu/SysMenuListReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuListReqVO.java similarity index 70% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/menu/SysMenuListReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuListReqVO.java index e0b8a2d02..53b0b46a9 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/menu/SysMenuListReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuListReqVO.java @@ -1,12 +1,12 @@ -package cn.iocoder.yudao.module.system.controller.permission.vo.menu; +package cn.iocoder.yudao.module.system.controller.admin.permission.vo.menu; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; -@ApiModel("菜单列表 Request VO") +@ApiModel("管理后台 - 菜单列表 Request VO") @Data -public class SysMenuListReqVO { +public class MenuListReqVO { @ApiModelProperty(value = "菜单名称", example = "芋道", notes = "模糊匹配") private String name; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/menu/SysMenuRespVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuRespVO.java similarity index 79% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/menu/SysMenuRespVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuRespVO.java index ed8512ae5..9fe9e12f5 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/menu/SysMenuRespVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.permission.vo.menu; +package cn.iocoder.yudao.module.system.controller.admin.permission.vo.menu; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -9,12 +9,12 @@ import lombok.NoArgsConstructor; import java.util.Date; -@ApiModel("菜单信息 Response VO") +@ApiModel("管理后台 - 菜单信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor @EqualsAndHashCode(callSuper = true) -public class SysMenuRespVO extends SysMenuBaseVO { +public class MenuRespVO extends MenuBaseVO { @ApiModelProperty(value = "菜单编号", required = true, example = "1024") private Long id; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/menu/SysMenuSimpleRespVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuSimpleRespVO.java similarity index 76% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/menu/SysMenuSimpleRespVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuSimpleRespVO.java index dc160cb96..927418518 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/menu/SysMenuSimpleRespVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuSimpleRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.permission.vo.menu; +package cn.iocoder.yudao.module.system.controller.admin.permission.vo.menu; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -6,11 +6,11 @@ import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; -@ApiModel("菜单精简信息 Response VO") +@ApiModel("管理后台 - 菜单精简信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor -public class SysMenuSimpleRespVO { +public class MenuSimpleRespVO { @ApiModelProperty(value = "菜单编号", required = true, example = "1024") private Long id; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/menu/SysMenuUpdateReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuUpdateReqVO.java similarity index 66% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/menu/SysMenuUpdateReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuUpdateReqVO.java index bf44bf94a..7a1784363 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/menu/SysMenuUpdateReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/menu/MenuUpdateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.permission.vo.menu; +package cn.iocoder.yudao.module.system.controller.admin.permission.vo.menu; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -6,10 +6,10 @@ import lombok.*; import javax.validation.constraints.NotNull; -@ApiModel("菜单更新 Request VO") +@ApiModel("管理后台 - 菜单更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) -public class SysMenuUpdateReqVO extends SysMenuBaseVO { +public class MenuUpdateReqVO extends MenuBaseVO { @ApiModelProperty(value = "菜单编号", required = true, example = "1024") @NotNull(message = "菜单编号不能为空") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/permission/SysPermissionAssignRoleDataScopeReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/permission/PermissionAssignRoleDataScopeReqVO.java similarity index 81% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/permission/SysPermissionAssignRoleDataScopeReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/permission/PermissionAssignRoleDataScopeReqVO.java index 08feaae0d..0683ba9b8 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/permission/SysPermissionAssignRoleDataScopeReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/permission/PermissionAssignRoleDataScopeReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.permission.vo.permission; +package cn.iocoder.yudao.module.system.controller.admin.permission.vo.permission; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -8,9 +8,9 @@ import javax.validation.constraints.NotNull; import java.util.Collections; import java.util.Set; -@ApiModel("赋予角色数据权限 Request VO") +@ApiModel("管理后台 - 赋予角色数据权限 Request VO") @Data -public class SysPermissionAssignRoleDataScopeReqVO { +public class PermissionAssignRoleDataScopeReqVO { @ApiModelProperty(value = "角色编号", required = true, example = "1") @NotNull(message = "角色编号不能为空") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/permission/SysPermissionAssignRoleMenuReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/permission/PermissionAssignRoleMenuReqVO.java similarity index 73% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/permission/SysPermissionAssignRoleMenuReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/permission/PermissionAssignRoleMenuReqVO.java index 664d6d8e8..3fc4dcb2c 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/permission/SysPermissionAssignRoleMenuReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/permission/PermissionAssignRoleMenuReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.permission.vo.permission; +package cn.iocoder.yudao.module.system.controller.admin.permission.vo.permission; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -8,9 +8,9 @@ import javax.validation.constraints.NotNull; import java.util.Collections; import java.util.Set; -@ApiModel("赋予角色菜单 Request VO") +@ApiModel("管理后台 - 赋予角色菜单 Request VO") @Data -public class SysPermissionAssignRoleMenuReqVO { +public class PermissionAssignRoleMenuReqVO { @ApiModelProperty(value = "角色编号", required = true, example = "1") @NotNull(message = "角色编号不能为空") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/permission/SysPermissionAssignUserRoleReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/permission/PermissionAssignUserRoleReqVO.java similarity index 73% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/permission/SysPermissionAssignUserRoleReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/permission/PermissionAssignUserRoleReqVO.java index fdbbedcbd..75671bcd2 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/permission/SysPermissionAssignUserRoleReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/permission/PermissionAssignUserRoleReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.permission.vo.permission; +package cn.iocoder.yudao.module.system.controller.admin.permission.vo.permission; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -8,9 +8,9 @@ import javax.validation.constraints.NotNull; import java.util.Collections; import java.util.Set; -@ApiModel("赋予用户角色 Request VO") +@ApiModel("管理后台 - 赋予用户角色 Request VO") @Data -public class SysPermissionAssignUserRoleReqVO { +public class PermissionAssignUserRoleReqVO { @ApiModelProperty(value = "角色编号", required = true, example = "1") @NotNull(message = "角色编号不能为空") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/role/SysRoleBaseVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleBaseVO.java similarity index 92% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/role/SysRoleBaseVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleBaseVO.java index a2553fc23..3f027f8dc 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/role/SysRoleBaseVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleBaseVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.permission.vo.role; +package cn.iocoder.yudao.module.system.controller.admin.permission.vo.role; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -12,7 +12,7 @@ import javax.validation.constraints.Size; * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 */ @Data -public class SysRoleBaseVO { +public class RoleBaseVO { @ApiModelProperty(value = "角色名称", required = true, example = "管理员") @NotBlank(message = "角色名称不能为空") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleCreateReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleCreateReqVO.java new file mode 100644 index 000000000..785f65815 --- /dev/null +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleCreateReqVO.java @@ -0,0 +1,12 @@ +package cn.iocoder.yudao.module.system.controller.admin.permission.vo.role; + +import io.swagger.annotations.ApiModel; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@ApiModel("管理后台 - 角色创建 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +public class RoleCreateReqVO extends RoleBaseVO { + +} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/role/SysRoleExcelVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleExcelVO.java similarity index 88% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/role/SysRoleExcelVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleExcelVO.java index 08a37816f..bb82f4ab1 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/role/SysRoleExcelVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleExcelVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.permission.vo.role; +package cn.iocoder.yudao.module.system.controller.admin.permission.vo.role; import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; @@ -10,7 +10,7 @@ import lombok.Data; * 角色 Excel 导出响应 VO */ @Data -public class SysRoleExcelVO { +public class RoleExcelVO { @ExcelProperty("角色序号") private Long id; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/role/SysRoleExportReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleExportReqVO.java similarity index 86% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/role/SysRoleExportReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleExportReqVO.java index bc0970878..339a22ba8 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/role/SysRoleExportReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleExportReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.permission.vo.role; +package cn.iocoder.yudao.module.system.controller.admin.permission.vo.role; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -9,9 +9,9 @@ import java.util.Date; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("角色分页 Request VO") +@ApiModel("管理后台 - 角色分页 Request VO") @Data -public class SysRoleExportReqVO { +public class RoleExportReqVO { @ApiModelProperty(value = "角色名称", example = "芋道", notes = "模糊匹配") private String name; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/role/SysRolePageReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RolePageReqVO.java similarity index 86% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/role/SysRolePageReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RolePageReqVO.java index c6e7665e4..d2fed80e5 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/role/SysRolePageReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RolePageReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.permission.vo.role; +package cn.iocoder.yudao.module.system.controller.admin.permission.vo.role; import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.annotations.ApiModel; @@ -11,10 +11,10 @@ import java.util.Date; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("角色分页 Request VO") +@ApiModel("管理后台 - 角色分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) -public class SysRolePageReqVO extends PageParam { +public class RolePageReqVO extends PageParam { @ApiModelProperty(value = "角色名称", example = "芋道", notes = "模糊匹配") private String name; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/role/SysRoleRespVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleRespVO.java similarity index 86% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/role/SysRoleRespVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleRespVO.java index ef11d82a3..e7c0e2c3c 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/role/SysRoleRespVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.permission.vo.role; +package cn.iocoder.yudao.module.system.controller.admin.permission.vo.role; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -10,12 +10,12 @@ import lombok.NoArgsConstructor; import java.util.Date; import java.util.Set; -@ApiModel("角色信息 Response VO") +@ApiModel("管理后台 - 角色信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor @EqualsAndHashCode(callSuper = true) -public class SysRoleRespVO extends SysRoleBaseVO { +public class RoleRespVO extends RoleBaseVO { @ApiModelProperty(value = "角色编号", required = true, example = "1") private Long id; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/role/SysRoleSimpleRespVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleSimpleRespVO.java similarity index 72% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/role/SysRoleSimpleRespVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleSimpleRespVO.java index a2706f4f4..c0a4c3083 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/role/SysRoleSimpleRespVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleSimpleRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.permission.vo.role; +package cn.iocoder.yudao.module.system.controller.admin.permission.vo.role; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -6,11 +6,11 @@ import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; -@ApiModel("角色精简信息 Response VO") +@ApiModel("管理后台 - 角色精简信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor -public class SysRoleSimpleRespVO { +public class RoleSimpleRespVO { @ApiModelProperty(value = "角色编号", required = true, example = "1024") private Long id; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/role/SysRoleUpdateReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleUpdateReqVO.java similarity index 68% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/role/SysRoleUpdateReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleUpdateReqVO.java index c6f56f63a..362cbb290 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/role/SysRoleUpdateReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleUpdateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.permission.vo.role; +package cn.iocoder.yudao.module.system.controller.admin.permission.vo.role; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -7,10 +7,10 @@ import lombok.EqualsAndHashCode; import javax.validation.constraints.NotNull; -@ApiModel("角色更新 Request VO") +@ApiModel("管理后台 - 角色更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) -public class SysRoleUpdateReqVO extends SysRoleBaseVO { +public class RoleUpdateReqVO extends RoleBaseVO { @ApiModelProperty(value = "角色编号", required = true, example = "1024") @NotNull(message = "角色编号不能为空") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/role/SysRoleUpdateStatusReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleUpdateStatusReqVO.java similarity index 56% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/role/SysRoleUpdateStatusReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleUpdateStatusReqVO.java index ba861539d..75a658c7a 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/role/SysRoleUpdateStatusReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/permission/vo/role/RoleUpdateStatusReqVO.java @@ -1,14 +1,16 @@ -package cn.iocoder.yudao.module.system.controller.permission.vo.role; +package cn.iocoder.yudao.module.system.controller.admin.permission.vo.role; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.validation.InEnum; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import javax.validation.constraints.NotNull; -@ApiModel("角色更新状态 Request VO") +@ApiModel("管理后台 - 角色更新状态 Request VO") @Data -public class SysRoleUpdateStatusReqVO { +public class RoleUpdateStatusReqVO { @ApiModelProperty(value = "角色编号", required = true, example = "1024") @NotNull(message = "角色编号不能为空") @@ -16,7 +18,7 @@ public class SysRoleUpdateStatusReqVO { @ApiModelProperty(value = "状态", required = true, example = "1", notes = "见 SysCommonStatusEnum 枚举") @NotNull(message = "状态不能为空") -// @InEnum(value = SysCommonStatusEnum.class, message = "修改状态必须是 {value}") +// @InEnum(value = CommonStatusEnum.class, message = "修改状态必须是 {value}") private Integer status; } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/SmsCallbackController.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsCallbackController.java similarity index 95% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/SmsCallbackController.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsCallbackController.java index 0968a1d2f..f13f188c4 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/SmsCallbackController.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsCallbackController.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.sms; +package cn.iocoder.yudao.module.system.controller.admin.sms; import cn.hutool.core.util.URLUtil; import cn.hutool.extra.servlet.ServletUtil; @@ -19,7 +19,7 @@ import javax.servlet.http.HttpServletRequest; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -@Api(tags = "短信回调") +@Api(tags = "管理后台 - 短信回调") @RestController @RequestMapping("/system/sms/callback") public class SmsCallbackController { diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/SysSmsChannelController.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsChannelController.java similarity index 72% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/SysSmsChannelController.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsChannelController.java index 70c7d7059..86c9eee6e 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/SysSmsChannelController.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsChannelController.java @@ -1,8 +1,8 @@ -package cn.iocoder.yudao.module.system.controller.sms; +package cn.iocoder.yudao.module.system.controller.admin.sms; -import cn.iocoder.yudao.module.system.controller.sms.vo.channel.*; -import cn.iocoder.yudao.module.system.convert.sms.SysSmsChannelConvert; -import cn.iocoder.yudao.module.system.service.sms.SysSmsChannelService; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel.*; +import cn.iocoder.yudao.module.system.convert.sms.SmsChannelConvert; +import cn.iocoder.yudao.module.system.service.sms.SmsChannelService; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.sms.SysSmsChannelDO; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; @@ -19,25 +19,25 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -@Api(tags = "短信渠道") +@Api(tags = "管理后台 - 短信渠道") @RestController @RequestMapping("system/sms-channel") -public class SysSmsChannelController { +public class SmsChannelController { @Resource - private SysSmsChannelService smsChannelService; + private SmsChannelService smsChannelService; @PostMapping("/create") @ApiOperation("创建短信渠道") @PreAuthorize("@ss.hasPermission('system:sms-channel:create')") - public CommonResult createSmsChannel(@Valid @RequestBody SysSmsChannelCreateReqVO createReqVO) { + public CommonResult createSmsChannel(@Valid @RequestBody SmsChannelCreateReqVO createReqVO) { return success(smsChannelService.createSmsChannel(createReqVO)); } @PutMapping("/update") @ApiOperation("更新短信渠道") @PreAuthorize("@ss.hasPermission('system:sms-channel:update')") - public CommonResult updateSmsChannel(@Valid @RequestBody SysSmsChannelUpdateReqVO updateReqVO) { + public CommonResult updateSmsChannel(@Valid @RequestBody SmsChannelUpdateReqVO updateReqVO) { smsChannelService.updateSmsChannel(updateReqVO); return success(true); } @@ -55,26 +55,26 @@ public class SysSmsChannelController { @ApiOperation("获得短信渠道") @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) @PreAuthorize("@ss.hasPermission('system:sms-channel:query')") - public CommonResult getSmsChannel(@RequestParam("id") Long id) { + public CommonResult getSmsChannel(@RequestParam("id") Long id) { SysSmsChannelDO smsChannel = smsChannelService.getSmsChannel(id); - return success(SysSmsChannelConvert.INSTANCE.convert(smsChannel)); + return success(SmsChannelConvert.INSTANCE.convert(smsChannel)); } @GetMapping("/page") @ApiOperation("获得短信渠道分页") @PreAuthorize("@ss.hasPermission('system:sms-channel:query')") - public CommonResult> getSmsChannelPage(@Valid SysSmsChannelPageReqVO pageVO) { + public CommonResult> getSmsChannelPage(@Valid SmsChannelPageReqVO pageVO) { PageResult pageResult = smsChannelService.getSmsChannelPage(pageVO); - return success(SysSmsChannelConvert.INSTANCE.convertPage(pageResult)); + return success(SmsChannelConvert.INSTANCE.convertPage(pageResult)); } @GetMapping("/list-all-simple") @ApiOperation(value = "获得短信渠道精简列表", notes = "包含被禁用的短信渠道") - public CommonResult> getSimpleSmsChannels() { + public CommonResult> getSimpleSmsChannels() { List list = smsChannelService.getSmsChannelList(); // 排序后,返回给前端 list.sort(Comparator.comparing(SysSmsChannelDO::getId)); - return success(SysSmsChannelConvert.INSTANCE.convertList03(list)); + return success(SmsChannelConvert.INSTANCE.convertList03(list)); } } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/SysSmsLogController.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsLogController.java similarity index 66% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/SysSmsLogController.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsLogController.java index ee69dee3d..557e6d31e 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/SysSmsLogController.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsLogController.java @@ -1,11 +1,11 @@ -package cn.iocoder.yudao.module.system.controller.sms; +package cn.iocoder.yudao.module.system.controller.admin.sms; -import cn.iocoder.yudao.module.system.controller.sms.vo.log.SysSmsLogExcelVO; -import cn.iocoder.yudao.module.system.controller.sms.vo.log.SysSmsLogExportReqVO; -import cn.iocoder.yudao.module.system.controller.sms.vo.log.SysSmsLogPageReqVO; -import cn.iocoder.yudao.module.system.controller.sms.vo.log.SysSmsLogRespVO; -import cn.iocoder.yudao.module.system.convert.sms.SysSmsLogConvert; -import cn.iocoder.yudao.module.system.service.sms.SysSmsLogService; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.log.SmsLogExcelVO; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.log.SmsLogExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.log.SmsLogPageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.log.SysSmsLogRespVO; +import cn.iocoder.yudao.module.system.convert.sms.SmsLogConvert; +import cn.iocoder.yudao.module.system.service.sms.SmsLogService; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.sms.SysSmsLogDO; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; @@ -28,33 +28,33 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; -@Api(tags = "短信日志") +@Api(tags = "管理后台 - 短信日志") @RestController @RequestMapping("/system/sms-log") @Validated -public class SysSmsLogController { +public class SmsLogController { @Resource - private SysSmsLogService smsLogService; + private SmsLogService smsLogService; @GetMapping("/page") @ApiOperation("获得短信日志分页") @PreAuthorize("@ss.hasPermission('system:sms-log:query')") - public CommonResult> getSmsLogPage(@Valid SysSmsLogPageReqVO pageVO) { + public CommonResult> getSmsLogPage(@Valid SmsLogPageReqVO pageVO) { PageResult pageResult = smsLogService.getSmsLogPage(pageVO); - return success(SysSmsLogConvert.INSTANCE.convertPage(pageResult)); + return success(SmsLogConvert.INSTANCE.convertPage(pageResult)); } @GetMapping("/export-excel") @ApiOperation("导出短信日志 Excel") @PreAuthorize("@ss.hasPermission('system:sms-log:export')") @OperateLog(type = EXPORT) - public void exportSmsLogExcel(@Valid SysSmsLogExportReqVO exportReqVO, + public void exportSmsLogExcel(@Valid SmsLogExportReqVO exportReqVO, HttpServletResponse response) throws IOException { List list = smsLogService.getSmsLogList(exportReqVO); // 导出 Excel - List datas = SysSmsLogConvert.INSTANCE.convertList02(list); - ExcelUtils.write(response, "短信日志.xls", "数据", SysSmsLogExcelVO.class, datas); + List datas = SmsLogConvert.INSTANCE.convertList02(list); + ExcelUtils.write(response, "短信日志.xls", "数据", SmsLogExcelVO.class, datas); } } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/SysSmsTemplateController.http b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsTemplateController.http similarity index 69% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/SysSmsTemplateController.http rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsTemplateController.http index d5441d057..3bf59d965 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/SysSmsTemplateController.http +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsTemplateController.http @@ -1,7 +1,8 @@ -### 请求 /menu/list 接口 => 成功 +### 请求 /system/sms-template/send-sms 接口 => 成功 POST {{baseUrl}}/system/sms-template/send-sms Authorization: Bearer {{token}} Content-Type: application/json +tenant-id: {{adminTenentId}} { "code": "test_01", diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/SysSmsTemplateController.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsTemplateController.java similarity index 74% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/SysSmsTemplateController.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsTemplateController.java index 9328680e3..2d0adc427 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/SysSmsTemplateController.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsTemplateController.java @@ -1,8 +1,8 @@ -package cn.iocoder.yudao.module.system.controller.sms; +package cn.iocoder.yudao.module.system.controller.admin.sms; -import cn.iocoder.yudao.module.system.controller.sms.vo.template.*; -import cn.iocoder.yudao.module.system.convert.sms.SysSmsTemplateConvert; -import cn.iocoder.yudao.module.system.service.sms.SysSmsTemplateService; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.template.*; +import cn.iocoder.yudao.module.system.convert.sms.SmsTemplateConvert; +import cn.iocoder.yudao.module.system.service.sms.SmsTemplateService; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.sms.SysSmsTemplateDO; import cn.iocoder.yudao.coreservice.modules.system.service.sms.SysSmsCoreService; import cn.iocoder.yudao.framework.common.pojo.CommonResult; @@ -24,27 +24,27 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; -@Api(tags = "短信模板") +@Api(tags = "管理后台 - 短信模板") @RestController @RequestMapping("/system/sms-template") -public class SysSmsTemplateController { +public class SmsTemplateController { @Resource - private SysSmsTemplateService smsTemplateService; + private SmsTemplateService smsTemplateService; @Resource private SysSmsCoreService smsCoreService; @PostMapping("/create") @ApiOperation("创建短信模板") @PreAuthorize("@ss.hasPermission('system:sms-template:create')") - public CommonResult createSmsTemplate(@Valid @RequestBody SysSmsTemplateCreateReqVO createReqVO) { + public CommonResult createSmsTemplate(@Valid @RequestBody SmsTemplateCreateReqVO createReqVO) { return success(smsTemplateService.createSmsTemplate(createReqVO)); } @PutMapping("/update") @ApiOperation("更新短信模板") @PreAuthorize("@ss.hasPermission('system:sms-template:update')") - public CommonResult updateSmsTemplate(@Valid @RequestBody SysSmsTemplateUpdateReqVO updateReqVO) { + public CommonResult updateSmsTemplate(@Valid @RequestBody SmsTemplateUpdateReqVO updateReqVO) { smsTemplateService.updateSmsTemplate(updateReqVO); return success(true); } @@ -62,35 +62,35 @@ public class SysSmsTemplateController { @ApiOperation("获得短信模板") @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) @PreAuthorize("@ss.hasPermission('system:sms-template:query')") - public CommonResult getSmsTemplate(@RequestParam("id") Long id) { + public CommonResult getSmsTemplate(@RequestParam("id") Long id) { SysSmsTemplateDO smsTemplate = smsTemplateService.getSmsTemplate(id); - return success(SysSmsTemplateConvert.INSTANCE.convert(smsTemplate)); + return success(SmsTemplateConvert.INSTANCE.convert(smsTemplate)); } @GetMapping("/page") @ApiOperation("获得短信模板分页") @PreAuthorize("@ss.hasPermission('system:sms-template:query')") - public CommonResult> getSmsTemplatePage(@Valid SysSmsTemplatePageReqVO pageVO) { + public CommonResult> getSmsTemplatePage(@Valid SmsTemplatePageReqVO pageVO) { PageResult pageResult = smsTemplateService.getSmsTemplatePage(pageVO); - return success(SysSmsTemplateConvert.INSTANCE.convertPage(pageResult)); + return success(SmsTemplateConvert.INSTANCE.convertPage(pageResult)); } @GetMapping("/export-excel") @ApiOperation("导出短信模板 Excel") @PreAuthorize("@ss.hasPermission('system:sms-template:export')") @OperateLog(type = EXPORT) - public void exportSmsTemplateExcel(@Valid SysSmsTemplateExportReqVO exportReqVO, + public void exportSmsTemplateExcel(@Valid SmsTemplateExportReqVO exportReqVO, HttpServletResponse response) throws IOException { List list = smsTemplateService.getSmsTemplateList(exportReqVO); // 导出 Excel - List datas = SysSmsTemplateConvert.INSTANCE.convertList02(list); - ExcelUtils.write(response, "短信模板.xls", "数据", SysSmsTemplateExcelVO.class, datas); + List datas = SmsTemplateConvert.INSTANCE.convertList02(list); + ExcelUtils.write(response, "短信模板.xls", "数据", SmsTemplateExcelVO.class, datas); } @PostMapping("/send-sms") @ApiOperation("发送短信") @PreAuthorize("@ss.hasPermission('system:sms-template:send-sms')") - public CommonResult sendSms(@Valid @RequestBody SysSmsTemplateSendReqVO sendReqVO) { + public CommonResult sendSms(@Valid @RequestBody SmsTemplateSendReqVO sendReqVO) { return success(smsCoreService.sendSingleSms(sendReqVO.getMobile(), null, null, sendReqVO.getTemplateCode(), sendReqVO.getTemplateParams())); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/channel/SysSmsChannelBaseVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelBaseVO.java similarity index 92% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/channel/SysSmsChannelBaseVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelBaseVO.java index 04b1f6926..ab5595fc0 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/channel/SysSmsChannelBaseVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelBaseVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.sms.vo.channel; +package cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -11,7 +11,7 @@ import javax.validation.constraints.NotNull; * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 */ @Data -public class SysSmsChannelBaseVO { +public class SmsChannelBaseVO { @ApiModelProperty(value = "短信签名", required = true, example = "芋道源码") @NotNull(message = "短信签名不能为空") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/channel/SysSmsChannelCreateReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelCreateReqVO.java similarity index 71% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/channel/SysSmsChannelCreateReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelCreateReqVO.java index fdf3e9874..edc162f47 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/channel/SysSmsChannelCreateReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelCreateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.sms.vo.channel; +package cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -8,11 +8,11 @@ import lombok.ToString; import javax.validation.constraints.NotNull; -@ApiModel("短信渠道创建 Request VO") +@ApiModel("管理后台 - 短信渠道创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) -public class SysSmsChannelCreateReqVO extends SysSmsChannelBaseVO { +public class SmsChannelCreateReqVO extends SmsChannelBaseVO { @ApiModelProperty(value = "渠道编码", required = true, example = "YUN_PIAN", notes = "参见 SmsChannelEnum 枚举类") @NotNull(message = "渠道编码不能为空") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/channel/SysSmsChannelPageReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelPageReqVO.java similarity index 84% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/channel/SysSmsChannelPageReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelPageReqVO.java index d7d90ec79..306c7d06f 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/channel/SysSmsChannelPageReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelPageReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.sms.vo.channel; +package cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel; import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.annotations.ApiModel; @@ -12,11 +12,11 @@ import java.util.Date; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("短信渠道分页 Request VO") +@ApiModel("管理后台 - 短信渠道分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) -public class SysSmsChannelPageReqVO extends PageParam { +public class SmsChannelPageReqVO extends PageParam { @ApiModelProperty(value = "任务状态", example = "1") private Integer status; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/channel/SysSmsChannelRespVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelRespVO.java similarity index 76% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/channel/SysSmsChannelRespVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelRespVO.java index 02654a017..b39e35edf 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/channel/SysSmsChannelRespVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.sms.vo.channel; +package cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -8,11 +8,11 @@ import lombok.ToString; import java.util.Date; -@ApiModel("短信渠道 Response VO") +@ApiModel("管理后台 - 短信渠道 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) -public class SysSmsChannelRespVO extends SysSmsChannelBaseVO { +public class SmsChannelRespVO extends SmsChannelBaseVO { @ApiModelProperty(value = "编号", required = true, example = "1024") private Long id; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/channel/SysSmsChannelSimpleRespVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelSimpleRespVO.java similarity index 78% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/channel/SysSmsChannelSimpleRespVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelSimpleRespVO.java index 1cf341f98..22b5bc1d4 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/channel/SysSmsChannelSimpleRespVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelSimpleRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.sms.vo.channel; +package cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -6,9 +6,9 @@ import lombok.Data; import javax.validation.constraints.NotNull; -@ApiModel("短信渠道精简 Response VO") +@ApiModel("管理后台 - 短信渠道精简 Response VO") @Data -public class SysSmsChannelSimpleRespVO { +public class SmsChannelSimpleRespVO { @ApiModelProperty(value = "编号", required = true, example = "1024") @NotNull(message = "编号不能为空") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/channel/SysSmsChannelUpdateReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelUpdateReqVO.java similarity index 69% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/channel/SysSmsChannelUpdateReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelUpdateReqVO.java index 72ffb28a2..683328745 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/channel/SysSmsChannelUpdateReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/channel/SmsChannelUpdateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.sms.vo.channel; +package cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -8,11 +8,11 @@ import lombok.ToString; import javax.validation.constraints.NotNull; -@ApiModel("短信渠道更新 Request VO") +@ApiModel("管理后台 - 短信渠道更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) -public class SysSmsChannelUpdateReqVO extends SysSmsChannelBaseVO { +public class SmsChannelUpdateReqVO extends SmsChannelBaseVO { @ApiModelProperty(value = "编号", required = true, example = "1024") @NotNull(message = "编号不能为空") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/log/SysSmsLogExcelVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/log/SmsLogExcelVO.java similarity index 96% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/log/SysSmsLogExcelVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/log/SmsLogExcelVO.java index 1bdc83047..9fb8515df 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/log/SysSmsLogExcelVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/log/SmsLogExcelVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.sms.vo.log; +package cn.iocoder.yudao.module.system.controller.admin.sms.vo.log; import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; @@ -16,7 +16,7 @@ import java.util.Map; * @author 芋道源码 */ @Data -public class SysSmsLogExcelVO { +public class SmsLogExcelVO { @ExcelProperty("编号") private Long id; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/log/SysSmsLogExportReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/log/SmsLogExportReqVO.java similarity index 85% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/log/SysSmsLogExportReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/log/SmsLogExportReqVO.java index 3cfd6ca64..7a57aa2ed 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/log/SysSmsLogExportReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/log/SmsLogExportReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.sms.vo.log; +package cn.iocoder.yudao.module.system.controller.admin.sms.vo.log; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -9,9 +9,9 @@ import java.util.Date; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel(value = "短信日志 Excel 导出 Request VO", description = "参数和 SysSmsLogPageReqVO 是一致的") +@ApiModel(value = "管理后台 - 短信日志 Excel 导出 Request VO", description = "参数和 SysSmsLogPageReqVO 是一致的") @Data -public class SysSmsLogExportReqVO { +public class SmsLogExportReqVO { @ApiModelProperty(value = "短信渠道编号", example = "10") private Long channelId; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/log/SysSmsLogPageReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/log/SmsLogPageReqVO.java similarity index 90% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/log/SysSmsLogPageReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/log/SmsLogPageReqVO.java index 94bcc9a70..358427e82 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/log/SysSmsLogPageReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/log/SmsLogPageReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.sms.vo.log; +package cn.iocoder.yudao.module.system.controller.admin.sms.vo.log; import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.annotations.ApiModel; @@ -12,11 +12,11 @@ import java.util.Date; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("短信日志分页 Request VO") +@ApiModel("管理后台 - 短信日志分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) -public class SysSmsLogPageReqVO extends PageParam { +public class SmsLogPageReqVO extends PageParam { @ApiModelProperty(value = "短信渠道编号", example = "10") private Long channelId; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/log/SysSmsLogRespVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/log/SysSmsLogRespVO.java similarity index 96% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/log/SysSmsLogRespVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/log/SysSmsLogRespVO.java index f2a07a0ad..7377fc1e5 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/log/SysSmsLogRespVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/log/SysSmsLogRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.sms.vo.log; +package cn.iocoder.yudao.module.system.controller.admin.sms.vo.log; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -7,7 +7,7 @@ import lombok.Data; import java.util.Date; import java.util.Map; -@ApiModel("短信日志 Response VO") +@ApiModel("管理后台 - 短信日志 Response VO") @Data public class SysSmsLogRespVO { diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/template/SysSmsTemplateBaseVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateBaseVO.java similarity index 94% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/template/SysSmsTemplateBaseVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateBaseVO.java index 622316cdc..9b16fa851 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/template/SysSmsTemplateBaseVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateBaseVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.sms.vo.template; +package cn.iocoder.yudao.module.system.controller.admin.sms.vo.template; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -10,7 +10,7 @@ import javax.validation.constraints.NotNull; * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 */ @Data -public class SysSmsTemplateBaseVO { +public class SmsTemplateBaseVO { @ApiModelProperty(value = "短信类型", required = true, example = "1", notes = "参见 SysSmsTemplateTypeEnum 枚举类") @NotNull(message = "短信类型不能为空") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateCreateReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateCreateReqVO.java new file mode 100644 index 000000000..ab8b89ebd --- /dev/null +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateCreateReqVO.java @@ -0,0 +1,14 @@ +package cn.iocoder.yudao.module.system.controller.admin.sms.vo.template; + +import io.swagger.annotations.ApiModel; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +@ApiModel("管理后台 - 短信模板创建 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class SmsTemplateCreateReqVO extends SmsTemplateBaseVO { + +} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/template/SysSmsTemplateExcelVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateExcelVO.java similarity index 92% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/template/SysSmsTemplateExcelVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateExcelVO.java index d3151e621..eb28c63cb 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/template/SysSmsTemplateExcelVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateExcelVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.sms.vo.template; +package cn.iocoder.yudao.module.system.controller.admin.sms.vo.template; import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; @@ -14,7 +14,7 @@ import java.util.Date; * @author 芋道源码 */ @Data -public class SysSmsTemplateExcelVO { +public class SmsTemplateExcelVO { @ExcelProperty("编号") private Long id; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/template/SysSmsTemplateExportReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateExportReqVO.java similarity index 84% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/template/SysSmsTemplateExportReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateExportReqVO.java index 930fff558..099be029f 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/template/SysSmsTemplateExportReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateExportReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.sms.vo.template; +package cn.iocoder.yudao.module.system.controller.admin.sms.vo.template; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -9,9 +9,9 @@ import java.util.Date; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel(value = "短信模板 Excel 导出 Request VO", description = "参数和 SysSmsTemplatePageReqVO 是一致的") +@ApiModel(value = "管理后台 - 短信模板 Excel 导出 Request VO", description = "参数和 SysSmsTemplatePageReqVO 是一致的") @Data -public class SysSmsTemplateExportReqVO { +public class SmsTemplateExportReqVO { @ApiModelProperty(value = "短信签名", example = "1") private Integer type; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/template/SysSmsTemplatePageReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplatePageReqVO.java similarity index 89% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/template/SysSmsTemplatePageReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplatePageReqVO.java index e0d711ad2..6932d2946 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/template/SysSmsTemplatePageReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplatePageReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.sms.vo.template; +package cn.iocoder.yudao.module.system.controller.admin.sms.vo.template; import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.annotations.ApiModel; @@ -12,11 +12,11 @@ import java.util.Date; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("短信模板分页 Request VO") +@ApiModel("管理后台 - 短信模板分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) -public class SysSmsTemplatePageReqVO extends PageParam { +public class SmsTemplatePageReqVO extends PageParam { @ApiModelProperty(value = "短信签名", example = "1") private Integer type; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/template/SysSmsTemplateRespVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateRespVO.java similarity index 79% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/template/SysSmsTemplateRespVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateRespVO.java index 24fae0ca1..6633c383b 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/template/SysSmsTemplateRespVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.sms.vo.template; +package cn.iocoder.yudao.module.system.controller.admin.sms.vo.template; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -9,11 +9,11 @@ import lombok.ToString; import java.util.Date; import java.util.List; -@ApiModel("短信模板 Response VO") +@ApiModel("管理后台 - 短信模板 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) -public class SysSmsTemplateRespVO extends SysSmsTemplateBaseVO { +public class SmsTemplateRespVO extends SmsTemplateBaseVO { @ApiModelProperty(value = "编号", required = true, example = "1024") private Long id; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/template/SysSmsTemplateSendReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateSendReqVO.java similarity index 78% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/template/SysSmsTemplateSendReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateSendReqVO.java index 0b420c123..956b4839e 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/template/SysSmsTemplateSendReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateSendReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.sms.vo.template; +package cn.iocoder.yudao.module.system.controller.admin.sms.vo.template; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -7,9 +7,9 @@ import lombok.Data; import javax.validation.constraints.NotNull; import java.util.Map; -@ApiModel("短信模板的发送 Request VO") +@ApiModel("管理后台 - 短信模板的发送 Request VO") @Data -public class SysSmsTemplateSendReqVO { +public class SmsTemplateSendReqVO { @ApiModelProperty(value = "手机号", required = true, example = "15601691300") @NotNull(message = "手机号不能为空") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/template/SysSmsTemplateUpdateReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateUpdateReqVO.java similarity index 68% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/template/SysSmsTemplateUpdateReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateUpdateReqVO.java index c12a826cc..86bdbba9a 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/sms/vo/template/SysSmsTemplateUpdateReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/template/SmsTemplateUpdateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.sms.vo.template; +package cn.iocoder.yudao.module.system.controller.admin.sms.vo.template; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -8,11 +8,11 @@ import lombok.ToString; import javax.validation.constraints.NotNull; -@ApiModel("短信模板更新 Request VO") +@ApiModel("管理后台 - 短信模板更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) -public class SysSmsTemplateUpdateReqVO extends SysSmsTemplateBaseVO { +public class SmsTemplateUpdateReqVO extends SmsTemplateBaseVO { @ApiModelProperty(value = "编号", required = true, example = "1024") @NotNull(message = "编号不能为空") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/tenant/SysTenantController.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/TenantController.java similarity index 74% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/tenant/SysTenantController.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/TenantController.java index c4a8ca140..2b5fc204c 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/tenant/SysTenantController.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/TenantController.java @@ -1,8 +1,8 @@ -package cn.iocoder.yudao.module.system.controller.tenant; +package cn.iocoder.yudao.module.system.controller.admin.tenant; -import cn.iocoder.yudao.module.system.controller.tenant.vo.*; -import cn.iocoder.yudao.module.system.convert.tenant.SysTenantConvert; -import cn.iocoder.yudao.module.system.service.tenant.SysTenantService; +import cn.iocoder.yudao.module.system.controller.admin.tenant.vo.*; +import cn.iocoder.yudao.module.system.convert.tenant.TenantConvert; +import cn.iocoder.yudao.module.system.service.tenant.TenantService; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.tenant.SysTenantDO; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; @@ -24,13 +24,13 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; -@Api(tags = "租户") +@Api(tags = "管理后台 - 租户") @RestController @RequestMapping("/system/tenant") -public class SysTenantController { +public class TenantController { @Resource - private SysTenantService tenantService; + private TenantService tenantService; @GetMapping("/get-id-by-name") @ApiOperation(value = "使用租户名,获得租户编号", notes = "登录界面,根据用户的租户名,获得租户编号") @@ -43,14 +43,14 @@ public class SysTenantController { @PostMapping("/create") @ApiOperation("创建租户") @PreAuthorize("@ss.hasPermission('system:tenant:create')") - public CommonResult createTenant(@Valid @RequestBody SysTenantCreateReqVO createReqVO) { + public CommonResult createTenant(@Valid @RequestBody TenantCreateReqVO createReqVO) { return success(tenantService.createTenant(createReqVO)); } @PutMapping("/update") @ApiOperation("更新租户") @PreAuthorize("@ss.hasPermission('system:tenant:update')") - public CommonResult updateTenant(@Valid @RequestBody SysTenantUpdateReqVO updateReqVO) { + public CommonResult updateTenant(@Valid @RequestBody TenantUpdateReqVO updateReqVO) { tenantService.updateTenant(updateReqVO); return success(true); } @@ -68,38 +68,38 @@ public class SysTenantController { @ApiOperation("获得租户") @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) @PreAuthorize("@ss.hasPermission('system:tenant:query')") - public CommonResult getTenant(@RequestParam("id") Long id) { + public CommonResult getTenant(@RequestParam("id") Long id) { SysTenantDO tenant = tenantService.getTenant(id); - return success(SysTenantConvert.INSTANCE.convert(tenant)); + return success(TenantConvert.INSTANCE.convert(tenant)); } @GetMapping("/list") @ApiOperation("获得租户列表") @ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class) @PreAuthorize("@ss.hasPermission('system:tenant:query')") - public CommonResult> getTenantList(@RequestParam("ids") Collection ids) { + public CommonResult> getTenantList(@RequestParam("ids") Collection ids) { List list = tenantService.getTenantList(ids); - return success(SysTenantConvert.INSTANCE.convertList(list)); + return success(TenantConvert.INSTANCE.convertList(list)); } @GetMapping("/page") @ApiOperation("获得租户分页") @PreAuthorize("@ss.hasPermission('system:tenant:query')") - public CommonResult> getTenantPage(@Valid SysTenantPageReqVO pageVO) { + public CommonResult> getTenantPage(@Valid TenantPageReqVO pageVO) { PageResult pageResult = tenantService.getTenantPage(pageVO); - return success(SysTenantConvert.INSTANCE.convertPage(pageResult)); + return success(TenantConvert.INSTANCE.convertPage(pageResult)); } @GetMapping("/export-excel") @ApiOperation("导出租户 Excel") @PreAuthorize("@ss.hasPermission('system:tenant:export')") @OperateLog(type = EXPORT) - public void exportTenantExcel(@Valid SysTenantExportReqVO exportReqVO, + public void exportTenantExcel(@Valid TenantExportReqVO exportReqVO, HttpServletResponse response) throws IOException { List list = tenantService.getTenantList(exportReqVO); // 导出 Excel - List datas = SysTenantConvert.INSTANCE.convertList02(list); - ExcelUtils.write(response, "租户.xls", "数据", SysTenantExcelVO.class, datas); + List datas = TenantConvert.INSTANCE.convertList02(list); + ExcelUtils.write(response, "租户.xls", "数据", TenantExcelVO.class, datas); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/tenant/vo/SysTenantBaseVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/TenantBaseVO.java similarity index 90% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/tenant/vo/SysTenantBaseVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/TenantBaseVO.java index 593b9aca4..72ee63b9e 100755 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/tenant/vo/SysTenantBaseVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/TenantBaseVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.tenant.vo; +package cn.iocoder.yudao.module.system.controller.admin.tenant.vo; import lombok.*; import io.swagger.annotations.*; @@ -9,7 +9,7 @@ import javax.validation.constraints.*; * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 */ @Data -public class SysTenantBaseVO { +public class TenantBaseVO { @ApiModelProperty(value = "租户名", required = true, example = "芋道") @NotNull(message = "租户名不能为空") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/TenantCreateReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/TenantCreateReqVO.java new file mode 100755 index 000000000..a7e75cb77 --- /dev/null +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/TenantCreateReqVO.java @@ -0,0 +1,12 @@ +package cn.iocoder.yudao.module.system.controller.admin.tenant.vo; + +import lombok.*; +import io.swagger.annotations.*; + +@ApiModel("管理后台 - 租户创建 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class TenantCreateReqVO extends TenantBaseVO { + +} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/tenant/vo/SysTenantExcelVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/TenantExcelVO.java similarity index 89% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/tenant/vo/SysTenantExcelVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/TenantExcelVO.java index 824448627..9b317cb15 100755 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/tenant/vo/SysTenantExcelVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/TenantExcelVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.tenant.vo; +package cn.iocoder.yudao.module.system.controller.admin.tenant.vo; import lombok.*; import java.util.*; @@ -14,7 +14,7 @@ import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; * @author 芋道源码 */ @Data -public class SysTenantExcelVO { +public class TenantExcelVO { @ExcelProperty("租户编号") private Long id; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/tenant/vo/SysTenantExportReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/TenantExportReqVO.java similarity index 82% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/tenant/vo/SysTenantExportReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/TenantExportReqVO.java index e70de0013..afe5e6700 100755 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/tenant/vo/SysTenantExportReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/TenantExportReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.tenant.vo; +package cn.iocoder.yudao.module.system.controller.admin.tenant.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -9,9 +9,9 @@ import java.util.Date; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel(value = "租户 Excel 导出 Request VO", description = "参数和 SysTenantPageReqVO 是一致的") +@ApiModel(value = "管理后台 - 租户 Excel 导出 Request VO", description = "参数和 SysTenantPageReqVO 是一致的") @Data -public class SysTenantExportReqVO { +public class TenantExportReqVO { @ApiModelProperty(value = "租户名", example = "芋道") private String name; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/tenant/vo/SysTenantPageReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/TenantPageReqVO.java similarity index 87% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/tenant/vo/SysTenantPageReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/TenantPageReqVO.java index b665ea3f6..4a11a9cd6 100755 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/tenant/vo/SysTenantPageReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/TenantPageReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.tenant.vo; +package cn.iocoder.yudao.module.system.controller.admin.tenant.vo; import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.annotations.ApiModel; @@ -12,11 +12,11 @@ import java.util.Date; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("租户分页 Request VO") +@ApiModel("管理后台 - 租户分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) -public class SysTenantPageReqVO extends PageParam { +public class TenantPageReqVO extends PageParam { @ApiModelProperty(value = "租户名", example = "芋道") private String name; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/tenant/vo/SysTenantRespVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/TenantRespVO.java similarity index 67% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/tenant/vo/SysTenantRespVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/TenantRespVO.java index 563b5095c..5b6940a55 100755 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/tenant/vo/SysTenantRespVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/TenantRespVO.java @@ -1,14 +1,14 @@ -package cn.iocoder.yudao.module.system.controller.tenant.vo; +package cn.iocoder.yudao.module.system.controller.admin.tenant.vo; import lombok.*; import java.util.*; import io.swagger.annotations.*; -@ApiModel("租户 Response VO") +@ApiModel("管理后台 - 租户 Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) -public class SysTenantRespVO extends SysTenantBaseVO { +public class TenantRespVO extends TenantBaseVO { @ApiModelProperty(value = "租户编号", required = true, example = "1024") private Long id; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/tenant/vo/SysTenantUpdateReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/TenantUpdateReqVO.java similarity index 64% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/tenant/vo/SysTenantUpdateReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/TenantUpdateReqVO.java index c24edc5ea..0e10dabed 100755 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/tenant/vo/SysTenantUpdateReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/TenantUpdateReqVO.java @@ -1,14 +1,14 @@ -package cn.iocoder.yudao.module.system.controller.tenant.vo; +package cn.iocoder.yudao.module.system.controller.admin.tenant.vo; import lombok.*; import io.swagger.annotations.*; import javax.validation.constraints.*; -@ApiModel("租户更新 Request VO") +@ApiModel("管理后台 - 租户更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) -public class SysTenantUpdateReqVO extends SysTenantBaseVO { +public class TenantUpdateReqVO extends TenantBaseVO { @ApiModelProperty(value = "租户编号", required = true, example = "1024") @NotNull(message = "租户编号不能为空") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/SysUserController.http b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.http similarity index 63% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/SysUserController.http rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.http index ce138afcd..6d9cea801 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/SysUserController.http +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.http @@ -1,4 +1,4 @@ ### 请求 /system/user/page 接口 => 没有权限 GET {{baseUrl}}/system/user/page?pageNo=1&pageSize=10 -Authorization: Bearer test1 # 使用测试账号 -tenant-id: 1 +Authorization: Bearer {{token}} +tenant-id: {{adminTenentId}} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/SysUserController.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java similarity index 76% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/SysUserController.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java index 9e03727d4..ddf19aec8 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/SysUserController.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java @@ -1,10 +1,10 @@ -package cn.iocoder.yudao.module.system.controller.user; +package cn.iocoder.yudao.module.system.controller.admin.user; import cn.hutool.core.collection.CollUtil; -import cn.iocoder.yudao.module.system.controller.user.vo.user.*; -import cn.iocoder.yudao.module.system.convert.user.SysUserConvert; +import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.*; +import cn.iocoder.yudao.module.system.convert.user.UserConvert; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.dept.SysDeptDO; -import cn.iocoder.yudao.module.system.service.user.SysUserService; +import cn.iocoder.yudao.module.system.service.user.UserService; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.user.SysUserDO; import cn.iocoder.yudao.coreservice.modules.system.enums.common.SysSexEnum; import cn.iocoder.yudao.coreservice.modules.system.service.dept.SysDeptCoreService; @@ -35,14 +35,14 @@ import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils. import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; -@Api(tags = "用户") +@Api(tags = "管理后台 - 用户") @RestController @RequestMapping("/system/user") @Validated -public class SysUserController { +public class UserController { @Resource - private SysUserService userService; + private UserService userService; @Resource private SysUserCoreService userCoreService; @Resource @@ -51,7 +51,7 @@ public class SysUserController { @PostMapping("/create") @ApiOperation("新增用户") @PreAuthorize("@ss.hasPermission('system:user:create')") - public CommonResult createUser(@Valid @RequestBody SysUserCreateReqVO reqVO) { + public CommonResult createUser(@Valid @RequestBody UserCreateReqVO reqVO) { Long id = userService.createUser(reqVO); return success(id); } @@ -59,7 +59,7 @@ public class SysUserController { @PutMapping("update") @ApiOperation("修改用户") @PreAuthorize("@ss.hasPermission('system:user:update')") - public CommonResult updateUser(@Valid @RequestBody SysUserUpdateReqVO reqVO) { + public CommonResult updateUser(@Valid @RequestBody UserUpdateReqVO reqVO) { userService.updateUser(reqVO); return success(true); } @@ -76,7 +76,7 @@ public class SysUserController { @PutMapping("/update-password") @ApiOperation("重置用户密码") @PreAuthorize("@ss.hasPermission('system:user:update-password')") - public CommonResult updateUserPassword(@Valid @RequestBody SysUserUpdatePasswordReqVO reqVO) { + public CommonResult updateUserPassword(@Valid @RequestBody UserUpdatePasswordReqVO reqVO) { userService.updateUserPassword(reqVO.getId(), reqVO.getPassword()); return success(true); } @@ -84,7 +84,7 @@ public class SysUserController { @PutMapping("/update-status") @ApiOperation("修改用户状态") @PreAuthorize("@ss.hasPermission('system:user:update')") - public CommonResult updateUserStatus(@Valid @RequestBody SysUserUpdateStatusReqVO reqVO) { + public CommonResult updateUserStatus(@Valid @RequestBody UserUpdateStatusReqVO reqVO) { userService.updateUserStatus(reqVO.getId(), reqVO.getStatus()); return success(true); } @@ -92,7 +92,7 @@ public class SysUserController { @GetMapping("/page") @ApiOperation("获得用户分页列表") @PreAuthorize("@ss.hasPermission('system:user:list')") - public CommonResult> getUserPage(@Valid SysUserPageReqVO reqVO) { + public CommonResult> getUserPage(@Valid UserPageReqVO reqVO) { // 获得用户分页列表 PageResult pageResult = userService.getUserPage(reqVO); if (CollUtil.isEmpty(pageResult.getList())) { @@ -103,10 +103,10 @@ public class SysUserController { Collection deptIds = convertList(pageResult.getList(), SysUserDO::getDeptId); Map deptMap = deptCoreService.getDeptMap(deptIds); // 拼接结果返回 - List userList = new ArrayList<>(pageResult.getList().size()); + List userList = new ArrayList<>(pageResult.getList().size()); pageResult.getList().forEach(user -> { - SysUserPageItemRespVO respVO = SysUserConvert.INSTANCE.convert(user); - respVO.setDept(SysUserConvert.INSTANCE.convert(deptMap.get(user.getDeptId()))); + UserPageItemRespVO respVO = UserConvert.INSTANCE.convert(user); + respVO.setDept(UserConvert.INSTANCE.convert(deptMap.get(user.getDeptId()))); userList.add(respVO); }); return success(new PageResult<>(userList, pageResult.getTotal())); @@ -114,26 +114,26 @@ public class SysUserController { @GetMapping("/list-all-simple") @ApiOperation(value = "获取用户精简信息列表", notes = "只包含被开启的用户,主要用于前端的下拉选项") - public CommonResult> getSimpleUsers() { + public CommonResult> getSimpleUsers() { // 获用户门列表,只要开启状态的 List list = userService.getUsersByStatus(CommonStatusEnum.ENABLE.getStatus()); // 排序后,返回给前端 - return success(SysUserConvert.INSTANCE.convertList04(list)); + return success(UserConvert.INSTANCE.convertList04(list)); } @GetMapping("/get") @ApiOperation("获得用户详情") @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) @PreAuthorize("@ss.hasPermission('system:user:query')") - public CommonResult getInfo(@RequestParam("id") Long id) { - return success(SysUserConvert.INSTANCE.convert(userCoreService.getUser(id))); + public CommonResult getInfo(@RequestParam("id") Long id) { + return success(UserConvert.INSTANCE.convert(userCoreService.getUser(id))); } @GetMapping("/export") @ApiOperation("导出用户") @PreAuthorize("@ss.hasPermission('system:user:export')") @OperateLog(type = EXPORT) - public void exportUsers(@Validated SysUserExportReqVO reqVO, + public void exportUsers(@Validated UserExportReqVO reqVO, HttpServletResponse response) throws IOException { // 获得用户列表 List users = userService.getUsers(reqVO); @@ -143,9 +143,9 @@ public class SysUserController { Map deptMap = deptCoreService.getDeptMap(deptIds); Map deptLeaderUserMap = userCoreService.getUserMap(convertSet(deptMap.values(), SysDeptDO::getLeaderUserId)); // 拼接数据 - List excelUsers = new ArrayList<>(users.size()); + List excelUsers = new ArrayList<>(users.size()); users.forEach(user -> { - SysUserExcelVO excelVO = SysUserConvert.INSTANCE.convert02(user); + UserExcelVO excelVO = UserConvert.INSTANCE.convert02(user); // 设置部门 MapUtils.findAndThen(deptMap, user.getDeptId(), dept -> { excelVO.setDeptName(dept.getName()); @@ -157,22 +157,22 @@ public class SysUserController { }); // 输出 - ExcelUtils.write(response, "用户数据.xls", "用户列表", SysUserExcelVO.class, excelUsers); + ExcelUtils.write(response, "用户数据.xls", "用户列表", UserExcelVO.class, excelUsers); } @GetMapping("/get-import-template") @ApiOperation("获得导入用户模板") public void importTemplate(HttpServletResponse response) throws IOException { // 手动创建导出 demo - List list = Arrays.asList( - SysUserImportExcelVO.builder().username("yudao").deptId(1L).email("yudao@iocoder.cn").mobile("15601691300") + List list = Arrays.asList( + UserImportExcelVO.builder().username("yudao").deptId(1L).email("yudao@iocoder.cn").mobile("15601691300") .nickname("芋道").status(CommonStatusEnum.ENABLE.getStatus()).sex(SysSexEnum.MALE.getSex()).build(), - SysUserImportExcelVO.builder().username("yuanma").deptId(2L).email("yuanma@iocoder.cn").mobile("15601701300") + UserImportExcelVO.builder().username("yuanma").deptId(2L).email("yuanma@iocoder.cn").mobile("15601701300") .nickname("源码").status(CommonStatusEnum.DISABLE.getStatus()).sex(SysSexEnum.FEMALE.getSex()).build() ); // 输出 - ExcelUtils.write(response, "用户导入模板.xls", "用户列表", SysUserImportExcelVO.class, list); + ExcelUtils.write(response, "用户导入模板.xls", "用户列表", UserImportExcelVO.class, list); } @PostMapping("/import") @@ -182,9 +182,9 @@ public class SysUserController { @ApiImplicitParam(name = "updateSupport", value = "是否支持更新,默认为 false", example = "true", dataTypeClass = Boolean.class) }) @PreAuthorize("@ss.hasPermission('system:user:import')") - public CommonResult importExcel(@RequestParam("file") MultipartFile file, - @RequestParam(value = "updateSupport", required = false, defaultValue = "false") Boolean updateSupport) throws Exception { - List list = ExcelUtils.read(file, SysUserImportExcelVO.class); + public CommonResult importExcel(@RequestParam("file") MultipartFile file, + @RequestParam(value = "updateSupport", required = false, defaultValue = "false") Boolean updateSupport) throws Exception { + List list = ExcelUtils.read(file, UserImportExcelVO.class); return success(userService.importUsers(list, updateSupport)); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/SysUserProfileController.http b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserProfileController.http similarity index 61% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/SysUserProfileController.http rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserProfileController.http index c0a817727..f06037b37 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/SysUserProfileController.http +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserProfileController.http @@ -1,3 +1,4 @@ ### 请求 /system/user/profile/get 接口 => 没有权限 GET {{baseUrl}}/system/user/profile/get -Authorization: Bearer test1 +Authorization: Bearer {{token}} +tenant-id: {{adminTenentId}} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/SysUserProfileController.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserProfileController.java similarity index 69% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/SysUserProfileController.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserProfileController.java index 8a38f8724..4745b2f5b 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/SysUserProfileController.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserProfileController.java @@ -1,14 +1,14 @@ -package cn.iocoder.yudao.module.system.controller.user; +package cn.iocoder.yudao.module.system.controller.admin.user; import cn.hutool.core.collection.CollUtil; -import cn.iocoder.yudao.module.system.controller.user.vo.profile.SysUserProfileRespVO; -import cn.iocoder.yudao.module.system.controller.user.vo.profile.SysUserProfileUpdatePasswordReqVO; -import cn.iocoder.yudao.module.system.controller.user.vo.profile.SysUserProfileUpdateReqVO; -import cn.iocoder.yudao.module.system.convert.user.SysUserConvert; -import cn.iocoder.yudao.module.system.service.dept.SysPostService; -import cn.iocoder.yudao.module.system.service.permission.SysPermissionService; -import cn.iocoder.yudao.module.system.service.permission.SysRoleService; -import cn.iocoder.yudao.module.system.service.user.SysUserService; +import cn.iocoder.yudao.module.system.controller.admin.user.vo.profile.UserProfileRespVO; +import cn.iocoder.yudao.module.system.controller.admin.user.vo.profile.UserProfileUpdatePasswordReqVO; +import cn.iocoder.yudao.module.system.controller.admin.user.vo.profile.UserProfileUpdateReqVO; +import cn.iocoder.yudao.module.system.convert.user.UserConvert; +import cn.iocoder.yudao.module.system.service.dept.PostService; +import cn.iocoder.yudao.module.system.service.permission.PermissionService; +import cn.iocoder.yudao.module.system.service.permission.RoleService; +import cn.iocoder.yudao.module.system.service.user.UserService; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.dept.SysDeptDO; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.dept.SysPostDO; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.permission.SysRoleDO; @@ -32,68 +32,68 @@ import javax.validation.Valid; import java.io.IOException; import java.util.List; -import static cn.iocoder.yudao.module.system.enums.SysErrorCodeConstants.FILE_IS_EMPTY; +import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.FILE_IS_EMPTY; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; -@Api(tags = "用户个人中心") +@Api(tags = "管理后台 - 用户个人中心") @RestController @RequestMapping("/system/user/profile") @Validated @Slf4j -public class SysUserProfileController { +public class UserProfileController { @Resource - private SysUserService userService; + private UserService userService; @Resource private SysUserCoreService userCoreService; @Resource private SysDeptCoreService deptCoreService; @Resource - private SysPostService postService; + private PostService postService; @Resource - private SysPermissionService permissionService; + private PermissionService permissionService; @Resource - private SysRoleService roleService; + private RoleService roleService; @Resource private SysSocialCoreService socialService; @GetMapping("/get") @ApiOperation("获得登录用户信息") - public CommonResult profile() { + public CommonResult profile() { // 获得用户基本信息 SysUserDO user = userCoreService.getUser(getLoginUserId()); - SysUserProfileRespVO resp = SysUserConvert.INSTANCE.convert03(user); + UserProfileRespVO resp = UserConvert.INSTANCE.convert03(user); // 获得用户角色 List userRoles = roleService.getRolesFromCache(permissionService.getUserRoleIdListByUserId(user.getId())); - resp.setRoles(SysUserConvert.INSTANCE.convertList(userRoles)); + resp.setRoles(UserConvert.INSTANCE.convertList(userRoles)); // 获得部门信息 if (user.getDeptId() != null) { SysDeptDO dept = deptCoreService.getDept(user.getDeptId()); - resp.setDept(SysUserConvert.INSTANCE.convert02(dept)); + resp.setDept(UserConvert.INSTANCE.convert02(dept)); } // 获得岗位信息 if (CollUtil.isNotEmpty(user.getPostIds())) { List posts = postService.getPosts(user.getPostIds()); - resp.setPosts(SysUserConvert.INSTANCE.convertList02(posts)); + resp.setPosts(UserConvert.INSTANCE.convertList02(posts)); } // 获得社交用户信息 List socialUsers = socialService.getSocialUserList(user.getId(), UserTypeEnum.ADMIN); - resp.setSocialUsers(SysUserConvert.INSTANCE.convertList03(socialUsers)); + resp.setSocialUsers(UserConvert.INSTANCE.convertList03(socialUsers)); return success(resp); } @PutMapping("/update") @ApiOperation("修改用户个人信息") - public CommonResult updateUserProfile(@Valid @RequestBody SysUserProfileUpdateReqVO reqVO) { + public CommonResult updateUserProfile(@Valid @RequestBody UserProfileUpdateReqVO reqVO) { userService.updateUserProfile(getLoginUserId(), reqVO); return success(true); } @PutMapping("/update-password") @ApiOperation("修改用户个人密码") - public CommonResult updateUserProfilePassword(@Valid @RequestBody SysUserProfileUpdatePasswordReqVO reqVO) { + public CommonResult updateUserProfilePassword(@Valid @RequestBody UserProfileUpdatePasswordReqVO reqVO) { userService.updateUserPassword(getLoginUserId(), reqVO); return success(true); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/profile/SysUserProfileRespVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/profile/UserProfileRespVO.java similarity index 90% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/profile/SysUserProfileRespVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/profile/UserProfileRespVO.java index 0abd7037a..788c91feb 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/profile/SysUserProfileRespVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/profile/UserProfileRespVO.java @@ -1,6 +1,6 @@ -package cn.iocoder.yudao.module.system.controller.user.vo.profile; +package cn.iocoder.yudao.module.system.controller.admin.user.vo.profile; -import cn.iocoder.yudao.module.system.controller.user.vo.user.SysUserBaseVO; +import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserBaseVO; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; @@ -16,8 +16,8 @@ import java.util.List; @EqualsAndHashCode(callSuper = true) @NoArgsConstructor @AllArgsConstructor -@ApiModel("用户个人中心信息 Response VO") -public class SysUserProfileRespVO extends SysUserBaseVO { +@ApiModel("管理后台 - 用户个人中心信息 Response VO") +public class UserProfileRespVO extends UserBaseVO { @ApiModelProperty(value = "用户编号", required = true, example = "1") private Long id; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/profile/SysUserProfileUpdatePasswordReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/profile/UserProfileUpdatePasswordReqVO.java similarity index 78% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/profile/SysUserProfileUpdatePasswordReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/profile/UserProfileUpdatePasswordReqVO.java index 0578f3ced..2269b37df 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/profile/SysUserProfileUpdatePasswordReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/profile/UserProfileUpdatePasswordReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.user.vo.profile; +package cn.iocoder.yudao.module.system.controller.admin.user.vo.profile; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -7,9 +7,9 @@ import org.hibernate.validator.constraints.Length; import javax.validation.constraints.NotEmpty; -@ApiModel("用户个人中心更新密码 Request VO") +@ApiModel("管理后台 - 用户个人中心更新密码 Request VO") @Data -public class SysUserProfileUpdatePasswordReqVO { +public class UserProfileUpdatePasswordReqVO { @ApiModelProperty(value = "旧密码", required = true, example = "123456") @NotEmpty(message = "旧密码不能为空") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/profile/SysUserProfileUpdateReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/profile/UserProfileUpdateReqVO.java similarity index 84% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/profile/SysUserProfileUpdateReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/profile/UserProfileUpdateReqVO.java index bcc7a2048..4f0f8f953 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/profile/SysUserProfileUpdateReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/profile/UserProfileUpdateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.user.vo.profile; +package cn.iocoder.yudao.module.system.controller.admin.user.vo.profile; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -8,9 +8,9 @@ import org.hibernate.validator.constraints.Length; import javax.validation.constraints.Email; import javax.validation.constraints.Size; -@ApiModel("用户个人信息更新 Request VO") +@ApiModel("管理后台 - 用户个人信息更新 Request VO") @Data -public class SysUserProfileUpdateReqVO { +public class UserProfileUpdateReqVO { @ApiModelProperty(value = "用户昵称", required = true, example = "芋艿") @Size(max = 30, message = "用户昵称长度不能超过30个字符") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/user/SysUserBaseVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserBaseVO.java similarity index 94% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/user/SysUserBaseVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserBaseVO.java index 5fc0b42b9..a4be1fd8d 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/user/SysUserBaseVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserBaseVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.user.vo.user; +package cn.iocoder.yudao.module.system.controller.admin.user.vo.user; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -14,7 +14,7 @@ import java.util.Set; * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 */ @Data -public class SysUserBaseVO { +public class UserBaseVO { @ApiModelProperty(value = "用户账号", required = true, example = "yudao") @NotBlank(message = "用户账号不能为空") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/user/SysUserCreateReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserCreateReqVO.java similarity index 74% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/user/SysUserCreateReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserCreateReqVO.java index 9b6676c97..9d0ff1988 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/user/SysUserCreateReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserCreateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.user.vo.user; +package cn.iocoder.yudao.module.system.controller.admin.user.vo.user; import io.swagger.annotations.ApiModel; @@ -9,10 +9,10 @@ import org.hibernate.validator.constraints.Length; import javax.validation.constraints.NotEmpty; -@ApiModel("用户创建 Request VO") +@ApiModel("管理后台 - 用户创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) -public class SysUserCreateReqVO extends SysUserBaseVO { +public class UserCreateReqVO extends UserBaseVO { @ApiModelProperty(value = "密码", required = true, example = "123456") @NotEmpty(message = "密码不能为空") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/user/SysUserExcelVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserExcelVO.java similarity index 92% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/user/SysUserExcelVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserExcelVO.java index 04c818ee5..b67010ca6 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/user/SysUserExcelVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserExcelVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.user.vo.user; +package cn.iocoder.yudao.module.system.controller.admin.user.vo.user; import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; @@ -12,7 +12,7 @@ import java.util.Date; * 用户 Excel 导出 VO */ @Data -public class SysUserExcelVO { +public class UserExcelVO { @ExcelProperty("用户编号") private Long id; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/user/SysUserExportReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserExportReqVO.java similarity index 85% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/user/SysUserExportReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserExportReqVO.java index e5f33deb3..1c1044a5c 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/user/SysUserExportReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserExportReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.user.vo.user; +package cn.iocoder.yudao.module.system.controller.admin.user.vo.user; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -11,11 +11,11 @@ import java.util.Date; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel(value = "用户导出 Request VO", description = "参数和 SysUserPageReqVO 是一致的") +@ApiModel(value = "管理后台 - 用户导出 Request VO", description = "参数和 SysUserPageReqVO 是一致的") @Data @NoArgsConstructor @AllArgsConstructor -public class SysUserExportReqVO { +public class UserExportReqVO { @ApiModelProperty(value = "用户账号", example = "yudao", notes = "模糊匹配") private String username; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/user/SysUserImportExcelVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserImportExcelVO.java similarity index 92% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/user/SysUserImportExcelVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserImportExcelVO.java index 43e6c9d26..b2e084af0 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/user/SysUserImportExcelVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserImportExcelVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.user.vo.user; +package cn.iocoder.yudao.module.system.controller.admin.user.vo.user; import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; @@ -18,7 +18,7 @@ import lombok.experimental.Accessors; @AllArgsConstructor @NoArgsConstructor @Accessors(chain = false) // 设置 chain = false,避免用户导入有问题 -public class SysUserImportExcelVO { +public class UserImportExcelVO { @ExcelProperty("登录名称") private String username; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/user/SysUserImportRespVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserImportRespVO.java similarity index 80% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/user/SysUserImportRespVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserImportRespVO.java index 533ec2af8..49f9b98d1 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/user/SysUserImportRespVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserImportRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.user.vo.user; +package cn.iocoder.yudao.module.system.controller.admin.user.vo.user; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -8,10 +8,10 @@ import lombok.Data; import java.util.List; import java.util.Map; -@ApiModel("用户导入 Response VO") +@ApiModel("管理后台 - 用户导入 Response VO") @Data @Builder -public class SysUserImportRespVO { +public class UserImportRespVO { @ApiModelProperty(value = "创建成功的用户名数组", required = true) private List createUsernames; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/user/SysUserPageItemRespVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserPageItemRespVO.java similarity index 71% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/user/SysUserPageItemRespVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserPageItemRespVO.java index 6178d6b80..bcfe9ea23 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/user/SysUserPageItemRespVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserPageItemRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.user.vo.user; +package cn.iocoder.yudao.module.system.controller.admin.user.vo.user; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -7,12 +7,12 @@ import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; -@ApiModel(value = "用户分页时的信息 Response VO", description = "相比用户基本信息来说,会多部门信息") +@ApiModel(value = "管理后台 - 用户分页时的信息 Response VO", description = "相比用户基本信息来说,会多部门信息") @Data @NoArgsConstructor @AllArgsConstructor @EqualsAndHashCode(callSuper = true) -public class SysUserPageItemRespVO extends SysUserRespVO { +public class UserPageItemRespVO extends UserRespVO { /** * 所在部门 diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/user/SysUserPageReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserPageReqVO.java similarity index 89% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/user/SysUserPageReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserPageReqVO.java index a677d208c..1c6073d16 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/user/SysUserPageReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserPageReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.user.vo.user; +package cn.iocoder.yudao.module.system.controller.admin.user.vo.user; import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.annotations.ApiModel; @@ -13,12 +13,12 @@ import java.util.Date; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("用户分页 Request VO") +@ApiModel("管理后台 - 用户分页 Request VO") @Data @NoArgsConstructor @AllArgsConstructor @EqualsAndHashCode(callSuper = true) -public class SysUserPageReqVO extends PageParam { +public class UserPageReqVO extends PageParam { @ApiModelProperty(value = "用户账号", example = "yudao", notes = "模糊匹配") private String username; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/user/SysUserRespVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserRespVO.java similarity index 83% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/user/SysUserRespVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserRespVO.java index 66d8f6981..fb50609b0 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/user/SysUserRespVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.user.vo.user; +package cn.iocoder.yudao.module.system.controller.admin.user.vo.user; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -6,12 +6,12 @@ import lombok.*; import java.util.Date; -@ApiModel("用户信息 Response VO") +@ApiModel("管理后台 - 用户信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor @EqualsAndHashCode(callSuper = true) -public class SysUserRespVO extends SysUserBaseVO { +public class UserRespVO extends UserBaseVO { @ApiModelProperty(value = "用户编号", required = true, example = "1") private Long id; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/user/SysUserSimpleRespVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserSimpleRespVO.java similarity index 82% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/user/SysUserSimpleRespVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserSimpleRespVO.java index d9ba0eb05..a815253e9 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/user/SysUserSimpleRespVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserSimpleRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.user.vo.user; +package cn.iocoder.yudao.module.system.controller.admin.user.vo.user; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -10,7 +10,7 @@ import lombok.NoArgsConstructor; @Data @NoArgsConstructor @AllArgsConstructor -public class SysUserSimpleRespVO { +public class UserSimpleRespVO { @ApiModelProperty(value = "用户编号", required = true, example = "1024") private Long id; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/user/SysUserUpdatePasswordReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserUpdatePasswordReqVO.java similarity index 79% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/user/SysUserUpdatePasswordReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserUpdatePasswordReqVO.java index 71e458654..542fc2b0f 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/user/SysUserUpdatePasswordReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserUpdatePasswordReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.user.vo.user; +package cn.iocoder.yudao.module.system.controller.admin.user.vo.user; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -8,9 +8,9 @@ import org.hibernate.validator.constraints.Length; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; -@ApiModel("用户更新密码 Request VO") +@ApiModel("管理后台 - 用户更新密码 Request VO") @Data -public class SysUserUpdatePasswordReqVO { +public class UserUpdatePasswordReqVO { @ApiModelProperty(value = "用户编号", required = true, example = "1024") @NotNull(message = "用户编号不能为空") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/user/SysUserUpdateReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserUpdateReqVO.java similarity index 69% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/user/SysUserUpdateReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserUpdateReqVO.java index 6513490d1..84a3de60f 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/user/SysUserUpdateReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserUpdateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.user.vo.user; +package cn.iocoder.yudao.module.system.controller.admin.user.vo.user; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -7,10 +7,10 @@ import lombok.EqualsAndHashCode; import javax.validation.constraints.NotNull; -@ApiModel("用户更新 Request VO") +@ApiModel("管理后台 - 用户更新 Request VO") @Data @EqualsAndHashCode(callSuper = true) -public class SysUserUpdateReqVO extends SysUserBaseVO { +public class UserUpdateReqVO extends UserBaseVO { @ApiModelProperty(value = "用户编号", required = true, example = "1024") @NotNull(message = "用户编号不能为空") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/user/SysUserUpdateStatusReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserUpdateStatusReqVO.java similarity index 78% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/user/SysUserUpdateStatusReqVO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserUpdateStatusReqVO.java index ac20eb745..f72897527 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/user/vo/user/SysUserUpdateStatusReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserUpdateStatusReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.system.controller.user.vo.user; +package cn.iocoder.yudao.module.system.controller.admin.user.vo.user; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -6,9 +6,9 @@ import lombok.Data; import javax.validation.constraints.NotNull; -@ApiModel("用户更新状态 Request VO") +@ApiModel("管理后台 - 用户更新状态 Request VO") @Data -public class SysUserUpdateStatusReqVO { +public class UserUpdateStatusReqVO { @ApiModelProperty(value = "用户编号", required = true, example = "1024") @NotNull(message = "角色编号不能为空") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/app/package-info.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/app/package-info.java new file mode 100644 index 000000000..9e4739f4c --- /dev/null +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/app/package-info.java @@ -0,0 +1,4 @@ +/** + * 占位,避免 package 无法提交到 Git 仓库 + */ +package cn.iocoder.yudao.module.system.controller.app; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/post/SysPostCreateReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/post/SysPostCreateReqVO.java deleted file mode 100644 index 9570ad07a..000000000 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dept/vo/post/SysPostCreateReqVO.java +++ /dev/null @@ -1,11 +0,0 @@ -package cn.iocoder.yudao.module.system.controller.dept.vo.post; - -import io.swagger.annotations.ApiModel; -import lombok.Data; -import lombok.EqualsAndHashCode; - -@ApiModel("岗位创建 Request VO") -@Data -@EqualsAndHashCode(callSuper = true) -public class SysPostCreateReqVO extends SysPostBaseVO { -} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/data/SysDictDataCreateReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/data/SysDictDataCreateReqVO.java deleted file mode 100644 index c2688b3e3..000000000 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/dict/vo/data/SysDictDataCreateReqVO.java +++ /dev/null @@ -1,12 +0,0 @@ -package cn.iocoder.yudao.module.system.controller.dict.vo.data; - -import io.swagger.annotations.ApiModel; -import lombok.Data; -import lombok.EqualsAndHashCode; - -@ApiModel("字典数据创建 Request VO") -@Data -@EqualsAndHashCode(callSuper = true) -public class SysDictDataCreateReqVO extends SysDictDataBaseVO { - -} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/errorcode/vo/SysErrorCodeCreateReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/errorcode/vo/SysErrorCodeCreateReqVO.java deleted file mode 100644 index 3eb9b14a4..000000000 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/errorcode/vo/SysErrorCodeCreateReqVO.java +++ /dev/null @@ -1,14 +0,0 @@ -package cn.iocoder.yudao.module.system.controller.errorcode.vo; - -import io.swagger.annotations.ApiModel; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.ToString; - -@ApiModel("错误码创建 Request VO") -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class SysErrorCodeCreateReqVO extends SysErrorCodeBaseVO { - -} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/notice/vo/SysNoticeCreateReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/notice/vo/SysNoticeCreateReqVO.java deleted file mode 100644 index 1669618ab..000000000 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/notice/vo/SysNoticeCreateReqVO.java +++ /dev/null @@ -1,11 +0,0 @@ -package cn.iocoder.yudao.module.system.controller.notice.vo; - -import io.swagger.annotations.ApiModel; -import lombok.Data; -import lombok.EqualsAndHashCode; - -@ApiModel("通知公告创建 Request VO") -@Data -@EqualsAndHashCode(callSuper = true) -public class SysNoticeCreateReqVO extends SysNoticeBaseVO { -} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/package-info.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/package-info.java new file mode 100644 index 000000000..659a90947 --- /dev/null +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/package-info.java @@ -0,0 +1,6 @@ +/** + * 提供 RESTful API 给前端: + * 1. admin 包:提供给管理后台 yudao-ui-admin 前端项目 + * 2. app 包:提供给用户 APP yudao-ui-app 前端项目,它的 Controller 和 VO 都要添加 App 前缀,用于和管理后台进行区分 + */ +package cn.iocoder.yudao.module.system.controller; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/menu/SysMenuCreateReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/menu/SysMenuCreateReqVO.java deleted file mode 100644 index 2c0357f86..000000000 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/menu/SysMenuCreateReqVO.java +++ /dev/null @@ -1,10 +0,0 @@ -package cn.iocoder.yudao.module.system.controller.permission.vo.menu; - -import io.swagger.annotations.ApiModel; -import lombok.*; - -@ApiModel("菜单创建 Request VO") -@Data -@EqualsAndHashCode(callSuper = true) -public class SysMenuCreateReqVO extends SysMenuBaseVO { -} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/role/SysRoleCreateReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/role/SysRoleCreateReqVO.java deleted file mode 100644 index a182b26c9..000000000 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/permission/vo/role/SysRoleCreateReqVO.java +++ /dev/null @@ -1,12 +0,0 @@ -package cn.iocoder.yudao.module.system.controller.permission.vo.role; - -import io.swagger.annotations.ApiModel; -import lombok.Data; -import lombok.EqualsAndHashCode; - -@ApiModel("角色创建 Request VO") -@Data -@EqualsAndHashCode(callSuper = true) -public class SysRoleCreateReqVO extends SysRoleBaseVO { - -} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/tenant/vo/SysTenantCreateReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/tenant/vo/SysTenantCreateReqVO.java deleted file mode 100755 index 4d41fdfe0..000000000 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/tenant/vo/SysTenantCreateReqVO.java +++ /dev/null @@ -1,12 +0,0 @@ -package cn.iocoder.yudao.module.system.controller.tenant.vo; - -import lombok.*; -import io.swagger.annotations.*; - -@ApiModel("租户创建 Request VO") -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class SysTenantCreateReqVO extends SysTenantBaseVO { - -} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/auth/SysAuthConvert.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/auth/AuthConvert.java similarity index 66% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/auth/SysAuthConvert.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/auth/AuthConvert.java index c1f6f265d..be76b5fdd 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/auth/SysAuthConvert.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/auth/AuthConvert.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.system.convert.auth; -import cn.iocoder.yudao.module.system.controller.auth.vo.auth.SysAuthMenuRespVO; -import cn.iocoder.yudao.module.system.controller.auth.vo.auth.SysAuthPermissionInfoRespVO; -import cn.iocoder.yudao.module.system.dal.dataobject.permission.SysMenuDO; +import cn.iocoder.yudao.module.system.controller.admin.auth.vo.auth.AuthMenuRespVO; +import cn.iocoder.yudao.module.system.controller.admin.auth.vo.auth.AuthPermissionInfoRespVO; +import cn.iocoder.yudao.module.system.dal.dataobject.permission.MenuDO; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.permission.SysRoleDO; import cn.iocoder.yudao.module.system.enums.permission.MenuIdEnum; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.user.SysUserDO; @@ -17,9 +17,9 @@ import org.slf4j.LoggerFactory; import java.util.*; @Mapper -public interface SysAuthConvert { +public interface AuthConvert { - SysAuthConvert INSTANCE = Mappers.getMapper(SysAuthConvert.class); + AuthConvert INSTANCE = Mappers.getMapper(AuthConvert.class); @Mapping(source = "updateTime", target = "updateTime", ignore = true) // 字段相同,但是含义不同,忽略 LoginUser convert0(SysUserDO bean); @@ -29,15 +29,15 @@ public interface SysAuthConvert { return convert0(bean).setUserType(UserTypeEnum.ADMIN.getValue()); } - default SysAuthPermissionInfoRespVO convert(SysUserDO user, List roleList, List menuList) { - return SysAuthPermissionInfoRespVO.builder() - .user(SysAuthPermissionInfoRespVO.UserVO.builder().id(user.getId()).nickname(user.getNickname()).avatar(user.getAvatar()).build()) + default AuthPermissionInfoRespVO convert(SysUserDO user, List roleList, List menuList) { + return AuthPermissionInfoRespVO.builder() + .user(AuthPermissionInfoRespVO.UserVO.builder().id(user.getId()).nickname(user.getNickname()).avatar(user.getAvatar()).build()) .roles(CollectionUtils.convertSet(roleList, SysRoleDO::getCode)) - .permissions(CollectionUtils.convertSet(menuList, SysMenuDO::getPermission)) + .permissions(CollectionUtils.convertSet(menuList, MenuDO::getPermission)) .build(); } - SysAuthMenuRespVO convertTreeNode(SysMenuDO menu); + AuthMenuRespVO convertTreeNode(MenuDO menu); /** * 将菜单列表,构建成菜单树 @@ -45,17 +45,17 @@ public interface SysAuthConvert { * @param menuList 菜单列表 * @return 菜单树 */ - default List buildMenuTree(List menuList) { + default List buildMenuTree(List menuList) { // 排序,保证菜单的有序性 - menuList.sort(Comparator.comparing(SysMenuDO::getSort)); + menuList.sort(Comparator.comparing(MenuDO::getSort)); // 构建菜单树 // 使用 LinkedHashMap 的原因,是为了排序 。实际也可以用 Stream API ,就是太丑了。 - Map treeNodeMap = new LinkedHashMap<>(); - menuList.forEach(menu -> treeNodeMap.put(menu.getId(), SysAuthConvert.INSTANCE.convertTreeNode(menu))); + Map treeNodeMap = new LinkedHashMap<>(); + menuList.forEach(menu -> treeNodeMap.put(menu.getId(), AuthConvert.INSTANCE.convertTreeNode(menu))); // 处理父子关系 treeNodeMap.values().stream().filter(node -> !node.getParentId().equals(MenuIdEnum.ROOT.getId())).forEach(childNode -> { // 获得父节点 - SysAuthMenuRespVO parentNode = treeNodeMap.get(childNode.getParentId()); + AuthMenuRespVO parentNode = treeNodeMap.get(childNode.getParentId()); if (parentNode == null) { LoggerFactory.getLogger(getClass()).error("[buildRouterTree][resource({}) 找不到父资源({})]", childNode.getId(), childNode.getParentId()); diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/auth/SysUserSessionConvert.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/auth/SysUserSessionConvert.java deleted file mode 100644 index 629f03007..000000000 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/auth/SysUserSessionConvert.java +++ /dev/null @@ -1,15 +0,0 @@ -package cn.iocoder.yudao.module.system.convert.auth; - -import cn.iocoder.yudao.module.system.controller.auth.vo.session.SysUserSessionPageItemRespVO; -import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.auth.SysUserSessionDO; -import org.mapstruct.Mapper; -import org.mapstruct.factory.Mappers; - -@Mapper -public interface SysUserSessionConvert { - - SysUserSessionConvert INSTANCE = Mappers.getMapper(SysUserSessionConvert.class); - - SysUserSessionPageItemRespVO convert(SysUserSessionDO session); - -} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/auth/UserSessionConvert.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/auth/UserSessionConvert.java new file mode 100644 index 000000000..37cec9ee4 --- /dev/null +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/auth/UserSessionConvert.java @@ -0,0 +1,15 @@ +package cn.iocoder.yudao.module.system.convert.auth; + +import cn.iocoder.yudao.module.system.controller.admin.auth.vo.session.UserSessionPageItemRespVO; +import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.auth.SysUserSessionDO; +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; + +@Mapper +public interface UserSessionConvert { + + UserSessionConvert INSTANCE = Mappers.getMapper(UserSessionConvert.class); + + UserSessionPageItemRespVO convert(SysUserSessionDO session); + +} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/common/CaptchaConvert.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/common/CaptchaConvert.java new file mode 100644 index 000000000..54d36bee9 --- /dev/null +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/common/CaptchaConvert.java @@ -0,0 +1,17 @@ +package cn.iocoder.yudao.module.system.convert.common; + +import cn.hutool.captcha.AbstractCaptcha; +import cn.iocoder.yudao.module.system.controller.admin.common.vo.CaptchaImageRespVO; +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; + +@Mapper +public interface CaptchaConvert { + + CaptchaConvert INSTANCE = Mappers.getMapper(CaptchaConvert.class); + + default CaptchaImageRespVO convert(String uuid, AbstractCaptcha captcha) { + return CaptchaImageRespVO.builder().uuid(uuid).img(captcha.getImageBase64()).build(); + } + +} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/common/SysCaptchaConvert.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/common/SysCaptchaConvert.java deleted file mode 100644 index 8e5fc34a6..000000000 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/common/SysCaptchaConvert.java +++ /dev/null @@ -1,17 +0,0 @@ -package cn.iocoder.yudao.module.system.convert.common; - -import cn.hutool.captcha.AbstractCaptcha; -import cn.iocoder.yudao.module.system.controller.common.vo.SysCaptchaImageRespVO; -import org.mapstruct.Mapper; -import org.mapstruct.factory.Mappers; - -@Mapper -public interface SysCaptchaConvert { - - SysCaptchaConvert INSTANCE = Mappers.getMapper(SysCaptchaConvert.class); - - default SysCaptchaImageRespVO convert(String uuid, AbstractCaptcha captcha) { - return SysCaptchaImageRespVO.builder().uuid(uuid).img(captcha.getImageBase64()).build(); - } - -} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/dept/DeptConvert.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/dept/DeptConvert.java new file mode 100644 index 000000000..2d1c4d6c1 --- /dev/null +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/dept/DeptConvert.java @@ -0,0 +1,28 @@ +package cn.iocoder.yudao.module.system.convert.dept; + +import cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept.DeptCreateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept.DeptRespVO; +import cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept.DeptSimpleRespVO; +import cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept.DeptUpdateReqVO; +import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.dept.SysDeptDO; +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; + +import java.util.List; + +@Mapper +public interface DeptConvert { + + DeptConvert INSTANCE = Mappers.getMapper(DeptConvert.class); + + List convertList(List list); + + List convertList02(List list); + + DeptRespVO convert(SysDeptDO bean); + + SysDeptDO convert(DeptCreateReqVO bean); + + SysDeptDO convert(DeptUpdateReqVO bean); + +} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/dept/PostConvert.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/dept/PostConvert.java new file mode 100644 index 000000000..99af8b91a --- /dev/null +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/dept/PostConvert.java @@ -0,0 +1,28 @@ +package cn.iocoder.yudao.module.system.convert.dept; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.system.controller.admin.dept.vo.post.*; +import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.dept.SysPostDO; +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; + +import java.util.List; + +@Mapper +public interface PostConvert { + + PostConvert INSTANCE = Mappers.getMapper(PostConvert.class); + + List convertList02(List list); + + PageResult convertPage(PageResult page); + + PostRespVO convert(SysPostDO id); + + SysPostDO convert(PostCreateReqVO bean); + + SysPostDO convert(PostUpdateReqVO reqVO); + + List convertList03(List list); + +} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/dept/SysDeptConvert.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/dept/SysDeptConvert.java deleted file mode 100644 index 40d667641..000000000 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/dept/SysDeptConvert.java +++ /dev/null @@ -1,28 +0,0 @@ -package cn.iocoder.yudao.module.system.convert.dept; - -import cn.iocoder.yudao.module.system.controller.dept.vo.dept.SysDeptCreateReqVO; -import cn.iocoder.yudao.module.system.controller.dept.vo.dept.SysDeptRespVO; -import cn.iocoder.yudao.module.system.controller.dept.vo.dept.SysDeptSimpleRespVO; -import cn.iocoder.yudao.module.system.controller.dept.vo.dept.SysDeptUpdateReqVO; -import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.dept.SysDeptDO; -import org.mapstruct.Mapper; -import org.mapstruct.factory.Mappers; - -import java.util.List; - -@Mapper -public interface SysDeptConvert { - - SysDeptConvert INSTANCE = Mappers.getMapper(SysDeptConvert.class); - - List convertList(List list); - - List convertList02(List list); - - SysDeptRespVO convert(SysDeptDO bean); - - SysDeptDO convert(SysDeptCreateReqVO bean); - - SysDeptDO convert(SysDeptUpdateReqVO bean); - -} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/dept/SysPostConvert.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/dept/SysPostConvert.java deleted file mode 100644 index 023bcfae1..000000000 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/dept/SysPostConvert.java +++ /dev/null @@ -1,28 +0,0 @@ -package cn.iocoder.yudao.module.system.convert.dept; - -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.system.controller.dept.vo.post.*; -import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.dept.SysPostDO; -import org.mapstruct.Mapper; -import org.mapstruct.factory.Mappers; - -import java.util.List; - -@Mapper -public interface SysPostConvert { - - SysPostConvert INSTANCE = Mappers.getMapper(SysPostConvert.class); - - List convertList02(List list); - - PageResult convertPage(PageResult page); - - SysPostRespVO convert(SysPostDO id); - - SysPostDO convert(SysPostCreateReqVO bean); - - SysPostDO convert(SysPostUpdateReqVO reqVO); - - List convertList03(List list); - -} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/dict/DictDataConvert.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/dict/DictDataConvert.java new file mode 100644 index 000000000..33958c325 --- /dev/null +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/dict/DictDataConvert.java @@ -0,0 +1,34 @@ +package cn.iocoder.yudao.module.system.convert.dict; + +import cn.iocoder.yudao.module.system.controller.admin.dict.vo.data.*; +import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.dict.SysDictDataDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.dict.core.dto.DictDataRespDTO; +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; + +import java.util.Collection; +import java.util.List; + +@Mapper +public interface DictDataConvert { + + DictDataConvert INSTANCE = Mappers.getMapper(DictDataConvert.class); + + List convertList(List list); + + DictDataRespVO convert(SysDictDataDO bean); + + PageResult convertPage(PageResult page); + + SysDictDataDO convert(DictDataUpdateReqVO bean); + + SysDictDataDO convert(DictDataCreateReqVO bean); + + List convertList02(List bean); + + DictDataRespDTO convert02(SysDictDataDO bean); + + List convertList03(Collection list); + +} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/dict/DictTypeConvert.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/dict/DictTypeConvert.java new file mode 100644 index 000000000..392e3082e --- /dev/null +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/dict/DictTypeConvert.java @@ -0,0 +1,28 @@ +package cn.iocoder.yudao.module.system.convert.dict; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.system.controller.admin.dict.vo.type.*; +import cn.iocoder.yudao.module.system.dal.dataobject.dict.DictTypeDO; +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; + +import java.util.List; + +@Mapper +public interface DictTypeConvert { + + DictTypeConvert INSTANCE = Mappers.getMapper(DictTypeConvert.class); + + PageResult convertPage(PageResult bean); + + DictTypeRespVO convert(DictTypeDO bean); + + DictTypeDO convert(DictTypeCreateReqVO bean); + + DictTypeDO convert(DictTypeUpdateReqVO bean); + + List convertList(List list); + + List convertList02(List list); + +} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/dict/SysDictDataConvert.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/dict/SysDictDataConvert.java deleted file mode 100644 index fc38f4162..000000000 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/dict/SysDictDataConvert.java +++ /dev/null @@ -1,34 +0,0 @@ -package cn.iocoder.yudao.module.system.convert.dict; - -import cn.iocoder.yudao.module.system.controller.dict.vo.data.*; -import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.dict.SysDictDataDO; -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.dict.core.dto.DictDataRespDTO; -import org.mapstruct.Mapper; -import org.mapstruct.factory.Mappers; - -import java.util.Collection; -import java.util.List; - -@Mapper -public interface SysDictDataConvert { - - SysDictDataConvert INSTANCE = Mappers.getMapper(SysDictDataConvert.class); - - List convertList(List list); - - SysDictDataRespVO convert(SysDictDataDO bean); - - PageResult convertPage(PageResult page); - - SysDictDataDO convert(SysDictDataUpdateReqVO bean); - - SysDictDataDO convert(SysDictDataCreateReqVO bean); - - List convertList02(List bean); - - DictDataRespDTO convert02(SysDictDataDO bean); - - List convertList03(Collection list); - -} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/dict/SysDictTypeConvert.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/dict/SysDictTypeConvert.java deleted file mode 100644 index ce4bae406..000000000 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/dict/SysDictTypeConvert.java +++ /dev/null @@ -1,28 +0,0 @@ -package cn.iocoder.yudao.module.system.convert.dict; - -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.system.controller.dict.vo.type.*; -import cn.iocoder.yudao.module.system.dal.dataobject.dict.SysDictTypeDO; -import org.mapstruct.Mapper; -import org.mapstruct.factory.Mappers; - -import java.util.List; - -@Mapper -public interface SysDictTypeConvert { - - SysDictTypeConvert INSTANCE = Mappers.getMapper(SysDictTypeConvert.class); - - PageResult convertPage(PageResult bean); - - SysDictTypeRespVO convert(SysDictTypeDO bean); - - SysDictTypeDO convert(SysDictTypeCreateReqVO bean); - - SysDictTypeDO convert(SysDictTypeUpdateReqVO bean); - - List convertList(List list); - - List convertList02(List list); - -} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/errorcode/ErrorCodeConvert.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/errorcode/ErrorCodeConvert.java new file mode 100644 index 000000000..0402aca8b --- /dev/null +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/errorcode/ErrorCodeConvert.java @@ -0,0 +1,42 @@ +package cn.iocoder.yudao.module.system.convert.errorcode; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.system.controller.admin.errorcode.vo.ErrorCodeCreateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.errorcode.vo.ErrorCodeExcelVO; +import cn.iocoder.yudao.module.system.controller.admin.errorcode.vo.ErrorCodeRespVO; +import cn.iocoder.yudao.module.system.dal.dataobject.errorcode.ErrorCodeDO; +import cn.iocoder.yudao.module.system.framework.errorcode.core.dto.ErrorCodeAutoGenerateReqDTO; +import cn.iocoder.yudao.module.system.framework.errorcode.core.dto.ErrorCodeRespDTO; +import cn.iocoder.yudao.module.system.controller.admin.errorcode.vo.ErrorCodeUpdateReqVO; +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; + +import java.util.List; + +/** + * 错误码 Convert + * + * @author 芋道源码 + */ +@Mapper +public interface ErrorCodeConvert { + + ErrorCodeConvert INSTANCE = Mappers.getMapper(ErrorCodeConvert.class); + + ErrorCodeDO convert(ErrorCodeCreateReqVO bean); + + ErrorCodeDO convert(ErrorCodeUpdateReqVO bean); + + ErrorCodeRespVO convert(ErrorCodeDO bean); + + List convertList(List list); + + PageResult convertPage(PageResult page); + + List convertList02(List list); + + ErrorCodeDO convert(ErrorCodeAutoGenerateReqDTO bean); + + List convertList03(List list); + +} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/errorcode/SysErrorCodeConvert.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/errorcode/SysErrorCodeConvert.java deleted file mode 100644 index 7a571dc45..000000000 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/errorcode/SysErrorCodeConvert.java +++ /dev/null @@ -1,42 +0,0 @@ -package cn.iocoder.yudao.module.system.convert.errorcode; - -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.system.framework.errorcode.core.dto.ErrorCodeAutoGenerateReqDTO; -import cn.iocoder.yudao.module.system.framework.errorcode.core.dto.ErrorCodeRespDTO; -import cn.iocoder.yudao.module.system.controller.errorcode.vo.SysErrorCodeCreateReqVO; -import cn.iocoder.yudao.module.system.controller.errorcode.vo.SysErrorCodeExcelVO; -import cn.iocoder.yudao.module.system.controller.errorcode.vo.SysErrorCodeRespVO; -import cn.iocoder.yudao.module.system.controller.errorcode.vo.SysErrorCodeUpdateReqVO; -import cn.iocoder.yudao.module.system.dal.dataobject.errorcode.SysErrorCodeDO; -import org.mapstruct.Mapper; -import org.mapstruct.factory.Mappers; - -import java.util.List; - -/** - * 错误码 Convert - * - * @author 芋道源码 - */ -@Mapper -public interface SysErrorCodeConvert { - - SysErrorCodeConvert INSTANCE = Mappers.getMapper(SysErrorCodeConvert.class); - - SysErrorCodeDO convert(SysErrorCodeCreateReqVO bean); - - SysErrorCodeDO convert(SysErrorCodeUpdateReqVO bean); - - SysErrorCodeRespVO convert(SysErrorCodeDO bean); - - List convertList(List list); - - PageResult convertPage(PageResult page); - - List convertList02(List list); - - SysErrorCodeDO convert(ErrorCodeAutoGenerateReqDTO bean); - - List convertList03(List list); - -} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/logger/LoginLogConvert.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/logger/LoginLogConvert.java new file mode 100644 index 000000000..3d375b004 --- /dev/null +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/logger/LoginLogConvert.java @@ -0,0 +1,21 @@ +package cn.iocoder.yudao.module.system.convert.logger; + +import cn.iocoder.yudao.module.system.controller.admin.logger.vo.loginlog.LoginLogExcelVO; +import cn.iocoder.yudao.module.system.controller.admin.logger.vo.loginlog.LoginLogRespVO; +import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.logger.SysLoginLogDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; + +import java.util.List; + +@Mapper +public interface LoginLogConvert { + + LoginLogConvert INSTANCE = Mappers.getMapper(LoginLogConvert.class); + + PageResult convertPage(PageResult page); + + List convertList(List list); + +} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/logger/SysOperateLogConvert.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/logger/OperateLogConvert.java similarity index 54% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/logger/SysOperateLogConvert.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/logger/OperateLogConvert.java index 901e321a0..bc5cd690e 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/logger/SysOperateLogConvert.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/logger/OperateLogConvert.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.system.convert.logger; -import cn.iocoder.yudao.module.system.controller.logger.vo.operatelog.SysOperateLogExcelVO; -import cn.iocoder.yudao.module.system.controller.logger.vo.operatelog.SysOperateLogRespVO; -import cn.iocoder.yudao.module.system.dal.dataobject.logger.SysOperateLogDO; +import cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog.OperateLogExcelVO; +import cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog.OperateLogRespVO; +import cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogDO; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.user.SysUserDO; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.MapUtils; @@ -17,25 +17,25 @@ import java.util.stream.Collectors; import static cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants.SUCCESS; @Mapper -public interface SysOperateLogConvert { +public interface OperateLogConvert { - SysOperateLogConvert INSTANCE = Mappers.getMapper(SysOperateLogConvert.class); + OperateLogConvert INSTANCE = Mappers.getMapper(OperateLogConvert.class); - SysOperateLogDO convert(OperateLogCreateReqDTO bean); + OperateLogDO convert(OperateLogCreateReqDTO bean); - PageResult convertPage(PageResult page); + PageResult convertPage(PageResult page); - SysOperateLogRespVO convert(SysOperateLogDO bean); + OperateLogRespVO convert(OperateLogDO bean); - default List convertList(List list, Map userMap) { + default List convertList(List list, Map userMap) { return list.stream().map(operateLog -> { - SysOperateLogExcelVO excelVO = convert02(operateLog); + OperateLogExcelVO excelVO = convert02(operateLog); MapUtils.findAndThen(userMap, operateLog.getId(), user -> excelVO.setUserNickname(user.getNickname())); excelVO.setSuccessStr(SUCCESS.getCode().equals(operateLog.getResultCode()) ? "成功" : "失败"); return excelVO; }).collect(Collectors.toList()); } - SysOperateLogExcelVO convert02(SysOperateLogDO bean); + OperateLogExcelVO convert02(OperateLogDO bean); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/logger/SysLoginLogConvert.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/logger/SysLoginLogConvert.java deleted file mode 100644 index 01b9adabb..000000000 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/logger/SysLoginLogConvert.java +++ /dev/null @@ -1,21 +0,0 @@ -package cn.iocoder.yudao.module.system.convert.logger; - -import cn.iocoder.yudao.module.system.controller.logger.vo.loginlog.SysLoginLogExcelVO; -import cn.iocoder.yudao.module.system.controller.logger.vo.loginlog.SysLoginLogRespVO; -import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.logger.SysLoginLogDO; -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import org.mapstruct.Mapper; -import org.mapstruct.factory.Mappers; - -import java.util.List; - -@Mapper -public interface SysLoginLogConvert { - - SysLoginLogConvert INSTANCE = Mappers.getMapper(SysLoginLogConvert.class); - - PageResult convertPage(PageResult page); - - List convertList(List list); - -} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/notice/NoticeConvert.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/notice/NoticeConvert.java new file mode 100644 index 000000000..ad2bedec7 --- /dev/null +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/notice/NoticeConvert.java @@ -0,0 +1,24 @@ +package cn.iocoder.yudao.module.system.convert.notice; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.system.controller.admin.notice.vo.NoticeCreateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.notice.vo.NoticeRespVO; +import cn.iocoder.yudao.module.system.controller.admin.notice.vo.NoticeUpdateReqVO; +import cn.iocoder.yudao.module.system.dal.dataobject.notice.NoticeDO; +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; + +@Mapper +public interface NoticeConvert { + + NoticeConvert INSTANCE = Mappers.getMapper(NoticeConvert.class); + + PageResult convertPage(PageResult page); + + NoticeRespVO convert(NoticeDO bean); + + NoticeDO convert(NoticeUpdateReqVO bean); + + NoticeDO convert(NoticeCreateReqVO bean); + +} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/notice/SysNoticeConvert.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/notice/SysNoticeConvert.java deleted file mode 100644 index bf46d698b..000000000 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/notice/SysNoticeConvert.java +++ /dev/null @@ -1,24 +0,0 @@ -package cn.iocoder.yudao.module.system.convert.notice; - -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.system.controller.notice.vo.SysNoticeCreateReqVO; -import cn.iocoder.yudao.module.system.controller.notice.vo.SysNoticeRespVO; -import cn.iocoder.yudao.module.system.controller.notice.vo.SysNoticeUpdateReqVO; -import cn.iocoder.yudao.module.system.dal.dataobject.notice.SysNoticeDO; -import org.mapstruct.Mapper; -import org.mapstruct.factory.Mappers; - -@Mapper -public interface SysNoticeConvert { - - SysNoticeConvert INSTANCE = Mappers.getMapper(SysNoticeConvert.class); - - PageResult convertPage(PageResult page); - - SysNoticeRespVO convert(SysNoticeDO bean); - - SysNoticeDO convert(SysNoticeUpdateReqVO bean); - - SysNoticeDO convert(SysNoticeCreateReqVO bean); - -} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/permission/MenuConvert.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/permission/MenuConvert.java new file mode 100644 index 000000000..0fb3505cc --- /dev/null +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/permission/MenuConvert.java @@ -0,0 +1,28 @@ +package cn.iocoder.yudao.module.system.convert.permission; + +import cn.iocoder.yudao.module.system.controller.admin.permission.vo.menu.MenuCreateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.permission.vo.menu.MenuRespVO; +import cn.iocoder.yudao.module.system.controller.admin.permission.vo.menu.MenuSimpleRespVO; +import cn.iocoder.yudao.module.system.controller.admin.permission.vo.menu.MenuUpdateReqVO; +import cn.iocoder.yudao.module.system.dal.dataobject.permission.MenuDO; +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; + +import java.util.List; + +@Mapper +public interface MenuConvert { + + MenuConvert INSTANCE = Mappers.getMapper(MenuConvert.class); + + List convertList(List list); + + MenuDO convert(MenuCreateReqVO bean); + + MenuDO convert(MenuUpdateReqVO bean); + + MenuRespVO convert(MenuDO bean); + + List convertList02(List list); + +} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/permission/RoleConvert.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/permission/RoleConvert.java new file mode 100644 index 000000000..c9e1098ae --- /dev/null +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/permission/RoleConvert.java @@ -0,0 +1,25 @@ +package cn.iocoder.yudao.module.system.convert.permission; + +import cn.iocoder.yudao.module.system.controller.admin.permission.vo.role.*; +import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.permission.SysRoleDO; +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; + +import java.util.List; + +@Mapper +public interface RoleConvert { + + RoleConvert INSTANCE = Mappers.getMapper(RoleConvert.class); + + SysRoleDO convert(RoleUpdateReqVO bean); + + RoleRespVO convert(SysRoleDO bean); + + SysRoleDO convert(RoleCreateReqVO bean); + + List convertList02(List list); + + List convertList03(List list); + +} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/permission/SysMenuConvert.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/permission/SysMenuConvert.java deleted file mode 100644 index 109a53f56..000000000 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/permission/SysMenuConvert.java +++ /dev/null @@ -1,28 +0,0 @@ -package cn.iocoder.yudao.module.system.convert.permission; - -import cn.iocoder.yudao.module.system.controller.permission.vo.menu.SysMenuCreateReqVO; -import cn.iocoder.yudao.module.system.controller.permission.vo.menu.SysMenuRespVO; -import cn.iocoder.yudao.module.system.controller.permission.vo.menu.SysMenuSimpleRespVO; -import cn.iocoder.yudao.module.system.controller.permission.vo.menu.SysMenuUpdateReqVO; -import cn.iocoder.yudao.module.system.dal.dataobject.permission.SysMenuDO; -import org.mapstruct.Mapper; -import org.mapstruct.factory.Mappers; - -import java.util.List; - -@Mapper -public interface SysMenuConvert { - - SysMenuConvert INSTANCE = Mappers.getMapper(SysMenuConvert.class); - - List convertList(List list); - - SysMenuDO convert(SysMenuCreateReqVO bean); - - SysMenuDO convert(SysMenuUpdateReqVO bean); - - SysMenuRespVO convert(SysMenuDO bean); - - List convertList02(List list); - -} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/permission/SysRoleConvert.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/permission/SysRoleConvert.java deleted file mode 100644 index bc048a774..000000000 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/permission/SysRoleConvert.java +++ /dev/null @@ -1,25 +0,0 @@ -package cn.iocoder.yudao.module.system.convert.permission; - -import cn.iocoder.yudao.module.system.controller.permission.vo.role.*; -import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.permission.SysRoleDO; -import org.mapstruct.Mapper; -import org.mapstruct.factory.Mappers; - -import java.util.List; - -@Mapper -public interface SysRoleConvert { - - SysRoleConvert INSTANCE = Mappers.getMapper(SysRoleConvert.class); - - SysRoleDO convert(SysRoleUpdateReqVO bean); - - SysRoleRespVO convert(SysRoleDO bean); - - SysRoleDO convert(SysRoleCreateReqVO bean); - - List convertList02(List list); - - List convertList03(List list); - -} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/sms/SmsChannelConvert.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/sms/SmsChannelConvert.java new file mode 100644 index 000000000..3885b7a1c --- /dev/null +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/sms/SmsChannelConvert.java @@ -0,0 +1,39 @@ +package cn.iocoder.yudao.module.system.convert.sms; + +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel.SmsChannelCreateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel.SmsChannelRespVO; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel.SmsChannelSimpleRespVO; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel.SmsChannelUpdateReqVO; +import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.sms.SysSmsChannelDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.sms.core.property.SmsChannelProperties; +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; + +import java.util.List; + +/** + * 短信渠道 Convert + * + * @author 芋道源码 + */ +@Mapper +public interface SmsChannelConvert { + + SmsChannelConvert INSTANCE = Mappers.getMapper(SmsChannelConvert.class); + + SysSmsChannelDO convert(SmsChannelCreateReqVO bean); + + SysSmsChannelDO convert(SmsChannelUpdateReqVO bean); + + SmsChannelRespVO convert(SysSmsChannelDO bean); + + List convertList(List list); + + PageResult convertPage(PageResult page); + + List convertList02(List list); + + List convertList03(List list); + +} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/sms/SysSmsLogConvert.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/sms/SmsLogConvert.java similarity index 62% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/sms/SysSmsLogConvert.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/sms/SmsLogConvert.java index d91f7b326..f5110b371 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/sms/SysSmsLogConvert.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/sms/SmsLogConvert.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.convert.sms; -import cn.iocoder.yudao.module.system.controller.sms.vo.log.SysSmsLogExcelVO; -import cn.iocoder.yudao.module.system.controller.sms.vo.log.SysSmsLogRespVO; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.log.SmsLogExcelVO; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.log.SysSmsLogRespVO; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.sms.SysSmsLogDO; import cn.iocoder.yudao.framework.common.pojo.PageResult; import org.mapstruct.Mapper; @@ -15,9 +15,9 @@ import java.util.List; * @author 芋道源码 */ @Mapper -public interface SysSmsLogConvert { +public interface SmsLogConvert { - SysSmsLogConvert INSTANCE = Mappers.getMapper(SysSmsLogConvert.class); + SmsLogConvert INSTANCE = Mappers.getMapper(SmsLogConvert.class); SysSmsLogRespVO convert(SysSmsLogDO bean); @@ -25,6 +25,6 @@ public interface SysSmsLogConvert { PageResult convertPage(PageResult page); - List convertList02(List list); + List convertList02(List list); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/sms/SmsTemplateConvert.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/sms/SmsTemplateConvert.java new file mode 100644 index 000000000..bc83e1e85 --- /dev/null +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/sms/SmsTemplateConvert.java @@ -0,0 +1,31 @@ +package cn.iocoder.yudao.module.system.convert.sms; + +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.template.SmsTemplateCreateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.template.SmsTemplateExcelVO; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.template.SmsTemplateRespVO; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.template.SmsTemplateUpdateReqVO; +import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.sms.SysSmsTemplateDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; + +import java.util.List; + +@Mapper +public interface SmsTemplateConvert { + + SmsTemplateConvert INSTANCE = Mappers.getMapper(SmsTemplateConvert.class); + + SysSmsTemplateDO convert(SmsTemplateCreateReqVO bean); + + SysSmsTemplateDO convert(SmsTemplateUpdateReqVO bean); + + SmsTemplateRespVO convert(SysSmsTemplateDO bean); + + List convertList(List list); + + PageResult convertPage(PageResult page); + + List convertList02(List list); + +} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/sms/SysSmsChannelConvert.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/sms/SysSmsChannelConvert.java deleted file mode 100644 index af0652eea..000000000 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/sms/SysSmsChannelConvert.java +++ /dev/null @@ -1,39 +0,0 @@ -package cn.iocoder.yudao.module.system.convert.sms; - -import cn.iocoder.yudao.module.system.controller.sms.vo.channel.SysSmsChannelCreateReqVO; -import cn.iocoder.yudao.module.system.controller.sms.vo.channel.SysSmsChannelRespVO; -import cn.iocoder.yudao.module.system.controller.sms.vo.channel.SysSmsChannelSimpleRespVO; -import cn.iocoder.yudao.module.system.controller.sms.vo.channel.SysSmsChannelUpdateReqVO; -import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.sms.SysSmsChannelDO; -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.sms.core.property.SmsChannelProperties; -import org.mapstruct.Mapper; -import org.mapstruct.factory.Mappers; - -import java.util.List; - -/** - * 短信渠道 Convert - * - * @author 芋道源码 - */ -@Mapper -public interface SysSmsChannelConvert { - - SysSmsChannelConvert INSTANCE = Mappers.getMapper(SysSmsChannelConvert.class); - - SysSmsChannelDO convert(SysSmsChannelCreateReqVO bean); - - SysSmsChannelDO convert(SysSmsChannelUpdateReqVO bean); - - SysSmsChannelRespVO convert(SysSmsChannelDO bean); - - List convertList(List list); - - PageResult convertPage(PageResult page); - - List convertList02(List list); - - List convertList03(List list); - -} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/sms/SysSmsTemplateConvert.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/sms/SysSmsTemplateConvert.java deleted file mode 100644 index b3a423e32..000000000 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/sms/SysSmsTemplateConvert.java +++ /dev/null @@ -1,31 +0,0 @@ -package cn.iocoder.yudao.module.system.convert.sms; - -import cn.iocoder.yudao.module.system.controller.sms.vo.template.SysSmsTemplateCreateReqVO; -import cn.iocoder.yudao.module.system.controller.sms.vo.template.SysSmsTemplateExcelVO; -import cn.iocoder.yudao.module.system.controller.sms.vo.template.SysSmsTemplateRespVO; -import cn.iocoder.yudao.module.system.controller.sms.vo.template.SysSmsTemplateUpdateReqVO; -import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.sms.SysSmsTemplateDO; -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import org.mapstruct.Mapper; -import org.mapstruct.factory.Mappers; - -import java.util.List; - -@Mapper -public interface SysSmsTemplateConvert { - - SysSmsTemplateConvert INSTANCE = Mappers.getMapper(SysSmsTemplateConvert.class); - - SysSmsTemplateDO convert(SysSmsTemplateCreateReqVO bean); - - SysSmsTemplateDO convert(SysSmsTemplateUpdateReqVO bean); - - SysSmsTemplateRespVO convert(SysSmsTemplateDO bean); - - List convertList(List list); - - PageResult convertPage(PageResult page); - - List convertList02(List list); - -} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/tenant/SysTenantConvert.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/tenant/SysTenantConvert.java deleted file mode 100755 index 6d9d1f77b..000000000 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/tenant/SysTenantConvert.java +++ /dev/null @@ -1,36 +0,0 @@ -package cn.iocoder.yudao.module.system.convert.tenant; - -import cn.iocoder.yudao.module.system.controller.tenant.vo.SysTenantCreateReqVO; -import cn.iocoder.yudao.module.system.controller.tenant.vo.SysTenantExcelVO; -import cn.iocoder.yudao.module.system.controller.tenant.vo.SysTenantRespVO; -import cn.iocoder.yudao.module.system.controller.tenant.vo.SysTenantUpdateReqVO; -import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.tenant.SysTenantDO; -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import org.mapstruct.Mapper; -import org.mapstruct.factory.Mappers; - -import java.util.List; - -/** - * 租户 Convert - * - * @author 芋道源码 - */ -@Mapper -public interface SysTenantConvert { - - SysTenantConvert INSTANCE = Mappers.getMapper(SysTenantConvert.class); - - SysTenantDO convert(SysTenantCreateReqVO bean); - - SysTenantDO convert(SysTenantUpdateReqVO bean); - - SysTenantRespVO convert(SysTenantDO bean); - - List convertList(List list); - - PageResult convertPage(PageResult page); - - List convertList02(List list); - -} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/tenant/TenantConvert.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/tenant/TenantConvert.java new file mode 100755 index 000000000..62e28b469 --- /dev/null +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/tenant/TenantConvert.java @@ -0,0 +1,36 @@ +package cn.iocoder.yudao.module.system.convert.tenant; + +import cn.iocoder.yudao.module.system.controller.admin.tenant.vo.TenantCreateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.tenant.vo.TenantExcelVO; +import cn.iocoder.yudao.module.system.controller.admin.tenant.vo.TenantRespVO; +import cn.iocoder.yudao.module.system.controller.admin.tenant.vo.TenantUpdateReqVO; +import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.tenant.SysTenantDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; + +import java.util.List; + +/** + * 租户 Convert + * + * @author 芋道源码 + */ +@Mapper +public interface TenantConvert { + + TenantConvert INSTANCE = Mappers.getMapper(TenantConvert.class); + + SysTenantDO convert(TenantCreateReqVO bean); + + SysTenantDO convert(TenantUpdateReqVO bean); + + TenantRespVO convert(SysTenantDO bean); + + List convertList(List list); + + PageResult convertPage(PageResult page); + + List convertList02(List list); + +} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/user/SysUserConvert.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/user/SysUserConvert.java deleted file mode 100644 index b1436155b..000000000 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/user/SysUserConvert.java +++ /dev/null @@ -1,49 +0,0 @@ -package cn.iocoder.yudao.module.system.convert.user; - -import cn.iocoder.yudao.module.system.controller.user.vo.profile.SysUserProfileRespVO; -import cn.iocoder.yudao.module.system.controller.user.vo.profile.SysUserProfileUpdatePasswordReqVO; -import cn.iocoder.yudao.module.system.controller.user.vo.profile.SysUserProfileUpdateReqVO; -import cn.iocoder.yudao.module.system.controller.user.vo.user.*; -import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.dept.SysDeptDO; -import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.dept.SysPostDO; -import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.permission.SysRoleDO; -import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.social.SysSocialUserDO; -import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.user.SysUserDO; -import org.mapstruct.Mapper; -import org.mapstruct.factory.Mappers; - -import java.util.List; - -@Mapper -public interface SysUserConvert { - - SysUserConvert INSTANCE = Mappers.getMapper(SysUserConvert.class); - - SysUserPageItemRespVO convert(SysUserDO bean); - - SysUserPageItemRespVO.Dept convert(SysDeptDO bean); - - SysUserDO convert(SysUserCreateReqVO bean); - - SysUserDO convert(SysUserUpdateReqVO bean); - - SysUserExcelVO convert02(SysUserDO bean); - - SysUserDO convert(SysUserImportExcelVO bean); - - SysUserProfileRespVO convert03(SysUserDO bean); - - List convertList(List list); - - SysUserProfileRespVO.Dept convert02(SysDeptDO bean); - - SysUserDO convert(SysUserProfileUpdateReqVO bean); - - SysUserDO convert(SysUserProfileUpdatePasswordReqVO bean); - - List convertList02(List list); - - List convertList03(List list); - - List convertList04(List list); -} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/user/UserConvert.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/user/UserConvert.java new file mode 100644 index 000000000..e57cb8648 --- /dev/null +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/user/UserConvert.java @@ -0,0 +1,49 @@ +package cn.iocoder.yudao.module.system.convert.user; + +import cn.iocoder.yudao.module.system.controller.admin.user.vo.profile.UserProfileRespVO; +import cn.iocoder.yudao.module.system.controller.admin.user.vo.profile.UserProfileUpdatePasswordReqVO; +import cn.iocoder.yudao.module.system.controller.admin.user.vo.profile.UserProfileUpdateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.*; +import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.dept.SysDeptDO; +import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.dept.SysPostDO; +import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.permission.SysRoleDO; +import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.social.SysSocialUserDO; +import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.user.SysUserDO; +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; + +import java.util.List; + +@Mapper +public interface UserConvert { + + UserConvert INSTANCE = Mappers.getMapper(UserConvert.class); + + UserPageItemRespVO convert(SysUserDO bean); + + UserPageItemRespVO.Dept convert(SysDeptDO bean); + + SysUserDO convert(UserCreateReqVO bean); + + SysUserDO convert(UserUpdateReqVO bean); + + UserExcelVO convert02(SysUserDO bean); + + SysUserDO convert(UserImportExcelVO bean); + + UserProfileRespVO convert03(SysUserDO bean); + + List convertList(List list); + + UserProfileRespVO.Dept convert02(SysDeptDO bean); + + SysUserDO convert(UserProfileUpdateReqVO bean); + + SysUserDO convert(UserProfileUpdatePasswordReqVO bean); + + List convertList02(List list); + + List convertList03(List list); + + List convertList04(List list); +} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/dict/SysDictTypeDO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/dict/DictTypeDO.java similarity index 92% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/dict/SysDictTypeDO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/dict/DictTypeDO.java index de7a67b85..01455f438 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/dict/SysDictTypeDO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/dict/DictTypeDO.java @@ -12,14 +12,14 @@ import lombok.*; * * @author ruoyi */ -@TableName("sys_dict_type") +@TableName("system_dict_type") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) @Builder @NoArgsConstructor @AllArgsConstructor -public class SysDictTypeDO extends BaseDO { +public class DictTypeDO extends BaseDO { /** * 字典主键 diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/errorcode/SysErrorCodeDO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/errorcode/ErrorCodeDO.java similarity index 81% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/errorcode/SysErrorCodeDO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/errorcode/ErrorCodeDO.java index b8cae75df..b27949287 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/errorcode/SysErrorCodeDO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/errorcode/ErrorCodeDO.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.dal.dataobject.errorcode; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.yudao.module.system.enums.errorcode.SysErrorCodeTypeEnum; +import cn.iocoder.yudao.module.system.enums.errorcode.ErrorCodeTypeEnum; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; @@ -13,11 +13,11 @@ import lombok.ToString; * * @author 芋道源码 */ -@TableName(value = "sys_error_code") +@TableName(value = "system_error_code") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) -public class SysErrorCodeDO extends BaseDO { +public class ErrorCodeDO extends BaseDO { /** * 错误码编号,自增 @@ -27,7 +27,7 @@ public class SysErrorCodeDO extends BaseDO { /** * 错误码类型 * - * 枚举 {@link SysErrorCodeTypeEnum} + * 枚举 {@link ErrorCodeTypeEnum} */ private Integer type; /** diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/logger/SysOperateLogDO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/logger/OperateLogDO.java similarity index 96% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/logger/SysOperateLogDO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/logger/OperateLogDO.java index ca9483e02..ec799ec46 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/logger/SysOperateLogDO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/logger/OperateLogDO.java @@ -19,10 +19,10 @@ import java.util.Map; * * @author 芋道源码 */ -@TableName(value = "sys_operate_log", autoResultMap = true) +@TableName(value = "system_operate_log", autoResultMap = true) @Data @EqualsAndHashCode(callSuper = true) -public class SysOperateLogDO extends TenantBaseDO { +public class OperateLogDO extends TenantBaseDO { /** * {@link #javaMethodArgs} 的最大长度 diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/notice/SysNoticeDO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/notice/NoticeDO.java similarity index 82% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/notice/SysNoticeDO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/notice/NoticeDO.java index 571b01157..20860b835 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/notice/SysNoticeDO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/notice/NoticeDO.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.dal.dataobject.notice; -import cn.iocoder.yudao.module.system.enums.notice.SysNoticeTypeEnum; +import cn.iocoder.yudao.module.system.enums.notice.NoticeTypeEnum; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO; import com.baomidou.mybatisplus.annotation.TableField; @@ -13,10 +13,10 @@ import lombok.EqualsAndHashCode; * * @author ruoyi */ -@TableName("sys_notice") +@TableName("system_notice") @Data @EqualsAndHashCode(callSuper = true) -public class SysNoticeDO extends TenantBaseDO { +public class NoticeDO extends TenantBaseDO { /** * 公告ID @@ -29,7 +29,7 @@ public class SysNoticeDO extends TenantBaseDO { /** * 公告类型 * - * 枚举 {@link SysNoticeTypeEnum} + * 枚举 {@link NoticeTypeEnum} */ @TableField("notice_type") private Integer type; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/permission/SysMenuDO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/permission/MenuDO.java similarity index 96% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/permission/SysMenuDO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/permission/MenuDO.java index 39c0b82ba..1920a68e2 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/permission/SysMenuDO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/permission/MenuDO.java @@ -14,10 +14,10 @@ import lombok.EqualsAndHashCode; * * @author ruoyi */ -@TableName("sys_menu") +@TableName("system_menu") @Data @EqualsAndHashCode(callSuper = true) -public class SysMenuDO extends BaseDO { +public class MenuDO extends BaseDO { /** * 菜单ID diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/permission/SysRoleMenuDO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/permission/RoleMenuDO.java similarity index 88% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/permission/SysRoleMenuDO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/permission/RoleMenuDO.java index bfe0c3f86..6b7778bf0 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/permission/SysRoleMenuDO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/permission/RoleMenuDO.java @@ -11,10 +11,10 @@ import lombok.EqualsAndHashCode; * * @author ruoyi */ -@TableName("sys_role_menu") +@TableName("system_role_menu") @Data @EqualsAndHashCode(callSuper = true) -public class SysRoleMenuDO extends BaseDO { +public class RoleMenuDO extends BaseDO { /** * 自增主键 diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/auth/SysUserSessionMapper.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/auth/SysUserSessionMapper.java index 34e3ffc38..7d231be88 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/auth/SysUserSessionMapper.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/auth/SysUserSessionMapper.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.dal.mysql.auth; -import cn.iocoder.yudao.module.system.controller.auth.vo.session.SysUserSessionPageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.auth.vo.session.UserSessionPageReqVO; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.auth.SysUserSessionDO; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; @@ -14,7 +14,7 @@ import java.util.List; @Mapper public interface SysUserSessionMapper extends BaseMapperX { - default PageResult selectPage(SysUserSessionPageReqVO reqVO, Collection userIds) { + default PageResult selectPage(UserSessionPageReqVO reqVO, Collection userIds) { return selectPage(reqVO, new QueryWrapperX() .inIfPresent("user_id", userIds) .likeIfPresent("user_ip", reqVO.getUserIp())); diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/dept/SysDeptMapper.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/dept/SysDeptMapper.java index 995ee1e5c..0bd2d024c 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/dept/SysDeptMapper.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/dept/SysDeptMapper.java @@ -3,7 +3,7 @@ package cn.iocoder.yudao.module.system.dal.mysql.dept; import cn.iocoder.yudao.framework.mybatis.core.enums.SqlConstants; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; -import cn.iocoder.yudao.module.system.controller.dept.vo.dept.SysDeptListReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept.DeptListReqVO; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.dept.SysDeptDO; import com.baomidou.mybatisplus.annotation.InterceptorIgnore; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; @@ -15,7 +15,7 @@ import java.util.List; @Mapper public interface SysDeptMapper extends BaseMapperX { - default List selectList(SysDeptListReqVO reqVO) { + default List selectList(DeptListReqVO reqVO) { return selectList(new LambdaQueryWrapperX().likeIfPresent(SysDeptDO::getName, reqVO.getName()) .eqIfPresent(SysDeptDO::getStatus, reqVO.getStatus())); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/dept/SysPostMapper.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/dept/SysPostMapper.java index bf154992a..b3657d1f4 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/dept/SysPostMapper.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/dept/SysPostMapper.java @@ -3,8 +3,8 @@ package cn.iocoder.yudao.module.system.dal.mysql.dept; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; -import cn.iocoder.yudao.module.system.controller.dept.vo.post.SysPostExportReqVO; -import cn.iocoder.yudao.module.system.controller.dept.vo.post.SysPostPageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dept.vo.post.PostExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dept.vo.post.PostPageReqVO; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.dept.SysPostDO; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import org.apache.ibatis.annotations.Mapper; @@ -20,14 +20,14 @@ public interface SysPostMapper extends BaseMapperX { .inIfPresent("status", statuses)); } - default PageResult selectPage(SysPostPageReqVO reqVO) { + default PageResult selectPage(PostPageReqVO reqVO) { return selectPage(reqVO, new QueryWrapperX() .likeIfPresent("code", reqVO.getCode()) .likeIfPresent("name", reqVO.getName()) .eqIfPresent("status", reqVO.getStatus())); } - default List selectList(SysPostExportReqVO reqVO) { + default List selectList(PostExportReqVO reqVO) { return selectList(new QueryWrapperX() .likeIfPresent("code", reqVO.getCode()) .likeIfPresent("name", reqVO.getName()) diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/dict/SysDictDataMapper.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/dict/SysDictDataMapper.java index 9fc681a02..c8abca94b 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/dict/SysDictDataMapper.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/dict/SysDictDataMapper.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.system.dal.mysql.dict; import cn.iocoder.yudao.framework.mybatis.core.enums.SqlConstants; -import cn.iocoder.yudao.module.system.controller.dict.vo.data.SysDictDataExportReqVO; -import cn.iocoder.yudao.module.system.controller.dict.vo.data.SysDictDataPageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dict.vo.data.DictDataExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dict.vo.data.DictDataPageReqVO; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.dict.SysDictDataDO; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; @@ -32,7 +32,7 @@ public interface SysDictDataMapper extends BaseMapperX { return selectCount(SysDictDataDO::getDictType, dictType); } - default PageResult selectPage(SysDictDataPageReqVO reqVO) { + default PageResult selectPage(DictDataPageReqVO reqVO) { return selectPage(reqVO, new LambdaQueryWrapperX() .likeIfPresent(SysDictDataDO::getLabel, reqVO.getLabel()) .likeIfPresent(SysDictDataDO::getDictType, reqVO.getDictType()) @@ -40,7 +40,7 @@ public interface SysDictDataMapper extends BaseMapperX { .orderByAsc(Arrays.asList(SysDictDataDO::getDictType, SysDictDataDO::getSort))); } - default List selectList(SysDictDataExportReqVO reqVO) { + default List selectList(DictDataExportReqVO reqVO) { return selectList(new LambdaQueryWrapperX().likeIfPresent(SysDictDataDO::getLabel, reqVO.getLabel()) .likeIfPresent(SysDictDataDO::getDictType, reqVO.getDictType()) .eqIfPresent(SysDictDataDO::getStatus, reqVO.getStatus())); diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/dict/SysDictTypeMapper.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/dict/SysDictTypeMapper.java index ae213915f..de3d700af 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/dict/SysDictTypeMapper.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/dict/SysDictTypeMapper.java @@ -3,38 +3,38 @@ package cn.iocoder.yudao.module.system.dal.mysql.dict; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; -import cn.iocoder.yudao.module.system.controller.dict.vo.type.SysDictTypeExportReqVO; -import cn.iocoder.yudao.module.system.controller.dict.vo.type.SysDictTypePageReqVO; -import cn.iocoder.yudao.module.system.dal.dataobject.dict.SysDictTypeDO; +import cn.iocoder.yudao.module.system.controller.admin.dict.vo.type.DictTypeExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dict.vo.type.DictTypePageReqVO; +import cn.iocoder.yudao.module.system.dal.dataobject.dict.DictTypeDO; import org.apache.ibatis.annotations.Mapper; import java.util.List; @Mapper -public interface SysDictTypeMapper extends BaseMapperX { +public interface SysDictTypeMapper extends BaseMapperX { - default PageResult selectPage(SysDictTypePageReqVO reqVO) { - return selectPage(reqVO, new QueryWrapperX() + default PageResult selectPage(DictTypePageReqVO reqVO) { + return selectPage(reqVO, new QueryWrapperX() .likeIfPresent("name", reqVO.getName()) .likeIfPresent("`type`", reqVO.getType()) .eqIfPresent("status", reqVO.getStatus()) .betweenIfPresent("create_time", reqVO.getBeginCreateTime(), reqVO.getEndCreateTime())); } - default List selectList(SysDictTypeExportReqVO reqVO) { - return selectList(new QueryWrapperX() + default List selectList(DictTypeExportReqVO reqVO) { + return selectList(new QueryWrapperX() .likeIfPresent("name", reqVO.getName()) .likeIfPresent("`type`", reqVO.getType()) .eqIfPresent("status", reqVO.getStatus()) .betweenIfPresent("create_time", reqVO.getBeginCreateTime(), reqVO.getEndCreateTime())); } - default SysDictTypeDO selectByType(String type) { - return selectOne(new QueryWrapperX().eq("`type`", type)); + default DictTypeDO selectByType(String type) { + return selectOne(new QueryWrapperX().eq("`type`", type)); } - default SysDictTypeDO selectByName(String name) { - return selectOne(new QueryWrapperX().eq("name", name)); + default DictTypeDO selectByName(String name) { + return selectOne(new QueryWrapperX().eq("name", name)); } } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/errorcode/SysErrorCodeMapper.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/errorcode/SysErrorCodeMapper.java index b7cac6ca9..4924c6e87 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/errorcode/SysErrorCodeMapper.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/errorcode/SysErrorCodeMapper.java @@ -3,9 +3,9 @@ package cn.iocoder.yudao.module.system.dal.mysql.errorcode; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; -import cn.iocoder.yudao.module.system.controller.errorcode.vo.SysErrorCodeExportReqVO; -import cn.iocoder.yudao.module.system.controller.errorcode.vo.SysErrorCodePageReqVO; -import cn.iocoder.yudao.module.system.dal.dataobject.errorcode.SysErrorCodeDO; +import cn.iocoder.yudao.module.system.controller.admin.errorcode.vo.ErrorCodeExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.errorcode.vo.ErrorCodePageReqVO; +import cn.iocoder.yudao.module.system.dal.dataobject.errorcode.ErrorCodeDO; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import org.apache.ibatis.annotations.Mapper; @@ -14,10 +14,10 @@ import java.util.Date; import java.util.List; @Mapper -public interface SysErrorCodeMapper extends BaseMapperX { +public interface SysErrorCodeMapper extends BaseMapperX { - default PageResult selectPage(SysErrorCodePageReqVO reqVO) { - return selectPage(reqVO, new QueryWrapperX() + default PageResult selectPage(ErrorCodePageReqVO reqVO) { + return selectPage(reqVO, new QueryWrapperX() .eqIfPresent("type", reqVO.getType()) .likeIfPresent("application_name", reqVO.getApplicationName()) .eqIfPresent("code", reqVO.getCode()) @@ -26,8 +26,8 @@ public interface SysErrorCodeMapper extends BaseMapperX { .orderByAsc("application_name", "code")); } - default List selectList(SysErrorCodeExportReqVO reqVO) { - return selectList(new QueryWrapperX() + default List selectList(ErrorCodeExportReqVO reqVO) { + return selectList(new QueryWrapperX() .eqIfPresent("type", reqVO.getType()) .likeIfPresent("application_name", reqVO.getApplicationName()) .eqIfPresent("code", reqVO.getCode()) @@ -36,16 +36,16 @@ public interface SysErrorCodeMapper extends BaseMapperX { .orderByAsc("application_name", "code")); } - default List selectListByCodes(Collection codes) { - return selectList(new QueryWrapper().in("code", codes)); + default List selectListByCodes(Collection codes) { + return selectList(new QueryWrapper().in("code", codes)); } - default SysErrorCodeDO selectByCode(Integer code) { - return selectOne(new QueryWrapper().eq("code", code)); + default ErrorCodeDO selectByCode(Integer code) { + return selectOne(new QueryWrapper().eq("code", code)); } - default List selectListByApplicationNameAndUpdateTimeGt(String applicationName, Date minUpdateTime) { - return selectList(new QueryWrapperX().eq("application_name", applicationName) + default List selectListByApplicationNameAndUpdateTimeGt(String applicationName, Date minUpdateTime) { + return selectList(new QueryWrapperX().eq("application_name", applicationName) .gtIfPresent("update_time", minUpdateTime)); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/logger/SysLoginLogMapper.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/logger/LoginLogMapper.java similarity index 65% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/logger/SysLoginLogMapper.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/logger/LoginLogMapper.java index b21121089..f26023388 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/logger/SysLoginLogMapper.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/logger/LoginLogMapper.java @@ -4,39 +4,39 @@ import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.logger.SysLogi import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; -import cn.iocoder.yudao.module.system.controller.logger.vo.loginlog.SysLoginLogExportReqVO; -import cn.iocoder.yudao.module.system.controller.logger.vo.loginlog.SysLoginLogPageReqVO; -import cn.iocoder.yudao.module.system.enums.logger.SysLoginResultEnum; +import cn.iocoder.yudao.module.system.controller.admin.logger.vo.loginlog.LoginLogExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.logger.vo.loginlog.LoginLogPageReqVO; +import cn.iocoder.yudao.module.system.enums.logger.LoginResultEnum; import org.apache.ibatis.annotations.Mapper; import java.util.List; @Mapper -public interface SysLoginLogMapper extends BaseMapperX { +public interface LoginLogMapper extends BaseMapperX { - default PageResult selectPage(SysLoginLogPageReqVO reqVO) { + default PageResult selectPage(LoginLogPageReqVO reqVO) { QueryWrapperX query = new QueryWrapperX() .likeIfPresent("user_ip", reqVO.getUserIp()) .likeIfPresent("username", reqVO.getUsername()) .betweenIfPresent("create_time", reqVO.getBeginTime(), reqVO.getEndTime()); if (Boolean.TRUE.equals(reqVO.getStatus())) { - query.eq("result", SysLoginResultEnum.SUCCESS.getResult()); + query.eq("result", LoginResultEnum.SUCCESS.getResult()); } else if (Boolean.FALSE.equals(reqVO.getStatus())) { - query.gt("result", SysLoginResultEnum.SUCCESS.getResult()); + query.gt("result", LoginResultEnum.SUCCESS.getResult()); } query.orderByDesc("id"); // 降序 return selectPage(reqVO, query); } - default List selectList(SysLoginLogExportReqVO reqVO) { + default List selectList(LoginLogExportReqVO reqVO) { QueryWrapperX query = new QueryWrapperX() .likeIfPresent("user_ip", reqVO.getUserIp()) .likeIfPresent("username", reqVO.getUsername()) .betweenIfPresent("create_time", reqVO.getBeginTime(), reqVO.getEndTime()); if (Boolean.TRUE.equals(reqVO.getStatus())) { - query.eq("result", SysLoginResultEnum.SUCCESS.getResult()); + query.eq("result", LoginResultEnum.SUCCESS.getResult()); } else if (Boolean.FALSE.equals(reqVO.getStatus())) { - query.gt("result", SysLoginResultEnum.SUCCESS.getResult()); + query.gt("result", LoginResultEnum.SUCCESS.getResult()); } query.orderByDesc("id"); // 降序 return selectList(query); diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/logger/SysOperateLogMapper.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/logger/OperateLogMapper.java similarity index 70% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/logger/SysOperateLogMapper.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/logger/OperateLogMapper.java index 14d866a0b..94367c55f 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/logger/SysOperateLogMapper.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/logger/OperateLogMapper.java @@ -4,19 +4,19 @@ import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstant import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; -import cn.iocoder.yudao.module.system.controller.logger.vo.operatelog.SysOperateLogExportReqVO; -import cn.iocoder.yudao.module.system.controller.logger.vo.operatelog.SysOperateLogPageReqVO; -import cn.iocoder.yudao.module.system.dal.dataobject.logger.SysOperateLogDO; +import cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog.OperateLogExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog.OperateLogPageReqVO; +import cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogDO; import org.apache.ibatis.annotations.Mapper; import java.util.Collection; import java.util.List; @Mapper -public interface SysOperateLogMapper extends BaseMapperX { +public interface OperateLogMapper extends BaseMapperX { - default PageResult selectPage(SysOperateLogPageReqVO reqVO, Collection userIds) { - QueryWrapperX query = new QueryWrapperX() + default PageResult selectPage(OperateLogPageReqVO reqVO, Collection userIds) { + QueryWrapperX query = new QueryWrapperX() .likeIfPresent("module", reqVO.getModule()) .inIfPresent("user_id", userIds) .eqIfPresent("operate_type", reqVO.getType()) @@ -30,8 +30,8 @@ public interface SysOperateLogMapper extends BaseMapperX { return selectPage(reqVO, query); } - default List selectList(SysOperateLogExportReqVO reqVO, Collection userIds) { - QueryWrapperX query = new QueryWrapperX() + default List selectList(OperateLogExportReqVO reqVO, Collection userIds) { + QueryWrapperX query = new QueryWrapperX() .likeIfPresent("module", reqVO.getModule()) .inIfPresent("user_id", userIds) .eqIfPresent("operate_type", reqVO.getType()) diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/notice/SysNoticeMapper.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/notice/SysNoticeMapper.java index 74aee3f5d..6c6a30518 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/notice/SysNoticeMapper.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/notice/SysNoticeMapper.java @@ -3,15 +3,15 @@ package cn.iocoder.yudao.module.system.dal.mysql.notice; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; -import cn.iocoder.yudao.module.system.controller.notice.vo.SysNoticePageReqVO; -import cn.iocoder.yudao.module.system.dal.dataobject.notice.SysNoticeDO; +import cn.iocoder.yudao.module.system.controller.admin.notice.vo.NoticePageReqVO; +import cn.iocoder.yudao.module.system.dal.dataobject.notice.NoticeDO; import org.apache.ibatis.annotations.Mapper; @Mapper -public interface SysNoticeMapper extends BaseMapperX { +public interface SysNoticeMapper extends BaseMapperX { - default PageResult selectPage(SysNoticePageReqVO reqVO) { - return selectPage(reqVO, new QueryWrapperX() + default PageResult selectPage(NoticePageReqVO reqVO) { + return selectPage(reqVO, new QueryWrapperX() .likeIfPresent("title", reqVO.getTitle()) .eqIfPresent("status", reqVO.getStatus())); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/permission/SysMenuMapper.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/permission/SysMenuMapper.java index 605937fa4..1cce445b2 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/permission/SysMenuMapper.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/permission/SysMenuMapper.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.system.dal.mysql.permission; import cn.iocoder.yudao.framework.mybatis.core.enums.SqlConstants; -import cn.iocoder.yudao.module.system.controller.permission.vo.menu.SysMenuListReqVO; -import cn.iocoder.yudao.module.system.dal.dataobject.permission.SysMenuDO; +import cn.iocoder.yudao.module.system.controller.admin.permission.vo.menu.MenuListReqVO; +import cn.iocoder.yudao.module.system.dal.dataobject.permission.MenuDO; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; @@ -12,25 +12,25 @@ import java.util.Date; import java.util.List; @Mapper -public interface SysMenuMapper extends BaseMapperX { +public interface SysMenuMapper extends BaseMapperX { - default SysMenuDO selectByParentIdAndName(Long parentId, String name) { - return selectOne(new LambdaQueryWrapper().eq(SysMenuDO::getParentId, parentId) - .eq(SysMenuDO::getName, name)); + default MenuDO selectByParentIdAndName(Long parentId, String name) { + return selectOne(new LambdaQueryWrapper().eq(MenuDO::getParentId, parentId) + .eq(MenuDO::getName, name)); } default Integer selectCountByParentId(Long parentId) { - return selectCount(SysMenuDO::getParentId, parentId); + return selectCount(MenuDO::getParentId, parentId); } - default List selectList(SysMenuListReqVO reqVO) { - return selectList(new LambdaQueryWrapperX().likeIfPresent(SysMenuDO::getName, reqVO.getName()) - .eqIfPresent(SysMenuDO::getStatus, reqVO.getStatus())); + default List selectList(MenuListReqVO reqVO) { + return selectList(new LambdaQueryWrapperX().likeIfPresent(MenuDO::getName, reqVO.getName()) + .eqIfPresent(MenuDO::getStatus, reqVO.getStatus())); } default boolean selectExistsByUpdateTimeAfter(Date maxUpdateTime) { - return selectOne(new LambdaQueryWrapper().select(SysMenuDO::getId) - .gt(SysMenuDO::getUpdateTime, maxUpdateTime).last(SqlConstants.LIMIT1)) != null; + return selectOne(new LambdaQueryWrapper().select(MenuDO::getId) + .gt(MenuDO::getUpdateTime, maxUpdateTime).last(SqlConstants.LIMIT1)) != null; } } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/permission/SysRoleMapper.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/permission/SysRoleMapper.java index 16641f8c3..45af3afad 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/permission/SysRoleMapper.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/permission/SysRoleMapper.java @@ -3,8 +3,8 @@ package cn.iocoder.yudao.module.system.dal.mysql.permission; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; -import cn.iocoder.yudao.module.system.controller.permission.vo.role.SysRoleExportReqVO; -import cn.iocoder.yudao.module.system.controller.permission.vo.role.SysRolePageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.permission.vo.role.RoleExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.permission.vo.role.RolePageReqVO; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.permission.SysRoleDO; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import org.apache.ibatis.annotations.Mapper; @@ -17,14 +17,14 @@ import java.util.List; @Mapper public interface SysRoleMapper extends BaseMapperX { - default PageResult selectPage(SysRolePageReqVO reqVO) { + default PageResult selectPage(RolePageReqVO reqVO) { return selectPage(reqVO, new QueryWrapperX().likeIfPresent("name", reqVO.getName()) .likeIfPresent("code", reqVO.getCode()) .eqIfPresent("status", reqVO.getStatus()) .betweenIfPresent("create_time", reqVO.getBeginTime(), reqVO.getEndTime())); } - default List listRoles(SysRoleExportReqVO reqVO) { + default List listRoles(RoleExportReqVO reqVO) { return selectList(new QueryWrapperX().likeIfPresent("name", reqVO.getName()) .likeIfPresent("code", reqVO.getCode()) .eqIfPresent("status", reqVO.getStatus()) diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/permission/SysRoleMenuMapper.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/permission/SysRoleMenuMapper.java index ac806927d..478729438 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/permission/SysRoleMenuMapper.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/permission/SysRoleMenuMapper.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.dal.mysql.permission; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; -import cn.iocoder.yudao.module.system.dal.dataobject.permission.SysRoleMenuDO; +import cn.iocoder.yudao.module.system.dal.dataobject.permission.RoleMenuDO; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Select; @@ -12,15 +12,15 @@ import java.util.List; import java.util.stream.Collectors; @Mapper -public interface SysRoleMenuMapper extends BaseMapperX { +public interface SysRoleMenuMapper extends BaseMapperX { - default List selectListByRoleId(Long roleId) { - return selectList(new QueryWrapper().eq("role_id", roleId)); + default List selectListByRoleId(Long roleId) { + return selectList(new QueryWrapper().eq("role_id", roleId)); } default void insertList(Long roleId, Collection menuIds) { - List list = menuIds.stream().map(menuId -> { - SysRoleMenuDO entity = new SysRoleMenuDO(); + List list = menuIds.stream().map(menuId -> { + RoleMenuDO entity = new RoleMenuDO(); entity.setRoleId(roleId); entity.setMenuId(menuId); return entity; @@ -30,16 +30,16 @@ public interface SysRoleMenuMapper extends BaseMapperX { } default void deleteListByRoleIdAndMenuIds(Long roleId, Collection menuIds) { - delete(new QueryWrapper().eq("role_id", roleId) + delete(new QueryWrapper().eq("role_id", roleId) .in("menu_id", menuIds)); } default void deleteListByMenuId(Long menuId) { - delete(new QueryWrapper().eq("menu_id", menuId)); + delete(new QueryWrapper().eq("menu_id", menuId)); } default void deleteListByRoleId(Long roleId) { - delete(new QueryWrapper().eq("role_id", roleId)); + delete(new QueryWrapper().eq("role_id", roleId)); } @Select("SELECT id FROM sys_role_menu WHERE update_time > #{maxUpdateTime} LIMIT 1") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/sms/SysSmsChannelMapper.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/sms/SysSmsChannelMapper.java index 5f6b0bb3e..8d183fcb9 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/sms/SysSmsChannelMapper.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/sms/SysSmsChannelMapper.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.dal.mysql.sms; -import cn.iocoder.yudao.module.system.controller.sms.vo.channel.SysSmsChannelPageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel.SmsChannelPageReqVO; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.sms.SysSmsChannelDO; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; @@ -13,7 +13,7 @@ import java.util.Date; @Mapper public interface SysSmsChannelMapper extends BaseMapperX { - default PageResult selectPage(SysSmsChannelPageReqVO reqVO) { + default PageResult selectPage(SmsChannelPageReqVO reqVO) { return selectPage(reqVO, new QueryWrapperX() .likeIfPresent("signature", reqVO.getSignature()) .eqIfPresent("status", reqVO.getStatus()) diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/sms/SysSmsLogMapper.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/sms/SysSmsLogMapper.java index e0a1039aa..ffed02912 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/sms/SysSmsLogMapper.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/sms/SysSmsLogMapper.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.dal.mysql.sms; -import cn.iocoder.yudao.module.system.controller.sms.vo.log.SysSmsLogExportReqVO; -import cn.iocoder.yudao.module.system.controller.sms.vo.log.SysSmsLogPageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.log.SmsLogExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.log.SmsLogPageReqVO; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.sms.SysSmsLogDO; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; @@ -13,7 +13,7 @@ import java.util.List; @Mapper public interface SysSmsLogMapper extends BaseMapperX { - default PageResult selectPage(SysSmsLogPageReqVO reqVO) { + default PageResult selectPage(SmsLogPageReqVO reqVO) { return selectPage(reqVO, new QueryWrapperX() .eqIfPresent("channel_id", reqVO.getChannelId()) .eqIfPresent("template_id", reqVO.getTemplateId()) @@ -25,7 +25,7 @@ public interface SysSmsLogMapper extends BaseMapperX { .orderByDesc("id")); } - default List selectList(SysSmsLogExportReqVO reqVO) { + default List selectList(SmsLogExportReqVO reqVO) { return selectList(new QueryWrapperX() .eqIfPresent("channel_id", reqVO.getChannelId()) .eqIfPresent("template_id", reqVO.getTemplateId()) diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/sms/SysSmsTemplateMapper.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/sms/SysSmsTemplateMapper.java index f1deda053..a2559bd47 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/sms/SysSmsTemplateMapper.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/sms/SysSmsTemplateMapper.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.dal.mysql.sms; -import cn.iocoder.yudao.module.system.controller.sms.vo.template.SysSmsTemplateExportReqVO; -import cn.iocoder.yudao.module.system.controller.sms.vo.template.SysSmsTemplatePageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.template.SmsTemplateExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.template.SmsTemplatePageReqVO; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.sms.SysSmsTemplateDO; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; @@ -18,7 +18,7 @@ public interface SysSmsTemplateMapper extends BaseMapperX { } // TODO 这种参数都一样的得想办法封装一下 - default PageResult selectPage(SysSmsTemplatePageReqVO reqVO) { + default PageResult selectPage(SmsTemplatePageReqVO reqVO) { return selectPage(reqVO, new LambdaQueryWrapperX() .eqIfPresent(SysSmsTemplateDO::getType, reqVO.getType()) .eqIfPresent(SysSmsTemplateDO::getStatus, reqVO.getStatus()) @@ -30,7 +30,7 @@ public interface SysSmsTemplateMapper extends BaseMapperX { .orderByDesc(SysSmsTemplateDO::getId)); } - default List selectList(SysSmsTemplateExportReqVO reqVO) { + default List selectList(SmsTemplateExportReqVO reqVO) { return selectList(new LambdaQueryWrapperX() .eqIfPresent(SysSmsTemplateDO::getType, reqVO.getType()) .eqIfPresent(SysSmsTemplateDO::getStatus, reqVO.getStatus()) diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/tenant/SysTenantMapper.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/tenant/SysTenantMapper.java index dc7d27d21..d92f660f9 100755 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/tenant/SysTenantMapper.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/tenant/SysTenantMapper.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.dal.mysql.tenant; -import cn.iocoder.yudao.module.system.controller.tenant.vo.SysTenantExportReqVO; -import cn.iocoder.yudao.module.system.controller.tenant.vo.SysTenantPageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.tenant.vo.TenantExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.tenant.vo.TenantPageReqVO; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.tenant.SysTenantDO; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; @@ -18,7 +18,7 @@ import java.util.List; @Mapper public interface SysTenantMapper extends BaseMapperX { - default PageResult selectPage(SysTenantPageReqVO reqVO) { + default PageResult selectPage(TenantPageReqVO reqVO) { return selectPage(reqVO, new LambdaQueryWrapperX() .likeIfPresent(SysTenantDO::getName, reqVO.getName()) .likeIfPresent(SysTenantDO::getContactName, reqVO.getContactName()) @@ -28,7 +28,7 @@ public interface SysTenantMapper extends BaseMapperX { .orderByDesc(SysTenantDO::getId)); } - default List selectList(SysTenantExportReqVO reqVO) { + default List selectList(TenantExportReqVO reqVO) { return selectList(new LambdaQueryWrapperX() .likeIfPresent(SysTenantDO::getName, reqVO.getName()) .likeIfPresent(SysTenantDO::getContactName, reqVO.getContactName()) diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/user/SysUserMapper.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/user/SysUserMapper.java index f954cd3cf..1d7eb74bf 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/user/SysUserMapper.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/user/SysUserMapper.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.dal.mysql.user; -import cn.iocoder.yudao.module.system.controller.user.vo.user.SysUserExportReqVO; -import cn.iocoder.yudao.module.system.controller.user.vo.user.SysUserPageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserPageReqVO; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.user.SysUserDO; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.PageResult; @@ -30,7 +30,7 @@ public interface SysUserMapper extends BaseMapperX { return selectOne(new LambdaQueryWrapper().eq(SysUserDO::getMobile, mobile)); } - default PageResult selectPage(SysUserPageReqVO reqVO, Collection deptIds) { + default PageResult selectPage(UserPageReqVO reqVO, Collection deptIds) { return selectPage(reqVO, new LambdaQueryWrapperX() .likeIfPresent(SysUserDO::getUsername, reqVO.getUsername()) .likeIfPresent(SysUserDO::getMobile, reqVO.getMobile()) @@ -39,7 +39,7 @@ public interface SysUserMapper extends BaseMapperX { .inIfPresent(SysUserDO::getDeptId, deptIds)); } - default List selectList(SysUserExportReqVO reqVO, Collection deptIds) { + default List selectList(UserExportReqVO reqVO, Collection deptIds) { return selectList(new LambdaQueryWrapperX() .likeIfPresent(SysUserDO::getUsername, reqVO.getUsername()) .likeIfPresent(SysUserDO::getMobile, reqVO.getMobile()) diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/redis/SysRedisKeyConstants.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/redis/SysRedisKeyConstants.java index 33fa08e7e..16baa4638 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/redis/SysRedisKeyConstants.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/redis/SysRedisKeyConstants.java @@ -14,6 +14,5 @@ public interface SysRedisKeyConstants { RedisKeyDefine CAPTCHA_CODE = new RedisKeyDefine("验证码的缓存", "captcha_code:%s", // 参数为 uuid STRING, String.class, RedisKeyDefine.TimeoutTypeEnum.DYNAMIC); - - + } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/redis/common/SysCaptchaRedisDAO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/redis/common/CaptchaRedisDAO.java similarity index 96% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/redis/common/SysCaptchaRedisDAO.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/redis/common/CaptchaRedisDAO.java index 9a2609561..1c83a7c5c 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/redis/common/SysCaptchaRedisDAO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/redis/common/CaptchaRedisDAO.java @@ -14,7 +14,7 @@ import static cn.iocoder.yudao.module.system.dal.redis.SysRedisKeyConstants.CAPT * @author 芋道源码 */ @Repository -public class SysCaptchaRedisDAO { +public class CaptchaRedisDAO { @Resource private StringRedisTemplate stringRedisTemplate; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/enums/SysErrorCodeConstants.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/enums/ErrorCodeConstants.java similarity index 99% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/enums/SysErrorCodeConstants.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/enums/ErrorCodeConstants.java index 566f835d5..15b6803a2 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/enums/SysErrorCodeConstants.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/enums/ErrorCodeConstants.java @@ -7,7 +7,7 @@ import cn.iocoder.yudao.framework.common.exception.ErrorCode; * * system 系统,使用 1-002-000-000 段 */ -public interface SysErrorCodeConstants { +public interface ErrorCodeConstants { // ========== AUTH 模块 1002000000 ========== ErrorCode AUTH_LOGIN_BAD_CREDENTIALS = new ErrorCode(1002000000, "登录失败,账号密码不正确"); diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/enums/errorcode/SysErrorCodeTypeEnum.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/enums/errorcode/ErrorCodeTypeEnum.java similarity index 84% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/enums/errorcode/SysErrorCodeTypeEnum.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/enums/errorcode/ErrorCodeTypeEnum.java index beb2e2b3e..97349e763 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/enums/errorcode/SysErrorCodeTypeEnum.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/enums/errorcode/ErrorCodeTypeEnum.java @@ -13,7 +13,7 @@ import java.util.Arrays; */ @AllArgsConstructor @Getter -public enum SysErrorCodeTypeEnum implements IntArrayValuable { +public enum ErrorCodeTypeEnum implements IntArrayValuable { /** * 自动生成 @@ -24,7 +24,7 @@ public enum SysErrorCodeTypeEnum implements IntArrayValuable { */ MANUAL_OPERATION(2); - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(SysErrorCodeTypeEnum::getType).toArray(); + public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(ErrorCodeTypeEnum::getType).toArray(); /** * 类型 diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/enums/logger/SysLoginLogTypeEnum.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/enums/logger/LoginLogTypeEnum.java similarity index 94% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/enums/logger/SysLoginLogTypeEnum.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/enums/logger/LoginLogTypeEnum.java index ff29ab558..2f845fd10 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/enums/logger/SysLoginLogTypeEnum.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/enums/logger/LoginLogTypeEnum.java @@ -8,7 +8,7 @@ import lombok.Getter; */ @Getter @AllArgsConstructor -public enum SysLoginLogTypeEnum { +public enum LoginLogTypeEnum { LOGIN_USERNAME(100), // 使用账号登录 LOGIN_SOCIAL(101), // 使用社交登录 diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/enums/logger/SysLoginResultEnum.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/enums/logger/LoginResultEnum.java similarity index 94% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/enums/logger/SysLoginResultEnum.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/enums/logger/LoginResultEnum.java index f1c8356ff..7084e13da 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/enums/logger/SysLoginResultEnum.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/enums/logger/LoginResultEnum.java @@ -8,7 +8,7 @@ import lombok.Getter; */ @Getter @AllArgsConstructor -public enum SysLoginResultEnum { +public enum LoginResultEnum { SUCCESS(0), // 成功 BAD_CREDENTIALS(10), // 账号或密码不正确 diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/enums/notice/SysNoticeTypeEnum.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/enums/notice/NoticeTypeEnum.java similarity index 90% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/enums/notice/SysNoticeTypeEnum.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/enums/notice/NoticeTypeEnum.java index c543f1cb5..9a2a3c462 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/enums/notice/SysNoticeTypeEnum.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/enums/notice/NoticeTypeEnum.java @@ -10,7 +10,7 @@ import lombok.Getter; */ @Getter @AllArgsConstructor -public enum SysNoticeTypeEnum { +public enum NoticeTypeEnum { NOTICE(1), ANNOUNCEMENT(2); diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/enums/permission/SysRoleTypeEnum.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/enums/permission/RoleTypeEnum.java similarity index 90% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/enums/permission/SysRoleTypeEnum.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/enums/permission/RoleTypeEnum.java index 426c5cdb5..1607b20b3 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/enums/permission/SysRoleTypeEnum.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/enums/permission/RoleTypeEnum.java @@ -5,7 +5,7 @@ import lombok.Getter; @Getter @AllArgsConstructor -public enum SysRoleTypeEnum { +public enum RoleTypeEnum { /** * 内置角色 diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/framework/datapermission/config/SysDataPermissionConfiguration.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/framework/datapermission/config/DataPermissionConfiguration.java similarity index 90% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/framework/datapermission/config/SysDataPermissionConfiguration.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/framework/datapermission/config/DataPermissionConfiguration.java index 0b0402956..cd67fdc82 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/framework/datapermission/config/SysDataPermissionConfiguration.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/framework/datapermission/config/DataPermissionConfiguration.java @@ -11,8 +11,8 @@ import org.springframework.context.annotation.Configuration; * * @author 芋道源码 */ -@Configuration -public class SysDataPermissionConfiguration { +@Configuration(proxyBeanMethods = false) +public class DataPermissionConfiguration { @Bean public DeptDataPermissionRuleCustomizer sysDeptDataPermissionRuleCustomizer() { diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/framework/errorcode/config/ErrorCodeConfiguration.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/framework/errorcode/config/ErrorCodeConfiguration.java index e86d40b4e..4c72ccec7 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/framework/errorcode/config/ErrorCodeConfiguration.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/framework/errorcode/config/ErrorCodeConfiguration.java @@ -11,6 +11,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.scheduling.annotation.EnableScheduling; +// TODO 芋艿:貌似放的位置有问题 /** * 错误码配置类 */ diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/job/auth/SysUserSessionTimeoutJob.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/job/auth/UserSessionTimeoutJob.java similarity index 78% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/job/auth/SysUserSessionTimeoutJob.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/job/auth/UserSessionTimeoutJob.java index c8c719f18..d1a061d3e 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/job/auth/SysUserSessionTimeoutJob.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/job/auth/UserSessionTimeoutJob.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.job.auth; import cn.iocoder.yudao.framework.quartz.core.handler.JobHandler; -import cn.iocoder.yudao.module.system.service.auth.SysUserSessionService; +import cn.iocoder.yudao.module.system.service.auth.UserSessionService; import cn.iocoder.yudao.framework.tenant.core.job.TenantJob; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; @@ -16,10 +16,10 @@ import javax.annotation.Resource; @Component @TenantJob @Slf4j -public class SysUserSessionTimeoutJob implements JobHandler { +public class UserSessionTimeoutJob implements JobHandler { @Resource - private SysUserSessionService sysUserSessionService; + private UserSessionService sysUserSessionService; @Override public String execute(String param) throws Exception { diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/dept/SysDeptRefreshConsumer.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/dept/DeptRefreshConsumer.java similarity index 53% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/dept/SysDeptRefreshConsumer.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/dept/DeptRefreshConsumer.java index dd9bd6420..981244d90 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/dept/SysDeptRefreshConsumer.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/dept/DeptRefreshConsumer.java @@ -1,27 +1,27 @@ package cn.iocoder.yudao.module.system.mq.consumer.dept; import cn.iocoder.yudao.framework.mq.core.pubsub.AbstractChannelMessageListener; -import cn.iocoder.yudao.module.system.mq.message.dept.SysDeptRefreshMessage; -import cn.iocoder.yudao.module.system.service.dept.SysDeptService; +import cn.iocoder.yudao.module.system.mq.message.dept.DeptRefreshMessage; +import cn.iocoder.yudao.module.system.service.dept.DeptService; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; import javax.annotation.Resource; /** - * 针对 {@link SysDeptRefreshMessage} 的消费者 + * 针对 {@link DeptRefreshMessage} 的消费者 * * @author 芋道源码 */ @Component @Slf4j -public class SysDeptRefreshConsumer extends AbstractChannelMessageListener { +public class DeptRefreshConsumer extends AbstractChannelMessageListener { @Resource - private SysDeptService deptService; + private DeptService deptService; @Override - public void onMessage(SysDeptRefreshMessage message) { + public void onMessage(DeptRefreshMessage message) { log.info("[onMessage][收到 Dept 刷新消息]"); deptService.initLocalCache(); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/dict/SysDictDataRefreshConsumer.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/dict/DictDataRefreshConsumer.java similarity index 66% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/dict/SysDictDataRefreshConsumer.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/dict/DictDataRefreshConsumer.java index ad14b7bfd..6fe1c7c6a 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/dict/SysDictDataRefreshConsumer.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/dict/DictDataRefreshConsumer.java @@ -2,26 +2,26 @@ package cn.iocoder.yudao.module.system.mq.consumer.dict; import cn.iocoder.yudao.coreservice.modules.system.service.dict.SysDictDataCoreService; import cn.iocoder.yudao.framework.mq.core.pubsub.AbstractChannelMessageListener; -import cn.iocoder.yudao.module.system.mq.message.dict.SysDictDataRefreshMessage; +import cn.iocoder.yudao.module.system.mq.message.dict.DictDataRefreshMessage; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; import javax.annotation.Resource; /** - * 针对 {@link SysDictDataRefreshMessage} 的消费者 + * 针对 {@link DictDataRefreshMessage} 的消费者 * * @author 芋道源码 */ @Component @Slf4j -public class SysDictDataRefreshConsumer extends AbstractChannelMessageListener { +public class DictDataRefreshConsumer extends AbstractChannelMessageListener { @Resource private SysDictDataCoreService dictDataCoreService; @Override - public void onMessage(SysDictDataRefreshMessage message) { + public void onMessage(DictDataRefreshMessage message) { log.info("[onMessage][收到 DictData 刷新消息]"); dictDataCoreService.initLocalCache(); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/mail/SysMailSendConsumer.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/mail/MailSendConsumer.java similarity index 56% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/mail/SysMailSendConsumer.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/mail/MailSendConsumer.java index 10b12ce0d..4b02f760e 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/mail/SysMailSendConsumer.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/mail/MailSendConsumer.java @@ -1,16 +1,17 @@ package cn.iocoder.yudao.module.system.mq.consumer.mail; import cn.iocoder.yudao.framework.mq.core.stream.AbstractStreamMessageListener; -import cn.iocoder.yudao.module.system.mq.message.mail.SysMailSendMessage; +import cn.iocoder.yudao.module.system.mq.message.mail.MailSendMessage; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; +// TODO 芋艿:这个暂未实现 @Component @Slf4j -public class SysMailSendConsumer extends AbstractStreamMessageListener { +public class MailSendConsumer extends AbstractStreamMessageListener { @Override - public void onMessage(SysMailSendMessage message) { + public void onMessage(MailSendMessage message) { log.info("[onMessage][消息内容({})]", message); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/permission/SysMenuRefreshConsumer.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/permission/MenuRefreshConsumer.java similarity index 52% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/permission/SysMenuRefreshConsumer.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/permission/MenuRefreshConsumer.java index 4630fef84..a4b633512 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/permission/SysMenuRefreshConsumer.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/permission/MenuRefreshConsumer.java @@ -1,27 +1,27 @@ package cn.iocoder.yudao.module.system.mq.consumer.permission; import cn.iocoder.yudao.framework.mq.core.pubsub.AbstractChannelMessageListener; -import cn.iocoder.yudao.module.system.mq.message.permission.SysMenuRefreshMessage; -import cn.iocoder.yudao.module.system.service.permission.SysMenuService; +import cn.iocoder.yudao.module.system.mq.message.permission.MenuRefreshMessage; +import cn.iocoder.yudao.module.system.service.permission.MenuService; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; import javax.annotation.Resource; /** - * 针对 {@link SysMenuRefreshMessage} 的消费者 + * 针对 {@link MenuRefreshMessage} 的消费者 * * @author 芋道源码 */ @Component @Slf4j -public class SysMenuRefreshConsumer extends AbstractChannelMessageListener { +public class MenuRefreshConsumer extends AbstractChannelMessageListener { @Resource - private SysMenuService menuService; + private MenuService menuService; @Override - public void onMessage(SysMenuRefreshMessage message) { + public void onMessage(MenuRefreshMessage message) { log.info("[onMessage][收到 Menu 刷新消息]"); menuService.initLocalCache(); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/permission/SysRoleMenuRefreshConsumer.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/permission/RoleMenuRefreshConsumer.java similarity index 51% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/permission/SysRoleMenuRefreshConsumer.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/permission/RoleMenuRefreshConsumer.java index 961ee83ee..d9f0e9220 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/permission/SysRoleMenuRefreshConsumer.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/permission/RoleMenuRefreshConsumer.java @@ -1,27 +1,27 @@ package cn.iocoder.yudao.module.system.mq.consumer.permission; import cn.iocoder.yudao.framework.mq.core.pubsub.AbstractChannelMessageListener; -import cn.iocoder.yudao.module.system.mq.message.permission.SysRoleMenuRefreshMessage; -import cn.iocoder.yudao.module.system.service.permission.SysPermissionService; +import cn.iocoder.yudao.module.system.mq.message.permission.RoleMenuRefreshMessage; +import cn.iocoder.yudao.module.system.service.permission.PermissionService; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; import javax.annotation.Resource; /** - * 针对 {@link SysRoleMenuRefreshMessage} 的消费者 + * 针对 {@link RoleMenuRefreshMessage} 的消费者 * * @author 芋道源码 */ @Component @Slf4j -public class SysRoleMenuRefreshConsumer extends AbstractChannelMessageListener { +public class RoleMenuRefreshConsumer extends AbstractChannelMessageListener { @Resource - private SysPermissionService permissionService; + private PermissionService permissionService; @Override - public void onMessage(SysRoleMenuRefreshMessage message) { + public void onMessage(RoleMenuRefreshMessage message) { log.info("[onMessage][收到 Role 与 Menu 的关联刷新消息]"); permissionService.initLocalCache(); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/permission/SysRoleRefreshConsumer.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/permission/RoleRefreshConsumer.java similarity index 52% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/permission/SysRoleRefreshConsumer.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/permission/RoleRefreshConsumer.java index 2ed56fe1d..bb53b7499 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/permission/SysRoleRefreshConsumer.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/permission/RoleRefreshConsumer.java @@ -1,27 +1,27 @@ package cn.iocoder.yudao.module.system.mq.consumer.permission; import cn.iocoder.yudao.framework.mq.core.pubsub.AbstractChannelMessageListener; -import cn.iocoder.yudao.module.system.mq.message.permission.SysRoleRefreshMessage; -import cn.iocoder.yudao.module.system.service.permission.SysRoleService; +import cn.iocoder.yudao.module.system.mq.message.permission.RoleRefreshMessage; +import cn.iocoder.yudao.module.system.service.permission.RoleService; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; import javax.annotation.Resource; /** - * 针对 {@link SysRoleRefreshMessage} 的消费者 + * 针对 {@link RoleRefreshMessage} 的消费者 * * @author 芋道源码 */ @Component @Slf4j -public class SysRoleRefreshConsumer extends AbstractChannelMessageListener { +public class RoleRefreshConsumer extends AbstractChannelMessageListener { @Resource - private SysRoleService roleService; + private RoleService roleService; @Override - public void onMessage(SysRoleRefreshMessage message) { + public void onMessage(RoleRefreshMessage message) { log.info("[onMessage][收到 Role 刷新消息]"); roleService.initLocalCache(); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/sms/SysSmsChannelRefreshConsumer.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/sms/SmsChannelRefreshConsumer.java similarity index 50% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/sms/SysSmsChannelRefreshConsumer.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/sms/SmsChannelRefreshConsumer.java index 11cbed107..cc5d83d1e 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/sms/SysSmsChannelRefreshConsumer.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/sms/SmsChannelRefreshConsumer.java @@ -1,27 +1,27 @@ package cn.iocoder.yudao.module.system.mq.consumer.sms; import cn.iocoder.yudao.framework.mq.core.pubsub.AbstractChannelMessageListener; -import cn.iocoder.yudao.module.system.mq.message.sms.SysSmsChannelRefreshMessage; -import cn.iocoder.yudao.module.system.service.sms.SysSmsChannelService; +import cn.iocoder.yudao.module.system.mq.message.sms.SmsChannelRefreshMessage; +import cn.iocoder.yudao.module.system.service.sms.SmsChannelService; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; import javax.annotation.Resource; /** - * 针对 {@link SysSmsChannelRefreshMessage} 的消费者 + * 针对 {@link SmsChannelRefreshMessage} 的消费者 * * @author 芋道源码 */ @Component @Slf4j -public class SysSmsChannelRefreshConsumer extends AbstractChannelMessageListener { +public class SmsChannelRefreshConsumer extends AbstractChannelMessageListener { @Resource - private SysSmsChannelService smsChannelService; + private SmsChannelService smsChannelService; @Override - public void onMessage(SysSmsChannelRefreshMessage message) { + public void onMessage(SmsChannelRefreshMessage message) { log.info("[onMessage][收到 SmsChannel 刷新消息]"); smsChannelService.initSmsClients(); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/sms/SysSmsSendConsumer.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/sms/SmsSendConsumer.java similarity index 89% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/sms/SysSmsSendConsumer.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/sms/SmsSendConsumer.java index feeeeefea..2239eecc1 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/sms/SysSmsSendConsumer.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/sms/SmsSendConsumer.java @@ -16,7 +16,7 @@ import javax.annotation.Resource; */ @Component @Slf4j -public class SysSmsSendConsumer extends AbstractStreamMessageListener { +public class SmsSendConsumer extends AbstractStreamMessageListener { @Resource private SysSmsCoreService smsCoreService; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/sms/SysSmsTemplateRefreshConsumer.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/sms/SmsTemplateRefreshConsumer.java similarity index 65% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/sms/SysSmsTemplateRefreshConsumer.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/sms/SmsTemplateRefreshConsumer.java index 36e2b4db4..52840189a 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/sms/SysSmsTemplateRefreshConsumer.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/sms/SmsTemplateRefreshConsumer.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.mq.consumer.sms; -import cn.iocoder.yudao.module.system.mq.message.sms.SysSmsTemplateRefreshMessage; +import cn.iocoder.yudao.module.system.mq.message.sms.SmsTemplateRefreshMessage; import cn.iocoder.yudao.coreservice.modules.system.service.sms.SysSmsTemplateCoreService; import cn.iocoder.yudao.framework.mq.core.pubsub.AbstractChannelMessageListener; import lombok.extern.slf4j.Slf4j; @@ -9,19 +9,19 @@ import org.springframework.stereotype.Component; import javax.annotation.Resource; /** - * 针对 {@link SysSmsTemplateRefreshMessage} 的消费者 + * 针对 {@link SmsTemplateRefreshMessage} 的消费者 * * @author 芋道源码 */ @Component @Slf4j -public class SysSmsTemplateRefreshConsumer extends AbstractChannelMessageListener { +public class SmsTemplateRefreshConsumer extends AbstractChannelMessageListener { @Resource private SysSmsTemplateCoreService smsTemplateCoreService; @Override - public void onMessage(SysSmsTemplateRefreshMessage message) { + public void onMessage(SmsTemplateRefreshMessage message) { log.info("[onMessage][收到 SmsTemplate 刷新消息]"); smsTemplateCoreService.initLocalCache(); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/dept/SysDeptRefreshMessage.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/dept/DeptRefreshMessage.java similarity index 85% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/dept/SysDeptRefreshMessage.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/dept/DeptRefreshMessage.java index 4403a28dc..80d3c8c39 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/dept/SysDeptRefreshMessage.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/dept/DeptRefreshMessage.java @@ -11,7 +11,7 @@ import lombok.EqualsAndHashCode; */ @Data @EqualsAndHashCode(callSuper = true) -public class SysDeptRefreshMessage extends AbstractChannelMessage { +public class DeptRefreshMessage extends AbstractChannelMessage { @Override public String getChannel() { diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/dict/SysDictDataRefreshMessage.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/dict/DictDataRefreshMessage.java similarity index 83% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/dict/SysDictDataRefreshMessage.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/dict/DictDataRefreshMessage.java index 7d919dd1f..01e5b8605 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/dict/SysDictDataRefreshMessage.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/dict/DictDataRefreshMessage.java @@ -9,7 +9,7 @@ import lombok.EqualsAndHashCode; */ @Data @EqualsAndHashCode(callSuper = true) -public class SysDictDataRefreshMessage extends AbstractChannelMessage { +public class DictDataRefreshMessage extends AbstractChannelMessage { @Override public String getChannel() { diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/mail/SysMailSendMessage.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/mail/MailSendMessage.java similarity index 93% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/mail/SysMailSendMessage.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/mail/MailSendMessage.java index e511b32ad..aee02c76e 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/mail/SysMailSendMessage.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/mail/MailSendMessage.java @@ -14,7 +14,7 @@ import java.util.Map; */ @Data @EqualsAndHashCode(callSuper = true) -public class SysMailSendMessage extends AbstractStreamMessage { +public class MailSendMessage extends AbstractStreamMessage { /** * 邮箱地址 diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/permission/SysMenuRefreshMessage.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/permission/MenuRefreshMessage.java similarity index 85% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/permission/SysMenuRefreshMessage.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/permission/MenuRefreshMessage.java index d829f706a..abd75dbaa 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/permission/SysMenuRefreshMessage.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/permission/MenuRefreshMessage.java @@ -11,7 +11,7 @@ import lombok.EqualsAndHashCode; */ @Data @EqualsAndHashCode(callSuper = true) -public class SysMenuRefreshMessage extends AbstractChannelMessage { +public class MenuRefreshMessage extends AbstractChannelMessage { @Override public String getChannel() { diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/permission/SysRoleMenuRefreshMessage.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/permission/RoleMenuRefreshMessage.java similarity index 84% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/permission/SysRoleMenuRefreshMessage.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/permission/RoleMenuRefreshMessage.java index 1cfd0e814..0982775bc 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/permission/SysRoleMenuRefreshMessage.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/permission/RoleMenuRefreshMessage.java @@ -11,7 +11,7 @@ import lombok.EqualsAndHashCode; */ @Data @EqualsAndHashCode(callSuper = true) -public class SysRoleMenuRefreshMessage extends AbstractChannelMessage { +public class RoleMenuRefreshMessage extends AbstractChannelMessage { @Override public String getChannel() { diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/permission/SysRoleRefreshMessage.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/permission/RoleRefreshMessage.java similarity index 85% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/permission/SysRoleRefreshMessage.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/permission/RoleRefreshMessage.java index 9ad25c627..e80d8f30c 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/permission/SysRoleRefreshMessage.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/permission/RoleRefreshMessage.java @@ -11,7 +11,7 @@ import lombok.EqualsAndHashCode; */ @Data @EqualsAndHashCode(callSuper = true) -public class SysRoleRefreshMessage extends AbstractChannelMessage { +public class RoleRefreshMessage extends AbstractChannelMessage { @Override public String getChannel() { diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/sms/SysSmsChannelRefreshMessage.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/sms/SmsChannelRefreshMessage.java similarity index 84% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/sms/SysSmsChannelRefreshMessage.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/sms/SmsChannelRefreshMessage.java index 296df410b..0841cdee0 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/sms/SysSmsChannelRefreshMessage.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/sms/SmsChannelRefreshMessage.java @@ -11,7 +11,7 @@ import lombok.EqualsAndHashCode; */ @Data @EqualsAndHashCode(callSuper = true) -public class SysSmsChannelRefreshMessage extends AbstractChannelMessage { +public class SmsChannelRefreshMessage extends AbstractChannelMessage { @Override public String getChannel() { diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/sms/SysSmsTemplateRefreshMessage.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/sms/SmsTemplateRefreshMessage.java similarity index 84% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/sms/SysSmsTemplateRefreshMessage.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/sms/SmsTemplateRefreshMessage.java index 955af3ed8..4873c06c4 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/sms/SysSmsTemplateRefreshMessage.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/message/sms/SmsTemplateRefreshMessage.java @@ -11,7 +11,7 @@ import lombok.EqualsAndHashCode; */ @Data @EqualsAndHashCode(callSuper = true) -public class SysSmsTemplateRefreshMessage extends AbstractChannelMessage { +public class SmsTemplateRefreshMessage extends AbstractChannelMessage { @Override public String getChannel() { diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/producer/dept/SysDeptProducer.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/producer/dept/DeptProducer.java similarity index 65% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/producer/dept/SysDeptProducer.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/producer/dept/DeptProducer.java index b4f9dace2..9a2ca1b9c 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/producer/dept/SysDeptProducer.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/producer/dept/DeptProducer.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.mq.producer.dept; -import cn.iocoder.yudao.module.system.mq.message.dept.SysDeptRefreshMessage; +import cn.iocoder.yudao.module.system.mq.message.dept.DeptRefreshMessage; import cn.iocoder.yudao.framework.mq.core.RedisMQTemplate; import org.springframework.stereotype.Component; @@ -10,16 +10,16 @@ import javax.annotation.Resource; * Dept 部门相关消息的 Producer */ @Component -public class SysDeptProducer { +public class DeptProducer { @Resource private RedisMQTemplate redisMQTemplate; /** - * 发送 {@link SysDeptRefreshMessage} 消息 + * 发送 {@link DeptRefreshMessage} 消息 */ public void sendDeptRefreshMessage() { - SysDeptRefreshMessage message = new SysDeptRefreshMessage(); + DeptRefreshMessage message = new DeptRefreshMessage(); redisMQTemplate.send(message); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/producer/dict/SysDictDataProducer.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/producer/dict/DictDataProducer.java similarity index 64% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/producer/dict/SysDictDataProducer.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/producer/dict/DictDataProducer.java index 165de3372..fa90c8c42 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/producer/dict/SysDictDataProducer.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/producer/dict/DictDataProducer.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.mq.producer.dict; -import cn.iocoder.yudao.module.system.mq.message.dict.SysDictDataRefreshMessage; +import cn.iocoder.yudao.module.system.mq.message.dict.DictDataRefreshMessage; import cn.iocoder.yudao.framework.mq.core.RedisMQTemplate; import org.springframework.stereotype.Component; @@ -10,16 +10,16 @@ import javax.annotation.Resource; * DictData 字典数据相关消息的 Producer */ @Component -public class SysDictDataProducer { +public class DictDataProducer { @Resource private RedisMQTemplate redisMQTemplate; /** - * 发送 {@link SysDictDataRefreshMessage} 消息 + * 发送 {@link DictDataRefreshMessage} 消息 */ public void sendDictDataRefreshMessage() { - SysDictDataRefreshMessage message = new SysDictDataRefreshMessage(); + DictDataRefreshMessage message = new DictDataRefreshMessage(); redisMQTemplate.send(message); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/producer/permission/SysMenuProducer.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/producer/permission/MenuProducer.java similarity index 64% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/producer/permission/SysMenuProducer.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/producer/permission/MenuProducer.java index d035824f2..5764c872a 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/producer/permission/SysMenuProducer.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/producer/permission/MenuProducer.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.mq.producer.permission; -import cn.iocoder.yudao.module.system.mq.message.permission.SysMenuRefreshMessage; +import cn.iocoder.yudao.module.system.mq.message.permission.MenuRefreshMessage; import cn.iocoder.yudao.framework.mq.core.RedisMQTemplate; import org.springframework.stereotype.Component; @@ -10,16 +10,16 @@ import javax.annotation.Resource; * Menu 菜单相关消息的 Producer */ @Component -public class SysMenuProducer { +public class MenuProducer { @Resource private RedisMQTemplate redisMQTemplate; /** - * 发送 {@link SysMenuRefreshMessage} 消息 + * 发送 {@link MenuRefreshMessage} 消息 */ public void sendMenuRefreshMessage() { - SysMenuRefreshMessage message = new SysMenuRefreshMessage(); + MenuRefreshMessage message = new MenuRefreshMessage(); redisMQTemplate.send(message); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/producer/permission/SysPermissionProducer.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/producer/permission/PermissionProducer.java similarity index 63% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/producer/permission/SysPermissionProducer.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/producer/permission/PermissionProducer.java index ca5141d84..56c8e3179 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/producer/permission/SysPermissionProducer.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/producer/permission/PermissionProducer.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.mq.producer.permission; -import cn.iocoder.yudao.module.system.mq.message.permission.SysRoleMenuRefreshMessage; +import cn.iocoder.yudao.module.system.mq.message.permission.RoleMenuRefreshMessage; import cn.iocoder.yudao.framework.mq.core.RedisMQTemplate; import org.springframework.stereotype.Component; @@ -10,16 +10,16 @@ import javax.annotation.Resource; * Permission 权限相关消息的 Producer */ @Component -public class SysPermissionProducer { +public class PermissionProducer { @Resource private RedisMQTemplate redisMQTemplate; /** - * 发送 {@link SysRoleMenuRefreshMessage} 消息 + * 发送 {@link RoleMenuRefreshMessage} 消息 */ public void sendRoleMenuRefreshMessage() { - SysRoleMenuRefreshMessage message = new SysRoleMenuRefreshMessage(); + RoleMenuRefreshMessage message = new RoleMenuRefreshMessage(); redisMQTemplate.send(message); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/producer/permission/SysRoleProducer.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/producer/permission/RoleProducer.java similarity index 66% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/producer/permission/SysRoleProducer.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/producer/permission/RoleProducer.java index 1fb1be9f6..c249d964e 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/producer/permission/SysRoleProducer.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/producer/permission/RoleProducer.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.mq.producer.permission; -import cn.iocoder.yudao.module.system.mq.message.permission.SysRoleRefreshMessage; +import cn.iocoder.yudao.module.system.mq.message.permission.RoleRefreshMessage; import cn.iocoder.yudao.framework.mq.core.RedisMQTemplate; import org.springframework.stereotype.Component; @@ -12,16 +12,16 @@ import javax.annotation.Resource; * @author 芋道源码 */ @Component -public class SysRoleProducer { +public class RoleProducer { @Resource private RedisMQTemplate redisMQTemplate; /** - * 发送 {@link SysRoleRefreshMessage} 消息 + * 发送 {@link RoleRefreshMessage} 消息 */ public void sendRoleRefreshMessage() { - SysRoleRefreshMessage message = new SysRoleRefreshMessage(); + RoleRefreshMessage message = new RoleRefreshMessage(); redisMQTemplate.send(message); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/producer/sms/SysSmsProducer.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/producer/sms/SmsProducer.java similarity index 56% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/producer/sms/SysSmsProducer.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/producer/sms/SmsProducer.java index abd343a48..117e666b9 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/producer/sms/SysSmsProducer.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/mq/producer/sms/SmsProducer.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.mq.producer.sms; -import cn.iocoder.yudao.module.system.mq.message.sms.SysSmsChannelRefreshMessage; -import cn.iocoder.yudao.module.system.mq.message.sms.SysSmsTemplateRefreshMessage; +import cn.iocoder.yudao.module.system.mq.message.sms.SmsChannelRefreshMessage; +import cn.iocoder.yudao.module.system.mq.message.sms.SmsTemplateRefreshMessage; import cn.iocoder.yudao.framework.mq.core.RedisMQTemplate; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; @@ -16,24 +16,24 @@ import javax.annotation.Resource; */ @Slf4j @Component -public class SysSmsProducer { +public class SmsProducer { @Resource private RedisMQTemplate redisMQTemplate; /** - * 发送 {@link SysSmsChannelRefreshMessage} 消息 + * 发送 {@link SmsChannelRefreshMessage} 消息 */ public void sendSmsChannelRefreshMessage() { - SysSmsChannelRefreshMessage message = new SysSmsChannelRefreshMessage(); + SmsChannelRefreshMessage message = new SmsChannelRefreshMessage(); redisMQTemplate.send(message); } /** - * 发送 {@link SysSmsTemplateRefreshMessage} 消息 + * 发送 {@link SmsTemplateRefreshMessage} 消息 */ public void sendSmsTemplateRefreshMessage() { - SysSmsTemplateRefreshMessage message = new SysSmsTemplateRefreshMessage(); + SmsTemplateRefreshMessage message = new SmsTemplateRefreshMessage(); redisMQTemplate.send(message); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/auth/SysAuthService.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/auth/AuthService.java similarity index 69% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/auth/SysAuthService.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/auth/AuthService.java index b111147d9..1a2a8240c 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/auth/SysAuthService.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/auth/AuthService.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.service.auth; -import cn.iocoder.yudao.module.system.controller.auth.vo.auth.*; +import cn.iocoder.yudao.module.system.controller.admin.auth.vo.auth.*; import cn.iocoder.yudao.framework.security.core.service.SecurityAuthFrameworkService; import javax.validation.Valid; @@ -12,7 +12,7 @@ import javax.validation.Valid; * * @author 芋道源码 */ -public interface SysAuthService extends SecurityAuthFrameworkService { +public interface AuthService extends SecurityAuthFrameworkService { /** * 账号登录 @@ -22,7 +22,7 @@ public interface SysAuthService extends SecurityAuthFrameworkService { * @param userAgent 用户 UA * @return 身份令牌,使用 JWT 方式 */ - String login(@Valid SysAuthLoginReqVO reqVO, String userIp, String userAgent); + String login(@Valid AuthLoginReqVO reqVO, String userIp, String userAgent); /** * 社交登录,使用 code 授权码 @@ -32,7 +32,7 @@ public interface SysAuthService extends SecurityAuthFrameworkService { * @param userAgent 用户 UA * @return 身份令牌,使用 JWT 方式 */ - String socialLogin(@Valid SysAuthSocialLoginReqVO reqVO, String userIp, String userAgent); + String socialLogin(@Valid AuthSocialLoginReqVO reqVO, String userIp, String userAgent); /** * 社交登录,使用 code 授权码 + 账号密码 @@ -42,7 +42,7 @@ public interface SysAuthService extends SecurityAuthFrameworkService { * @param userAgent 用户 UA * @return 身份令牌,使用 JWT 方式 */ - String socialLogin2(@Valid SysAuthSocialLogin2ReqVO reqVO, String userIp, String userAgent); + String socialLogin2(@Valid AuthSocialLogin2ReqVO reqVO, String userIp, String userAgent); /** * 社交绑定,使用 code 授权码 @@ -50,6 +50,6 @@ public interface SysAuthService extends SecurityAuthFrameworkService { * @param userId 用户编号 * @param reqVO 绑定信息 */ - void socialBind(Long userId, @Valid SysAuthSocialBindReqVO reqVO); + void socialBind(Long userId, @Valid AuthSocialBindReqVO reqVO); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/auth/SysAuthServiceImpl.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/auth/AuthServiceImpl.java similarity index 80% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/auth/SysAuthServiceImpl.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/auth/AuthServiceImpl.java index bd7fdf2d9..a0a45e7d7 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/auth/SysAuthServiceImpl.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/auth/AuthServiceImpl.java @@ -1,19 +1,18 @@ package cn.iocoder.yudao.module.system.service.auth; import cn.hutool.core.collection.CollUtil; -import cn.iocoder.yudao.module.system.controller.auth.vo.auth.SysAuthLoginReqVO; -import cn.iocoder.yudao.module.system.controller.auth.vo.auth.SysAuthSocialBindReqVO; -import cn.iocoder.yudao.module.system.controller.auth.vo.auth.SysAuthSocialLogin2ReqVO; -import cn.iocoder.yudao.module.system.controller.auth.vo.auth.SysAuthSocialLoginReqVO; -import cn.iocoder.yudao.module.system.convert.auth.SysAuthConvert; +import cn.iocoder.yudao.module.system.controller.admin.auth.vo.auth.AuthLoginReqVO; +import cn.iocoder.yudao.module.system.controller.admin.auth.vo.auth.AuthSocialBindReqVO; +import cn.iocoder.yudao.module.system.controller.admin.auth.vo.auth.AuthSocialLogin2ReqVO; +import cn.iocoder.yudao.module.system.controller.admin.auth.vo.auth.AuthSocialLoginReqVO; +import cn.iocoder.yudao.module.system.convert.auth.AuthConvert; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.dept.SysPostDO; -import cn.iocoder.yudao.module.system.enums.logger.SysLoginLogTypeEnum; -import cn.iocoder.yudao.module.system.enums.logger.SysLoginResultEnum; -import cn.iocoder.yudao.module.system.service.auth.SysAuthService; -import cn.iocoder.yudao.module.system.service.common.SysCaptchaService; -import cn.iocoder.yudao.module.system.service.dept.SysPostService; -import cn.iocoder.yudao.module.system.service.permission.SysPermissionService; -import cn.iocoder.yudao.module.system.service.user.SysUserService; +import cn.iocoder.yudao.module.system.enums.logger.LoginLogTypeEnum; +import cn.iocoder.yudao.module.system.enums.logger.LoginResultEnum; +import cn.iocoder.yudao.module.system.service.common.CaptchaService; +import cn.iocoder.yudao.module.system.service.dept.PostService; +import cn.iocoder.yudao.module.system.service.permission.PermissionService; +import cn.iocoder.yudao.module.system.service.user.UserService; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.social.SysSocialUserDO; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.user.SysUserDO; import cn.iocoder.yudao.coreservice.modules.system.service.auth.SysUserSessionCoreService; @@ -46,7 +45,7 @@ import java.util.List; import java.util.Objects; import java.util.Set; -import static cn.iocoder.yudao.module.system.enums.SysErrorCodeConstants.*; +import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; import static java.util.Collections.singleton; @@ -56,28 +55,28 @@ import static java.util.Collections.singleton; * * @author 芋道源码 */ -@Service +@Service("adminAuthService") @Slf4j -public class SysAuthServiceImpl implements SysAuthService { +public class AuthServiceImpl implements AuthService { @Resource @Lazy // 延迟加载,因为存在相互依赖的问题 private AuthenticationManager authenticationManager; @Resource - private SysUserService userService; + private UserService userService; @Resource private SysUserCoreService userCoreService; @Resource - private SysPermissionService permissionService; + private PermissionService permissionService; @Resource - private SysCaptchaService captchaService; + private CaptchaService captchaService; @Resource private SysLoginLogCoreService loginLogCoreService; @Resource private SysUserSessionCoreService userSessionCoreService; @Resource - private SysPostService postService; + private PostService postService; @Resource private SysSocialCoreService socialService; @@ -99,14 +98,14 @@ public class SysAuthServiceImpl implements SysAuthService { if (user == null) { throw new UsernameNotFoundException(String.valueOf(userId)); } - this.createLoginLog(user.getUsername(), SysLoginLogTypeEnum.LOGIN_MOCK, SysLoginResultEnum.SUCCESS); + this.createLoginLog(user.getUsername(), LoginLogTypeEnum.LOGIN_MOCK, LoginResultEnum.SUCCESS); // 创建 LoginUser 对象 return this.buildLoginUser(user); } @Override - public String login(SysAuthLoginReqVO reqVO, String userIp, String userAgent) { + public String login(AuthLoginReqVO reqVO, String userIp, String userAgent) { // 判断验证码是否正确 this.verifyCaptcha(reqVO.getUsername(), reqVO.getUuid(), reqVO.getCode()); @@ -130,17 +129,17 @@ public class SysAuthServiceImpl implements SysAuthService { return; } // 验证码不存在 - final SysLoginLogTypeEnum logTypeEnum = SysLoginLogTypeEnum.LOGIN_USERNAME; + final LoginLogTypeEnum logTypeEnum = LoginLogTypeEnum.LOGIN_USERNAME; String code = captchaService.getCaptchaCode(captchaUUID); if (code == null) { // 创建登录失败日志(验证码不存在) - this.createLoginLog(username, logTypeEnum, SysLoginResultEnum.CAPTCHA_NOT_FOUND); + this.createLoginLog(username, logTypeEnum, LoginResultEnum.CAPTCHA_NOT_FOUND); throw exception(AUTH_LOGIN_CAPTCHA_NOT_FOUND); } // 验证码不正确 if (!code.equals(captchaCode)) { // 创建登录失败日志(验证码不正确) - this.createLoginLog(username, logTypeEnum, SysLoginResultEnum.CAPTCHA_CODE_ERROR); + this.createLoginLog(username, logTypeEnum, LoginResultEnum.CAPTCHA_CODE_ERROR); throw exception(AUTH_LOGIN_CAPTCHA_CODE_ERROR); } // 正确,所以要删除下验证码 @@ -148,7 +147,7 @@ public class SysAuthServiceImpl implements SysAuthService { } private LoginUser login0(String username, String password) { - final SysLoginLogTypeEnum logTypeEnum = SysLoginLogTypeEnum.LOGIN_USERNAME; + final LoginLogTypeEnum logTypeEnum = LoginLogTypeEnum.LOGIN_USERNAME; // 用户验证 Authentication authentication; try { @@ -158,23 +157,23 @@ public class SysAuthServiceImpl implements SysAuthService { username, password, getUserType())); // org.activiti.engine.impl.identity.Authentication.setAuthenticatedUserId(username); } catch (BadCredentialsException badCredentialsException) { - this.createLoginLog(username, logTypeEnum, SysLoginResultEnum.BAD_CREDENTIALS); + this.createLoginLog(username, logTypeEnum, LoginResultEnum.BAD_CREDENTIALS); throw exception(AUTH_LOGIN_BAD_CREDENTIALS); } catch (DisabledException disabledException) { - this.createLoginLog(username, logTypeEnum, SysLoginResultEnum.USER_DISABLED); + this.createLoginLog(username, logTypeEnum, LoginResultEnum.USER_DISABLED); throw exception(AUTH_LOGIN_USER_DISABLED); } catch (AuthenticationException authenticationException) { log.error("[login0][username({}) 发生未知异常]", username, authenticationException); - this.createLoginLog(username, logTypeEnum, SysLoginResultEnum.UNKNOWN_ERROR); + this.createLoginLog(username, logTypeEnum, LoginResultEnum.UNKNOWN_ERROR); throw exception(AUTH_LOGIN_FAIL_UNKNOWN); } // 登录成功的日志 Assert.notNull(authentication.getPrincipal(), "Principal 不会为空"); - this.createLoginLog(username, logTypeEnum, SysLoginResultEnum.SUCCESS); + this.createLoginLog(username, logTypeEnum, LoginResultEnum.SUCCESS); return (LoginUser) authentication.getPrincipal(); } - private void createLoginLog(String username, SysLoginLogTypeEnum logTypeEnum, SysLoginResultEnum loginResult) { + private void createLoginLog(String username, LoginLogTypeEnum logTypeEnum, LoginResultEnum loginResult) { // 获得用户 SysUserDO user = userService.getUserByUsername(username); // 插入登录日志 @@ -191,7 +190,7 @@ public class SysAuthServiceImpl implements SysAuthService { reqDTO.setResult(loginResult.getResult()); loginLogCoreService.createLoginLog(reqDTO); // 更新最后登录时间 - if (user != null && Objects.equals(SysLoginResultEnum.SUCCESS.getResult(), loginResult.getResult())) { + if (user != null && Objects.equals(LoginResultEnum.SUCCESS.getResult(), loginResult.getResult())) { userService.updateUserLogin(user.getId(), ServletUtils.getClientIP()); } } @@ -207,7 +206,7 @@ public class SysAuthServiceImpl implements SysAuthService { } @Override - public String socialLogin(SysAuthSocialLoginReqVO reqVO, String userIp, String userAgent) { + public String socialLogin(AuthSocialLoginReqVO reqVO, String userIp, String userAgent) { // 使用 code 授权码,进行登录 AuthUser authUser = socialService.getAuthUser(reqVO.getType(), reqVO.getCode(), reqVO.getState()); Assert.notNull(authUser, "授权用户不为空"); @@ -224,7 +223,7 @@ public class SysAuthServiceImpl implements SysAuthService { if (user == null) { throw exception(USER_NOT_EXISTS); } - this.createLoginLog(user.getUsername(), SysLoginLogTypeEnum.LOGIN_SOCIAL, SysLoginResultEnum.SUCCESS); + this.createLoginLog(user.getUsername(), LoginLogTypeEnum.LOGIN_SOCIAL, LoginResultEnum.SUCCESS); // 创建 LoginUser 对象 LoginUser loginUser = this.buildLoginUser(user); @@ -237,7 +236,7 @@ public class SysAuthServiceImpl implements SysAuthService { } @Override - public String socialLogin2(SysAuthSocialLogin2ReqVO reqVO, String userIp, String userAgent) { + public String socialLogin2(AuthSocialLogin2ReqVO reqVO, String userIp, String userAgent) { // 使用 code 授权码,进行登录 AuthUser authUser = socialService.getAuthUser(reqVO.getType(), reqVO.getCode(), reqVO.getState()); Assert.notNull(authUser, "授权用户不为空"); @@ -253,7 +252,7 @@ public class SysAuthServiceImpl implements SysAuthService { } @Override - public void socialBind(Long userId, SysAuthSocialBindReqVO reqVO) { + public void socialBind(Long userId, AuthSocialBindReqVO reqVO) { // 使用 code 授权码,进行登录 AuthUser authUser = socialService.getAuthUser(reqVO.getType(), reqVO.getCode(), reqVO.getState()); Assert.notNull(authUser, "授权用户不为空"); @@ -282,14 +281,14 @@ public class SysAuthServiceImpl implements SysAuthService { private void createLogoutLog(Long userId, String username) { SysLoginLogCreateReqDTO reqDTO = new SysLoginLogCreateReqDTO(); - reqDTO.setLogType(SysLoginLogTypeEnum.LOGOUT_SELF.getType()); + reqDTO.setLogType(LoginLogTypeEnum.LOGOUT_SELF.getType()); reqDTO.setTraceId(TracerUtils.getTraceId()); reqDTO.setUserId(userId); reqDTO.setUserType(getUserType().getValue()); reqDTO.setUsername(username); reqDTO.setUserAgent(ServletUtils.getUserAgent()); reqDTO.setUserIp(ServletUtils.getClientIP()); - reqDTO.setResult(SysLoginResultEnum.SUCCESS.getResult()); + reqDTO.setResult(LoginResultEnum.SUCCESS.getResult()); loginLogCoreService.createLoginLog(reqDTO); } @@ -324,7 +323,7 @@ public class SysAuthServiceImpl implements SysAuthService { } private LoginUser buildLoginUser(SysUserDO user) { - LoginUser loginUser = SysAuthConvert.INSTANCE.convert(user); + LoginUser loginUser = AuthConvert.INSTANCE.convert(user); // 补全字段 loginUser.setDeptId(user.getDeptId()); loginUser.setRoleIds(this.getUserRoleIds(loginUser.getId())); diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/auth/SysUserSessionService.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/auth/UserSessionService.java similarity index 72% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/auth/SysUserSessionService.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/auth/UserSessionService.java index f47c04b8b..af318fec4 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/auth/SysUserSessionService.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/auth/UserSessionService.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.system.service.auth; -import cn.iocoder.yudao.module.system.controller.auth.vo.session.SysUserSessionPageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.auth.vo.session.UserSessionPageReqVO; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.auth.SysUserSessionDO; import cn.iocoder.yudao.framework.common.pojo.PageResult; @@ -9,7 +9,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; * * @author 芋道源码 */ -public interface SysUserSessionService { +public interface UserSessionService { /** * 获得在线用户分页列表 @@ -17,7 +17,7 @@ public interface SysUserSessionService { * @param reqVO 分页条件 * @return 份额与列表 */ - PageResult getUserSessionPage(SysUserSessionPageReqVO reqVO); + PageResult getUserSessionPage(UserSessionPageReqVO reqVO); /** * 移除超时的在线用户 diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/auth/SysUserSessionServiceImpl.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/auth/UserSessionServiceImpl.java similarity index 83% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/auth/SysUserSessionServiceImpl.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/auth/UserSessionServiceImpl.java index 83bc371cb..23d68cd6e 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/auth/SysUserSessionServiceImpl.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/auth/UserSessionServiceImpl.java @@ -2,12 +2,11 @@ package cn.iocoder.yudao.module.system.service.auth; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.StrUtil; -import cn.iocoder.yudao.module.system.controller.auth.vo.session.SysUserSessionPageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.auth.vo.session.UserSessionPageReqVO; import cn.iocoder.yudao.module.system.dal.mysql.auth.SysUserSessionMapper; -import cn.iocoder.yudao.module.system.enums.logger.SysLoginLogTypeEnum; -import cn.iocoder.yudao.module.system.enums.logger.SysLoginResultEnum; -import cn.iocoder.yudao.module.system.service.auth.SysUserSessionService; -import cn.iocoder.yudao.module.system.service.user.SysUserService; +import cn.iocoder.yudao.module.system.enums.logger.LoginLogTypeEnum; +import cn.iocoder.yudao.module.system.enums.logger.LoginResultEnum; +import cn.iocoder.yudao.module.system.service.user.UserService; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.auth.SysUserSessionDO; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.user.SysUserDO; import cn.iocoder.yudao.coreservice.modules.system.dal.redis.auth.SysLoginUserCoreRedisDAO; @@ -35,12 +34,12 @@ import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils. */ @Slf4j @Service -public class SysUserSessionServiceImpl implements SysUserSessionService { +public class UserSessionServiceImpl implements UserSessionService { @Resource private SysUserSessionMapper userSessionMapper; @Resource - private SysUserService userService; + private UserService userService; @Resource private SysLoginLogCoreService loginLogCoreService; @@ -48,7 +47,7 @@ public class SysUserSessionServiceImpl implements SysUserSessionService { private SysLoginUserCoreRedisDAO loginUserCoreRedisDAO; @Override - public PageResult getUserSessionPage(SysUserSessionPageReqVO reqVO) { + public PageResult getUserSessionPage(UserSessionPageReqVO reqVO) { // 处理基于用户昵称的查询 Collection userIds = null; if (StrUtil.isNotEmpty(reqVO.getUsername())) { @@ -82,14 +81,14 @@ public class SysUserSessionServiceImpl implements SysUserSessionService { private void createTimeoutLogoutLog(Collection timeoutSessionDOS) { for (SysUserSessionDO timeoutSessionDO : timeoutSessionDOS) { SysLoginLogCreateReqDTO reqDTO = new SysLoginLogCreateReqDTO(); - reqDTO.setLogType(SysLoginLogTypeEnum.LOGOUT_TIMEOUT.getType()); + reqDTO.setLogType(LoginLogTypeEnum.LOGOUT_TIMEOUT.getType()); reqDTO.setTraceId(TracerUtils.getTraceId()); reqDTO.setUserId(timeoutSessionDO.getUserId()); reqDTO.setUserType(timeoutSessionDO.getUserType()); reqDTO.setUsername(timeoutSessionDO.getUsername()); reqDTO.setUserAgent(timeoutSessionDO.getUserAgent()); reqDTO.setUserIp(timeoutSessionDO.getUserIp()); - reqDTO.setResult(SysLoginResultEnum.SUCCESS.getResult()); + reqDTO.setResult(LoginResultEnum.SUCCESS.getResult()); loginLogCoreService.createLoginLog(reqDTO); } } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/common/SysCaptchaService.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/common/CaptchaService.java similarity index 78% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/common/SysCaptchaService.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/common/CaptchaService.java index c6a20b909..ecb05d88a 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/common/SysCaptchaService.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/common/CaptchaService.java @@ -1,18 +1,18 @@ package cn.iocoder.yudao.module.system.service.common; -import cn.iocoder.yudao.module.system.controller.common.vo.SysCaptchaImageRespVO; +import cn.iocoder.yudao.module.system.controller.admin.common.vo.CaptchaImageRespVO; /** * 验证码 Service 接口 */ -public interface SysCaptchaService { +public interface CaptchaService { /** * 获得验证码图片 * * @return 验证码图片 */ - SysCaptchaImageRespVO getCaptchaImage(); + CaptchaImageRespVO getCaptchaImage(); /** * 是否开启图片验证码 diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/common/SysCaptchaServiceImpl.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/common/CaptchaServiceImpl.java similarity index 68% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/common/SysCaptchaServiceImpl.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/common/CaptchaServiceImpl.java index c97ca037c..1c1a38875 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/common/SysCaptchaServiceImpl.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/common/CaptchaServiceImpl.java @@ -3,11 +3,10 @@ package cn.iocoder.yudao.module.system.service.common; import cn.hutool.captcha.CaptchaUtil; import cn.hutool.captcha.CircleCaptcha; import cn.hutool.core.util.IdUtil; +import cn.iocoder.yudao.module.system.convert.common.CaptchaConvert; import cn.iocoder.yudao.module.system.framework.captcha.config.CaptchaProperties; -import cn.iocoder.yudao.module.system.controller.common.vo.SysCaptchaImageRespVO; -import cn.iocoder.yudao.module.system.convert.common.SysCaptchaConvert; -import cn.iocoder.yudao.module.system.dal.redis.common.SysCaptchaRedisDAO; -import cn.iocoder.yudao.module.system.service.common.SysCaptchaService; +import cn.iocoder.yudao.module.system.controller.admin.common.vo.CaptchaImageRespVO; +import cn.iocoder.yudao.module.system.dal.redis.common.CaptchaRedisDAO; import org.springframework.stereotype.Service; import javax.annotation.Resource; @@ -16,23 +15,23 @@ import javax.annotation.Resource; * 验证码 Service 实现类 */ @Service -public class SysCaptchaServiceImpl implements SysCaptchaService { +public class CaptchaServiceImpl implements CaptchaService { @Resource private CaptchaProperties captchaProperties; @Resource - private SysCaptchaRedisDAO captchaRedisDAO; + private CaptchaRedisDAO captchaRedisDAO; @Override - public SysCaptchaImageRespVO getCaptchaImage() { + public CaptchaImageRespVO getCaptchaImage() { // 生成验证码 CircleCaptcha captcha = CaptchaUtil.createCircleCaptcha(captchaProperties.getWidth(), captchaProperties.getHeight()); // 缓存到 Redis 中 String uuid = IdUtil.fastSimpleUUID(); captchaRedisDAO.set(uuid, captcha.getCode(), captchaProperties.getTimeout()); // 返回 - return SysCaptchaConvert.INSTANCE.convert(uuid, captcha); + return CaptchaConvert.INSTANCE.convert(uuid, captcha); } @Override diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dept/SysDeptService.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dept/DeptService.java similarity index 69% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dept/SysDeptService.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dept/DeptService.java index 79913ed53..e8397b542 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dept/SysDeptService.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dept/DeptService.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.system.service.dept; -import cn.iocoder.yudao.module.system.controller.dept.vo.dept.SysDeptCreateReqVO; -import cn.iocoder.yudao.module.system.controller.dept.vo.dept.SysDeptListReqVO; -import cn.iocoder.yudao.module.system.controller.dept.vo.dept.SysDeptUpdateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept.DeptCreateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept.DeptListReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept.DeptUpdateReqVO; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.dept.SysDeptDO; import java.util.List; @@ -12,7 +12,7 @@ import java.util.List; * * @author 芋道源码 */ -public interface SysDeptService { +public interface DeptService { /** * 初始化部门的本地缓存 @@ -25,14 +25,14 @@ public interface SysDeptService { * @param reqVO 部门信息 * @return 部门编号 */ - Long createDept(SysDeptCreateReqVO reqVO); + Long createDept(DeptCreateReqVO reqVO); /** * 更新部门 * * @param reqVO 部门信息 */ - void updateDept(SysDeptUpdateReqVO reqVO); + void updateDept(DeptUpdateReqVO reqVO); /** * 删除部门 @@ -48,7 +48,7 @@ public interface SysDeptService { * @param reqVO 筛选条件请求 VO * @return 部门列表 */ - List getSimpleDepts(SysDeptListReqVO reqVO); + List getSimpleDepts(DeptListReqVO reqVO); /** * 获得所有子部门,从缓存中 diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dept/SysDeptServiceImpl.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dept/DeptServiceImpl.java similarity index 90% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dept/SysDeptServiceImpl.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dept/DeptServiceImpl.java index f4f2773e8..2f9c1a713 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dept/SysDeptServiceImpl.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dept/DeptServiceImpl.java @@ -4,15 +4,14 @@ import cn.hutool.core.collection.CollUtil; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.yudao.module.system.controller.dept.vo.dept.SysDeptCreateReqVO; -import cn.iocoder.yudao.module.system.controller.dept.vo.dept.SysDeptListReqVO; -import cn.iocoder.yudao.module.system.controller.dept.vo.dept.SysDeptUpdateReqVO; -import cn.iocoder.yudao.module.system.convert.dept.SysDeptConvert; +import cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept.DeptCreateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept.DeptListReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept.DeptUpdateReqVO; +import cn.iocoder.yudao.module.system.convert.dept.DeptConvert; import cn.iocoder.yudao.module.system.dal.mysql.dept.SysDeptMapper; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.dept.SysDeptDO; import cn.iocoder.yudao.module.system.enums.dept.DeptIdEnum; -import cn.iocoder.yudao.module.system.mq.producer.dept.SysDeptProducer; -import cn.iocoder.yudao.module.system.service.dept.SysDeptService; +import cn.iocoder.yudao.module.system.mq.producer.dept.DeptProducer; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMultimap; import com.google.common.collect.Multimap; @@ -25,7 +24,7 @@ import javax.annotation.PostConstruct; import javax.annotation.Resource; import java.util.*; -import static cn.iocoder.yudao.module.system.enums.SysErrorCodeConstants.*; +import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; /** @@ -36,7 +35,7 @@ import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionU @Service @Validated @Slf4j -public class SysDeptServiceImpl implements SysDeptService { +public class DeptServiceImpl implements DeptService { /** * 定时执行 {@link #schedulePeriodicRefresh()} 的周期 @@ -69,7 +68,7 @@ public class SysDeptServiceImpl implements SysDeptService { private SysDeptMapper deptMapper; @Resource - private SysDeptProducer deptProducer; + private DeptProducer deptProducer; @Override @PostConstruct @@ -122,11 +121,11 @@ public class SysDeptServiceImpl implements SysDeptService { } @Override - public Long createDept(SysDeptCreateReqVO reqVO) { + public Long createDept(DeptCreateReqVO reqVO) { // 校验正确性 checkCreateOrUpdate(null, reqVO.getParentId(), reqVO.getName()); // 插入部门 - SysDeptDO dept = SysDeptConvert.INSTANCE.convert(reqVO); + SysDeptDO dept = DeptConvert.INSTANCE.convert(reqVO); deptMapper.insert(dept); // 发送刷新消息 deptProducer.sendDeptRefreshMessage(); @@ -134,11 +133,11 @@ public class SysDeptServiceImpl implements SysDeptService { } @Override - public void updateDept(SysDeptUpdateReqVO reqVO) { + public void updateDept(DeptUpdateReqVO reqVO) { // 校验正确性 checkCreateOrUpdate(reqVO.getId(), reqVO.getParentId(), reqVO.getName()); // 更新部门 - SysDeptDO updateObj = SysDeptConvert.INSTANCE.convert(reqVO); + SysDeptDO updateObj = DeptConvert.INSTANCE.convert(reqVO); deptMapper.updateById(updateObj); // 发送刷新消息 deptProducer.sendDeptRefreshMessage(); @@ -159,7 +158,7 @@ public class SysDeptServiceImpl implements SysDeptService { } @Override - public List getSimpleDepts(SysDeptListReqVO reqVO) { + public List getSimpleDepts(DeptListReqVO reqVO) { return deptMapper.selectList(reqVO); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dept/SysPostService.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dept/PostService.java similarity index 76% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dept/SysPostService.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dept/PostService.java index def06e25a..73e9759b7 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dept/SysPostService.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dept/PostService.java @@ -2,10 +2,10 @@ package cn.iocoder.yudao.module.system.service.dept; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.system.controller.dept.vo.post.SysPostCreateReqVO; -import cn.iocoder.yudao.module.system.controller.dept.vo.post.SysPostExportReqVO; -import cn.iocoder.yudao.module.system.controller.dept.vo.post.SysPostPageReqVO; -import cn.iocoder.yudao.module.system.controller.dept.vo.post.SysPostUpdateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dept.vo.post.PostCreateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dept.vo.post.PostExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dept.vo.post.PostPageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dept.vo.post.PostUpdateReqVO; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.dept.SysPostDO; import org.springframework.lang.Nullable; @@ -19,7 +19,7 @@ import static cn.iocoder.yudao.framework.common.util.collection.SetUtils.asSet; * * @author 芋道源码 */ -public interface SysPostService { +public interface PostService { /** * 创建岗位 @@ -27,14 +27,14 @@ public interface SysPostService { * @param reqVO 岗位信息 * @return 岗位编号 */ - Long createPost(SysPostCreateReqVO reqVO); + Long createPost(PostCreateReqVO reqVO); /** * 更新岗位 * * @param reqVO 岗位信息 */ - void updatePost(SysPostUpdateReqVO reqVO); + void updatePost(PostUpdateReqVO reqVO); /** * 删除岗位信息 @@ -68,7 +68,7 @@ public interface SysPostService { * @param reqVO 分页条件 * @return 部门分页列表 */ - PageResult getPostPage(SysPostPageReqVO reqVO); + PageResult getPostPage(PostPageReqVO reqVO); /** * 获得岗位列表 @@ -76,7 +76,7 @@ public interface SysPostService { * @param reqVO 查询条件 * @return 部门列表 */ - List getPosts(SysPostExportReqVO reqVO); + List getPosts(PostExportReqVO reqVO); /** * 获得岗位信息 diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dept/SysPostServiceImpl.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dept/PostServiceImpl.java similarity index 77% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dept/SysPostServiceImpl.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dept/PostServiceImpl.java index 178daeeae..971743a29 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dept/SysPostServiceImpl.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dept/PostServiceImpl.java @@ -2,14 +2,13 @@ package cn.iocoder.yudao.module.system.service.dept; import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.system.controller.dept.vo.post.SysPostCreateReqVO; -import cn.iocoder.yudao.module.system.controller.dept.vo.post.SysPostExportReqVO; -import cn.iocoder.yudao.module.system.controller.dept.vo.post.SysPostPageReqVO; -import cn.iocoder.yudao.module.system.controller.dept.vo.post.SysPostUpdateReqVO; -import cn.iocoder.yudao.module.system.convert.dept.SysPostConvert; +import cn.iocoder.yudao.module.system.controller.admin.dept.vo.post.PostCreateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dept.vo.post.PostExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dept.vo.post.PostPageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dept.vo.post.PostUpdateReqVO; +import cn.iocoder.yudao.module.system.convert.dept.PostConvert; import cn.iocoder.yudao.module.system.dal.mysql.dept.SysPostMapper; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.dept.SysPostDO; -import cn.iocoder.yudao.module.system.service.dept.SysPostService; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; @@ -17,7 +16,7 @@ import javax.annotation.Resource; import java.util.Collection; import java.util.List; -import static cn.iocoder.yudao.module.system.enums.SysErrorCodeConstants.*; +import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; /** @@ -27,27 +26,27 @@ import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionU */ @Service @Validated -public class SysPostServiceImpl implements SysPostService { +public class PostServiceImpl implements PostService { @Resource private SysPostMapper postMapper; @Override - public Long createPost(SysPostCreateReqVO reqVO) { + public Long createPost(PostCreateReqVO reqVO) { // 校验正确性 this.checkCreateOrUpdate(null, reqVO.getName(), reqVO.getCode()); // 插入岗位 - SysPostDO post = SysPostConvert.INSTANCE.convert(reqVO); + SysPostDO post = PostConvert.INSTANCE.convert(reqVO); postMapper.insert(post); return post.getId(); } @Override - public void updatePost(SysPostUpdateReqVO reqVO) { + public void updatePost(PostUpdateReqVO reqVO) { // 校验正确性 this.checkCreateOrUpdate(reqVO.getId(), reqVO.getName(), reqVO.getCode()); // 更新岗位 - SysPostDO updateObj = SysPostConvert.INSTANCE.convert(reqVO); + SysPostDO updateObj = PostConvert.INSTANCE.convert(reqVO); postMapper.updateById(updateObj); } @@ -65,12 +64,12 @@ public class SysPostServiceImpl implements SysPostService { } @Override - public PageResult getPostPage(SysPostPageReqVO reqVO) { + public PageResult getPostPage(PostPageReqVO reqVO) { return postMapper.selectPage(reqVO); } @Override - public List getPosts(SysPostExportReqVO reqVO) { + public List getPosts(PostExportReqVO reqVO) { return postMapper.selectList(reqVO); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dict/SysDictDataService.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dict/DictDataService.java similarity index 67% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dict/SysDictDataService.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dict/DictDataService.java index 30d469098..c7b60e0ad 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dict/SysDictDataService.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dict/DictDataService.java @@ -2,10 +2,10 @@ package cn.iocoder.yudao.module.system.service.dict; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.dict.SysDictDataDO; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.system.controller.dict.vo.data.SysDictDataCreateReqVO; -import cn.iocoder.yudao.module.system.controller.dict.vo.data.SysDictDataExportReqVO; -import cn.iocoder.yudao.module.system.controller.dict.vo.data.SysDictDataPageReqVO; -import cn.iocoder.yudao.module.system.controller.dict.vo.data.SysDictDataUpdateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dict.vo.data.DictDataCreateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dict.vo.data.DictDataExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dict.vo.data.DictDataPageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dict.vo.data.DictDataUpdateReqVO; import java.util.List; @@ -14,7 +14,7 @@ import java.util.List; * * @author ruoyi */ -public interface SysDictDataService { +public interface DictDataService { /** * 创建字典数据 @@ -22,14 +22,14 @@ public interface SysDictDataService { * @param reqVO 字典数据信息 * @return 字典数据编号 */ - Long createDictData(SysDictDataCreateReqVO reqVO); + Long createDictData(DictDataCreateReqVO reqVO); /** * 更新字典数据 * * @param reqVO 字典数据信息 */ - void updateDictData(SysDictDataUpdateReqVO reqVO); + void updateDictData(DictDataUpdateReqVO reqVO); /** * 删除字典数据 @@ -51,7 +51,7 @@ public interface SysDictDataService { * @param reqVO 分页请求 * @return 字典数据分页列表 */ - PageResult getDictDataPage(SysDictDataPageReqVO reqVO); + PageResult getDictDataPage(DictDataPageReqVO reqVO); /** * 获得字典数据列表 @@ -59,7 +59,7 @@ public interface SysDictDataService { * @param reqVO 列表请求 * @return 字典数据列表 */ - List getDictDatas(SysDictDataExportReqVO reqVO); + List getDictDatas(DictDataExportReqVO reqVO); /** * 获得字典数据详情 diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dict/SysDictDataServiceImpl.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dict/DictDataServiceImpl.java similarity index 77% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dict/SysDictDataServiceImpl.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dict/DictDataServiceImpl.java index 1037779f0..0d25f87ca 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dict/SysDictDataServiceImpl.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dict/DictDataServiceImpl.java @@ -1,15 +1,15 @@ package cn.iocoder.yudao.module.system.service.dict; -import cn.iocoder.yudao.module.system.controller.dict.vo.data.SysDictDataCreateReqVO; -import cn.iocoder.yudao.module.system.controller.dict.vo.data.SysDictDataExportReqVO; -import cn.iocoder.yudao.module.system.controller.dict.vo.data.SysDictDataPageReqVO; -import cn.iocoder.yudao.module.system.controller.dict.vo.data.SysDictDataUpdateReqVO; -import cn.iocoder.yudao.module.system.convert.dict.SysDictDataConvert; -import cn.iocoder.yudao.module.system.dal.dataobject.dict.SysDictTypeDO; +import cn.iocoder.yudao.module.system.controller.admin.dict.vo.data.DictDataCreateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dict.vo.data.DictDataExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dict.vo.data.DictDataPageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dict.vo.data.DictDataUpdateReqVO; +import cn.iocoder.yudao.module.system.convert.dict.DictDataConvert; +import cn.iocoder.yudao.module.system.dal.dataobject.dict.DictTypeDO; import cn.iocoder.yudao.module.system.dal.mysql.dict.SysDictDataMapper; -import cn.iocoder.yudao.module.system.mq.producer.dict.SysDictDataProducer; -import cn.iocoder.yudao.module.system.service.dict.SysDictDataService; -import cn.iocoder.yudao.module.system.service.dict.SysDictTypeService; +import cn.iocoder.yudao.module.system.mq.producer.dict.DictDataProducer; +import cn.iocoder.yudao.module.system.service.dict.DictDataService; +import cn.iocoder.yudao.module.system.service.dict.DictTypeService; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.dict.SysDictDataDO; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.PageResult; @@ -20,7 +20,7 @@ import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.util.*; -import static cn.iocoder.yudao.module.system.enums.SysErrorCodeConstants.*; +import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; /** @@ -30,7 +30,7 @@ import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionU */ @Service @Slf4j -public class SysDictDataServiceImpl implements SysDictDataService { +public class DictDataServiceImpl implements DictDataService { /** * 排序 dictType > sort @@ -40,13 +40,13 @@ public class SysDictDataServiceImpl implements SysDictDataService { .thenComparingInt(SysDictDataDO::getSort); @Resource - private SysDictTypeService dictTypeService; + private DictTypeService dictTypeService; @Resource private SysDictDataMapper dictDataMapper; @Resource - private SysDictDataProducer dictDataProducer; + private DictDataProducer dictDataProducer; /** * 如果字典数据发生变化,从数据库中获取最新的全量字典数据。 @@ -77,12 +77,12 @@ public class SysDictDataServiceImpl implements SysDictDataService { } @Override - public PageResult getDictDataPage(SysDictDataPageReqVO reqVO) { + public PageResult getDictDataPage(DictDataPageReqVO reqVO) { return dictDataMapper.selectPage(reqVO); } @Override - public List getDictDatas(SysDictDataExportReqVO reqVO) { + public List getDictDatas(DictDataExportReqVO reqVO) { List list = dictDataMapper.selectList(reqVO); list.sort(COMPARATOR_TYPE_AND_SORT); return list; @@ -94,11 +94,11 @@ public class SysDictDataServiceImpl implements SysDictDataService { } @Override - public Long createDictData(SysDictDataCreateReqVO reqVO) { + public Long createDictData(DictDataCreateReqVO reqVO) { // 校验正确性 this.checkCreateOrUpdate(null, reqVO.getValue(), reqVO.getDictType()); // 插入字典类型 - SysDictDataDO dictData = SysDictDataConvert.INSTANCE.convert(reqVO); + SysDictDataDO dictData = DictDataConvert.INSTANCE.convert(reqVO); dictDataMapper.insert(dictData); // 发送刷新消息 dictDataProducer.sendDictDataRefreshMessage(); @@ -106,11 +106,11 @@ public class SysDictDataServiceImpl implements SysDictDataService { } @Override - public void updateDictData(SysDictDataUpdateReqVO reqVO) { + public void updateDictData(DictDataUpdateReqVO reqVO) { // 校验正确性 this.checkCreateOrUpdate(reqVO.getId(), reqVO.getValue(), reqVO.getDictType()); // 更新字典类型 - SysDictDataDO updateObj = SysDictDataConvert.INSTANCE.convert(reqVO); + SysDictDataDO updateObj = DictDataConvert.INSTANCE.convert(reqVO); dictDataMapper.updateById(updateObj); // 发送刷新消息 dictDataProducer.sendDictDataRefreshMessage(); @@ -169,7 +169,7 @@ public class SysDictDataServiceImpl implements SysDictDataService { @VisibleForTesting public void checkDictTypeValid(String type) { - SysDictTypeDO dictType = dictTypeService.getDictType(type); + DictTypeDO dictType = dictTypeService.getDictType(type); if (dictType == null) { throw exception(DICT_TYPE_NOT_EXISTS); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dict/SysDictTypeService.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dict/DictTypeService.java similarity index 57% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dict/SysDictTypeService.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dict/DictTypeService.java index a115269a6..4b334b08b 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dict/SysDictTypeService.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dict/DictTypeService.java @@ -1,11 +1,11 @@ package cn.iocoder.yudao.module.system.service.dict; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.system.controller.dict.vo.type.SysDictTypeCreateReqVO; -import cn.iocoder.yudao.module.system.controller.dict.vo.type.SysDictTypeExportReqVO; -import cn.iocoder.yudao.module.system.controller.dict.vo.type.SysDictTypePageReqVO; -import cn.iocoder.yudao.module.system.controller.dict.vo.type.SysDictTypeUpdateReqVO; -import cn.iocoder.yudao.module.system.dal.dataobject.dict.SysDictTypeDO; +import cn.iocoder.yudao.module.system.controller.admin.dict.vo.type.DictTypeCreateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dict.vo.type.DictTypeExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dict.vo.type.DictTypePageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dict.vo.type.DictTypeUpdateReqVO; +import cn.iocoder.yudao.module.system.dal.dataobject.dict.DictTypeDO; import java.util.List; @@ -14,7 +14,7 @@ import java.util.List; * * @author 芋道源码 */ -public interface SysDictTypeService { +public interface DictTypeService { /** * 创建字典类型 @@ -22,14 +22,14 @@ public interface SysDictTypeService { * @param reqVO 字典类型信息 * @return 字典类型编号 */ - Long createDictType(SysDictTypeCreateReqVO reqVO); + Long createDictType(DictTypeCreateReqVO reqVO); /** * 更新字典类型 * * @param reqVO 字典类型信息 */ - void updateDictType(SysDictTypeUpdateReqVO reqVO); + void updateDictType(DictTypeUpdateReqVO reqVO); /** * 删除字典类型 @@ -44,7 +44,7 @@ public interface SysDictTypeService { * @param reqVO 分页请求 * @return 字典类型分页列表 */ - PageResult getDictTypePage(SysDictTypePageReqVO reqVO); + PageResult getDictTypePage(DictTypePageReqVO reqVO); /** * 获得字典类型列表 @@ -52,7 +52,7 @@ public interface SysDictTypeService { * @param reqVO 列表请求 * @return 字典类型列表 */ - List getDictTypeList(SysDictTypeExportReqVO reqVO); + List getDictTypeList(DictTypeExportReqVO reqVO); /** * 获得字典类型详情 @@ -60,7 +60,7 @@ public interface SysDictTypeService { * @param id 字典类型编号 * @return 字典类型 */ - SysDictTypeDO getDictType(Long id); + DictTypeDO getDictType(Long id); /** * 获得字典类型详情 @@ -68,13 +68,13 @@ public interface SysDictTypeService { * @param type 字典类型 * @return 字典类型详情 */ - SysDictTypeDO getDictType(String type); + DictTypeDO getDictType(String type); /** * 获得全部字典类型列表 * * @return 字典类型列表 */ - List getDictTypeList(); + List getDictTypeList(); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dict/SysDictTypeServiceImpl.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dict/DictTypeServiceImpl.java similarity index 66% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dict/SysDictTypeServiceImpl.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dict/DictTypeServiceImpl.java index 7cfb1a966..222269b51 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dict/SysDictTypeServiceImpl.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/dict/DictTypeServiceImpl.java @@ -1,12 +1,12 @@ package cn.iocoder.yudao.module.system.service.dict; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.system.controller.dict.vo.type.SysDictTypeCreateReqVO; -import cn.iocoder.yudao.module.system.controller.dict.vo.type.SysDictTypeExportReqVO; -import cn.iocoder.yudao.module.system.controller.dict.vo.type.SysDictTypePageReqVO; -import cn.iocoder.yudao.module.system.controller.dict.vo.type.SysDictTypeUpdateReqVO; -import cn.iocoder.yudao.module.system.convert.dict.SysDictTypeConvert; -import cn.iocoder.yudao.module.system.dal.dataobject.dict.SysDictTypeDO; +import cn.iocoder.yudao.module.system.controller.admin.dict.vo.type.DictTypeCreateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dict.vo.type.DictTypeExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dict.vo.type.DictTypePageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dict.vo.type.DictTypeUpdateReqVO; +import cn.iocoder.yudao.module.system.convert.dict.DictTypeConvert; +import cn.iocoder.yudao.module.system.dal.dataobject.dict.DictTypeDO; import cn.iocoder.yudao.module.system.dal.mysql.dict.SysDictTypeMapper; import com.google.common.annotations.VisibleForTesting; import org.springframework.stereotype.Service; @@ -15,7 +15,7 @@ import javax.annotation.Resource; import java.util.List; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.yudao.module.system.enums.SysErrorCodeConstants.*; +import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*; /** * 字典类型 Service 实现类 @@ -23,57 +23,57 @@ import static cn.iocoder.yudao.module.system.enums.SysErrorCodeConstants.*; * @author 芋道源码 */ @Service -public class SysDictTypeServiceImpl implements SysDictTypeService { +public class DictTypeServiceImpl implements DictTypeService { @Resource - private SysDictDataService dictDataService; + private DictDataService dictDataService; @Resource private SysDictTypeMapper dictTypeMapper; @Override - public PageResult getDictTypePage(SysDictTypePageReqVO reqVO) { + public PageResult getDictTypePage(DictTypePageReqVO reqVO) { return dictTypeMapper.selectPage(reqVO); } @Override - public List getDictTypeList(SysDictTypeExportReqVO reqVO) { + public List getDictTypeList(DictTypeExportReqVO reqVO) { return dictTypeMapper.selectList(reqVO); } @Override - public SysDictTypeDO getDictType(Long id) { + public DictTypeDO getDictType(Long id) { return dictTypeMapper.selectById(id); } @Override - public SysDictTypeDO getDictType(String type) { + public DictTypeDO getDictType(String type) { return dictTypeMapper.selectByType(type); } @Override - public Long createDictType(SysDictTypeCreateReqVO reqVO) { + public Long createDictType(DictTypeCreateReqVO reqVO) { // 校验正确性 this.checkCreateOrUpdate(null, reqVO.getName(), reqVO.getType()); // 插入字典类型 - SysDictTypeDO dictType = SysDictTypeConvert.INSTANCE.convert(reqVO); + DictTypeDO dictType = DictTypeConvert.INSTANCE.convert(reqVO); dictTypeMapper.insert(dictType); return dictType.getId(); } @Override - public void updateDictType(SysDictTypeUpdateReqVO reqVO) { + public void updateDictType(DictTypeUpdateReqVO reqVO) { // 校验正确性 this.checkCreateOrUpdate(reqVO.getId(), reqVO.getName(), null); // 更新字典类型 - SysDictTypeDO updateObj = SysDictTypeConvert.INSTANCE.convert(reqVO); + DictTypeDO updateObj = DictTypeConvert.INSTANCE.convert(reqVO); dictTypeMapper.updateById(updateObj); } @Override public void deleteDictType(Long id) { // 校验是否存在 - SysDictTypeDO dictType = this.checkDictTypeExists(id); + DictTypeDO dictType = this.checkDictTypeExists(id); // 校验是否有字典数据 if (dictDataService.countByDictType(dictType.getType()) > 0) { throw exception(DICT_TYPE_HAS_CHILDREN); @@ -83,7 +83,7 @@ public class SysDictTypeServiceImpl implements SysDictTypeService { } @Override - public List getDictTypeList() { + public List getDictTypeList() { return dictTypeMapper.selectList(); } @@ -98,7 +98,7 @@ public class SysDictTypeServiceImpl implements SysDictTypeService { @VisibleForTesting public void checkDictTypeNameUnique(Long id, String name) { - SysDictTypeDO dictType = dictTypeMapper.selectByName(name); + DictTypeDO dictType = dictTypeMapper.selectByName(name); if (dictType == null) { return; } @@ -113,7 +113,7 @@ public class SysDictTypeServiceImpl implements SysDictTypeService { @VisibleForTesting public void checkDictTypeUnique(Long id, String type) { - SysDictTypeDO dictType = dictTypeMapper.selectByType(type); + DictTypeDO dictType = dictTypeMapper.selectByType(type); if (dictType == null) { return; } @@ -127,11 +127,11 @@ public class SysDictTypeServiceImpl implements SysDictTypeService { } @VisibleForTesting - public SysDictTypeDO checkDictTypeExists(Long id) { + public DictTypeDO checkDictTypeExists(Long id) { if (id == null) { return null; } - SysDictTypeDO dictType = dictTypeMapper.selectById(id); + DictTypeDO dictType = dictTypeMapper.selectById(id); if (dictType == null) { throw exception(DICT_TYPE_NOT_EXISTS); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/errorcode/SysErrorCodeService.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/errorcode/ErrorCodeService.java similarity index 54% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/errorcode/SysErrorCodeService.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/errorcode/ErrorCodeService.java index 0eff89906..18875f628 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/errorcode/SysErrorCodeService.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/errorcode/ErrorCodeService.java @@ -1,12 +1,12 @@ package cn.iocoder.yudao.module.system.service.errorcode; import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.system.dal.dataobject.errorcode.ErrorCodeDO; import cn.iocoder.yudao.module.system.framework.errorcode.core.service.ErrorCodeFrameworkService; -import cn.iocoder.yudao.module.system.controller.errorcode.vo.SysErrorCodeCreateReqVO; -import cn.iocoder.yudao.module.system.controller.errorcode.vo.SysErrorCodeExportReqVO; -import cn.iocoder.yudao.module.system.controller.errorcode.vo.SysErrorCodePageReqVO; -import cn.iocoder.yudao.module.system.controller.errorcode.vo.SysErrorCodeUpdateReqVO; -import cn.iocoder.yudao.module.system.dal.dataobject.errorcode.SysErrorCodeDO; +import cn.iocoder.yudao.module.system.controller.admin.errorcode.vo.ErrorCodeCreateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.errorcode.vo.ErrorCodeExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.errorcode.vo.ErrorCodePageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.errorcode.vo.ErrorCodeUpdateReqVO; import javax.validation.Valid; import java.util.List; @@ -16,7 +16,7 @@ import java.util.List; * * @author 芋道源码 */ -public interface SysErrorCodeService extends ErrorCodeFrameworkService { +public interface ErrorCodeService extends ErrorCodeFrameworkService { /** * 创建错误码 @@ -24,14 +24,14 @@ public interface SysErrorCodeService extends ErrorCodeFrameworkService { * @param createReqVO 创建信息 * @return 编号 */ - Long createErrorCode(@Valid SysErrorCodeCreateReqVO createReqVO); + Long createErrorCode(@Valid ErrorCodeCreateReqVO createReqVO); /** * 更新错误码 * * @param updateReqVO 更新信息 */ - void updateErrorCode(@Valid SysErrorCodeUpdateReqVO updateReqVO); + void updateErrorCode(@Valid ErrorCodeUpdateReqVO updateReqVO); /** * 删除错误码 @@ -46,7 +46,7 @@ public interface SysErrorCodeService extends ErrorCodeFrameworkService { * @param id 编号 * @return 错误码 */ - SysErrorCodeDO getErrorCode(Long id); + ErrorCodeDO getErrorCode(Long id); /** * 获得错误码分页 @@ -54,7 +54,7 @@ public interface SysErrorCodeService extends ErrorCodeFrameworkService { * @param pageReqVO 分页查询 * @return 错误码分页 */ - PageResult getErrorCodePage(SysErrorCodePageReqVO pageReqVO); + PageResult getErrorCodePage(ErrorCodePageReqVO pageReqVO); /** * 获得错误码列表, 用于 Excel 导出 @@ -62,6 +62,6 @@ public interface SysErrorCodeService extends ErrorCodeFrameworkService { * @param exportReqVO 查询条件 * @return 错误码列表 */ - List getErrorCodeList(SysErrorCodeExportReqVO exportReqVO); + List getErrorCodeList(ErrorCodeExportReqVO exportReqVO); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/errorcode/SysErrorCodeServiceImpl.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/errorcode/ErrorCodeServiceImpl.java similarity index 66% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/errorcode/SysErrorCodeServiceImpl.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/errorcode/ErrorCodeServiceImpl.java index af4e9f352..d347d7981 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/errorcode/SysErrorCodeServiceImpl.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/errorcode/ErrorCodeServiceImpl.java @@ -2,17 +2,16 @@ package cn.iocoder.yudao.module.system.service.errorcode; import cn.hutool.core.collection.CollUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.system.controller.admin.errorcode.vo.ErrorCodeCreateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.errorcode.vo.ErrorCodeUpdateReqVO; +import cn.iocoder.yudao.module.system.dal.dataobject.errorcode.ErrorCodeDO; import cn.iocoder.yudao.module.system.framework.errorcode.core.dto.ErrorCodeAutoGenerateReqDTO; import cn.iocoder.yudao.module.system.framework.errorcode.core.dto.ErrorCodeRespDTO; -import cn.iocoder.yudao.module.system.convert.errorcode.SysErrorCodeConvert; -import cn.iocoder.yudao.module.system.controller.errorcode.vo.SysErrorCodeCreateReqVO; -import cn.iocoder.yudao.module.system.controller.errorcode.vo.SysErrorCodeExportReqVO; -import cn.iocoder.yudao.module.system.controller.errorcode.vo.SysErrorCodePageReqVO; -import cn.iocoder.yudao.module.system.controller.errorcode.vo.SysErrorCodeUpdateReqVO; -import cn.iocoder.yudao.module.system.dal.dataobject.errorcode.SysErrorCodeDO; +import cn.iocoder.yudao.module.system.convert.errorcode.ErrorCodeConvert; +import cn.iocoder.yudao.module.system.controller.admin.errorcode.vo.ErrorCodeExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.errorcode.vo.ErrorCodePageReqVO; import cn.iocoder.yudao.module.system.dal.mysql.errorcode.SysErrorCodeMapper; -import cn.iocoder.yudao.module.system.enums.errorcode.SysErrorCodeTypeEnum; -import cn.iocoder.yudao.module.system.service.errorcode.SysErrorCodeService; +import cn.iocoder.yudao.module.system.enums.errorcode.ErrorCodeTypeEnum; import com.google.common.annotations.VisibleForTesting; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; @@ -25,7 +24,7 @@ import java.util.List; import java.util.Map; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.yudao.module.system.enums.SysErrorCodeConstants.*; +import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; @@ -37,34 +36,34 @@ import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils. @Service @Validated @Slf4j -public class SysErrorCodeServiceImpl implements SysErrorCodeService { +public class ErrorCodeServiceImpl implements ErrorCodeService { @Resource private SysErrorCodeMapper errorCodeMapper; @Override - public Long createErrorCode(SysErrorCodeCreateReqVO createReqVO) { + public Long createErrorCode(ErrorCodeCreateReqVO createReqVO) { // 校验 code 重复 validateCodeDuplicate(createReqVO.getCode(), null); // 插入 - SysErrorCodeDO errorCode = SysErrorCodeConvert.INSTANCE.convert(createReqVO) - .setType(SysErrorCodeTypeEnum.MANUAL_OPERATION.getType()); + ErrorCodeDO errorCode = ErrorCodeConvert.INSTANCE.convert(createReqVO) + .setType(ErrorCodeTypeEnum.MANUAL_OPERATION.getType()); errorCodeMapper.insert(errorCode); // 返回 return errorCode.getId(); } @Override - public void updateErrorCode(SysErrorCodeUpdateReqVO updateReqVO) { + public void updateErrorCode(ErrorCodeUpdateReqVO updateReqVO) { // 校验存在 this.validateErrorCodeExists(updateReqVO.getId()); // 校验 code 重复 validateCodeDuplicate(updateReqVO.getCode(), updateReqVO.getId()); // 更新 - SysErrorCodeDO updateObj = SysErrorCodeConvert.INSTANCE.convert(updateReqVO) - .setType(SysErrorCodeTypeEnum.MANUAL_OPERATION.getType()); + ErrorCodeDO updateObj = ErrorCodeConvert.INSTANCE.convert(updateReqVO) + .setType(ErrorCodeTypeEnum.MANUAL_OPERATION.getType()); errorCodeMapper.updateById(updateObj); } @@ -86,7 +85,7 @@ public class SysErrorCodeServiceImpl implements SysErrorCodeService { */ @VisibleForTesting public void validateCodeDuplicate(Integer code, Long id) { - SysErrorCodeDO errorCodeDO = errorCodeMapper.selectByCode(code); + ErrorCodeDO errorCodeDO = errorCodeMapper.selectByCode(code); if (errorCodeDO == null) { return; } @@ -107,17 +106,17 @@ public class SysErrorCodeServiceImpl implements SysErrorCodeService { } @Override - public SysErrorCodeDO getErrorCode(Long id) { + public ErrorCodeDO getErrorCode(Long id) { return errorCodeMapper.selectById(id); } @Override - public PageResult getErrorCodePage(SysErrorCodePageReqVO pageReqVO) { + public PageResult getErrorCodePage(ErrorCodePageReqVO pageReqVO) { return errorCodeMapper.selectPage(pageReqVO); } @Override - public List getErrorCodeList(SysErrorCodeExportReqVO exportReqVO) { + public List getErrorCodeList(ErrorCodeExportReqVO exportReqVO) { return errorCodeMapper.selectList(exportReqVO); } @@ -128,23 +127,23 @@ public class SysErrorCodeServiceImpl implements SysErrorCodeService { return; } // 获得错误码 - List errorCodeDOs = errorCodeMapper.selectListByCodes( + List errorCodeDOs = errorCodeMapper.selectListByCodes( convertSet(autoGenerateDTOs, ErrorCodeAutoGenerateReqDTO::getCode)); - Map errorCodeDOMap = convertMap(errorCodeDOs, SysErrorCodeDO::getCode); + Map errorCodeDOMap = convertMap(errorCodeDOs, ErrorCodeDO::getCode); // 遍历 autoGenerateBOs 数组,逐个插入或更新。考虑到每次量级不大,就不走批量了 autoGenerateDTOs.forEach(autoGenerateDTO -> { - SysErrorCodeDO errorCodeDO = errorCodeDOMap.get(autoGenerateDTO.getCode()); + ErrorCodeDO errorCodeDO = errorCodeDOMap.get(autoGenerateDTO.getCode()); // 不存在,则进行新增 if (errorCodeDO == null) { - errorCodeDO = SysErrorCodeConvert.INSTANCE.convert(autoGenerateDTO) - .setType(SysErrorCodeTypeEnum.AUTO_GENERATION.getType()); + errorCodeDO = ErrorCodeConvert.INSTANCE.convert(autoGenerateDTO) + .setType(ErrorCodeTypeEnum.AUTO_GENERATION.getType()); errorCodeMapper.insert(errorCodeDO); return; } // 存在,则进行更新。更新有三个前置条件: // 条件 1. 只更新自动生成的错误码,即 Type 为 ErrorCodeTypeEnum.AUTO_GENERATION - if (!SysErrorCodeTypeEnum.AUTO_GENERATION.getType().equals(errorCodeDO.getType())) { + if (!ErrorCodeTypeEnum.AUTO_GENERATION.getType().equals(errorCodeDO.getType())) { return; } // 条件 2. 分组 applicationName 必须匹配,避免存在错误码冲突的情况 @@ -159,15 +158,15 @@ public class SysErrorCodeServiceImpl implements SysErrorCodeService { return; } // 最终匹配,进行更新 - errorCodeMapper.updateById(new SysErrorCodeDO().setId(errorCodeDO.getId()).setMessage(autoGenerateDTO.getMessage())); + errorCodeMapper.updateById(new ErrorCodeDO().setId(errorCodeDO.getId()).setMessage(autoGenerateDTO.getMessage())); }); } @Override public List getErrorCodeList(String applicationName, Date minUpdateTime) { - List errorCodeDOs = errorCodeMapper.selectListByApplicationNameAndUpdateTimeGt( + List errorCodeDOs = errorCodeMapper.selectListByApplicationNameAndUpdateTimeGt( applicationName, minUpdateTime); - return SysErrorCodeConvert.INSTANCE.convertList03(errorCodeDOs); + return ErrorCodeConvert.INSTANCE.convertList03(errorCodeDOs); } } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/logger/SysLoginLogService.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/logger/LoginLogService.java similarity index 58% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/logger/SysLoginLogService.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/logger/LoginLogService.java index 8dbff7d4d..7643fe115 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/logger/SysLoginLogService.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/logger/LoginLogService.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.service.logger; -import cn.iocoder.yudao.module.system.controller.logger.vo.loginlog.SysLoginLogExportReqVO; -import cn.iocoder.yudao.module.system.controller.logger.vo.loginlog.SysLoginLogPageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.logger.vo.loginlog.LoginLogExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.logger.vo.loginlog.LoginLogPageReqVO; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.logger.SysLoginLogDO; import cn.iocoder.yudao.framework.common.pojo.PageResult; @@ -10,7 +10,7 @@ import java.util.List; /** * 登录日志 Service 接口 */ -public interface SysLoginLogService { +public interface LoginLogService { /** * 获得登录日志分页 @@ -18,7 +18,7 @@ public interface SysLoginLogService { * @param reqVO 分页条件 * @return 登录日志分页 */ - PageResult getLoginLogPage(SysLoginLogPageReqVO reqVO); + PageResult getLoginLogPage(LoginLogPageReqVO reqVO); /** * 获得登录日志列表 @@ -26,6 +26,6 @@ public interface SysLoginLogService { * @param reqVO 列表条件 * @return 登录日志列表 */ - List getLoginLogList(SysLoginLogExportReqVO reqVO); + List getLoginLogList(LoginLogExportReqVO reqVO); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/logger/LoginLogServiceImpl.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/logger/LoginLogServiceImpl.java new file mode 100644 index 000000000..d2f35aee8 --- /dev/null +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/logger/LoginLogServiceImpl.java @@ -0,0 +1,32 @@ +package cn.iocoder.yudao.module.system.service.logger; + +import cn.iocoder.yudao.module.system.controller.admin.logger.vo.loginlog.LoginLogExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.logger.vo.loginlog.LoginLogPageReqVO; +import cn.iocoder.yudao.module.system.dal.mysql.logger.LoginLogMapper; +import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.logger.SysLoginLogDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +/** + * 登录日志 Service 实现 + */ +@Service +public class LoginLogServiceImpl implements LoginLogService { + + @Resource + private LoginLogMapper loginLogMapper; + + @Override + public PageResult getLoginLogPage(LoginLogPageReqVO reqVO) { + return loginLogMapper.selectPage(reqVO); + } + + @Override + public List getLoginLogList(LoginLogExportReqVO reqVO) { + return loginLogMapper.selectList(reqVO); + } + +} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/logger/SysOperateLogService.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/logger/OperateLogService.java similarity index 51% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/logger/SysOperateLogService.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/logger/OperateLogService.java index 4bab97586..4ec2d8f01 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/logger/SysOperateLogService.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/logger/OperateLogService.java @@ -2,16 +2,16 @@ package cn.iocoder.yudao.module.system.service.logger; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.operatelog.core.service.OperateLogFrameworkService; -import cn.iocoder.yudao.module.system.controller.logger.vo.operatelog.SysOperateLogExportReqVO; -import cn.iocoder.yudao.module.system.controller.logger.vo.operatelog.SysOperateLogPageReqVO; -import cn.iocoder.yudao.module.system.dal.dataobject.logger.SysOperateLogDO; +import cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog.OperateLogExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog.OperateLogPageReqVO; +import cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogDO; import java.util.List; /** * 操作日志 Service 接口 */ -public interface SysOperateLogService extends OperateLogFrameworkService { +public interface OperateLogService extends OperateLogFrameworkService { /** * 获得操作日志分页列表 @@ -19,7 +19,7 @@ public interface SysOperateLogService extends OperateLogFrameworkService { * @param reqVO 分页条件 * @return 操作日志分页列表 */ - PageResult getOperateLogPage(SysOperateLogPageReqVO reqVO); + PageResult getOperateLogPage(OperateLogPageReqVO reqVO); /** * 获得操作日志列表 @@ -27,6 +27,6 @@ public interface SysOperateLogService extends OperateLogFrameworkService { * @param reqVO 列表条件 * @return 日志列表 */ - List getOperateLogs(SysOperateLogExportReqVO reqVO); + List getOperateLogs(OperateLogExportReqVO reqVO); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/logger/SysOperateLogServiceImpl.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/logger/OperateLogServiceImpl.java similarity index 71% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/logger/SysOperateLogServiceImpl.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/logger/OperateLogServiceImpl.java index c89c37b3e..fab8ddfaa 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/logger/SysOperateLogServiceImpl.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/logger/OperateLogServiceImpl.java @@ -2,13 +2,12 @@ package cn.iocoder.yudao.module.system.service.logger; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.StrUtil; -import cn.iocoder.yudao.module.system.controller.logger.vo.operatelog.SysOperateLogExportReqVO; -import cn.iocoder.yudao.module.system.controller.logger.vo.operatelog.SysOperateLogPageReqVO; -import cn.iocoder.yudao.module.system.convert.logger.SysOperateLogConvert; -import cn.iocoder.yudao.module.system.dal.dataobject.logger.SysOperateLogDO; -import cn.iocoder.yudao.module.system.dal.mysql.logger.SysOperateLogMapper; -import cn.iocoder.yudao.module.system.service.logger.SysOperateLogService; -import cn.iocoder.yudao.module.system.service.user.SysUserService; +import cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog.OperateLogExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog.OperateLogPageReqVO; +import cn.iocoder.yudao.module.system.convert.logger.OperateLogConvert; +import cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogDO; +import cn.iocoder.yudao.module.system.dal.mysql.logger.OperateLogMapper; +import cn.iocoder.yudao.module.system.service.user.UserService; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.user.SysUserDO; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.string.StrUtils; @@ -24,26 +23,26 @@ import java.util.Collections; import java.util.List; import java.util.concurrent.Future; -import static cn.iocoder.yudao.module.system.dal.dataobject.logger.SysOperateLogDO.JAVA_METHOD_ARGS_MAX_LENGTH; -import static cn.iocoder.yudao.module.system.dal.dataobject.logger.SysOperateLogDO.RESULT_MAX_LENGTH; +import static cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogDO.JAVA_METHOD_ARGS_MAX_LENGTH; +import static cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogDO.RESULT_MAX_LENGTH; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; @Service @Slf4j -public class SysOperateLogServiceImpl implements SysOperateLogService { +public class OperateLogServiceImpl implements OperateLogService { @Resource - private SysOperateLogMapper operateLogMapper; + private OperateLogMapper operateLogMapper; @Resource - private SysUserService userService; + private UserService userService; @Override @Async public Future createOperateLogAsync(OperateLogCreateReqDTO reqVO) { boolean success = false; try { - SysOperateLogDO logDO = SysOperateLogConvert.INSTANCE.convert(reqVO); + OperateLogDO logDO = OperateLogConvert.INSTANCE.convert(reqVO); logDO.setJavaMethodArgs(StrUtils.maxLength(logDO.getJavaMethodArgs(), JAVA_METHOD_ARGS_MAX_LENGTH)); logDO.setResultData(StrUtils.maxLength(logDO.getResultData(), RESULT_MAX_LENGTH)); success = operateLogMapper.insert(logDO) == 1; @@ -55,7 +54,7 @@ public class SysOperateLogServiceImpl implements SysOperateLogService { } @Override - public PageResult getOperateLogPage(SysOperateLogPageReqVO reqVO) { + public PageResult getOperateLogPage(OperateLogPageReqVO reqVO) { // 处理基于用户昵称的查询 Collection userIds = null; if (StrUtil.isNotEmpty(reqVO.getUserNickname())) { @@ -69,7 +68,7 @@ public class SysOperateLogServiceImpl implements SysOperateLogService { } @Override - public List getOperateLogs(SysOperateLogExportReqVO reqVO) { + public List getOperateLogs(OperateLogExportReqVO reqVO) { // 处理基于用户昵称的查询 Collection userIds = null; if (StrUtil.isNotEmpty(reqVO.getUserNickname())) { diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/logger/SysLoginLogServiceImpl.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/logger/SysLoginLogServiceImpl.java deleted file mode 100644 index 5d708773a..000000000 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/logger/SysLoginLogServiceImpl.java +++ /dev/null @@ -1,33 +0,0 @@ -package cn.iocoder.yudao.module.system.service.logger; - -import cn.iocoder.yudao.module.system.controller.logger.vo.loginlog.SysLoginLogExportReqVO; -import cn.iocoder.yudao.module.system.controller.logger.vo.loginlog.SysLoginLogPageReqVO; -import cn.iocoder.yudao.module.system.dal.mysql.logger.SysLoginLogMapper; -import cn.iocoder.yudao.module.system.service.logger.SysLoginLogService; -import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.logger.SysLoginLogDO; -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import org.springframework.stereotype.Service; - -import javax.annotation.Resource; -import java.util.List; - -/** - * 登录日志 Service 实现 - */ -@Service -public class SysLoginLogServiceImpl implements SysLoginLogService { - - @Resource - private SysLoginLogMapper loginLogMapper; - - @Override - public PageResult getLoginLogPage(SysLoginLogPageReqVO reqVO) { - return loginLogMapper.selectPage(reqVO); - } - - @Override - public List getLoginLogList(SysLoginLogExportReqVO reqVO) { - return loginLogMapper.selectList(reqVO); - } - -} diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/notice/SysNoticeService.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/notice/NoticeService.java similarity index 59% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/notice/SysNoticeService.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/notice/NoticeService.java index c832beff3..264fc3048 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/notice/SysNoticeService.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/notice/NoticeService.java @@ -1,15 +1,15 @@ package cn.iocoder.yudao.module.system.service.notice; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.system.controller.notice.vo.SysNoticeCreateReqVO; -import cn.iocoder.yudao.module.system.controller.notice.vo.SysNoticePageReqVO; -import cn.iocoder.yudao.module.system.controller.notice.vo.SysNoticeUpdateReqVO; -import cn.iocoder.yudao.module.system.dal.dataobject.notice.SysNoticeDO; +import cn.iocoder.yudao.module.system.controller.admin.notice.vo.NoticeCreateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.notice.vo.NoticePageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.notice.vo.NoticeUpdateReqVO; +import cn.iocoder.yudao.module.system.dal.dataobject.notice.NoticeDO; /** * 通知公告 Service 接口 */ -public interface SysNoticeService { +public interface NoticeService { /** * 创建岗位公告公告 @@ -17,14 +17,14 @@ public interface SysNoticeService { * @param reqVO 岗位公告公告信息 * @return 岗位公告公告编号 */ - Long createNotice(SysNoticeCreateReqVO reqVO); + Long createNotice(NoticeCreateReqVO reqVO); /** * 更新岗位公告公告 * * @param reqVO 岗位公告公告信息 */ - void updateNotice(SysNoticeUpdateReqVO reqVO); + void updateNotice(NoticeUpdateReqVO reqVO); /** * 删除岗位公告公告信息 @@ -39,7 +39,7 @@ public interface SysNoticeService { * @param reqVO 分页条件 * @return 部门分页列表 */ - PageResult pageNotices(SysNoticePageReqVO reqVO); + PageResult pageNotices(NoticePageReqVO reqVO); /** * 获得岗位公告公告信息 @@ -47,6 +47,6 @@ public interface SysNoticeService { * @param id 岗位公告公告编号 * @return 岗位公告公告信息 */ - SysNoticeDO getNotice(Long id); + NoticeDO getNotice(Long id); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/notice/SysNoticeServiceImpl.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/notice/NoticeServiceImpl.java similarity index 56% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/notice/SysNoticeServiceImpl.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/notice/NoticeServiceImpl.java index aa9f4a694..2ca561ac4 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/notice/SysNoticeServiceImpl.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/notice/NoticeServiceImpl.java @@ -2,19 +2,18 @@ package cn.iocoder.yudao.module.system.service.notice; import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.system.controller.notice.vo.SysNoticeCreateReqVO; -import cn.iocoder.yudao.module.system.controller.notice.vo.SysNoticePageReqVO; -import cn.iocoder.yudao.module.system.controller.notice.vo.SysNoticeUpdateReqVO; -import cn.iocoder.yudao.module.system.convert.notice.SysNoticeConvert; +import cn.iocoder.yudao.module.system.controller.admin.notice.vo.NoticeCreateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.notice.vo.NoticePageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.notice.vo.NoticeUpdateReqVO; +import cn.iocoder.yudao.module.system.convert.notice.NoticeConvert; import cn.iocoder.yudao.module.system.dal.mysql.notice.SysNoticeMapper; -import cn.iocoder.yudao.module.system.dal.dataobject.notice.SysNoticeDO; -import cn.iocoder.yudao.module.system.service.notice.SysNoticeService; +import cn.iocoder.yudao.module.system.dal.dataobject.notice.NoticeDO; import com.google.common.annotations.VisibleForTesting; import org.springframework.stereotype.Service; import javax.annotation.Resource; -import static cn.iocoder.yudao.module.system.enums.SysErrorCodeConstants.NOTICE_NOT_FOUND; +import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.NOTICE_NOT_FOUND; /** * 通知公告 Service 实现类 @@ -22,24 +21,24 @@ import static cn.iocoder.yudao.module.system.enums.SysErrorCodeConstants.NOTICE_ * @author 芋道源码 */ @Service -public class SysNoticeServiceImpl implements SysNoticeService { +public class NoticeServiceImpl implements NoticeService { @Resource private SysNoticeMapper noticeMapper; @Override - public Long createNotice(SysNoticeCreateReqVO reqVO) { - SysNoticeDO notice = SysNoticeConvert.INSTANCE.convert(reqVO); + public Long createNotice(NoticeCreateReqVO reqVO) { + NoticeDO notice = NoticeConvert.INSTANCE.convert(reqVO); noticeMapper.insert(notice); return notice.getId(); } @Override - public void updateNotice(SysNoticeUpdateReqVO reqVO) { + public void updateNotice(NoticeUpdateReqVO reqVO) { // 校验是否存在 this.checkNoticeExists(reqVO.getId()); // 更新通知公告 - SysNoticeDO updateObj = SysNoticeConvert.INSTANCE.convert(reqVO); + NoticeDO updateObj = NoticeConvert.INSTANCE.convert(reqVO); noticeMapper.updateById(updateObj); } @@ -52,12 +51,12 @@ public class SysNoticeServiceImpl implements SysNoticeService { } @Override - public PageResult pageNotices(SysNoticePageReqVO reqVO) { + public PageResult pageNotices(NoticePageReqVO reqVO) { return noticeMapper.selectPage(reqVO); } @Override - public SysNoticeDO getNotice(Long id) { + public NoticeDO getNotice(Long id) { return noticeMapper.selectById(id); } @@ -66,7 +65,7 @@ public class SysNoticeServiceImpl implements SysNoticeService { if (id == null) { return; } - SysNoticeDO notice = noticeMapper.selectById(id); + NoticeDO notice = noticeMapper.selectById(id); if (notice == null) { throw ServiceExceptionUtil.exception(NOTICE_NOT_FOUND); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/SysMenuService.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/MenuService.java similarity index 64% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/SysMenuService.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/MenuService.java index 155769a52..405f390e4 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/SysMenuService.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/MenuService.java @@ -1,9 +1,9 @@ package cn.iocoder.yudao.module.system.service.permission; -import cn.iocoder.yudao.module.system.controller.permission.vo.menu.SysMenuCreateReqVO; -import cn.iocoder.yudao.module.system.controller.permission.vo.menu.SysMenuListReqVO; -import cn.iocoder.yudao.module.system.controller.permission.vo.menu.SysMenuUpdateReqVO; -import cn.iocoder.yudao.module.system.dal.dataobject.permission.SysMenuDO; +import cn.iocoder.yudao.module.system.controller.admin.permission.vo.menu.MenuCreateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.permission.vo.menu.MenuListReqVO; +import cn.iocoder.yudao.module.system.controller.admin.permission.vo.menu.MenuUpdateReqVO; +import cn.iocoder.yudao.module.system.dal.dataobject.permission.MenuDO; import java.util.Collection; import java.util.List; @@ -13,7 +13,7 @@ import java.util.List; * * @author 芋道源码 */ -public interface SysMenuService { +public interface MenuService { /** * 初始化菜单的本地缓存 @@ -26,14 +26,14 @@ public interface SysMenuService { * @param reqVO 菜单信息 * @return 创建出来的菜单编号 */ - Long createMenu(SysMenuCreateReqVO reqVO); + Long createMenu(MenuCreateReqVO reqVO); /** * 更新菜单 * * @param reqVO 菜单信息 */ - void updateMenu(SysMenuUpdateReqVO reqVO); + void updateMenu(MenuUpdateReqVO reqVO); /** * 删除菜单 @@ -47,7 +47,7 @@ public interface SysMenuService { * * @return 菜单列表 */ - List getMenus(); + List getMenus(); /** * 筛选菜单列表 @@ -55,7 +55,7 @@ public interface SysMenuService { * @param reqVO 筛选条件请求 VO * @return 菜单列表 */ - List getMenus(SysMenuListReqVO reqVO); + List getMenus(MenuListReqVO reqVO); /** * 获得所有菜单,从缓存中 @@ -66,7 +66,7 @@ public interface SysMenuService { * @param menusStatuses 菜单状态数组 * @return 菜单列表 */ - List listMenusFromCache(Collection menuTypes, Collection menusStatuses); + List listMenusFromCache(Collection menuTypes, Collection menusStatuses); /** * 获得指定编号的菜单数组,从缓存中 @@ -78,8 +78,8 @@ public interface SysMenuService { * @param menusStatuses 菜单状态数组 * @return 菜单数组 */ - List listMenusFromCache(Collection menuIds, Collection menuTypes, - Collection menusStatuses); + List listMenusFromCache(Collection menuIds, Collection menuTypes, + Collection menusStatuses); /** * 获得权限对应的菜单数组 @@ -87,7 +87,7 @@ public interface SysMenuService { * @param permission 权限标识 * @return 数组 */ - List getMenuListByPermissionFromCache(String permission); + List getMenuListByPermissionFromCache(String permission); /** * 获得菜单 @@ -95,6 +95,6 @@ public interface SysMenuService { * @param id 菜单编号 * @return 菜单 */ - SysMenuDO getMenu(Long id); + MenuDO getMenu(Long id); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/SysMenuServiceImpl.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/MenuServiceImpl.java similarity index 80% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/SysMenuServiceImpl.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/MenuServiceImpl.java index 855d8c9e1..0bae64b78 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/SysMenuServiceImpl.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/MenuServiceImpl.java @@ -3,17 +3,15 @@ package cn.iocoder.yudao.module.system.service.permission; import cn.hutool.core.collection.CollUtil; import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.yudao.module.system.controller.permission.vo.menu.SysMenuCreateReqVO; -import cn.iocoder.yudao.module.system.controller.permission.vo.menu.SysMenuListReqVO; -import cn.iocoder.yudao.module.system.controller.permission.vo.menu.SysMenuUpdateReqVO; -import cn.iocoder.yudao.module.system.convert.permission.SysMenuConvert; +import cn.iocoder.yudao.module.system.controller.admin.permission.vo.menu.MenuCreateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.permission.vo.menu.MenuListReqVO; +import cn.iocoder.yudao.module.system.controller.admin.permission.vo.menu.MenuUpdateReqVO; +import cn.iocoder.yudao.module.system.convert.permission.MenuConvert; +import cn.iocoder.yudao.module.system.dal.dataobject.permission.MenuDO; import cn.iocoder.yudao.module.system.dal.mysql.permission.SysMenuMapper; -import cn.iocoder.yudao.module.system.dal.dataobject.permission.SysMenuDO; import cn.iocoder.yudao.module.system.enums.permission.MenuIdEnum; import cn.iocoder.yudao.module.system.enums.permission.MenuTypeEnum; -import cn.iocoder.yudao.module.system.mq.producer.permission.SysMenuProducer; -import cn.iocoder.yudao.module.system.service.permission.SysMenuService; -import cn.iocoder.yudao.module.system.service.permission.SysPermissionService; +import cn.iocoder.yudao.module.system.mq.producer.permission.MenuProducer; import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableMap; @@ -31,7 +29,7 @@ import javax.annotation.Resource; import java.util.*; import java.util.stream.Collectors; -import static cn.iocoder.yudao.module.system.enums.SysErrorCodeConstants.*; +import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*; /** * 菜单 Service 实现 @@ -40,7 +38,7 @@ import static cn.iocoder.yudao.module.system.enums.SysErrorCodeConstants.*; */ @Service @Slf4j -public class SysMenuServiceImpl implements SysMenuService { +public class MenuServiceImpl implements MenuService { /** * 定时执行 {@link #schedulePeriodicRefresh()} 的周期 @@ -54,15 +52,15 @@ public class SysMenuServiceImpl implements SysMenuService { * * 这里声明 volatile 修饰的原因是,每次刷新时,直接修改指向 */ - private volatile Map menuCache; + private volatile Map menuCache; /** * 权限与菜单缓存 - * key:权限 {@link SysMenuDO#getPermission()} + * key:权限 {@link MenuDO#getPermission()} * value:SysMenuDO 数组,因为一个权限可能对应多个 SysMenuDO 对象 * * 这里声明 volatile 修饰的原因是,每次刷新时,直接修改指向 */ - private volatile Multimap permissionMenuCache; + private volatile Multimap permissionMenuCache; /** * 缓存菜单的最大更新时间,用于后续的增量轮询,判断是否有更新 */ @@ -71,10 +69,10 @@ public class SysMenuServiceImpl implements SysMenuService { @Resource private SysMenuMapper menuMapper; @Resource - private SysPermissionService permissionService; + private PermissionService permissionService; @Resource - private SysMenuProducer menuProducer; + private MenuProducer menuProducer; /** * 初始化 {@link #menuCache} 和 {@link #permissionMenuCache} 缓存 @@ -83,14 +81,14 @@ public class SysMenuServiceImpl implements SysMenuService { @PostConstruct public synchronized void initLocalCache() { // 获取菜单列表,如果有更新 - List menuList = this.loadMenuIfUpdate(maxUpdateTime); + List menuList = this.loadMenuIfUpdate(maxUpdateTime); if (CollUtil.isEmpty(menuList)) { return; } // 构建缓存 - ImmutableMap.Builder menuCacheBuilder = ImmutableMap.builder(); - ImmutableMultimap.Builder permMenuCacheBuilder = ImmutableMultimap.builder(); + ImmutableMap.Builder menuCacheBuilder = ImmutableMap.builder(); + ImmutableMultimap.Builder permMenuCacheBuilder = ImmutableMultimap.builder(); menuList.forEach(menuDO -> { menuCacheBuilder.put(menuDO.getId(), menuDO); permMenuCacheBuilder.put(menuDO.getPermission(), menuDO); @@ -114,7 +112,7 @@ public class SysMenuServiceImpl implements SysMenuService { * @param maxUpdateTime 当前菜单的最大更新时间 * @return 菜单列表 */ - private List loadMenuIfUpdate(Date maxUpdateTime) { + private List loadMenuIfUpdate(Date maxUpdateTime) { // 第一步,判断是否要更新。 if (maxUpdateTime == null) { // 如果更新时间为空,说明 DB 一定有新数据 log.info("[loadMenuIfUpdate][首次加载全量菜单]"); @@ -129,13 +127,13 @@ public class SysMenuServiceImpl implements SysMenuService { } @Override - public Long createMenu(SysMenuCreateReqVO reqVO) { + public Long createMenu(MenuCreateReqVO reqVO) { // 校验父菜单存在 checkParentResource(reqVO.getParentId(), null); // 校验菜单(自己) checkResource(reqVO.getParentId(), reqVO.getName(), null); // 插入数据库 - SysMenuDO menu = SysMenuConvert.INSTANCE.convert(reqVO); + MenuDO menu = MenuConvert.INSTANCE.convert(reqVO); initMenuProperty(menu); menuMapper.insert(menu); // 发送刷新消息 @@ -145,7 +143,7 @@ public class SysMenuServiceImpl implements SysMenuService { } @Override - public void updateMenu(SysMenuUpdateReqVO reqVO) { + public void updateMenu(MenuUpdateReqVO reqVO) { // 校验更新的菜单是否存在 if (menuMapper.selectById(reqVO.getId()) == null) { throw ServiceExceptionUtil.exception(MENU_NOT_EXISTS); @@ -155,7 +153,7 @@ public class SysMenuServiceImpl implements SysMenuService { // 校验菜单(自己) checkResource(reqVO.getParentId(), reqVO.getName(), reqVO.getId()); // 更新到数据库 - SysMenuDO updateObject = SysMenuConvert.INSTANCE.convert(reqVO); + MenuDO updateObject = MenuConvert.INSTANCE.convert(reqVO); initMenuProperty(updateObject); menuMapper.updateById(updateObject); // 发送刷新消息 @@ -193,17 +191,17 @@ public class SysMenuServiceImpl implements SysMenuService { } @Override - public List getMenus() { + public List getMenus() { return menuMapper.selectList(); } @Override - public List getMenus(SysMenuListReqVO reqVO) { + public List getMenus(MenuListReqVO reqVO) { return menuMapper.selectList(reqVO); } @Override - public List listMenusFromCache(Collection menuTypes, Collection menusStatuses) { + public List listMenusFromCache(Collection menuTypes, Collection menusStatuses) { // 任一一个参数为空,则返回空 if (CollectionUtils.isAnyEmpty(menuTypes, menusStatuses)) { return Collections.emptyList(); @@ -215,8 +213,8 @@ public class SysMenuServiceImpl implements SysMenuService { } @Override - public List listMenusFromCache(Collection menuIds, Collection menuTypes, - Collection menusStatuses) { + public List listMenusFromCache(Collection menuIds, Collection menuTypes, + Collection menusStatuses) { // 任一一个参数为空,则返回空 if (CollectionUtils.isAnyEmpty(menuIds, menuTypes, menusStatuses)) { return Collections.emptyList(); @@ -228,12 +226,12 @@ public class SysMenuServiceImpl implements SysMenuService { } @Override - public List getMenuListByPermissionFromCache(String permission) { + public List getMenuListByPermissionFromCache(String permission) { return new ArrayList<>(permissionMenuCache.get(permission)); } @Override - public SysMenuDO getMenu(Long id) { + public MenuDO getMenu(Long id) { return menuMapper.selectById(id); } @@ -256,7 +254,7 @@ public class SysMenuServiceImpl implements SysMenuService { if (parentId.equals(childId)) { throw ServiceExceptionUtil.exception(MENU_PARENT_ERROR); } - SysMenuDO menu = menuMapper.selectById(parentId); + MenuDO menu = menuMapper.selectById(parentId); // 父菜单不存在 if (menu == null) { throw ServiceExceptionUtil.exception(MENU_PARENT_NOT_EXISTS); @@ -279,7 +277,7 @@ public class SysMenuServiceImpl implements SysMenuService { */ @VisibleForTesting public void checkResource(Long parentId, String name, Long id) { - SysMenuDO menu = menuMapper.selectByParentIdAndName(parentId, name); + MenuDO menu = menuMapper.selectByParentIdAndName(parentId, name); if (menu == null) { return; } @@ -299,7 +297,7 @@ public class SysMenuServiceImpl implements SysMenuService { * * @param menu 菜单 */ - private void initMenuProperty(SysMenuDO menu) { + private void initMenuProperty(MenuDO menu) { // 菜单为按钮类型时,无需 component、icon、path 属性,进行置空 if (MenuTypeEnum.BUTTON.getType().equals(menu.getType())) { menu.setComponent(""); diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/SysPermissionService.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/PermissionService.java similarity index 90% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/SysPermissionService.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/PermissionService.java index aad7a419c..9983bcbb9 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/SysPermissionService.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/PermissionService.java @@ -2,7 +2,7 @@ package cn.iocoder.yudao.module.system.service.permission; import cn.iocoder.yudao.framework.datapermission.core.dept.service.DeptDataPermissionFrameworkService; import cn.iocoder.yudao.framework.security.core.service.SecurityPermissionFrameworkService; -import cn.iocoder.yudao.module.system.dal.dataobject.permission.SysMenuDO; +import cn.iocoder.yudao.module.system.dal.dataobject.permission.MenuDO; import org.springframework.lang.Nullable; import java.util.Collection; @@ -16,7 +16,7 @@ import java.util.Set; * * @author 芋道源码 */ -public interface SysPermissionService extends SecurityPermissionFrameworkService, DeptDataPermissionFrameworkService { +public interface PermissionService extends SecurityPermissionFrameworkService, DeptDataPermissionFrameworkService { /** * 初始化权限的本地缓存 @@ -33,8 +33,8 @@ public interface SysPermissionService extends SecurityPermissionFrameworkService * @param menusStatuses 菜单状态数组 * @return 菜单列表 */ - List getRoleMenusFromCache(Collection roleIds, Collection menuTypes, - Collection menusStatuses); + List getRoleMenusFromCache(Collection roleIds, Collection menuTypes, + Collection menusStatuses); /** * 获得用户拥有的角色编号集合 diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/SysPermissionServiceImpl.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/PermissionServiceImpl.java similarity index 93% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/SysPermissionServiceImpl.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/PermissionServiceImpl.java index 83ca671db..b8da08730 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/SysPermissionServiceImpl.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/PermissionServiceImpl.java @@ -4,14 +4,14 @@ import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.util.ArrayUtil; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.dept.SysDeptDO; -import cn.iocoder.yudao.module.system.dal.dataobject.permission.SysMenuDO; +import cn.iocoder.yudao.module.system.dal.dataobject.permission.MenuDO; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.permission.SysRoleDO; -import cn.iocoder.yudao.module.system.dal.dataobject.permission.SysRoleMenuDO; +import cn.iocoder.yudao.module.system.dal.dataobject.permission.RoleMenuDO; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.permission.SysUserRoleDO; import cn.iocoder.yudao.module.system.dal.mysql.permission.SysRoleMenuMapper; import cn.iocoder.yudao.module.system.dal.mysql.permission.SysUserRoleMapper; -import cn.iocoder.yudao.module.system.mq.producer.permission.SysPermissionProducer; -import cn.iocoder.yudao.module.system.service.dept.SysDeptService; +import cn.iocoder.yudao.module.system.mq.producer.permission.PermissionProducer; +import cn.iocoder.yudao.module.system.service.dept.DeptService; import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; import cn.iocoder.yudao.framework.common.util.collection.MapUtils; import cn.iocoder.yudao.framework.common.util.json.JsonUtils; @@ -40,12 +40,12 @@ import java.util.*; */ @Service("ss") // 使用 Spring Security 的缩写,方便食用 @Slf4j -public class SysPermissionServiceImpl implements SysPermissionService { +public class PermissionServiceImpl implements PermissionService { /** * LoginUser 的 Context 缓存 Key */ - public static final String CONTEXT_KEY = SysPermissionServiceImpl.class.getSimpleName(); + public static final String CONTEXT_KEY = PermissionServiceImpl.class.getSimpleName(); /** * 定时执行 {@link #schedulePeriodicRefresh()} 的周期 @@ -80,14 +80,14 @@ public class SysPermissionServiceImpl implements SysPermissionService { private SysUserRoleMapper userRoleMapper; @Resource - private SysRoleService roleService; + private RoleService roleService; @Resource - private SysMenuService menuService; + private MenuService menuService; @Resource - private SysDeptService deptService; + private DeptService deptService; @Resource - private SysPermissionProducer permissionProducer; + private PermissionProducer permissionProducer; /** * 初始化 {@link #roleMenuCache} 和 {@link #menuRoleCache} 缓存 @@ -97,7 +97,7 @@ public class SysPermissionServiceImpl implements SysPermissionService { public void initLocalCache() { Date now = new Date(); // 获取角色与菜单的关联列表,如果有更新 - List roleMenuList = this.loadRoleMenuIfUpdate(maxUpdateTime); + List roleMenuList = this.loadRoleMenuIfUpdate(maxUpdateTime); if (CollUtil.isEmpty(roleMenuList)) { return; } @@ -128,7 +128,7 @@ public class SysPermissionServiceImpl implements SysPermissionService { * @param maxUpdateTime 当前角色与菜单的关联的最大更新时间 * @return 角色与菜单的关联列表 */ - private List loadRoleMenuIfUpdate(Date maxUpdateTime) { + private List loadRoleMenuIfUpdate(Date maxUpdateTime) { // 第一步,判断是否要更新。 if (maxUpdateTime == null) { // 如果更新时间为空,说明 DB 一定有新数据 log.info("[loadRoleMenuIfUpdate][首次加载全量角色与菜单的关联]"); @@ -143,8 +143,8 @@ public class SysPermissionServiceImpl implements SysPermissionService { } @Override - public List getRoleMenusFromCache(Collection roleIds, Collection menuTypes, - Collection menusStatuses) { + public List getRoleMenusFromCache(Collection roleIds, Collection menuTypes, + Collection menusStatuses) { // 任一一个参数为空时,不返回任何菜单 if (CollectionUtils.isAnyEmpty(roleIds, menusStatuses, menusStatuses)) { return Collections.emptyList(); @@ -178,11 +178,11 @@ public class SysPermissionServiceImpl implements SysPermissionService { // 如果是管理员的情况下,获取全部菜单编号 SysRoleDO role = roleService.getRole(roleId); if (roleService.hasAnyAdmin(Collections.singletonList(role))) { - return CollectionUtils.convertSet(menuService.getMenus(), SysMenuDO::getId); + return CollectionUtils.convertSet(menuService.getMenus(), MenuDO::getId); } // 如果是非管理员的情况下,获得拥有的菜单编号 return CollectionUtils.convertSet(roleMenuMapper.selectListByRoleId(roleId), - SysRoleMenuDO::getMenuId); + RoleMenuDO::getMenuId); } @Override @@ -190,7 +190,7 @@ public class SysPermissionServiceImpl implements SysPermissionService { public void assignRoleMenu(Long roleId, Set menuIds) { // 获得角色拥有菜单编号 Set dbMenuIds = CollectionUtils.convertSet(roleMenuMapper.selectListByRoleId(roleId), - SysRoleMenuDO::getMenuId); + RoleMenuDO::getMenuId); // 计算新增和删除的菜单编号 Collection createMenuIds = CollUtil.subtract(menuIds, dbMenuIds); Collection deleteMenuIds = CollUtil.subtract(dbMenuIds, menuIds); @@ -310,7 +310,7 @@ public class SysPermissionServiceImpl implements SysPermissionService { // 遍历权限,判断是否有一个满足 return Arrays.stream(permissions).anyMatch(permission -> { - List menuList = menuService.getMenuListByPermissionFromCache(permission); + List menuList = menuService.getMenuListByPermissionFromCache(permission); // 采用严格模式,如果权限找不到对应的 Menu 的话,认为 if (CollUtil.isEmpty(menuList)) { return false; diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/SysRoleService.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/RoleService.java similarity index 81% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/SysRoleService.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/RoleService.java index 47de67f8a..0bf13785d 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/SysRoleService.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/RoleService.java @@ -1,10 +1,10 @@ package cn.iocoder.yudao.module.system.service.permission; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.system.controller.permission.vo.role.SysRoleCreateReqVO; -import cn.iocoder.yudao.module.system.controller.permission.vo.role.SysRoleExportReqVO; -import cn.iocoder.yudao.module.system.controller.permission.vo.role.SysRolePageReqVO; -import cn.iocoder.yudao.module.system.controller.permission.vo.role.SysRoleUpdateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.permission.vo.role.RoleCreateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.permission.vo.role.RoleExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.permission.vo.role.RolePageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.permission.vo.role.RoleUpdateReqVO; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.permission.SysRoleDO; import org.springframework.lang.Nullable; @@ -17,7 +17,7 @@ import java.util.Set; * * @author 芋道源码 */ -public interface SysRoleService { +public interface RoleService { /** * 初始化角色的本地缓存 @@ -30,14 +30,14 @@ public interface SysRoleService { * @param reqVO 创建角色信息 * @return 角色编号 */ - Long createRole(SysRoleCreateReqVO reqVO); + Long createRole(RoleCreateReqVO reqVO); /** * 更新角色 * * @param reqVO 更新角色信息 */ - void updateRole(SysRoleUpdateReqVO reqVO); + void updateRole(RoleUpdateReqVO reqVO); /** * 删除角色 @@ -119,7 +119,7 @@ public interface SysRoleService { * @param reqVO 角色分页查询 * @return 角色分页结果 */ - PageResult getRolePage(SysRolePageReqVO reqVO); + PageResult getRolePage(RolePageReqVO reqVO); /** * 获得角色列表 @@ -127,7 +127,7 @@ public interface SysRoleService { * @param reqVO 列表查询 * @return 角色列表 */ - List getRoleList(SysRoleExportReqVO reqVO); + List getRoleList(RoleExportReqVO reqVO); diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/SysRoleServiceImpl.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/RoleServiceImpl.java similarity index 86% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/SysRoleServiceImpl.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/RoleServiceImpl.java index f0c8b167c..cd8cbe819 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/SysRoleServiceImpl.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/RoleServiceImpl.java @@ -5,18 +5,16 @@ import cn.hutool.core.collection.CollectionUtil; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.yudao.module.system.controller.permission.vo.role.SysRoleCreateReqVO; -import cn.iocoder.yudao.module.system.controller.permission.vo.role.SysRoleExportReqVO; -import cn.iocoder.yudao.module.system.controller.permission.vo.role.SysRolePageReqVO; -import cn.iocoder.yudao.module.system.controller.permission.vo.role.SysRoleUpdateReqVO; -import cn.iocoder.yudao.module.system.convert.permission.SysRoleConvert; +import cn.iocoder.yudao.module.system.controller.admin.permission.vo.role.RoleCreateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.permission.vo.role.RoleExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.permission.vo.role.RolePageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.permission.vo.role.RoleUpdateReqVO; +import cn.iocoder.yudao.module.system.convert.permission.RoleConvert; import cn.iocoder.yudao.module.system.dal.mysql.permission.SysRoleMapper; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.permission.SysRoleDO; import cn.iocoder.yudao.module.system.enums.permission.RoleCodeEnum; -import cn.iocoder.yudao.module.system.enums.permission.SysRoleTypeEnum; -import cn.iocoder.yudao.module.system.mq.producer.permission.SysRoleProducer; -import cn.iocoder.yudao.module.system.service.permission.SysPermissionService; -import cn.iocoder.yudao.module.system.service.permission.SysRoleService; +import cn.iocoder.yudao.module.system.enums.permission.RoleTypeEnum; +import cn.iocoder.yudao.module.system.mq.producer.permission.RoleProducer; import cn.iocoder.yudao.framework.security.core.enums.DataScopeEnum; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableMap; @@ -34,7 +32,7 @@ import javax.annotation.Resource; import java.util.*; import java.util.stream.Collectors; -import static cn.iocoder.yudao.module.system.enums.SysErrorCodeConstants.*; +import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; /** @@ -44,7 +42,7 @@ import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionU */ @Service @Slf4j -public class SysRoleServiceImpl implements SysRoleService { +public class RoleServiceImpl implements RoleService { /** * 定时执行 {@link #schedulePeriodicRefresh()} 的周期 @@ -65,13 +63,13 @@ public class SysRoleServiceImpl implements SysRoleService { private volatile Date maxUpdateTime; @Resource - private SysPermissionService permissionService; + private PermissionService permissionService; @Resource private SysRoleMapper roleMapper; @Resource - private SysRoleProducer roleProducer; + private RoleProducer roleProducer; /** * 初始化 {@link #roleCache} 缓存 @@ -121,12 +119,12 @@ public class SysRoleServiceImpl implements SysRoleService { } @Override - public Long createRole(SysRoleCreateReqVO reqVO) { + public Long createRole(RoleCreateReqVO reqVO) { // 校验角色 checkDuplicateRole(reqVO.getName(), reqVO.getCode(), null); // 插入到数据库 - SysRoleDO role = SysRoleConvert.INSTANCE.convert(reqVO); - role.setType(SysRoleTypeEnum.CUSTOM.getType()); + SysRoleDO role = RoleConvert.INSTANCE.convert(reqVO); + role.setType(RoleTypeEnum.CUSTOM.getType()); role.setStatus(CommonStatusEnum.ENABLE.getStatus()); role.setDataScope(DataScopeEnum.ALL.getScope()); // 默认可查看所有数据。原因是,可能一些项目不需要项目权限 roleMapper.insert(role); @@ -137,13 +135,13 @@ public class SysRoleServiceImpl implements SysRoleService { } @Override - public void updateRole(SysRoleUpdateReqVO reqVO) { + public void updateRole(RoleUpdateReqVO reqVO) { // 校验是否可以更新 this.checkUpdateRole(reqVO.getId()); // 校验角色的唯一字段是否重复 checkDuplicateRole(reqVO.getName(), reqVO.getCode(), reqVO.getId()); // 更新到数据库 - SysRoleDO updateObject = SysRoleConvert.INSTANCE.convert(reqVO); + SysRoleDO updateObject = RoleConvert.INSTANCE.convert(reqVO); roleMapper.updateById(updateObject); // 发送刷新消息 roleProducer.sendRoleRefreshMessage(); @@ -229,12 +227,12 @@ public class SysRoleServiceImpl implements SysRoleService { } @Override - public PageResult getRolePage(SysRolePageReqVO reqVO) { + public PageResult getRolePage(RolePageReqVO reqVO) { return roleMapper.selectPage(reqVO); } @Override - public List getRoleList(SysRoleExportReqVO reqVO) { + public List getRoleList(RoleExportReqVO reqVO) { return roleMapper.listRoles(reqVO); } @@ -278,7 +276,7 @@ public class SysRoleServiceImpl implements SysRoleService { throw exception(ROLE_NOT_EXISTS); } // 内置角色,不允许删除 - if (SysRoleTypeEnum.SYSTEM.getType().equals(roleDO.getType())) { + if (RoleTypeEnum.SYSTEM.getType().equals(roleDO.getType())) { throw exception(ROLE_CAN_NOT_UPDATE_SYSTEM_TYPE_ROLE); } } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SysSmsChannelService.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsChannelService.java similarity index 71% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SysSmsChannelService.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsChannelService.java index d7fa604e2..d57a990c8 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SysSmsChannelService.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsChannelService.java @@ -2,9 +2,9 @@ package cn.iocoder.yudao.module.system.service.sms; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.sms.SysSmsChannelDO; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.system.controller.sms.vo.channel.SysSmsChannelCreateReqVO; -import cn.iocoder.yudao.module.system.controller.sms.vo.channel.SysSmsChannelPageReqVO; -import cn.iocoder.yudao.module.system.controller.sms.vo.channel.SysSmsChannelUpdateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel.SmsChannelCreateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel.SmsChannelPageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel.SmsChannelUpdateReqVO; import javax.validation.Valid; import java.util.Collection; @@ -16,7 +16,7 @@ import java.util.List; * @author zzf * @date 2021/1/25 9:24 */ -public interface SysSmsChannelService { +public interface SmsChannelService { /** * 初始化短信客户端 @@ -29,14 +29,14 @@ public interface SysSmsChannelService { * @param createReqVO 创建信息 * @return 编号 */ - Long createSmsChannel(@Valid SysSmsChannelCreateReqVO createReqVO); + Long createSmsChannel(@Valid SmsChannelCreateReqVO createReqVO); /** * 更新短信渠道 * * @param updateReqVO 更新信息 */ - void updateSmsChannel(@Valid SysSmsChannelUpdateReqVO updateReqVO); + void updateSmsChannel(@Valid SmsChannelUpdateReqVO updateReqVO); /** * 删除短信渠道 @@ -74,6 +74,6 @@ public interface SysSmsChannelService { * @param pageReqVO 分页查询 * @return 短信渠道分页 */ - PageResult getSmsChannelPage(SysSmsChannelPageReqVO pageReqVO); + PageResult getSmsChannelPage(SmsChannelPageReqVO pageReqVO); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SysSmsChannelServiceImpl.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsChannelServiceImpl.java similarity index 77% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SysSmsChannelServiceImpl.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsChannelServiceImpl.java index b36016a6b..6c26e8203 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SysSmsChannelServiceImpl.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsChannelServiceImpl.java @@ -1,14 +1,12 @@ package cn.iocoder.yudao.module.system.service.sms; import cn.hutool.core.collection.CollUtil; -import cn.iocoder.yudao.module.system.controller.sms.vo.channel.SysSmsChannelCreateReqVO; -import cn.iocoder.yudao.module.system.controller.sms.vo.channel.SysSmsChannelPageReqVO; -import cn.iocoder.yudao.module.system.controller.sms.vo.channel.SysSmsChannelUpdateReqVO; -import cn.iocoder.yudao.module.system.convert.sms.SysSmsChannelConvert; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel.SmsChannelCreateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel.SmsChannelPageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel.SmsChannelUpdateReqVO; +import cn.iocoder.yudao.module.system.convert.sms.SmsChannelConvert; import cn.iocoder.yudao.module.system.dal.mysql.sms.SysSmsChannelMapper; -import cn.iocoder.yudao.module.system.mq.producer.sms.SysSmsProducer; -import cn.iocoder.yudao.module.system.service.sms.SysSmsChannelService; -import cn.iocoder.yudao.module.system.service.sms.SysSmsTemplateService; +import cn.iocoder.yudao.module.system.mq.producer.sms.SmsProducer; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.sms.SysSmsChannelDO; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; @@ -25,8 +23,8 @@ import java.util.Comparator; import java.util.Date; import java.util.List; -import static cn.iocoder.yudao.module.system.enums.SysErrorCodeConstants.SMS_CHANNEL_HAS_CHILDREN; -import static cn.iocoder.yudao.module.system.enums.SysErrorCodeConstants.SMS_CHANNEL_NOT_EXISTS; +import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.SMS_CHANNEL_HAS_CHILDREN; +import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.SMS_CHANNEL_NOT_EXISTS; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; /** @@ -37,7 +35,7 @@ import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionU */ @Service @Slf4j -public class SysSmsChannelServiceImpl implements SysSmsChannelService { +public class SmsChannelServiceImpl implements SmsChannelService { /** * 定时执行 {@link #schedulePeriodicRefresh()} 的周期 @@ -57,10 +55,10 @@ public class SysSmsChannelServiceImpl implements SysSmsChannelService { private SysSmsChannelMapper smsChannelMapper; @Resource - private SysSmsTemplateService smsTemplateService; + private SmsTemplateService smsTemplateService; @Resource - private SysSmsProducer smsProducer; + private SmsProducer smsProducer; @Override @PostConstruct @@ -72,7 +70,7 @@ public class SysSmsChannelServiceImpl implements SysSmsChannelService { } // 创建或更新短信 Client - List propertiesList = SysSmsChannelConvert.INSTANCE.convertList02(smsChannels); + List propertiesList = SmsChannelConvert.INSTANCE.convertList02(smsChannels); propertiesList.forEach(properties -> smsClientFactory.createOrUpdateSmsClient(properties)); // 写入缓存 @@ -108,9 +106,9 @@ public class SysSmsChannelServiceImpl implements SysSmsChannelService { } @Override - public Long createSmsChannel(SysSmsChannelCreateReqVO createReqVO) { + public Long createSmsChannel(SmsChannelCreateReqVO createReqVO) { // 插入 - SysSmsChannelDO smsChannel = SysSmsChannelConvert.INSTANCE.convert(createReqVO); + SysSmsChannelDO smsChannel = SmsChannelConvert.INSTANCE.convert(createReqVO); smsChannelMapper.insert(smsChannel); // 发送刷新消息 smsProducer.sendSmsChannelRefreshMessage(); @@ -119,11 +117,11 @@ public class SysSmsChannelServiceImpl implements SysSmsChannelService { } @Override - public void updateSmsChannel(SysSmsChannelUpdateReqVO updateReqVO) { + public void updateSmsChannel(SmsChannelUpdateReqVO updateReqVO) { // 校验存在 this.validateSmsChannelExists(updateReqVO.getId()); // 更新 - SysSmsChannelDO updateObj = SysSmsChannelConvert.INSTANCE.convert(updateReqVO); + SysSmsChannelDO updateObj = SmsChannelConvert.INSTANCE.convert(updateReqVO); smsChannelMapper.updateById(updateObj); // 发送刷新消息 smsProducer.sendSmsChannelRefreshMessage(); @@ -165,7 +163,7 @@ public class SysSmsChannelServiceImpl implements SysSmsChannelService { } @Override - public PageResult getSmsChannelPage(SysSmsChannelPageReqVO pageReqVO) { + public PageResult getSmsChannelPage(SmsChannelPageReqVO pageReqVO) { return smsChannelMapper.selectPage(pageReqVO); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SysSmsLogService.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsLogService.java similarity index 62% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SysSmsLogService.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsLogService.java index 547bc6b0d..fcd66e7a1 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SysSmsLogService.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsLogService.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.service.sms; -import cn.iocoder.yudao.module.system.controller.sms.vo.log.SysSmsLogExportReqVO; -import cn.iocoder.yudao.module.system.controller.sms.vo.log.SysSmsLogPageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.log.SmsLogExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.log.SmsLogPageReqVO; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.sms.SysSmsLogDO; import cn.iocoder.yudao.framework.common.pojo.PageResult; @@ -13,7 +13,7 @@ import java.util.List; * @author zzf * @date 13:48 2021/3/2 */ -public interface SysSmsLogService { +public interface SmsLogService { /** * 获得短信日志分页 @@ -21,7 +21,7 @@ public interface SysSmsLogService { * @param pageReqVO 分页查询 * @return 短信日志分页 */ - PageResult getSmsLogPage(SysSmsLogPageReqVO pageReqVO); + PageResult getSmsLogPage(SmsLogPageReqVO pageReqVO); /** * 获得短信日志列表, 用于 Excel 导出 @@ -29,6 +29,6 @@ public interface SysSmsLogService { * @param exportReqVO 查询条件 * @return 短信日志列表 */ - List getSmsLogList(SysSmsLogExportReqVO exportReqVO); + List getSmsLogList(SmsLogExportReqVO exportReqVO); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SysSmsLogServiceImpl.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsLogServiceImpl.java similarity index 60% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SysSmsLogServiceImpl.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsLogServiceImpl.java index f390c98c5..d09b77e1d 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SysSmsLogServiceImpl.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsLogServiceImpl.java @@ -1,9 +1,8 @@ package cn.iocoder.yudao.module.system.service.sms; -import cn.iocoder.yudao.module.system.controller.sms.vo.log.SysSmsLogExportReqVO; -import cn.iocoder.yudao.module.system.controller.sms.vo.log.SysSmsLogPageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.log.SmsLogExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.log.SmsLogPageReqVO; import cn.iocoder.yudao.module.system.dal.mysql.sms.SysSmsLogMapper; -import cn.iocoder.yudao.module.system.service.sms.SysSmsLogService; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.sms.SysSmsLogDO; import cn.iocoder.yudao.framework.common.pojo.PageResult; import lombok.extern.slf4j.Slf4j; @@ -20,18 +19,18 @@ import java.util.List; */ @Slf4j @Service -public class SysSmsLogServiceImpl implements SysSmsLogService { +public class SmsLogServiceImpl implements SmsLogService { @Resource private SysSmsLogMapper smsLogMapper; @Override - public PageResult getSmsLogPage(SysSmsLogPageReqVO pageReqVO) { + public PageResult getSmsLogPage(SmsLogPageReqVO pageReqVO) { return smsLogMapper.selectPage(pageReqVO); } @Override - public List getSmsLogList(SysSmsLogExportReqVO exportReqVO) { + public List getSmsLogList(SmsLogExportReqVO exportReqVO) { return smsLogMapper.selectList(exportReqVO); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SysSmsTemplateService.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsTemplateService.java similarity index 69% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SysSmsTemplateService.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsTemplateService.java index 96873a0c1..397ff9faa 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SysSmsTemplateService.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsTemplateService.java @@ -1,9 +1,9 @@ package cn.iocoder.yudao.module.system.service.sms; -import cn.iocoder.yudao.module.system.controller.sms.vo.template.SysSmsTemplateCreateReqVO; -import cn.iocoder.yudao.module.system.controller.sms.vo.template.SysSmsTemplateExportReqVO; -import cn.iocoder.yudao.module.system.controller.sms.vo.template.SysSmsTemplatePageReqVO; -import cn.iocoder.yudao.module.system.controller.sms.vo.template.SysSmsTemplateUpdateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.template.SmsTemplateCreateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.template.SmsTemplateExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.template.SmsTemplatePageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.template.SmsTemplateUpdateReqVO; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.sms.SysSmsTemplateDO; import cn.iocoder.yudao.framework.common.pojo.PageResult; @@ -17,7 +17,7 @@ import java.util.List; * @author zzf * @date 2021/1/25 9:24 */ -public interface SysSmsTemplateService { +public interface SmsTemplateService { /** * 获得短信模板 @@ -33,14 +33,14 @@ public interface SysSmsTemplateService { * @param createReqVO 创建信息 * @return 编号 */ - Long createSmsTemplate(@Valid SysSmsTemplateCreateReqVO createReqVO); + Long createSmsTemplate(@Valid SmsTemplateCreateReqVO createReqVO); /** * 更新短信模板 * * @param updateReqVO 更新信息 */ - void updateSmsTemplate(@Valid SysSmsTemplateUpdateReqVO updateReqVO); + void updateSmsTemplate(@Valid SmsTemplateUpdateReqVO updateReqVO); /** * 删除短信模板 @@ -71,7 +71,7 @@ public interface SysSmsTemplateService { * @param pageReqVO 分页查询 * @return 短信模板分页 */ - PageResult getSmsTemplatePage(SysSmsTemplatePageReqVO pageReqVO); + PageResult getSmsTemplatePage(SmsTemplatePageReqVO pageReqVO); /** * 获得短信模板列表, 用于 Excel 导出 @@ -79,7 +79,7 @@ public interface SysSmsTemplateService { * @param exportReqVO 查询条件 * @return 短信模板分页 */ - List getSmsTemplateList(SysSmsTemplateExportReqVO exportReqVO); + List getSmsTemplateList(SmsTemplateExportReqVO exportReqVO); /** * 获得指定短信渠道下的短信模板数量 diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SysSmsTemplateServiceImpl.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsTemplateServiceImpl.java similarity index 80% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SysSmsTemplateServiceImpl.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsTemplateServiceImpl.java index 3b6e46328..cc145d97e 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SysSmsTemplateServiceImpl.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsTemplateServiceImpl.java @@ -1,15 +1,13 @@ package cn.iocoder.yudao.module.system.service.sms; import cn.hutool.core.util.ReUtil; -import cn.iocoder.yudao.module.system.controller.sms.vo.template.SysSmsTemplateCreateReqVO; -import cn.iocoder.yudao.module.system.controller.sms.vo.template.SysSmsTemplateExportReqVO; -import cn.iocoder.yudao.module.system.controller.sms.vo.template.SysSmsTemplatePageReqVO; -import cn.iocoder.yudao.module.system.controller.sms.vo.template.SysSmsTemplateUpdateReqVO; -import cn.iocoder.yudao.module.system.convert.sms.SysSmsTemplateConvert; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.template.SmsTemplateCreateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.template.SmsTemplateExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.template.SmsTemplatePageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.template.SmsTemplateUpdateReqVO; +import cn.iocoder.yudao.module.system.convert.sms.SmsTemplateConvert; import cn.iocoder.yudao.module.system.dal.mysql.sms.SysSmsTemplateMapper; -import cn.iocoder.yudao.module.system.mq.producer.sms.SysSmsProducer; -import cn.iocoder.yudao.module.system.service.sms.SysSmsChannelService; -import cn.iocoder.yudao.module.system.service.sms.SysSmsTemplateService; +import cn.iocoder.yudao.module.system.mq.producer.sms.SmsProducer; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.sms.SysSmsChannelDO; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.sms.SysSmsTemplateDO; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; @@ -29,7 +27,7 @@ import java.util.List; import java.util.Objects; import java.util.regex.Pattern; -import static cn.iocoder.yudao.module.system.enums.SysErrorCodeConstants.*; +import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; /** @@ -40,7 +38,7 @@ import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionU */ @Service @Slf4j -public class SysSmsTemplateServiceImpl implements SysSmsTemplateService { +public class SmsTemplateServiceImpl implements SmsTemplateService { /** * 正则表达式,匹配 {} 中的变量 @@ -51,13 +49,13 @@ public class SysSmsTemplateServiceImpl implements SysSmsTemplateService { private SysSmsTemplateMapper smsTemplateMapper; @Resource - private SysSmsChannelService smsChannelService; + private SmsChannelService smsChannelService; @Resource private SmsClientFactory smsClientFactory; @Resource - private SysSmsProducer smsProducer; + private SmsProducer smsProducer; @Override public SysSmsTemplateDO getSmsTemplateByCode(String code) { @@ -70,7 +68,7 @@ public class SysSmsTemplateServiceImpl implements SysSmsTemplateService { } @Override - public Long createSmsTemplate(SysSmsTemplateCreateReqVO createReqVO) { + public Long createSmsTemplate(SmsTemplateCreateReqVO createReqVO) { // 校验短信渠道 SysSmsChannelDO channelDO = checkSmsChannel(createReqVO.getChannelId()); // 校验短信编码是否重复 @@ -79,7 +77,7 @@ public class SysSmsTemplateServiceImpl implements SysSmsTemplateService { checkApiTemplate(createReqVO.getChannelId(), createReqVO.getApiTemplateId()); // 插入 - SysSmsTemplateDO template = SysSmsTemplateConvert.INSTANCE.convert(createReqVO); + SysSmsTemplateDO template = SmsTemplateConvert.INSTANCE.convert(createReqVO); template.setParams(parseTemplateContentParams(template.getContent())); template.setChannelCode(channelDO.getCode()); smsTemplateMapper.insert(template); @@ -90,7 +88,7 @@ public class SysSmsTemplateServiceImpl implements SysSmsTemplateService { } @Override - public void updateSmsTemplate(SysSmsTemplateUpdateReqVO updateReqVO) { + public void updateSmsTemplate(SmsTemplateUpdateReqVO updateReqVO) { // 校验存在 this.validateSmsTemplateExists(updateReqVO.getId()); // 校验短信渠道 @@ -101,7 +99,7 @@ public class SysSmsTemplateServiceImpl implements SysSmsTemplateService { checkApiTemplate(updateReqVO.getChannelId(), updateReqVO.getApiTemplateId()); // 更新 - SysSmsTemplateDO updateObj = SysSmsTemplateConvert.INSTANCE.convert(updateReqVO); + SysSmsTemplateDO updateObj = SmsTemplateConvert.INSTANCE.convert(updateReqVO); updateObj.setParams(parseTemplateContentParams(updateObj.getContent())); updateObj.setChannelCode(channelDO.getCode()); smsTemplateMapper.updateById(updateObj); @@ -136,12 +134,12 @@ public class SysSmsTemplateServiceImpl implements SysSmsTemplateService { } @Override - public PageResult getSmsTemplatePage(SysSmsTemplatePageReqVO pageReqVO) { + public PageResult getSmsTemplatePage(SmsTemplatePageReqVO pageReqVO) { return smsTemplateMapper.selectPage(pageReqVO); } @Override - public List getSmsTemplateList(SysSmsTemplateExportReqVO exportReqVO) { + public List getSmsTemplateList(SmsTemplateExportReqVO exportReqVO) { return smsTemplateMapper.selectList(exportReqVO); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/tenant/SysTenantService.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/tenant/TenantService.java similarity index 67% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/tenant/SysTenantService.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/tenant/TenantService.java index 357e23ad7..63ebfd5f3 100755 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/tenant/SysTenantService.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/tenant/TenantService.java @@ -1,9 +1,9 @@ package cn.iocoder.yudao.module.system.service.tenant; -import cn.iocoder.yudao.module.system.controller.tenant.vo.SysTenantCreateReqVO; -import cn.iocoder.yudao.module.system.controller.tenant.vo.SysTenantExportReqVO; -import cn.iocoder.yudao.module.system.controller.tenant.vo.SysTenantPageReqVO; -import cn.iocoder.yudao.module.system.controller.tenant.vo.SysTenantUpdateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.tenant.vo.TenantCreateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.tenant.vo.TenantExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.tenant.vo.TenantPageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.tenant.vo.TenantUpdateReqVO; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.tenant.SysTenantDO; import cn.iocoder.yudao.framework.common.pojo.PageResult; @@ -16,7 +16,7 @@ import java.util.List; * * @author 芋道源码 */ -public interface SysTenantService { +public interface TenantService { /** * 创建租户 @@ -24,14 +24,14 @@ public interface SysTenantService { * @param createReqVO 创建信息 * @return 编号 */ - Long createTenant(@Valid SysTenantCreateReqVO createReqVO); + Long createTenant(@Valid TenantCreateReqVO createReqVO); /** * 更新租户 * * @param updateReqVO 更新信息 */ - void updateTenant(@Valid SysTenantUpdateReqVO updateReqVO); + void updateTenant(@Valid TenantUpdateReqVO updateReqVO); /** * 删除租户 @@ -62,7 +62,7 @@ public interface SysTenantService { * @param pageReqVO 分页查询 * @return 租户分页 */ - PageResult getTenantPage(SysTenantPageReqVO pageReqVO); + PageResult getTenantPage(TenantPageReqVO pageReqVO); /** * 获得租户列表, 用于 Excel 导出 @@ -70,7 +70,7 @@ public interface SysTenantService { * @param exportReqVO 查询条件 * @return 租户列表 */ - List getTenantList(SysTenantExportReqVO exportReqVO); + List getTenantList(TenantExportReqVO exportReqVO); /** * 获得名字对应的租户 diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/tenant/SysTenantServiceImpl.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/tenant/TenantServiceImpl.java similarity index 63% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/tenant/SysTenantServiceImpl.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/tenant/TenantServiceImpl.java index bc76d2bad..297dbbbcc 100755 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/tenant/SysTenantServiceImpl.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/tenant/TenantServiceImpl.java @@ -1,12 +1,11 @@ package cn.iocoder.yudao.module.system.service.tenant; -import cn.iocoder.yudao.module.system.controller.tenant.vo.SysTenantCreateReqVO; -import cn.iocoder.yudao.module.system.controller.tenant.vo.SysTenantExportReqVO; -import cn.iocoder.yudao.module.system.controller.tenant.vo.SysTenantPageReqVO; -import cn.iocoder.yudao.module.system.controller.tenant.vo.SysTenantUpdateReqVO; -import cn.iocoder.yudao.module.system.convert.tenant.SysTenantConvert; +import cn.iocoder.yudao.module.system.controller.admin.tenant.vo.TenantCreateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.tenant.vo.TenantExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.tenant.vo.TenantPageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.tenant.vo.TenantUpdateReqVO; +import cn.iocoder.yudao.module.system.convert.tenant.TenantConvert; import cn.iocoder.yudao.module.system.dal.mysql.tenant.SysTenantMapper; -import cn.iocoder.yudao.module.system.service.tenant.SysTenantService; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.tenant.SysTenantDO; import cn.iocoder.yudao.framework.common.pojo.PageResult; import org.springframework.stereotype.Service; @@ -16,7 +15,7 @@ import javax.annotation.Resource; import java.util.Collection; import java.util.List; -import static cn.iocoder.yudao.module.system.enums.SysErrorCodeConstants.TENANT_NOT_EXISTS; +import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.TENANT_NOT_EXISTS; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; /** @@ -26,26 +25,26 @@ import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionU */ @Service @Validated -public class SysTenantServiceImpl implements SysTenantService { +public class TenantServiceImpl implements TenantService { @Resource private SysTenantMapper tenantMapper; @Override - public Long createTenant(SysTenantCreateReqVO createReqVO) { + public Long createTenant(TenantCreateReqVO createReqVO) { // 插入 - SysTenantDO tenant = SysTenantConvert.INSTANCE.convert(createReqVO); + SysTenantDO tenant = TenantConvert.INSTANCE.convert(createReqVO); tenantMapper.insert(tenant); // 返回 return tenant.getId(); } @Override - public void updateTenant(SysTenantUpdateReqVO updateReqVO) { + public void updateTenant(TenantUpdateReqVO updateReqVO) { // 校验存在 this.validateTenantExists(updateReqVO.getId()); // 更新 - SysTenantDO updateObj = SysTenantConvert.INSTANCE.convert(updateReqVO); + SysTenantDO updateObj = TenantConvert.INSTANCE.convert(updateReqVO); tenantMapper.updateById(updateObj); } @@ -74,12 +73,12 @@ public class SysTenantServiceImpl implements SysTenantService { } @Override - public PageResult getTenantPage(SysTenantPageReqVO pageReqVO) { + public PageResult getTenantPage(TenantPageReqVO pageReqVO) { return tenantMapper.selectPage(pageReqVO); } @Override - public List getTenantList(SysTenantExportReqVO exportReqVO) { + public List getTenantList(TenantExportReqVO exportReqVO) { return tenantMapper.selectList(exportReqVO); } diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/user/SysUserService.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/user/UserService.java similarity index 78% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/user/SysUserService.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/user/UserService.java index a1f428b7e..15d62caf2 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/user/SysUserService.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/user/UserService.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.system.service.user; -import cn.iocoder.yudao.module.system.controller.user.vo.profile.SysUserProfileUpdatePasswordReqVO; -import cn.iocoder.yudao.module.system.controller.user.vo.profile.SysUserProfileUpdateReqVO; -import cn.iocoder.yudao.module.system.controller.user.vo.user.*; +import cn.iocoder.yudao.module.system.controller.admin.user.vo.profile.UserProfileUpdatePasswordReqVO; +import cn.iocoder.yudao.module.system.controller.admin.user.vo.profile.UserProfileUpdateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.*; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.user.SysUserDO; import cn.iocoder.yudao.framework.common.pojo.PageResult; @@ -14,7 +14,7 @@ import java.util.*; * * @author 芋道源码 */ -public interface SysUserService { +public interface UserService { /** * 创建用户 @@ -22,14 +22,14 @@ public interface SysUserService { * @param reqVO 用户信息 * @return 用户编号 */ - Long createUser(SysUserCreateReqVO reqVO); + Long createUser(UserCreateReqVO reqVO); /** * 修改用户 * * @param reqVO 用户信息 */ - void updateUser(SysUserUpdateReqVO reqVO); + void updateUser(UserUpdateReqVO reqVO); /** * 更新用户的最后登陆信息 @@ -45,7 +45,7 @@ public interface SysUserService { * @param id 用户编号 * @param reqVO 用户个人信息 */ - void updateUserProfile(Long id, SysUserProfileUpdateReqVO reqVO); + void updateUserProfile(Long id, UserProfileUpdateReqVO reqVO); /** * 修改用户个人密码 @@ -53,7 +53,7 @@ public interface SysUserService { * @param id 用户编号 * @param reqVO 更新用户个人密码 */ - void updateUserPassword(Long id, SysUserProfileUpdatePasswordReqVO reqVO); + void updateUserPassword(Long id, UserProfileUpdatePasswordReqVO reqVO); /** * 更新用户头像 @@ -100,7 +100,7 @@ public interface SysUserService { * @param reqVO 分页条件 * @return 分页列表 */ - PageResult getUserPage(SysUserPageReqVO reqVO); + PageResult getUserPage(UserPageReqVO reqVO); /** * 获得用户 @@ -116,7 +116,7 @@ public interface SysUserService { * @param reqVO 列表请求 * @return 用户列表 */ - List getUsers(SysUserExportReqVO reqVO); + List getUsers(UserExportReqVO reqVO); @@ -143,7 +143,7 @@ public interface SysUserService { * @param isUpdateSupport 是否支持更新 * @return 导入结果 */ - SysUserImportRespVO importUsers(List importUsers, boolean isUpdateSupport); + UserImportRespVO importUsers(List importUsers, boolean isUpdateSupport); /** * 获得指定状态的用户们 diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/user/SysUserServiceImpl.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/user/UserServiceImpl.java similarity index 86% rename from yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/user/SysUserServiceImpl.java rename to yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/user/UserServiceImpl.java index 5eab9a83c..d5d7faefc 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/user/SysUserServiceImpl.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/user/UserServiceImpl.java @@ -4,17 +4,16 @@ import cn.hutool.core.collection.CollUtil; import cn.hutool.core.io.IoUtil; import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.StrUtil; -import cn.iocoder.yudao.module.system.controller.user.vo.profile.SysUserProfileUpdatePasswordReqVO; -import cn.iocoder.yudao.module.system.controller.user.vo.profile.SysUserProfileUpdateReqVO; -import cn.iocoder.yudao.module.system.controller.user.vo.user.*; -import cn.iocoder.yudao.module.system.convert.user.SysUserConvert; +import cn.iocoder.yudao.module.system.controller.admin.user.vo.profile.UserProfileUpdatePasswordReqVO; +import cn.iocoder.yudao.module.system.controller.admin.user.vo.profile.UserProfileUpdateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.*; +import cn.iocoder.yudao.module.system.convert.user.UserConvert; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.dept.SysDeptDO; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.dept.SysPostDO; import cn.iocoder.yudao.module.system.dal.mysql.user.SysUserMapper; -import cn.iocoder.yudao.module.system.service.dept.SysDeptService; -import cn.iocoder.yudao.module.system.service.dept.SysPostService; -import cn.iocoder.yudao.module.system.service.permission.SysPermissionService; -import cn.iocoder.yudao.module.system.service.user.SysUserService; +import cn.iocoder.yudao.module.system.service.dept.DeptService; +import cn.iocoder.yudao.module.system.service.dept.PostService; +import cn.iocoder.yudao.module.system.service.permission.PermissionService; import cn.iocoder.yudao.coreservice.modules.infra.service.file.InfFileCoreService; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.user.SysUserDO; import cn.iocoder.yudao.coreservice.modules.system.service.dept.SysDeptCoreService; @@ -33,17 +32,17 @@ import javax.annotation.Resource; import java.io.InputStream; import java.util.*; -import static cn.iocoder.yudao.module.system.enums.SysErrorCodeConstants.*; +import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; /** - * 用户 Service 实现类 + * 管理员用户 Service 实现类 * * @author 芋道源码 */ -@Service +@Service("adminUserService") @Slf4j -public class SysUserServiceImpl implements SysUserService { +public class UserServiceImpl implements UserService { @Value("${sys.user.init-password:yudaoyuanma}") private String userInitPassword; @@ -52,26 +51,26 @@ public class SysUserServiceImpl implements SysUserService { private SysUserMapper userMapper; @Resource - private SysDeptService deptService; + private DeptService deptService; @Resource private SysDeptCoreService deptCoreService; @Resource - private SysPostService postService; + private PostService postService; @Resource - private SysPermissionService permissionService; + private PermissionService permissionService; @Resource private PasswordEncoder passwordEncoder; @Resource private InfFileCoreService fileService; @Override - public Long createUser(SysUserCreateReqVO reqVO) { + public Long createUser(UserCreateReqVO reqVO) { // 校验正确性 this.checkCreateOrUpdate(null, reqVO.getUsername(), reqVO.getMobile(), reqVO.getEmail(), reqVO.getDeptId(), reqVO.getPostIds()); // 插入用户 - SysUserDO user = SysUserConvert.INSTANCE.convert(reqVO); + SysUserDO user = UserConvert.INSTANCE.convert(reqVO); user.setStatus(CommonStatusEnum.ENABLE.getStatus()); // 默认开启 user.setPassword(passwordEncoder.encode(reqVO.getPassword())); // 加密密码 userMapper.insert(user); @@ -79,12 +78,12 @@ public class SysUserServiceImpl implements SysUserService { } @Override - public void updateUser(SysUserUpdateReqVO reqVO) { + public void updateUser(UserUpdateReqVO reqVO) { // 校验正确性 this.checkCreateOrUpdate(reqVO.getId(), reqVO.getUsername(), reqVO.getMobile(), reqVO.getEmail(), reqVO.getDeptId(), reqVO.getPostIds()); // 更新用户 - SysUserDO updateObj = SysUserConvert.INSTANCE.convert(reqVO); + SysUserDO updateObj = UserConvert.INSTANCE.convert(reqVO); userMapper.updateById(updateObj); } @@ -94,17 +93,17 @@ public class SysUserServiceImpl implements SysUserService { } @Override - public void updateUserProfile(Long id, SysUserProfileUpdateReqVO reqVO) { + public void updateUserProfile(Long id, UserProfileUpdateReqVO reqVO) { // 校验正确性 this.checkUserExists(id); this.checkEmailUnique(id, reqVO.getEmail()); this.checkMobileUnique(id, reqVO.getMobile()); // 执行更新 - userMapper.updateById(SysUserConvert.INSTANCE.convert(reqVO).setId(id)); + userMapper.updateById(UserConvert.INSTANCE.convert(reqVO).setId(id)); } @Override - public void updateUserPassword(Long id, SysUserProfileUpdatePasswordReqVO reqVO) { + public void updateUserPassword(Long id, UserProfileUpdatePasswordReqVO reqVO) { // 校验旧密码密码 this.checkOldPassword(id, reqVO.getOldPassword()); // 执行更新 @@ -164,7 +163,7 @@ public class SysUserServiceImpl implements SysUserService { } @Override - public PageResult getUserPage(SysUserPageReqVO reqVO) { + public PageResult getUserPage(UserPageReqVO reqVO) { return userMapper.selectPage(reqVO, this.getDeptCondition(reqVO.getDeptId())); } @@ -174,7 +173,7 @@ public class SysUserServiceImpl implements SysUserService { } @Override - public List getUsers(SysUserExportReqVO reqVO) { + public List getUsers(UserExportReqVO reqVO) { return userMapper.selectList(reqVO, this.getDeptCondition(reqVO.getDeptId())); } @@ -340,11 +339,11 @@ public class SysUserServiceImpl implements SysUserService { @Override @Transactional(rollbackFor = Exception.class) // 添加事务,异常则回滚所有导入 - public SysUserImportRespVO importUsers(List importUsers, boolean isUpdateSupport) { + public UserImportRespVO importUsers(List importUsers, boolean isUpdateSupport) { if (CollUtil.isEmpty(importUsers)) { throw exception(USER_IMPORT_LIST_IS_EMPTY); } - SysUserImportRespVO respVO = SysUserImportRespVO.builder().createUsernames(new ArrayList<>()) + UserImportRespVO respVO = UserImportRespVO.builder().createUsernames(new ArrayList<>()) .updateUsernames(new ArrayList<>()).failureUsernames(new LinkedHashMap<>()).build(); importUsers.forEach(importUser -> { // 校验,判断是否有不符合的原因 @@ -358,7 +357,7 @@ public class SysUserServiceImpl implements SysUserService { // 判断如果不存在,在进行插入 SysUserDO existUser = userMapper.selectByUsername(importUser.getUsername()); if (existUser == null) { - userMapper.insert(SysUserConvert.INSTANCE.convert(importUser) + userMapper.insert(UserConvert.INSTANCE.convert(importUser) .setPassword(passwordEncoder.encode(userInitPassword))); // 设置默认密码 respVO.getCreateUsernames().add(importUser.getUsername()); return; @@ -368,7 +367,7 @@ public class SysUserServiceImpl implements SysUserService { respVO.getFailureUsernames().put(importUser.getUsername(), USER_USERNAME_EXISTS.getMsg()); return; } - SysUserDO updateUser = SysUserConvert.INSTANCE.convert(importUser); + SysUserDO updateUser = UserConvert.INSTANCE.convert(importUser); updateUser.setId(existUser.getId()); userMapper.updateById(updateUser); respVO.getUpdateUsernames().add(importUser.getUsername()); diff --git a/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/auth/SysAuthServiceImplTest.java b/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/auth/AuthServiceImplTest.java similarity index 79% rename from yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/auth/SysAuthServiceImplTest.java rename to yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/auth/AuthServiceImplTest.java index 75ab194bc..a306eea49 100644 --- a/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/auth/SysAuthServiceImplTest.java +++ b/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/auth/AuthServiceImplTest.java @@ -1,12 +1,12 @@ package cn.iocoder.yudao.module.system.service.auth; -import cn.iocoder.yudao.module.system.controller.auth.vo.auth.SysAuthLoginReqVO; -import cn.iocoder.yudao.module.system.enums.logger.SysLoginLogTypeEnum; -import cn.iocoder.yudao.module.system.enums.logger.SysLoginResultEnum; -import cn.iocoder.yudao.module.system.service.common.SysCaptchaService; -import cn.iocoder.yudao.module.system.service.dept.SysPostService; -import cn.iocoder.yudao.module.system.service.permission.SysPermissionService; -import cn.iocoder.yudao.module.system.service.user.SysUserService; +import cn.iocoder.yudao.module.system.controller.admin.auth.vo.auth.AuthLoginReqVO; +import cn.iocoder.yudao.module.system.enums.logger.LoginLogTypeEnum; +import cn.iocoder.yudao.module.system.enums.logger.LoginResultEnum; +import cn.iocoder.yudao.module.system.service.common.CaptchaService; +import cn.iocoder.yudao.module.system.service.dept.PostService; +import cn.iocoder.yudao.module.system.service.permission.PermissionService; +import cn.iocoder.yudao.module.system.service.user.UserService; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.user.SysUserDO; import cn.iocoder.yudao.coreservice.modules.system.service.auth.SysUserSessionCoreService; import cn.iocoder.yudao.coreservice.modules.system.service.logger.SysLoginLogCoreService; @@ -31,7 +31,7 @@ import org.springframework.security.core.userdetails.UsernameNotFoundException; import javax.annotation.Resource; import java.util.Set; -import static cn.iocoder.yudao.module.system.enums.SysErrorCodeConstants.*; +import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*; import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.*; import static java.util.Collections.singleton; @@ -39,24 +39,24 @@ import static org.junit.jupiter.api.Assertions.*; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.*; -@Import(SysAuthServiceImpl.class) -public class SysAuthServiceImplTest extends BaseDbUnitTest { +@Import(AuthServiceImpl.class) +public class AuthServiceImplTest extends BaseDbUnitTest { @Resource - private SysAuthServiceImpl authService; + private AuthServiceImpl authService; @MockBean - private SysUserService userService; + private UserService userService; @MockBean private SysUserCoreService userCoreService; @MockBean - private SysPermissionService permissionService; + private PermissionService permissionService; @MockBean private AuthenticationManager authenticationManager; @MockBean private Authentication authentication; @MockBean - private SysCaptchaService captchaService; + private CaptchaService captchaService; @MockBean private SysLoginLogCoreService loginLogCoreService; @MockBean @@ -64,7 +64,7 @@ public class SysAuthServiceImplTest extends BaseDbUnitTest { @MockBean private SysSocialCoreService socialService; @MockBean - private SysPostService postService; + private PostService postService; @BeforeEach public void setUp() { @@ -131,15 +131,15 @@ public class SysAuthServiceImplTest extends BaseDbUnitTest { @Test public void testLogin_captchaNotFound() { // 准备参数 - SysAuthLoginReqVO reqVO = randomPojo(SysAuthLoginReqVO.class); + AuthLoginReqVO reqVO = randomPojo(AuthLoginReqVO.class); String userIp = randomString(); String userAgent = randomString(); // 调用, 并断言异常 assertServiceException(() -> authService.login(reqVO, userIp, userAgent), AUTH_LOGIN_CAPTCHA_NOT_FOUND); // 校验调用参数 verify(loginLogCoreService, times(1)).createLoginLog( - argThat(o -> o.getLogType().equals(SysLoginLogTypeEnum.LOGIN_USERNAME.getType()) - && o.getResult().equals(SysLoginResultEnum.CAPTCHA_NOT_FOUND.getResult())) + argThat(o -> o.getLogType().equals(LoginLogTypeEnum.LOGIN_USERNAME.getType()) + && o.getResult().equals(LoginResultEnum.CAPTCHA_NOT_FOUND.getResult())) ); } @@ -149,15 +149,15 @@ public class SysAuthServiceImplTest extends BaseDbUnitTest { String userIp = randomString(); String userAgent = randomString(); String code = randomString(); - SysAuthLoginReqVO reqVO = randomPojo(SysAuthLoginReqVO.class); + AuthLoginReqVO reqVO = randomPojo(AuthLoginReqVO.class); // mock 验证码不正确 when(captchaService.getCaptchaCode(reqVO.getUuid())).thenReturn(code); // 调用, 并断言异常 assertServiceException(() -> authService.login(reqVO, userIp, userAgent), AUTH_LOGIN_CAPTCHA_CODE_ERROR); // 校验调用参数 verify(loginLogCoreService, times(1)).createLoginLog( - argThat(o -> o.getLogType().equals(SysLoginLogTypeEnum.LOGIN_USERNAME.getType()) - && o.getResult().equals(SysLoginResultEnum.CAPTCHA_CODE_ERROR.getResult())) + argThat(o -> o.getLogType().equals(LoginLogTypeEnum.LOGIN_USERNAME.getType()) + && o.getResult().equals(LoginResultEnum.CAPTCHA_CODE_ERROR.getResult())) ); } @@ -166,7 +166,7 @@ public class SysAuthServiceImplTest extends BaseDbUnitTest { // 准备参数 String userIp = randomString(); String userAgent = randomString(); - SysAuthLoginReqVO reqVO = randomPojo(SysAuthLoginReqVO.class); + AuthLoginReqVO reqVO = randomPojo(AuthLoginReqVO.class); // mock 验证码正确 when(captchaService.getCaptchaCode(reqVO.getUuid())).thenReturn(reqVO.getCode()); // mock 抛出异常 @@ -177,8 +177,8 @@ public class SysAuthServiceImplTest extends BaseDbUnitTest { // 校验调用参数 verify(captchaService, times(1)).deleteCaptchaCode(reqVO.getUuid()); verify(loginLogCoreService, times(1)).createLoginLog( - argThat(o -> o.getLogType().equals(SysLoginLogTypeEnum.LOGIN_USERNAME.getType()) - && o.getResult().equals(SysLoginResultEnum.BAD_CREDENTIALS.getResult())) + argThat(o -> o.getLogType().equals(LoginLogTypeEnum.LOGIN_USERNAME.getType()) + && o.getResult().equals(LoginResultEnum.BAD_CREDENTIALS.getResult())) ); } @@ -187,7 +187,7 @@ public class SysAuthServiceImplTest extends BaseDbUnitTest { // 准备参数 String userIp = randomString(); String userAgent = randomString(); - SysAuthLoginReqVO reqVO = randomPojo(SysAuthLoginReqVO.class); + AuthLoginReqVO reqVO = randomPojo(AuthLoginReqVO.class); // mock 验证码正确 when(captchaService.getCaptchaCode(reqVO.getUuid())).thenReturn(reqVO.getCode()); // mock 抛出异常 @@ -198,8 +198,8 @@ public class SysAuthServiceImplTest extends BaseDbUnitTest { // 校验调用参数 verify(captchaService, times(1)).deleteCaptchaCode(reqVO.getUuid()); verify(loginLogCoreService, times(1)).createLoginLog( - argThat(o -> o.getLogType().equals(SysLoginLogTypeEnum.LOGIN_USERNAME.getType()) - && o.getResult().equals(SysLoginResultEnum.USER_DISABLED.getResult())) + argThat(o -> o.getLogType().equals(LoginLogTypeEnum.LOGIN_USERNAME.getType()) + && o.getResult().equals(LoginResultEnum.USER_DISABLED.getResult())) ); } @@ -208,7 +208,7 @@ public class SysAuthServiceImplTest extends BaseDbUnitTest { // 准备参数 String userIp = randomString(); String userAgent = randomString(); - SysAuthLoginReqVO reqVO = randomPojo(SysAuthLoginReqVO.class); + AuthLoginReqVO reqVO = randomPojo(AuthLoginReqVO.class); // mock 验证码正确 when(captchaService.getCaptchaCode(reqVO.getUuid())).thenReturn(reqVO.getCode()); // mock 抛出异常 @@ -219,8 +219,8 @@ public class SysAuthServiceImplTest extends BaseDbUnitTest { // 校验调用参数 verify(captchaService, times(1)).deleteCaptchaCode(reqVO.getUuid()); verify(loginLogCoreService, times(1)).createLoginLog( - argThat(o -> o.getLogType().equals(SysLoginLogTypeEnum.LOGIN_USERNAME.getType()) - && o.getResult().equals(SysLoginResultEnum.UNKNOWN_ERROR.getResult())) + argThat(o -> o.getLogType().equals(LoginLogTypeEnum.LOGIN_USERNAME.getType()) + && o.getResult().equals(LoginResultEnum.UNKNOWN_ERROR.getResult())) ); } @@ -232,7 +232,7 @@ public class SysAuthServiceImplTest extends BaseDbUnitTest { Long userId = randomLongId(); Set userRoleIds = randomSet(Long.class); String sessionId = randomString(); - SysAuthLoginReqVO reqVO = randomPojo(SysAuthLoginReqVO.class); + AuthLoginReqVO reqVO = randomPojo(AuthLoginReqVO.class); LoginUser loginUser = randomPojo(LoginUser.class, o -> { o.setId(userId); o.setRoleIds(userRoleIds); @@ -253,8 +253,8 @@ public class SysAuthServiceImplTest extends BaseDbUnitTest { // 校验调用参数 verify(captchaService, times(1)).deleteCaptchaCode(reqVO.getUuid()); verify(loginLogCoreService, times(1)).createLoginLog( - argThat(o -> o.getLogType().equals(SysLoginLogTypeEnum.LOGIN_USERNAME.getType()) - && o.getResult().equals(SysLoginResultEnum.SUCCESS.getResult())) + argThat(o -> o.getLogType().equals(LoginLogTypeEnum.LOGIN_USERNAME.getType()) + && o.getResult().equals(LoginResultEnum.SUCCESS.getResult())) ); } @@ -270,8 +270,8 @@ public class SysAuthServiceImplTest extends BaseDbUnitTest { // 校验调用参数 verify(userSessionCoreService, times(1)).deleteUserSession(token); verify(loginLogCoreService, times(1)).createLoginLog( - argThat(o -> o.getLogType().equals(SysLoginLogTypeEnum.LOGOUT_SELF.getType()) - && o.getResult().equals(SysLoginResultEnum.SUCCESS.getResult())) + argThat(o -> o.getLogType().equals(LoginLogTypeEnum.LOGOUT_SELF.getType()) + && o.getResult().equals(LoginResultEnum.SUCCESS.getResult())) ); } diff --git a/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/auth/SysUserSessionServiceImplTest.java b/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/auth/UserSessionServiceImplTest.java similarity index 90% rename from yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/auth/SysUserSessionServiceImplTest.java rename to yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/auth/UserSessionServiceImplTest.java index 345457235..eea61a408 100644 --- a/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/auth/SysUserSessionServiceImplTest.java +++ b/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/auth/UserSessionServiceImplTest.java @@ -1,9 +1,9 @@ package cn.iocoder.yudao.module.system.service.auth; import cn.hutool.core.date.DateUtil; -import cn.iocoder.yudao.module.system.controller.auth.vo.session.SysUserSessionPageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.auth.vo.session.UserSessionPageReqVO; import cn.iocoder.yudao.module.system.dal.mysql.auth.SysUserSessionMapper; -import cn.iocoder.yudao.module.system.service.user.SysUserService; +import cn.iocoder.yudao.module.system.service.user.UserService; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.auth.SysUserSessionDO; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.user.SysUserDO; import cn.iocoder.yudao.coreservice.modules.system.dal.redis.auth.SysLoginUserCoreRedisDAO; @@ -34,21 +34,21 @@ import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.when; /** - * {@link SysUserSessionServiceImpl} 的单元测试 + * {@link UserSessionServiceImpl} 的单元测试 * * @author Lyon */ -@Import({SysUserSessionServiceImpl.class}) -public class SysUserSessionServiceImplTest extends BaseDbAndRedisUnitTest { +@Import({UserSessionServiceImpl.class}) +public class UserSessionServiceImplTest extends BaseDbAndRedisUnitTest { @Resource - private SysUserSessionServiceImpl userSessionService; + private UserSessionServiceImpl userSessionService; @Resource private SysUserSessionMapper userSessionMapper; @MockBean - private SysUserService userService; + private UserService userService; @MockBean private SysLoginLogCoreService loginLogCoreService; @MockBean @@ -81,7 +81,7 @@ public class SysUserSessionServiceImplTest extends BaseDbAndRedisUnitTest { o.setUserIp("testUserIp"); })); // 准备参数 - SysUserSessionPageReqVO reqVO = new SysUserSessionPageReqVO(); + UserSessionPageReqVO reqVO = new UserSessionPageReqVO(); reqVO.setUsername(dbUser.getUsername()); reqVO.setUserIp(userIp); diff --git a/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/common/SysCaptchaServiceTest.java b/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/common/CaptchaServiceTest.java similarity index 77% rename from yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/common/SysCaptchaServiceTest.java rename to yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/common/CaptchaServiceTest.java index 224874422..79fb65f43 100644 --- a/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/common/SysCaptchaServiceTest.java +++ b/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/common/CaptchaServiceTest.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.system.service.common; -import cn.iocoder.yudao.module.system.controller.common.vo.SysCaptchaImageRespVO; -import cn.iocoder.yudao.module.system.dal.redis.common.SysCaptchaRedisDAO; +import cn.iocoder.yudao.module.system.controller.admin.common.vo.CaptchaImageRespVO; +import cn.iocoder.yudao.module.system.dal.redis.common.CaptchaRedisDAO; import cn.iocoder.yudao.module.system.framework.captcha.config.CaptchaProperties; import cn.iocoder.yudao.module.system.test.BaseRedisUnitTest; import org.junit.jupiter.api.Test; @@ -12,21 +12,21 @@ import javax.annotation.Resource; import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomString; import static org.junit.jupiter.api.Assertions.*; -@Import({SysCaptchaServiceImpl.class, CaptchaProperties.class, SysCaptchaRedisDAO.class}) -public class SysCaptchaServiceTest extends BaseRedisUnitTest { +@Import({CaptchaServiceImpl.class, CaptchaProperties.class, CaptchaRedisDAO.class}) +public class CaptchaServiceTest extends BaseRedisUnitTest { @Resource - private SysCaptchaServiceImpl captchaService; + private CaptchaServiceImpl captchaService; @Resource - private SysCaptchaRedisDAO captchaRedisDAO; + private CaptchaRedisDAO captchaRedisDAO; @Resource private CaptchaProperties captchaProperties; @Test public void testGetCaptchaImage() { // 调用 - SysCaptchaImageRespVO respVO = captchaService.getCaptchaImage(); + CaptchaImageRespVO respVO = captchaService.getCaptchaImage(); // 断言 assertNotNull(respVO.getUuid()); assertNotNull(respVO.getImg()); diff --git a/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/dept/SysDeptServiceTest.java b/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/dept/DeptServiceTest.java similarity index 89% rename from yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/dept/SysDeptServiceTest.java rename to yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/dept/DeptServiceTest.java index b041e2d4c..fe49ea2b3 100644 --- a/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/dept/SysDeptServiceTest.java +++ b/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/dept/DeptServiceTest.java @@ -1,13 +1,13 @@ package cn.iocoder.yudao.module.system.service.dept; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; -import cn.iocoder.yudao.module.system.controller.dept.vo.dept.SysDeptCreateReqVO; -import cn.iocoder.yudao.module.system.controller.dept.vo.dept.SysDeptListReqVO; -import cn.iocoder.yudao.module.system.controller.dept.vo.dept.SysDeptUpdateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept.DeptCreateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept.DeptListReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept.DeptUpdateReqVO; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.dept.SysDeptDO; import cn.iocoder.yudao.module.system.dal.mysql.dept.SysDeptMapper; import cn.iocoder.yudao.module.system.enums.dept.DeptIdEnum; -import cn.iocoder.yudao.module.system.mq.producer.dept.SysDeptProducer; +import cn.iocoder.yudao.module.system.mq.producer.dept.DeptProducer; import cn.iocoder.yudao.framework.common.util.collection.ArrayUtils; import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; import cn.iocoder.yudao.module.system.test.BaseDbUnitTest; @@ -24,7 +24,7 @@ import java.util.function.Consumer; import static cn.hutool.core.bean.BeanUtil.getFieldValue; import static cn.hutool.core.util.RandomUtil.randomEle; -import static cn.iocoder.yudao.module.system.enums.SysErrorCodeConstants.*; +import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*; import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.*; @@ -33,19 +33,19 @@ import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; /** - * {@link SysDeptServiceImpl} 的单元测试类 + * {@link DeptServiceImpl} 的单元测试类 * * @author niudehua */ -@Import(SysDeptServiceImpl.class) -class SysDeptServiceTest extends BaseDbUnitTest { +@Import(DeptServiceImpl.class) +public class DeptServiceTest extends BaseDbUnitTest { @Resource - private SysDeptServiceImpl deptService; + private DeptServiceImpl deptService; @Resource private SysDeptMapper deptMapper; @MockBean - private SysDeptProducer deptProducer; + private DeptProducer deptProducer; @Test @SuppressWarnings("unchecked") @@ -86,7 +86,7 @@ class SysDeptServiceTest extends BaseDbUnitTest { // 测试 status 不匹配 deptMapper.insert(ObjectUtils.cloneIgnoreId(dept, o -> o.setStatus(CommonStatusEnum.DISABLE.getStatus()))); // 准备参数 - SysDeptListReqVO reqVO = new SysDeptListReqVO(); + DeptListReqVO reqVO = new DeptListReqVO(); reqVO.setName("开"); reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); // 调用 @@ -99,7 +99,7 @@ class SysDeptServiceTest extends BaseDbUnitTest { @Test void testCreateDept_success() { // 准备参数 - SysDeptCreateReqVO reqVO = randomPojo(SysDeptCreateReqVO.class, + DeptCreateReqVO reqVO = randomPojo(DeptCreateReqVO.class, o -> { o.setParentId(DeptIdEnum.ROOT.getId()); o.setStatus(randomCommonStatus()); @@ -121,7 +121,7 @@ class SysDeptServiceTest extends BaseDbUnitTest { SysDeptDO dbDeptDO = randomPojo(SysDeptDO.class, o -> o.setStatus(randomCommonStatus())); deptMapper.insert(dbDeptDO);// @Sql: 先插入出一条存在的数据 // 准备参数 - SysDeptUpdateReqVO reqVO = randomPojo(SysDeptUpdateReqVO.class, o -> { + DeptUpdateReqVO reqVO = randomPojo(DeptUpdateReqVO.class, o -> { // 设置更新的 ID o.setParentId(DeptIdEnum.ROOT.getId()); o.setId(dbDeptDO.getId()); @@ -160,7 +160,7 @@ class SysDeptServiceTest extends BaseDbUnitTest { nameDeptDO.setParentId(DeptIdEnum.ROOT.getId()); deptMapper.insert(nameDeptDO); // 准备参数 - SysDeptUpdateReqVO reqVO = randomPojo(SysDeptUpdateReqVO.class, + DeptUpdateReqVO reqVO = randomPojo(DeptUpdateReqVO.class, o -> { // 设置根节点部门 o.setParentId(DeptIdEnum.ROOT.getId()); @@ -175,7 +175,7 @@ class SysDeptServiceTest extends BaseDbUnitTest { @Test void testCheckDept_parentNotExitsForCreate() { - SysDeptCreateReqVO reqVO = randomPojo(SysDeptCreateReqVO.class, + DeptCreateReqVO reqVO = randomPojo(DeptCreateReqVO.class, o -> o.setStatus(randomCommonStatus())); // 调用,并断言异常 assertServiceException(() -> deptService.createDept(reqVO), DEPT_PARENT_NOT_EXITS); @@ -211,7 +211,7 @@ class SysDeptServiceTest extends BaseDbUnitTest { SysDeptDO dbDeptDO = randomPojo(SysDeptDO.class, o -> o.setStatus(randomCommonStatus())); deptMapper.insert(dbDeptDO); // 准备参数 - SysDeptUpdateReqVO reqVO = randomPojo(SysDeptUpdateReqVO.class, + DeptUpdateReqVO reqVO = randomPojo(DeptUpdateReqVO.class, o -> { // 设置自己为父部门 o.setParentId(dbDeptDO.getId()); @@ -228,7 +228,7 @@ class SysDeptServiceTest extends BaseDbUnitTest { SysDeptDO deptDO = randomPojo(SysDeptDO.class, o -> o.setStatus(CommonStatusEnum.DISABLE.getStatus())); deptMapper.insert(deptDO); // 准备参数 - SysDeptCreateReqVO reqVO = randomPojo(SysDeptCreateReqVO.class, + DeptCreateReqVO reqVO = randomPojo(DeptCreateReqVO.class, o -> { // 设置未启用的部门为副部门 o.setParentId(deptDO.getId()); @@ -250,7 +250,7 @@ class SysDeptServiceTest extends BaseDbUnitTest { // 初始化本地缓存 deptService.initLocalCache(); // 准备参数 - SysDeptUpdateReqVO reqVO = randomPojo(SysDeptUpdateReqVO.class, + DeptUpdateReqVO reqVO = randomPojo(DeptUpdateReqVO.class, o -> { // 设置自己的子部门为父部门 o.setParentId(childDept.getId()); diff --git a/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/dept/SysPostServiceTest.java b/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/dept/PostServiceTest.java similarity index 86% rename from yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/dept/SysPostServiceTest.java rename to yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/dept/PostServiceTest.java index fa0da3257..df64ed2b1 100644 --- a/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/dept/SysPostServiceTest.java +++ b/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/dept/PostServiceTest.java @@ -5,10 +5,10 @@ import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.ArrayUtils; import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; -import cn.iocoder.yudao.module.system.controller.dept.vo.post.SysPostCreateReqVO; -import cn.iocoder.yudao.module.system.controller.dept.vo.post.SysPostExportReqVO; -import cn.iocoder.yudao.module.system.controller.dept.vo.post.SysPostPageReqVO; -import cn.iocoder.yudao.module.system.controller.dept.vo.post.SysPostUpdateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dept.vo.post.PostCreateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dept.vo.post.PostExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dept.vo.post.PostPageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dept.vo.post.PostUpdateReqVO; import cn.iocoder.yudao.module.system.dal.mysql.dept.SysPostMapper; import cn.iocoder.yudao.module.system.test.BaseDbUnitTest; import org.junit.jupiter.api.Test; @@ -23,19 +23,14 @@ import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEq import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomLongId; import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomPojo; -import static cn.iocoder.yudao.module.system.enums.SysErrorCodeConstants.*; +import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*; import static org.junit.jupiter.api.Assertions.*; -/** - * {@link SysPostServiceImpl} 的单元测试类 - * - * @author niudehua - */ -@Import(SysPostServiceImpl.class) -class SysPostServiceTest extends BaseDbUnitTest { +@Import(PostServiceImpl.class) +public class PostServiceTest extends BaseDbUnitTest { @Resource - private SysPostServiceImpl postService; + private PostServiceImpl postService; @Resource private SysPostMapper postMapper; @@ -53,7 +48,7 @@ class SysPostServiceTest extends BaseDbUnitTest { postMapper.insert(ObjectUtils.cloneIgnoreId(postDO, o -> o.setStatus(CommonStatusEnum.DISABLE.getStatus()))); // 准备参数 - SysPostPageReqVO reqVO = new SysPostPageReqVO(); + PostPageReqVO reqVO = new PostPageReqVO(); reqVO.setName("码"); reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); @@ -79,7 +74,7 @@ class SysPostServiceTest extends BaseDbUnitTest { // 测试 status 不匹配 postMapper.insert(ObjectUtils.cloneIgnoreId(postDO, o -> o.setStatus(CommonStatusEnum.DISABLE.getStatus()))); // 准备参数 - SysPostExportReqVO reqVO = new SysPostExportReqVO(); + PostExportReqVO reqVO = new PostExportReqVO(); reqVO.setName("码"); reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); @@ -107,7 +102,7 @@ class SysPostServiceTest extends BaseDbUnitTest { @Test void testCreatePost_success() { // 准备参数 - SysPostCreateReqVO reqVO = randomPojo(SysPostCreateReqVO.class, + PostCreateReqVO reqVO = randomPojo(PostCreateReqVO.class, o -> o.setStatus(randomEle(CommonStatusEnum.values()).getStatus())); // 调用 Long postId = postService.createPost(reqVO); @@ -124,7 +119,7 @@ class SysPostServiceTest extends BaseDbUnitTest { SysPostDO postDO = randomPostDO(); postMapper.insert(postDO);// @Sql: 先插入出一条存在的数据 // 准备参数 - SysPostUpdateReqVO reqVO = randomPojo(SysPostUpdateReqVO.class, + PostUpdateReqVO reqVO = randomPojo(PostUpdateReqVO.class, o -> { // 设置更新的 ID o.setId(postDO.getId()); @@ -163,7 +158,7 @@ class SysPostServiceTest extends BaseDbUnitTest { SysPostDO postDO = randomPostDO(); postMapper.insert(postDO);// @Sql: 先插入出一条存在的数据 // 准备参数 - SysPostCreateReqVO reqVO = randomPojo(SysPostCreateReqVO.class, + PostCreateReqVO reqVO = randomPojo(PostCreateReqVO.class, // 模拟 name 重复 o -> o.setName(postDO.getName())); assertServiceException(() -> postService.createPost(reqVO), POST_NAME_DUPLICATE); @@ -178,7 +173,7 @@ class SysPostServiceTest extends BaseDbUnitTest { SysPostDO codePostDO = randomPostDO(); postMapper.insert(codePostDO); // 准备参数 - SysPostUpdateReqVO reqVO = randomPojo(SysPostUpdateReqVO.class, + PostUpdateReqVO reqVO = randomPojo(PostUpdateReqVO.class, o -> { // 设置更新的 ID o.setId(postDO.getId()); diff --git a/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/dict/SysDictDataServiceTest.java b/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/dict/DictDataServiceTest.java similarity index 86% rename from yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/dict/SysDictDataServiceTest.java rename to yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/dict/DictDataServiceTest.java index bc5f83db8..42217d3b7 100644 --- a/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/dict/SysDictDataServiceTest.java +++ b/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/dict/DictDataServiceTest.java @@ -3,13 +3,13 @@ package cn.iocoder.yudao.module.system.service.dict; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.dict.SysDictDataDO; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.system.controller.dict.vo.data.SysDictDataCreateReqVO; -import cn.iocoder.yudao.module.system.controller.dict.vo.data.SysDictDataExportReqVO; -import cn.iocoder.yudao.module.system.controller.dict.vo.data.SysDictDataPageReqVO; -import cn.iocoder.yudao.module.system.controller.dict.vo.data.SysDictDataUpdateReqVO; -import cn.iocoder.yudao.module.system.dal.dataobject.dict.SysDictTypeDO; +import cn.iocoder.yudao.module.system.controller.admin.dict.vo.data.DictDataCreateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dict.vo.data.DictDataExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dict.vo.data.DictDataPageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dict.vo.data.DictDataUpdateReqVO; +import cn.iocoder.yudao.module.system.dal.dataobject.dict.DictTypeDO; import cn.iocoder.yudao.module.system.dal.mysql.dict.SysDictDataMapper; -import cn.iocoder.yudao.module.system.mq.producer.dict.SysDictDataProducer; +import cn.iocoder.yudao.module.system.mq.producer.dict.DictDataProducer; import cn.iocoder.yudao.framework.common.util.collection.ArrayUtils; import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; import cn.iocoder.yudao.module.system.test.BaseDbUnitTest; @@ -21,7 +21,7 @@ import javax.annotation.Resource; import java.util.List; import java.util.function.Consumer; -import static cn.iocoder.yudao.module.system.enums.SysErrorCodeConstants.*; +import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*; import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.*; @@ -29,23 +29,18 @@ import static org.junit.jupiter.api.Assertions.*; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.*; -/** -* {@link SysDictDataServiceImpl} 的单元测试类 -* -* @author 芋道源码 -*/ -@Import(SysDictDataServiceImpl.class) -public class SysDictDataServiceTest extends BaseDbUnitTest { +@Import(DictDataServiceImpl.class) +public class DictDataServiceTest extends BaseDbUnitTest { @Resource - private SysDictDataServiceImpl dictDataService; + private DictDataServiceImpl dictDataService; @Resource private SysDictDataMapper dictDataMapper; @MockBean - private SysDictTypeService dictTypeService; + private DictTypeService dictTypeService; @MockBean - private SysDictDataProducer dictDataProducer; + private DictDataProducer dictDataProducer; @Test public void testGetDictDataPage() { @@ -63,7 +58,7 @@ public class SysDictDataServiceTest extends BaseDbUnitTest { // 测试 status 不匹配 dictDataMapper.insert(ObjectUtils.cloneIgnoreId(dbDictData, o -> o.setStatus(CommonStatusEnum.DISABLE.getStatus()))); // 准备参数 - SysDictDataPageReqVO reqVO = new SysDictDataPageReqVO(); + DictDataPageReqVO reqVO = new DictDataPageReqVO(); reqVO.setLabel("芋"); reqVO.setDictType("yu"); reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); @@ -92,7 +87,7 @@ public class SysDictDataServiceTest extends BaseDbUnitTest { // 测试 status 不匹配 dictDataMapper.insert(ObjectUtils.cloneIgnoreId(dbDictData, o -> o.setStatus(CommonStatusEnum.DISABLE.getStatus()))); // 准备参数 - SysDictDataExportReqVO reqVO = new SysDictDataExportReqVO(); + DictDataExportReqVO reqVO = new DictDataExportReqVO(); reqVO.setLabel("芋"); reqVO.setDictType("yu"); reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); @@ -107,7 +102,7 @@ public class SysDictDataServiceTest extends BaseDbUnitTest { @Test public void testCreateDictData_success() { // 准备参数 - SysDictDataCreateReqVO reqVO = randomPojo(SysDictDataCreateReqVO.class, + DictDataCreateReqVO reqVO = randomPojo(DictDataCreateReqVO.class, o -> o.setStatus(randomCommonStatus())); // mock 方法 when(dictTypeService.getDictType(eq(reqVO.getDictType()))).thenReturn(randomDictTypeDO(reqVO.getDictType())); @@ -129,7 +124,7 @@ public class SysDictDataServiceTest extends BaseDbUnitTest { SysDictDataDO dbDictData = randomDictDataDO(); dictDataMapper.insert(dbDictData);// @Sql: 先插入出一条存在的数据 // 准备参数 - SysDictDataUpdateReqVO reqVO = randomPojo(SysDictDataUpdateReqVO.class, o -> { + DictDataUpdateReqVO reqVO = randomPojo(DictDataUpdateReqVO.class, o -> { o.setId(dbDictData.getId()); // 设置更新的 ID o.setStatus(randomCommonStatus()); }); @@ -196,7 +191,7 @@ public class SysDictDataServiceTest extends BaseDbUnitTest { // mock 方法,数据类型被禁用 String dictType = randomString(); when(dictTypeService.getDictType(eq(dictType))).thenReturn( - randomPojo(SysDictTypeDO.class, o -> o.setStatus(CommonStatusEnum.DISABLE.getStatus()))); + randomPojo(DictTypeDO.class, o -> o.setStatus(CommonStatusEnum.DISABLE.getStatus()))); // 调用, 并断言异常 assertServiceException(() -> dictDataService.checkDictTypeValid(dictType), DICT_TYPE_NOT_ENABLE); @@ -257,8 +252,8 @@ public class SysDictDataServiceTest extends BaseDbUnitTest { * @param type 字典类型 * @return SysDictTypeDO 对象 */ - private static SysDictTypeDO randomDictTypeDO(String type) { - return randomPojo(SysDictTypeDO.class, o -> { + private static DictTypeDO randomDictTypeDO(String type) { + return randomPojo(DictTypeDO.class, o -> { o.setType(type); o.setStatus(CommonStatusEnum.ENABLE.getStatus()); // 保证 status 是开启 }); diff --git a/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/dict/SysDictTypeServiceTest.java b/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/dict/DictTypeServiceTest.java similarity index 80% rename from yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/dict/SysDictTypeServiceTest.java rename to yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/dict/DictTypeServiceTest.java index 916acbf26..3b2d763be 100644 --- a/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/dict/SysDictTypeServiceTest.java +++ b/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/dict/DictTypeServiceTest.java @@ -2,11 +2,11 @@ package cn.iocoder.yudao.module.system.service.dict; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.system.controller.dict.vo.type.SysDictTypeCreateReqVO; -import cn.iocoder.yudao.module.system.controller.dict.vo.type.SysDictTypeExportReqVO; -import cn.iocoder.yudao.module.system.controller.dict.vo.type.SysDictTypePageReqVO; -import cn.iocoder.yudao.module.system.controller.dict.vo.type.SysDictTypeUpdateReqVO; -import cn.iocoder.yudao.module.system.dal.dataobject.dict.SysDictTypeDO; +import cn.iocoder.yudao.module.system.controller.admin.dict.vo.type.DictTypeCreateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dict.vo.type.DictTypeUpdateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dict.vo.type.DictTypeExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.dict.vo.type.DictTypePageReqVO; +import cn.iocoder.yudao.module.system.dal.dataobject.dict.DictTypeDO; import cn.iocoder.yudao.module.system.dal.mysql.dict.SysDictTypeMapper; import cn.iocoder.yudao.framework.common.util.collection.ArrayUtils; import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; @@ -20,7 +20,7 @@ import java.util.List; import java.util.function.Consumer; import static cn.hutool.core.util.RandomUtil.randomEle; -import static cn.iocoder.yudao.module.system.enums.SysErrorCodeConstants.*; +import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*; import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime; @@ -29,21 +29,21 @@ import static org.junit.jupiter.api.Assertions.*; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.when; -@Import(SysDictTypeServiceImpl.class) -public class SysDictTypeServiceTest extends BaseDbUnitTest { +@Import(DictTypeServiceImpl.class) +public class DictTypeServiceTest extends BaseDbUnitTest { @Resource - private SysDictTypeServiceImpl dictTypeService; + private DictTypeServiceImpl dictTypeService; @Resource private SysDictTypeMapper dictTypeMapper; @MockBean - private SysDictDataService dictDataService; + private DictDataService dictDataService; @Test public void testGetDictTypePage() { // mock 数据 - SysDictTypeDO dbDictType = randomPojo(SysDictTypeDO.class, o -> { // 等会查询到 + DictTypeDO dbDictType = randomPojo(DictTypeDO.class, o -> { // 等会查询到 o.setName("yunai"); o.setType("芋艿"); o.setStatus(CommonStatusEnum.ENABLE.getStatus()); @@ -59,7 +59,7 @@ public class SysDictTypeServiceTest extends BaseDbUnitTest { // 测试 createTime 不匹配 dictTypeMapper.insert(ObjectUtils.cloneIgnoreId(dbDictType, o -> o.setCreateTime(buildTime(2021, 1, 1)))); // 准备参数 - SysDictTypePageReqVO reqVO = new SysDictTypePageReqVO(); + DictTypePageReqVO reqVO = new DictTypePageReqVO(); reqVO.setName("nai"); reqVO.setType("艿"); reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); @@ -67,7 +67,7 @@ public class SysDictTypeServiceTest extends BaseDbUnitTest { reqVO.setEndCreateTime(buildTime(2021, 1, 20)); // 调用 - PageResult pageResult = dictTypeService.getDictTypePage(reqVO); + PageResult pageResult = dictTypeService.getDictTypePage(reqVO); // 断言 assertEquals(1, pageResult.getTotal()); assertEquals(1, pageResult.getList().size()); @@ -77,7 +77,7 @@ public class SysDictTypeServiceTest extends BaseDbUnitTest { @Test public void testGetDictTypeList() { // mock 数据 - SysDictTypeDO dbDictType = randomPojo(SysDictTypeDO.class, o -> { // 等会查询到 + DictTypeDO dbDictType = randomPojo(DictTypeDO.class, o -> { // 等会查询到 o.setName("yunai"); o.setType("芋艿"); o.setStatus(CommonStatusEnum.ENABLE.getStatus()); @@ -93,7 +93,7 @@ public class SysDictTypeServiceTest extends BaseDbUnitTest { // 测试 createTime 不匹配 dictTypeMapper.insert(ObjectUtils.cloneIgnoreId(dbDictType, o -> o.setCreateTime(buildTime(2021, 1, 1)))); // 准备参数 - SysDictTypeExportReqVO reqVO = new SysDictTypeExportReqVO(); + DictTypeExportReqVO reqVO = new DictTypeExportReqVO(); reqVO.setName("nai"); reqVO.setType("艿"); reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); @@ -101,7 +101,7 @@ public class SysDictTypeServiceTest extends BaseDbUnitTest { reqVO.setEndCreateTime(buildTime(2021, 1, 20)); // 调用 - List list = dictTypeService.getDictTypeList(reqVO); + List list = dictTypeService.getDictTypeList(reqVO); // 断言 assertEquals(1, list.size()); assertPojoEquals(dbDictType, list.get(0)); @@ -110,13 +110,13 @@ public class SysDictTypeServiceTest extends BaseDbUnitTest { @Test public void testGetDictType() { // mock 数据 - SysDictTypeDO dbDictType = randomDictTypeDO(); + DictTypeDO dbDictType = randomDictTypeDO(); dictTypeMapper.insert(dbDictType); // 准备参数 String type = dbDictType.getType(); // 调用 - SysDictTypeDO dictType = dictTypeService.getDictType(type); + DictTypeDO dictType = dictTypeService.getDictType(type); // 断言 assertNotNull(dictType); assertPojoEquals(dbDictType, dictType); @@ -125,7 +125,7 @@ public class SysDictTypeServiceTest extends BaseDbUnitTest { @Test public void testCreateDictType_success() { // 准备参数 - SysDictTypeCreateReqVO reqVO = randomPojo(SysDictTypeCreateReqVO.class, + DictTypeCreateReqVO reqVO = randomPojo(DictTypeCreateReqVO.class, o -> o.setStatus(randomEle(CommonStatusEnum.values()).getStatus())); // 调用 @@ -133,17 +133,17 @@ public class SysDictTypeServiceTest extends BaseDbUnitTest { // 断言 assertNotNull(dictTypeId); // 校验记录的属性是否正确 - SysDictTypeDO dictType = dictTypeMapper.selectById(dictTypeId); + DictTypeDO dictType = dictTypeMapper.selectById(dictTypeId); assertPojoEquals(reqVO, dictType); } @Test public void testUpdateDictType_success() { // mock 数据 - SysDictTypeDO dbDictType = randomDictTypeDO(); + DictTypeDO dbDictType = randomDictTypeDO(); dictTypeMapper.insert(dbDictType);// @Sql: 先插入出一条存在的数据 // 准备参数 - SysDictTypeUpdateReqVO reqVO = randomPojo(SysDictTypeUpdateReqVO.class, o -> { + DictTypeUpdateReqVO reqVO = randomPojo(DictTypeUpdateReqVO.class, o -> { o.setId(dbDictType.getId()); // 设置更新的 ID o.setStatus(randomEle(CommonStatusEnum.values()).getStatus()); }); @@ -151,14 +151,14 @@ public class SysDictTypeServiceTest extends BaseDbUnitTest { // 调用 dictTypeService.updateDictType(reqVO); // 校验是否更新正确 - SysDictTypeDO dictType = dictTypeMapper.selectById(reqVO.getId()); // 获取最新的 + DictTypeDO dictType = dictTypeMapper.selectById(reqVO.getId()); // 获取最新的 assertPojoEquals(reqVO, dictType); } @Test public void testDeleteDictType_success() { // mock 数据 - SysDictTypeDO dbDictType = randomDictTypeDO(); + DictTypeDO dbDictType = randomDictTypeDO(); dictTypeMapper.insert(dbDictType);// @Sql: 先插入出一条存在的数据 // 准备参数 Long id = dbDictType.getId(); @@ -172,7 +172,7 @@ public class SysDictTypeServiceTest extends BaseDbUnitTest { @Test public void testDeleteDictType_hasChildren() { // mock 数据 - SysDictTypeDO dbDictType = randomDictTypeDO(); + DictTypeDO dbDictType = randomDictTypeDO(); dictTypeMapper.insert(dbDictType);// @Sql: 先插入出一条存在的数据 // 准备参数 Long id = dbDictType.getId(); @@ -186,7 +186,7 @@ public class SysDictTypeServiceTest extends BaseDbUnitTest { @Test public void testCheckDictDataExists_success() { // mock 数据 - SysDictTypeDO dbDictType = randomDictTypeDO(); + DictTypeDO dbDictType = randomDictTypeDO(); dictTypeMapper.insert(dbDictType);// @Sql: 先插入出一条存在的数据 // 调用成功 @@ -263,11 +263,11 @@ public class SysDictTypeServiceTest extends BaseDbUnitTest { // ========== 随机对象 ========== @SafeVarargs - private static SysDictTypeDO randomDictTypeDO(Consumer... consumers) { - Consumer consumer = (o) -> { + private static DictTypeDO randomDictTypeDO(Consumer... consumers) { + Consumer consumer = (o) -> { o.setStatus(randomEle(CommonStatusEnum.values()).getStatus()); // 保证 status 的范围 }; - return randomPojo(SysDictTypeDO.class, ArrayUtils.append(consumer, consumers)); + return randomPojo(DictTypeDO.class, ArrayUtils.append(consumer, consumers)); } } diff --git a/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/errorcode/SysErrorCodeServiceTest.java b/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/errorcode/ErrorCodeServiceTest.java similarity index 69% rename from yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/errorcode/SysErrorCodeServiceTest.java rename to yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/errorcode/ErrorCodeServiceTest.java index 517006d64..045b10f39 100644 --- a/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/errorcode/SysErrorCodeServiceTest.java +++ b/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/errorcode/ErrorCodeServiceTest.java @@ -1,21 +1,19 @@ package cn.iocoder.yudao.module.system.service.errorcode; import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.system.dal.dataobject.errorcode.ErrorCodeDO; import cn.iocoder.yudao.module.system.framework.errorcode.core.dto.ErrorCodeAutoGenerateReqDTO; -import cn.iocoder.yudao.module.system.controller.errorcode.vo.SysErrorCodeCreateReqVO; -import cn.iocoder.yudao.module.system.controller.errorcode.vo.SysErrorCodeExportReqVO; -import cn.iocoder.yudao.module.system.controller.errorcode.vo.SysErrorCodePageReqVO; -import cn.iocoder.yudao.module.system.controller.errorcode.vo.SysErrorCodeUpdateReqVO; -import cn.iocoder.yudao.module.system.dal.dataobject.errorcode.SysErrorCodeDO; +import cn.iocoder.yudao.module.system.controller.admin.errorcode.vo.ErrorCodeCreateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.errorcode.vo.ErrorCodeExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.errorcode.vo.ErrorCodePageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.errorcode.vo.ErrorCodeUpdateReqVO; import cn.iocoder.yudao.module.system.dal.mysql.errorcode.SysErrorCodeMapper; -import cn.iocoder.yudao.module.system.enums.errorcode.SysErrorCodeTypeEnum; +import cn.iocoder.yudao.module.system.enums.errorcode.ErrorCodeTypeEnum; import cn.iocoder.yudao.framework.common.util.collection.ArrayUtils; import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; import cn.iocoder.yudao.module.system.test.BaseDbUnitTest; import org.assertj.core.util.Lists; import org.junit.jupiter.api.Test; -import org.mockito.Mock; -import org.slf4j.Logger; import org.springframework.context.annotation.Import; import javax.annotation.Resource; @@ -23,19 +21,19 @@ import java.util.List; import java.util.function.Consumer; import static cn.hutool.core.util.RandomUtil.randomEle; -import static cn.iocoder.yudao.module.system.enums.SysErrorCodeConstants.ERROR_CODE_DUPLICATE; -import static cn.iocoder.yudao.module.system.enums.SysErrorCodeConstants.ERROR_CODE_NOT_EXISTS; +import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.ERROR_CODE_DUPLICATE; +import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.ERROR_CODE_NOT_EXISTS; import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime; import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.*; import static org.junit.jupiter.api.Assertions.*; -@Import(SysErrorCodeServiceImpl.class) -public class SysErrorCodeServiceTest extends BaseDbUnitTest { +@Import(ErrorCodeServiceImpl.class) +public class ErrorCodeServiceTest extends BaseDbUnitTest { @Resource - private SysErrorCodeServiceImpl errorCodeService; + private ErrorCodeServiceImpl errorCodeService; @Resource private SysErrorCodeMapper errorCodeMapper; @@ -43,40 +41,40 @@ public class SysErrorCodeServiceTest extends BaseDbUnitTest { @Test public void testCreateErrorCode_success() { // 准备参数 - SysErrorCodeCreateReqVO reqVO = randomPojo(SysErrorCodeCreateReqVO.class); + ErrorCodeCreateReqVO reqVO = randomPojo(ErrorCodeCreateReqVO.class); // 调用 Long errorCodeId = errorCodeService.createErrorCode(reqVO); // 断言 assertNotNull(errorCodeId); // 校验记录的属性是否正确 - SysErrorCodeDO errorCode = errorCodeMapper.selectById(errorCodeId); + ErrorCodeDO errorCode = errorCodeMapper.selectById(errorCodeId); assertPojoEquals(reqVO, errorCode); - assertEquals(SysErrorCodeTypeEnum.MANUAL_OPERATION.getType(), errorCode.getType()); + assertEquals(ErrorCodeTypeEnum.MANUAL_OPERATION.getType(), errorCode.getType()); } @Test public void testUpdateErrorCode_success() { // mock 数据 - SysErrorCodeDO dbErrorCode = randomInfErrorCodeDO(); + ErrorCodeDO dbErrorCode = randomInfErrorCodeDO(); errorCodeMapper.insert(dbErrorCode);// @Sql: 先插入出一条存在的数据 // 准备参数 - SysErrorCodeUpdateReqVO reqVO = randomPojo(SysErrorCodeUpdateReqVO.class, o -> { + ErrorCodeUpdateReqVO reqVO = randomPojo(ErrorCodeUpdateReqVO.class, o -> { o.setId(dbErrorCode.getId()); // 设置更新的 ID }); // 调用 errorCodeService.updateErrorCode(reqVO); // 校验是否更新正确 - SysErrorCodeDO errorCode = errorCodeMapper.selectById(reqVO.getId()); // 获取最新的 + ErrorCodeDO errorCode = errorCodeMapper.selectById(reqVO.getId()); // 获取最新的 assertPojoEquals(reqVO, errorCode); - assertEquals(SysErrorCodeTypeEnum.MANUAL_OPERATION.getType(), errorCode.getType()); + assertEquals(ErrorCodeTypeEnum.MANUAL_OPERATION.getType(), errorCode.getType()); } @Test public void testDeleteErrorCode_success() { // mock 数据 - SysErrorCodeDO dbErrorCode = randomInfErrorCodeDO(); + ErrorCodeDO dbErrorCode = randomInfErrorCodeDO(); errorCodeMapper.insert(dbErrorCode);// @Sql: 先插入出一条存在的数据 // 准备参数 Long id = dbErrorCode.getId(); @@ -90,10 +88,10 @@ public class SysErrorCodeServiceTest extends BaseDbUnitTest { @Test public void testGetErrorCodePage() { // mock 数据 - SysErrorCodeDO dbErrorCode = initGetErrorCodePage(); + ErrorCodeDO dbErrorCode = initGetErrorCodePage(); // 准备参数 - SysErrorCodePageReqVO reqVO = new SysErrorCodePageReqVO(); - reqVO.setType(SysErrorCodeTypeEnum.AUTO_GENERATION.getType()); + ErrorCodePageReqVO reqVO = new ErrorCodePageReqVO(); + reqVO.setType(ErrorCodeTypeEnum.AUTO_GENERATION.getType()); reqVO.setApplicationName("yudao"); reqVO.setCode(1); reqVO.setMessage("yu"); @@ -101,7 +99,7 @@ public class SysErrorCodeServiceTest extends BaseDbUnitTest { reqVO.setEndCreateTime(buildTime(2020, 11, 30)); // 调用 - PageResult pageResult = errorCodeService.getErrorCodePage(reqVO); + PageResult pageResult = errorCodeService.getErrorCodePage(reqVO); // 断言 assertEquals(1, pageResult.getTotal()); assertEquals(1, pageResult.getList().size()); @@ -111,9 +109,9 @@ public class SysErrorCodeServiceTest extends BaseDbUnitTest { /** * 初始化 getErrorCodePage 方法的测试数据 */ - private SysErrorCodeDO initGetErrorCodePage() { - SysErrorCodeDO dbErrorCode = randomInfErrorCodeDO(o -> { // 等会查询到 - o.setType(SysErrorCodeTypeEnum.AUTO_GENERATION.getType()); + private ErrorCodeDO initGetErrorCodePage() { + ErrorCodeDO dbErrorCode = randomInfErrorCodeDO(o -> { // 等会查询到 + o.setType(ErrorCodeTypeEnum.AUTO_GENERATION.getType()); o.setApplicationName("yudaoyuanma"); o.setCode(1); o.setMessage("yudao"); @@ -121,7 +119,7 @@ public class SysErrorCodeServiceTest extends BaseDbUnitTest { }); errorCodeMapper.insert(dbErrorCode); // 测试 type 不匹配 - errorCodeMapper.insert(ObjectUtils.cloneIgnoreId(dbErrorCode, o -> o.setType(SysErrorCodeTypeEnum.MANUAL_OPERATION.getType()))); + errorCodeMapper.insert(ObjectUtils.cloneIgnoreId(dbErrorCode, o -> o.setType(ErrorCodeTypeEnum.MANUAL_OPERATION.getType()))); // 测试 applicationName 不匹配 errorCodeMapper.insert(ObjectUtils.cloneIgnoreId(dbErrorCode, o -> o.setApplicationName("yunai"))); // 测试 code 不匹配 @@ -136,10 +134,10 @@ public class SysErrorCodeServiceTest extends BaseDbUnitTest { @Test public void testGetErrorCodeList() { // mock 数据 - SysErrorCodeDO dbErrorCode = initGetErrorCodePage(); + ErrorCodeDO dbErrorCode = initGetErrorCodePage(); // 准备参数 - SysErrorCodeExportReqVO reqVO = new SysErrorCodeExportReqVO(); - reqVO.setType(SysErrorCodeTypeEnum.AUTO_GENERATION.getType()); + ErrorCodeExportReqVO reqVO = new ErrorCodeExportReqVO(); + reqVO.setType(ErrorCodeTypeEnum.AUTO_GENERATION.getType()); reqVO.setApplicationName("yudao"); reqVO.setCode(1); reqVO.setMessage("yu"); @@ -147,7 +145,7 @@ public class SysErrorCodeServiceTest extends BaseDbUnitTest { reqVO.setEndCreateTime(buildTime(2020, 11, 30)); // 调用 - List list = errorCodeService.getErrorCodeList(reqVO); + List list = errorCodeService.getErrorCodeList(reqVO); // 断言 assertEquals(1, list.size()); assertPojoEquals(dbErrorCode, list.get(0)); @@ -196,9 +194,9 @@ public class SysErrorCodeServiceTest extends BaseDbUnitTest { // 调用 errorCodeService.autoGenerateErrorCodes(Lists.newArrayList(generateReqDTO)); // 断言 - SysErrorCodeDO errorCode = errorCodeMapper.selectOne(null); + ErrorCodeDO errorCode = errorCodeMapper.selectOne(null); assertPojoEquals(generateReqDTO, errorCode); - assertEquals(SysErrorCodeTypeEnum.AUTO_GENERATION.getType(), errorCode.getType()); + assertEquals(ErrorCodeTypeEnum.AUTO_GENERATION.getType(), errorCode.getType()); } /** @@ -207,7 +205,7 @@ public class SysErrorCodeServiceTest extends BaseDbUnitTest { @Test public void testAutoGenerateErrorCodes_021() { // mock 数据 - SysErrorCodeDO dbErrorCode = randomInfErrorCodeDO(o -> o.setType(SysErrorCodeTypeEnum.MANUAL_OPERATION.getType())); + ErrorCodeDO dbErrorCode = randomInfErrorCodeDO(o -> o.setType(ErrorCodeTypeEnum.MANUAL_OPERATION.getType())); errorCodeMapper.insert(dbErrorCode); // 准备参数 ErrorCodeAutoGenerateReqDTO generateReqDTO = randomPojo(ErrorCodeAutoGenerateReqDTO.class, @@ -217,7 +215,7 @@ public class SysErrorCodeServiceTest extends BaseDbUnitTest { // 调用 errorCodeService.autoGenerateErrorCodes(Lists.newArrayList(generateReqDTO)); // 断言,相等,说明不会更新 - SysErrorCodeDO errorCode = errorCodeMapper.selectById(dbErrorCode.getId()); + ErrorCodeDO errorCode = errorCodeMapper.selectById(dbErrorCode.getId()); assertPojoEquals(dbErrorCode, errorCode); } @@ -227,7 +225,7 @@ public class SysErrorCodeServiceTest extends BaseDbUnitTest { @Test public void testAutoGenerateErrorCodes_022() { // mock 数据 - SysErrorCodeDO dbErrorCode = randomInfErrorCodeDO(o -> o.setType(SysErrorCodeTypeEnum.AUTO_GENERATION.getType())); + ErrorCodeDO dbErrorCode = randomInfErrorCodeDO(o -> o.setType(ErrorCodeTypeEnum.AUTO_GENERATION.getType())); errorCodeMapper.insert(dbErrorCode); // 准备参数 ErrorCodeAutoGenerateReqDTO generateReqDTO = randomPojo(ErrorCodeAutoGenerateReqDTO.class, @@ -237,7 +235,7 @@ public class SysErrorCodeServiceTest extends BaseDbUnitTest { // 调用 errorCodeService.autoGenerateErrorCodes(Lists.newArrayList(generateReqDTO)); // 断言,相等,说明不会更新 - SysErrorCodeDO errorCode = errorCodeMapper.selectById(dbErrorCode.getId()); + ErrorCodeDO errorCode = errorCodeMapper.selectById(dbErrorCode.getId()); assertPojoEquals(dbErrorCode, errorCode); } @@ -247,7 +245,7 @@ public class SysErrorCodeServiceTest extends BaseDbUnitTest { @Test public void testAutoGenerateErrorCodes_023() { // mock 数据 - SysErrorCodeDO dbErrorCode = randomInfErrorCodeDO(o -> o.setType(SysErrorCodeTypeEnum.AUTO_GENERATION.getType())); + ErrorCodeDO dbErrorCode = randomInfErrorCodeDO(o -> o.setType(ErrorCodeTypeEnum.AUTO_GENERATION.getType())); errorCodeMapper.insert(dbErrorCode); // 准备参数 ErrorCodeAutoGenerateReqDTO generateReqDTO = randomPojo(ErrorCodeAutoGenerateReqDTO.class, @@ -258,7 +256,7 @@ public class SysErrorCodeServiceTest extends BaseDbUnitTest { // 调用 errorCodeService.autoGenerateErrorCodes(Lists.newArrayList(generateReqDTO)); // 断言,相等,说明不会更新 - SysErrorCodeDO errorCode = errorCodeMapper.selectById(dbErrorCode.getId()); + ErrorCodeDO errorCode = errorCodeMapper.selectById(dbErrorCode.getId()); assertPojoEquals(dbErrorCode, errorCode); } @@ -268,7 +266,7 @@ public class SysErrorCodeServiceTest extends BaseDbUnitTest { @Test public void testAutoGenerateErrorCodes_024() { // mock 数据 - SysErrorCodeDO dbErrorCode = randomInfErrorCodeDO(o -> o.setType(SysErrorCodeTypeEnum.AUTO_GENERATION.getType())); + ErrorCodeDO dbErrorCode = randomInfErrorCodeDO(o -> o.setType(ErrorCodeTypeEnum.AUTO_GENERATION.getType())); errorCodeMapper.insert(dbErrorCode); // 准备参数 ErrorCodeAutoGenerateReqDTO generateReqDTO = randomPojo(ErrorCodeAutoGenerateReqDTO.class, @@ -278,18 +276,18 @@ public class SysErrorCodeServiceTest extends BaseDbUnitTest { // 调用 errorCodeService.autoGenerateErrorCodes(Lists.newArrayList(generateReqDTO)); // 断言,匹配 - SysErrorCodeDO errorCode = errorCodeMapper.selectById(dbErrorCode.getId()); + ErrorCodeDO errorCode = errorCodeMapper.selectById(dbErrorCode.getId()); assertPojoEquals(generateReqDTO, errorCode); } // ========== 随机对象 ========== @SafeVarargs - private static SysErrorCodeDO randomInfErrorCodeDO(Consumer... consumers) { - Consumer consumer = (o) -> { - o.setType(randomEle(SysErrorCodeTypeEnum.values()).getType()); // 保证 key 的范围 + private static ErrorCodeDO randomInfErrorCodeDO(Consumer... consumers) { + Consumer consumer = (o) -> { + o.setType(randomEle(ErrorCodeTypeEnum.values()).getType()); // 保证 key 的范围 }; - return randomPojo(SysErrorCodeDO.class, ArrayUtils.append(consumer, consumers)); + return randomPojo(ErrorCodeDO.class, ArrayUtils.append(consumer, consumers)); } } diff --git a/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/logger/SysLoginLogServiceImplTest.java b/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/logger/LoginLogServiceImplTest.java similarity index 77% rename from yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/logger/SysLoginLogServiceImplTest.java rename to yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/logger/LoginLogServiceImplTest.java index bac9b5a6e..94778ef49 100644 --- a/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/logger/SysLoginLogServiceImplTest.java +++ b/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/logger/LoginLogServiceImplTest.java @@ -5,11 +5,11 @@ import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.logger.SysLogi import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.monitor.TracerUtils; -import cn.iocoder.yudao.module.system.controller.logger.vo.loginlog.SysLoginLogExportReqVO; -import cn.iocoder.yudao.module.system.controller.logger.vo.loginlog.SysLoginLogPageReqVO; -import cn.iocoder.yudao.module.system.dal.mysql.logger.SysLoginLogMapper; -import cn.iocoder.yudao.module.system.enums.logger.SysLoginLogTypeEnum; -import cn.iocoder.yudao.module.system.enums.logger.SysLoginResultEnum; +import cn.iocoder.yudao.module.system.controller.admin.logger.vo.loginlog.LoginLogExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.logger.vo.loginlog.LoginLogPageReqVO; +import cn.iocoder.yudao.module.system.dal.mysql.logger.LoginLogMapper; +import cn.iocoder.yudao.module.system.enums.logger.LoginLogTypeEnum; +import cn.iocoder.yudao.module.system.enums.logger.LoginResultEnum; import cn.iocoder.yudao.framework.test.core.util.RandomUtils; import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; import cn.iocoder.yudao.module.system.test.BaseDbUnitTest; @@ -23,34 +23,34 @@ import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEq import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime; import static org.junit.jupiter.api.Assertions.assertEquals; -@Import(SysLoginLogServiceImpl.class) -public class SysLoginLogServiceImplTest extends BaseDbUnitTest { +@Import(LoginLogServiceImpl.class) +public class LoginLogServiceImplTest extends BaseDbUnitTest { @Resource - private SysLoginLogServiceImpl sysLoginLogService; + private LoginLogServiceImpl sysLoginLogService; @Resource - private SysLoginLogMapper loginLogMapper; + private LoginLogMapper loginLogMapper; @Test public void testGetLoginLogPage() { // 构造测试数据 // 登录成功的 SysLoginLogDO loginLogDO = RandomUtils.randomPojo(SysLoginLogDO.class, logDO -> { - logDO.setLogType(RandomUtil.randomEle(SysLoginLogTypeEnum.values()).getType()); + logDO.setLogType(RandomUtil.randomEle(LoginLogTypeEnum.values()).getType()); logDO.setTraceId(TracerUtils.getTraceId()); logDO.setUserType(RandomUtil.randomEle(UserTypeEnum.values()).getValue()); logDO.setUserIp("192.168.199.16"); logDO.setUsername("wangkai"); logDO.setCreateTime(buildTime(2021, 3, 6)); - logDO.setResult(SysLoginResultEnum.SUCCESS.getResult()); + logDO.setResult(LoginResultEnum.SUCCESS.getResult()); }); loginLogMapper.insert(loginLogDO); // 下面几个都是不匹配的数据 // 登录失败的 - loginLogMapper.insert(ObjectUtils.cloneIgnoreId(loginLogDO, logDO -> logDO.setResult(SysLoginResultEnum.CAPTCHA_CODE_ERROR.getResult()))); + loginLogMapper.insert(ObjectUtils.cloneIgnoreId(loginLogDO, logDO -> logDO.setResult(LoginResultEnum.CAPTCHA_CODE_ERROR.getResult()))); // 不同ip段的 loginLogMapper.insert(ObjectUtils.cloneIgnoreId(loginLogDO, logDO -> logDO.setUserIp("192.168.128.18"))); // 不同username @@ -60,7 +60,7 @@ public class SysLoginLogServiceImplTest extends BaseDbUnitTest { // 构造调用参数 - SysLoginLogPageReqVO reqVO = new SysLoginLogPageReqVO(); + LoginLogPageReqVO reqVO = new LoginLogPageReqVO(); reqVO.setUsername("wangkai"); reqVO.setUserIp("192.168.199"); reqVO.setStatus(true); @@ -82,20 +82,20 @@ public class SysLoginLogServiceImplTest extends BaseDbUnitTest { // 登录成功的 SysLoginLogDO loginLogDO = RandomUtils.randomPojo(SysLoginLogDO.class, logDO -> { - logDO.setLogType(RandomUtil.randomEle(SysLoginLogTypeEnum.values()).getType()); + logDO.setLogType(RandomUtil.randomEle(LoginLogTypeEnum.values()).getType()); logDO.setTraceId(TracerUtils.getTraceId()); logDO.setUserType(RandomUtil.randomEle(UserTypeEnum.values()).getValue()); logDO.setUserIp("192.168.111.16"); logDO.setUsername("wangxiaokai"); logDO.setCreateTime(buildTime(2021, 3, 6)); - logDO.setResult(SysLoginResultEnum.SUCCESS.getResult()); + logDO.setResult(LoginResultEnum.SUCCESS.getResult()); }); loginLogMapper.insert(loginLogDO); // 下面几个都是不匹配的数据 // 登录失败的 - loginLogMapper.insert(ObjectUtils.cloneIgnoreId(loginLogDO, logDO -> logDO.setResult(SysLoginResultEnum.CAPTCHA_CODE_ERROR.getResult()))); + loginLogMapper.insert(ObjectUtils.cloneIgnoreId(loginLogDO, logDO -> logDO.setResult(LoginResultEnum.CAPTCHA_CODE_ERROR.getResult()))); // 不同ip段的 loginLogMapper.insert(ObjectUtils.cloneIgnoreId(loginLogDO, logDO -> logDO.setUserIp("192.168.128.18"))); // 不同username @@ -105,7 +105,7 @@ public class SysLoginLogServiceImplTest extends BaseDbUnitTest { // 构造调用参数 - SysLoginLogExportReqVO reqVO = new SysLoginLogExportReqVO(); + LoginLogExportReqVO reqVO = new LoginLogExportReqVO(); reqVO.setUsername("wangxiaokai"); reqVO.setUserIp("192.168.111"); reqVO.setStatus(true); diff --git a/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/logger/SysOperateLogServiceImplTest.java b/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/logger/OperateLogServiceImplTest.java similarity index 84% rename from yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/logger/SysOperateLogServiceImplTest.java rename to yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/logger/OperateLogServiceImplTest.java index 7838defb9..6f6edf4cf 100644 --- a/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/logger/SysOperateLogServiceImplTest.java +++ b/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/logger/OperateLogServiceImplTest.java @@ -1,11 +1,11 @@ package cn.iocoder.yudao.module.system.service.logger; import cn.hutool.core.map.MapUtil; -import cn.iocoder.yudao.module.system.controller.logger.vo.operatelog.SysOperateLogExportReqVO; -import cn.iocoder.yudao.module.system.controller.logger.vo.operatelog.SysOperateLogPageReqVO; -import cn.iocoder.yudao.module.system.dal.dataobject.logger.SysOperateLogDO; -import cn.iocoder.yudao.module.system.dal.mysql.logger.SysOperateLogMapper; -import cn.iocoder.yudao.module.system.service.user.SysUserService; +import cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog.OperateLogExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog.OperateLogPageReqVO; +import cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogDO; +import cn.iocoder.yudao.module.system.dal.mysql.logger.OperateLogMapper; +import cn.iocoder.yudao.module.system.service.user.UserService; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.user.SysUserDO; import cn.iocoder.yudao.coreservice.modules.system.enums.common.SysSexEnum; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; @@ -33,17 +33,17 @@ import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomLongId import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.Mockito.when; -@Import({SysOperateLogServiceImpl.class}) -public class SysOperateLogServiceImplTest extends BaseDbUnitTest { +@Import({OperateLogServiceImpl.class}) +public class OperateLogServiceImplTest extends BaseDbUnitTest { @Resource - private SysOperateLogService operateLogServiceImpl; + private OperateLogService operateLogServiceImpl; @Resource - private SysOperateLogMapper operateLogMapper; + private OperateLogMapper operateLogMapper; @MockBean - private SysUserService userService; + private UserService userService; @Test public void testCreateOperateLogAsync() throws InterruptedException, ExecutionException { @@ -58,7 +58,7 @@ public class SysOperateLogServiceImplTest extends BaseDbUnitTest { Future future = operateLogServiceImpl.createOperateLogAsync(reqVO); future.get(); // 断言插入是否正确 - SysOperateLogDO sysOperateLogDO = operateLogMapper.selectOne("trace_id", traceId); + OperateLogDO sysOperateLogDO = operateLogMapper.selectOne("trace_id", traceId); assertPojoEquals(reqVO, sysOperateLogDO); } @@ -74,7 +74,7 @@ public class SysOperateLogServiceImplTest extends BaseDbUnitTest { when(userService.getUsersByNickname("wangkai")).thenReturn(Collections.singletonList(user)); Long userId = user.getId(); // 构造操作日志 - SysOperateLogDO sysOperateLogDO = RandomUtils.randomPojo(SysOperateLogDO.class, o -> { + OperateLogDO sysOperateLogDO = RandomUtils.randomPojo(OperateLogDO.class, o -> { o.setUserId(userId); o.setModule("order"); o.setType(OperateTypeEnum.CREATE.getType()); @@ -97,7 +97,7 @@ public class SysOperateLogServiceImplTest extends BaseDbUnitTest { operateLogMapper.insert(ObjectUtils.cloneIgnoreId(sysOperateLogDO, logDO -> logDO.setResultCode(GlobalErrorCodeConstants.BAD_REQUEST.getCode()))); // 构造调用参数 - SysOperateLogPageReqVO reqVO = new SysOperateLogPageReqVO(); + OperateLogPageReqVO reqVO = new OperateLogPageReqVO(); reqVO.setUserNickname("wangkai"); reqVO.setModule("order"); reqVO.setType(OperateTypeEnum.CREATE.getType()); @@ -106,7 +106,7 @@ public class SysOperateLogServiceImplTest extends BaseDbUnitTest { reqVO.setSuccess(true); // 调用service方法 - PageResult pageResult = operateLogServiceImpl.getOperateLogPage(reqVO); + PageResult pageResult = operateLogServiceImpl.getOperateLogPage(reqVO); // 断言,只查到了一条符合条件的 assertEquals(1, pageResult.getTotal()); assertEquals(1, pageResult.getList().size()); @@ -125,7 +125,7 @@ public class SysOperateLogServiceImplTest extends BaseDbUnitTest { when(userService.getUsersByNickname("wangkai")).thenReturn(Collections.singletonList(user)); Long userId = user.getId(); // 构造操作日志 - SysOperateLogDO sysOperateLogDO = RandomUtils.randomPojo(SysOperateLogDO.class, o -> { + OperateLogDO sysOperateLogDO = RandomUtils.randomPojo(OperateLogDO.class, o -> { o.setUserId(userId); o.setModule("order"); o.setType(OperateTypeEnum.CREATE.getType()); @@ -148,7 +148,7 @@ public class SysOperateLogServiceImplTest extends BaseDbUnitTest { operateLogMapper.insert(ObjectUtils.cloneIgnoreId(sysOperateLogDO, logDO -> logDO.setResultCode(GlobalErrorCodeConstants.BAD_REQUEST.getCode()))); // 构造调用参数 - SysOperateLogExportReqVO reqVO = new SysOperateLogExportReqVO(); + OperateLogExportReqVO reqVO = new OperateLogExportReqVO(); reqVO.setUserNickname("wangkai"); reqVO.setModule("order"); reqVO.setType(OperateTypeEnum.CREATE.getType()); @@ -157,7 +157,7 @@ public class SysOperateLogServiceImplTest extends BaseDbUnitTest { reqVO.setSuccess(true); // 调用 service 方法 - List list = operateLogServiceImpl.getOperateLogs(reqVO); + List list = operateLogServiceImpl.getOperateLogs(reqVO); // 断言,只查到了一条符合条件的 assertEquals(1, list.size()); assertPojoEquals(sysOperateLogDO, list.get(0)); diff --git a/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/notice/SysNoticeServiceImplTest.java b/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/notice/NoticeServiceImplTest.java similarity index 63% rename from yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/notice/SysNoticeServiceImplTest.java rename to yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/notice/NoticeServiceImplTest.java index 0d9144f75..0d5babc50 100644 --- a/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/notice/SysNoticeServiceImplTest.java +++ b/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/notice/NoticeServiceImplTest.java @@ -2,12 +2,12 @@ package cn.iocoder.yudao.module.system.service.notice; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.system.controller.notice.vo.SysNoticeCreateReqVO; -import cn.iocoder.yudao.module.system.controller.notice.vo.SysNoticePageReqVO; -import cn.iocoder.yudao.module.system.controller.notice.vo.SysNoticeUpdateReqVO; -import cn.iocoder.yudao.module.system.dal.dataobject.notice.SysNoticeDO; +import cn.iocoder.yudao.module.system.controller.admin.notice.vo.NoticeCreateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.notice.vo.NoticePageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.notice.vo.NoticeUpdateReqVO; +import cn.iocoder.yudao.module.system.dal.dataobject.notice.NoticeDO; import cn.iocoder.yudao.module.system.dal.mysql.notice.SysNoticeMapper; -import cn.iocoder.yudao.module.system.enums.notice.SysNoticeTypeEnum; +import cn.iocoder.yudao.module.system.enums.notice.NoticeTypeEnum; import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; import cn.iocoder.yudao.module.system.test.BaseDbUnitTest; import org.junit.jupiter.api.Test; @@ -18,18 +18,18 @@ import javax.annotation.Resource; import java.util.function.Consumer; import static cn.hutool.core.util.RandomUtil.randomEle; -import static cn.iocoder.yudao.module.system.enums.SysErrorCodeConstants.NOTICE_NOT_FOUND; +import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.NOTICE_NOT_FOUND; import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomLongId; import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomPojo; import static org.junit.jupiter.api.Assertions.*; -@Import(SysNoticeServiceImpl.class) -class SysNoticeServiceImplTest extends BaseDbUnitTest { +@Import(NoticeServiceImpl.class) +class NoticeServiceImplTest extends BaseDbUnitTest { @Resource - private SysNoticeServiceImpl sysNoticeService; + private NoticeServiceImpl sysNoticeService; @Resource private SysNoticeMapper sysNoticeMapper; @@ -37,10 +37,10 @@ class SysNoticeServiceImplTest extends BaseDbUnitTest { @Test public void testPageNotices_success() { // 插入前置数据 - SysNoticeDO dbNotice = randomPojo(SysNoticeDO.class, o -> { + NoticeDO dbNotice = randomPojo(NoticeDO.class, o -> { o.setTitle("尼古拉斯赵四来啦!"); o.setStatus(CommonStatusEnum.ENABLE.getStatus()); - o.setType(randomEle(SysNoticeTypeEnum.values()).getType()); + o.setType(randomEle(NoticeTypeEnum.values()).getType()); }); sysNoticeMapper.insert(dbNotice); @@ -51,10 +51,10 @@ class SysNoticeServiceImplTest extends BaseDbUnitTest { // 查询 - SysNoticePageReqVO reqVO = new SysNoticePageReqVO(); + NoticePageReqVO reqVO = new NoticePageReqVO(); reqVO.setTitle("尼古拉斯赵四来啦!"); reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); - PageResult pageResult = sysNoticeService.pageNotices(reqVO); + PageResult pageResult = sysNoticeService.pageNotices(reqVO); // 验证查询结果经过筛选 assertEquals(1, pageResult.getTotal()); @@ -66,11 +66,11 @@ class SysNoticeServiceImplTest extends BaseDbUnitTest { @Test public void testGetNotice_success() { // 插入前置数据 - SysNoticeDO dbNotice = randomSysNoticeDO(); + NoticeDO dbNotice = randomSysNoticeDO(); sysNoticeMapper.insert(dbNotice); // 查询 - SysNoticeDO notice = sysNoticeService.getNotice(dbNotice.getId()); + NoticeDO notice = sysNoticeService.getNotice(dbNotice.getId()); // 验证插入与读取对象是否一致 assertNotNull(notice); @@ -80,38 +80,38 @@ class SysNoticeServiceImplTest extends BaseDbUnitTest { @Test public void testCreateNotice_success() { // 准备参数 - SysNoticeCreateReqVO reqVO = randomSysNoticeCreateReqVO(); + NoticeCreateReqVO reqVO = randomSysNoticeCreateReqVO(); // 校验插入是否成功 Long noticeId = sysNoticeService.createNotice(reqVO); assertNotNull(noticeId); // 校验插入属性是否正确 - SysNoticeDO notice = sysNoticeMapper.selectById(noticeId); + NoticeDO notice = sysNoticeMapper.selectById(noticeId); assertPojoEquals(reqVO, notice); } @Test public void testUpdateNotice_success() { // 插入前置数据 - SysNoticeDO dbNoticeDO = randomSysNoticeDO(); + NoticeDO dbNoticeDO = randomSysNoticeDO(); sysNoticeMapper.insert(dbNoticeDO); // 准备更新参数 - SysNoticeUpdateReqVO reqVO = randomSysNoticeUpdateReqVO(o -> o.setId(dbNoticeDO.getId())); + NoticeUpdateReqVO reqVO = randomSysNoticeUpdateReqVO(o -> o.setId(dbNoticeDO.getId())); // 更新 sysNoticeService.updateNotice(reqVO); // 检验是否更新成功 - SysNoticeDO notice = sysNoticeMapper.selectById(reqVO.getId()); + NoticeDO notice = sysNoticeMapper.selectById(reqVO.getId()); assertPojoEquals(reqVO, notice); } @Test public void testDeleteNotice_success() { // 插入前置数据 - SysNoticeDO dbNotice = randomSysNoticeDO(); + NoticeDO dbNotice = randomSysNoticeDO(); sysNoticeMapper.insert(dbNotice); // 删除 @@ -124,7 +124,7 @@ class SysNoticeServiceImplTest extends BaseDbUnitTest { @Test public void checkNoticeExists_success() { // 插入前置数据 - SysNoticeDO dbNotice = randomSysNoticeDO(); + NoticeDO dbNotice = randomSysNoticeDO(); sysNoticeMapper.insert(dbNotice); // 成功调用 @@ -137,24 +137,24 @@ class SysNoticeServiceImplTest extends BaseDbUnitTest { } @SafeVarargs - private static SysNoticeDO randomSysNoticeDO(Consumer... consumers) { - SysNoticeDO notice = randomPojo(SysNoticeDO.class, consumers); - notice.setType(randomEle(SysNoticeTypeEnum.values()).getType()); + private static NoticeDO randomSysNoticeDO(Consumer... consumers) { + NoticeDO notice = randomPojo(NoticeDO.class, consumers); + notice.setType(randomEle(NoticeTypeEnum.values()).getType()); notice.setStatus(CommonStatusEnum.ENABLE.getStatus()); return notice; } @SafeVarargs - private static SysNoticeUpdateReqVO randomSysNoticeUpdateReqVO(Consumer... consumers) { - SysNoticeUpdateReqVO reqVO = randomPojo(SysNoticeUpdateReqVO.class, consumers); - reqVO.setType(randomEle(SysNoticeTypeEnum.values()).getType()); + private static NoticeUpdateReqVO randomSysNoticeUpdateReqVO(Consumer... consumers) { + NoticeUpdateReqVO reqVO = randomPojo(NoticeUpdateReqVO.class, consumers); + reqVO.setType(randomEle(NoticeTypeEnum.values()).getType()); reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); return reqVO; } - private static SysNoticeCreateReqVO randomSysNoticeCreateReqVO() { - SysNoticeCreateReqVO reqVO = randomPojo(SysNoticeCreateReqVO.class); - reqVO.setType(randomEle(SysNoticeTypeEnum.values()).getType()); + private static NoticeCreateReqVO randomSysNoticeCreateReqVO() { + NoticeCreateReqVO reqVO = randomPojo(NoticeCreateReqVO.class); + reqVO.setType(randomEle(NoticeTypeEnum.values()).getType()); reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); return reqVO; } diff --git a/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/permission/SysMenuServiceTest.java b/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/permission/MenuServiceTest.java similarity index 70% rename from yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/permission/SysMenuServiceTest.java rename to yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/permission/MenuServiceTest.java index 06209bb6d..5b2b34383 100644 --- a/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/permission/SysMenuServiceTest.java +++ b/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/permission/MenuServiceTest.java @@ -3,19 +3,17 @@ package cn.iocoder.yudao.module.system.service.permission; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.lang.Assert; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; -import cn.iocoder.yudao.module.system.controller.permission.vo.menu.SysMenuCreateReqVO; -import cn.iocoder.yudao.module.system.controller.permission.vo.menu.SysMenuListReqVO; -import cn.iocoder.yudao.module.system.controller.permission.vo.menu.SysMenuUpdateReqVO; -import cn.iocoder.yudao.module.system.dal.dataobject.permission.SysMenuDO; +import cn.iocoder.yudao.module.system.controller.admin.permission.vo.menu.MenuCreateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.permission.vo.menu.MenuListReqVO; +import cn.iocoder.yudao.module.system.controller.admin.permission.vo.menu.MenuUpdateReqVO; +import cn.iocoder.yudao.module.system.dal.dataobject.permission.MenuDO; import cn.iocoder.yudao.module.system.dal.mysql.permission.SysMenuMapper; import cn.iocoder.yudao.module.system.enums.permission.MenuTypeEnum; -import cn.iocoder.yudao.module.system.mq.producer.permission.SysMenuProducer; +import cn.iocoder.yudao.module.system.mq.producer.permission.MenuProducer; import cn.iocoder.yudao.framework.common.util.spring.SpringAopUtils; -import cn.iocoder.yudao.framework.test.core.util.RandomUtils; import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; import cn.iocoder.yudao.module.system.test.BaseDbUnitTest; import com.google.common.collect.Multimap; -import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.context.annotation.Import; @@ -23,49 +21,49 @@ import org.springframework.context.annotation.Import; import javax.annotation.Resource; import java.util.*; -import static cn.iocoder.yudao.module.system.enums.SysErrorCodeConstants.*; +import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*; import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.*; import static org.junit.jupiter.api.Assertions.*; import static org.mockito.Mockito.verify; -@Import(SysMenuServiceImpl.class) -public class SysMenuServiceTest extends BaseDbUnitTest { +@Import(MenuServiceImpl.class) +public class MenuServiceTest extends BaseDbUnitTest { @Resource - private SysMenuServiceImpl sysMenuService; + private MenuServiceImpl sysMenuService; @MockBean - private SysPermissionService sysPermissionService; + private PermissionService sysPermissionService; @MockBean - private SysMenuProducer sysMenuProducer; + private MenuProducer sysMenuProducer; @Resource private SysMenuMapper menuMapper; @Test public void testInitLocalCache_success() throws Exception { - SysMenuDO menuDO1 = createMenuDO(MenuTypeEnum.MENU, "xxxx", 0L); + MenuDO menuDO1 = createMenuDO(MenuTypeEnum.MENU, "xxxx", 0L); menuMapper.insert(menuDO1); - SysMenuDO menuDO2 = createMenuDO(MenuTypeEnum.MENU, "xxxx", 0L); + MenuDO menuDO2 = createMenuDO(MenuTypeEnum.MENU, "xxxx", 0L); menuMapper.insert(menuDO2); // 调用 sysMenuService.initLocalCache(); // 获取代理对象 - SysMenuServiceImpl target = (SysMenuServiceImpl) SpringAopUtils.getTarget(sysMenuService); + MenuServiceImpl target = (MenuServiceImpl) SpringAopUtils.getTarget(sysMenuService); - Map menuCache = - (Map) BeanUtil.getFieldValue(target, "menuCache"); + Map menuCache = + (Map) BeanUtil.getFieldValue(target, "menuCache"); Assert.isTrue(menuCache.size() == 2); assertPojoEquals(menuDO1, menuCache.get(menuDO1.getId())); assertPojoEquals(menuDO2, menuCache.get(menuDO2.getId())); - Multimap permissionMenuCache = - (Multimap) BeanUtil.getFieldValue(target, "permissionMenuCache"); + Multimap permissionMenuCache = + (Multimap) BeanUtil.getFieldValue(target, "permissionMenuCache"); Assert.isTrue(permissionMenuCache.size() == 2); assertPojoEquals(menuDO1, permissionMenuCache.get(menuDO1.getPermission())); assertPojoEquals(menuDO2, permissionMenuCache.get(menuDO2.getPermission())); @@ -77,12 +75,12 @@ public class SysMenuServiceTest extends BaseDbUnitTest { @Test public void testCreateMenu_success() { //构造父目录 - SysMenuDO menuDO = createMenuDO(MenuTypeEnum.MENU, "parent", 0L); + MenuDO menuDO = createMenuDO(MenuTypeEnum.MENU, "parent", 0L); menuMapper.insert(menuDO); Long parentId = menuDO.getId(); //调用 - SysMenuCreateReqVO vo = randomPojo(SysMenuCreateReqVO.class, o -> { + MenuCreateReqVO vo = randomPojo(MenuCreateReqVO.class, o -> { o.setParentId(parentId); o.setName("testSonName"); o.setType(MenuTypeEnum.MENU.getType()); @@ -93,7 +91,7 @@ public class SysMenuServiceTest extends BaseDbUnitTest { //断言 assertNotNull(menuId); // 校验记录的属性是否正确 - SysMenuDO ret = menuMapper.selectById(menuId); + MenuDO ret = menuMapper.selectById(menuId); assertPojoEquals(vo, ret); // 校验调用 verify(sysMenuProducer).sendMenuRefreshMessage(); @@ -102,12 +100,12 @@ public class SysMenuServiceTest extends BaseDbUnitTest { @Test public void testUpdateMenu_success() { //构造父子目录 - SysMenuDO sonMenuDO = initParentAndSonMenuDO(); + MenuDO sonMenuDO = initParentAndSonMenuDO(); Long sonId = sonMenuDO.getId(); Long parentId = sonMenuDO.getParentId(); //调用 - SysMenuUpdateReqVO vo = randomPojo(SysMenuUpdateReqVO.class, o -> { + MenuUpdateReqVO vo = randomPojo(MenuUpdateReqVO.class, o -> { o.setId(sonId); o.setParentId(parentId); o.setType(MenuTypeEnum.MENU.getType()); @@ -118,7 +116,7 @@ public class SysMenuServiceTest extends BaseDbUnitTest { //断言 // 校验记录的属性是否正确 - SysMenuDO ret = menuMapper.selectById(sonId); + MenuDO ret = menuMapper.selectById(sonId); assertPojoEquals(vo, ret); // 校验调用 verify(sysMenuProducer).sendMenuRefreshMessage(); @@ -130,7 +128,7 @@ public class SysMenuServiceTest extends BaseDbUnitTest { Long parentId = 10000L; //调用 - SysMenuUpdateReqVO vo = randomPojo(SysMenuUpdateReqVO.class, o -> { + MenuUpdateReqVO vo = randomPojo(MenuUpdateReqVO.class, o -> { o.setId(sonId); o.setParentId(parentId); o.setType(MenuTypeEnum.MENU.getType()); @@ -142,14 +140,14 @@ public class SysMenuServiceTest extends BaseDbUnitTest { @Test public void testDeleteMenu_success() { - SysMenuDO sonMenuDO = initParentAndSonMenuDO(); + MenuDO sonMenuDO = initParentAndSonMenuDO(); Long sonId = sonMenuDO.getId(); // 调用 sysMenuService.deleteMenu(sonId); // 断言 - SysMenuDO menuDO = menuMapper.selectById(sonId); + MenuDO menuDO = menuMapper.selectById(sonId); assertNull(menuDO); verify(sysPermissionService).processMenuDeleted(sonId); verify(sysMenuProducer).sendMenuRefreshMessage(); @@ -164,7 +162,7 @@ public class SysMenuServiceTest extends BaseDbUnitTest { @Test public void testDeleteMenu_existChildren() { - SysMenuDO sonMenu = initParentAndSonMenuDO(); + MenuDO sonMenu = initParentAndSonMenuDO(); Long parentId = sonMenu.getParentId(); assertServiceException(() -> sysMenuService.deleteMenu(parentId), MENU_EXISTS_CHILDREN); @@ -172,17 +170,17 @@ public class SysMenuServiceTest extends BaseDbUnitTest { @Test public void testGetMenus_success() { - Map idMenuMap = new HashMap<>(); - SysMenuDO menuDO = createMenuDO(MenuTypeEnum.MENU, "parent", 0L); + Map idMenuMap = new HashMap<>(); + MenuDO menuDO = createMenuDO(MenuTypeEnum.MENU, "parent", 0L); menuMapper.insert(menuDO); idMenuMap.put(menuDO.getId(), menuDO); - SysMenuDO sonMenu = createMenuDO(MenuTypeEnum.MENU, "son", menuDO.getId()); + MenuDO sonMenu = createMenuDO(MenuTypeEnum.MENU, "son", menuDO.getId()); menuMapper.insert(sonMenu); idMenuMap.put(sonMenu.getId(), sonMenu); // 调用 - List menuDOS = sysMenuService.getMenus(); + List menuDOS = sysMenuService.getMenus(); // 断言 assertEquals(menuDOS.size(), idMenuMap.size()); @@ -191,9 +189,9 @@ public class SysMenuServiceTest extends BaseDbUnitTest { @Test public void testGetMenusReqVo_success() { - Map idMenuMap = new HashMap<>(); + Map idMenuMap = new HashMap<>(); // 用于验证可以模糊搜索名称包含"name",状态为1的menu - SysMenuDO menu = createMenuDO(MenuTypeEnum.MENU, "name2", 0L, 1); + MenuDO menu = createMenuDO(MenuTypeEnum.MENU, "name2", 0L, 1); menuMapper.insert(menu); idMenuMap.put(menu.getId(), menu); @@ -212,10 +210,10 @@ public class SysMenuServiceTest extends BaseDbUnitTest { menuMapper.insert(menu); // 调用 - SysMenuListReqVO reqVO = new SysMenuListReqVO(); + MenuListReqVO reqVO = new MenuListReqVO(); reqVO.setStatus(1); reqVO.setName("name"); - List menuDOS = sysMenuService.getMenus(reqVO); + List menuDOS = sysMenuService.getMenus(reqVO); // 断言 assertEquals(menuDOS.size(), idMenuMap.size()); @@ -224,14 +222,14 @@ public class SysMenuServiceTest extends BaseDbUnitTest { @Test public void testListMenusFromCache_success() throws Exception { - Map mockCacheMap = new HashMap<>(); + Map mockCacheMap = new HashMap<>(); // 获取代理对象 - SysMenuServiceImpl target = (SysMenuServiceImpl) SpringAopUtils.getTarget(sysMenuService); + MenuServiceImpl target = (MenuServiceImpl) SpringAopUtils.getTarget(sysMenuService); BeanUtil.setFieldValue(target, "menuCache", mockCacheMap); - Map idMenuMap = new HashMap<>(); + Map idMenuMap = new HashMap<>(); // 用于验证搜索类型为MENU,状态为1的menu - SysMenuDO menuDO = createMenuDO(1L, MenuTypeEnum.MENU, "name", 0L, 1); + MenuDO menuDO = createMenuDO(1L, MenuTypeEnum.MENU, "name", 0L, 1); mockCacheMap.put(menuDO.getId(), menuDO); idMenuMap.put(menuDO.getId(), menuDO); @@ -245,7 +243,7 @@ public class SysMenuServiceTest extends BaseDbUnitTest { menuDO = createMenuDO(4L, MenuTypeEnum.MENU, "name", 0L, 2); mockCacheMap.put(menuDO.getId(), menuDO); - List menuDOS = sysMenuService.listMenusFromCache(Collections.singletonList(MenuTypeEnum.MENU.getType()), + List menuDOS = sysMenuService.listMenusFromCache(Collections.singletonList(MenuTypeEnum.MENU.getType()), Collections.singletonList(CommonStatusEnum.DISABLE.getStatus())); assertEquals(menuDOS.size(), idMenuMap.size()); menuDOS.forEach(m -> assertPojoEquals(idMenuMap.get(m.getId()), m)); @@ -253,14 +251,14 @@ public class SysMenuServiceTest extends BaseDbUnitTest { @Test public void testListMenusFromCache2_success() throws Exception { - Map mockCacheMap = new HashMap<>(); + Map mockCacheMap = new HashMap<>(); // 获取代理对象 - SysMenuServiceImpl target = (SysMenuServiceImpl) SpringAopUtils.getTarget(sysMenuService); + MenuServiceImpl target = (MenuServiceImpl) SpringAopUtils.getTarget(sysMenuService); BeanUtil.setFieldValue(target, "menuCache", mockCacheMap); - Map idMenuMap = new HashMap<>(); + Map idMenuMap = new HashMap<>(); // 验证搜索id为1, 类型为MENU, 状态为1 的menu - SysMenuDO menuDO = createMenuDO(1L, MenuTypeEnum.MENU, "name", 0L, 1); + MenuDO menuDO = createMenuDO(1L, MenuTypeEnum.MENU, "name", 0L, 1); mockCacheMap.put(menuDO.getId(), menuDO); idMenuMap.put(menuDO.getId(), menuDO); @@ -272,7 +270,7 @@ public class SysMenuServiceTest extends BaseDbUnitTest { menuDO = createMenuDO(4L, MenuTypeEnum.MENU, "name", 0L, 2); mockCacheMap.put(menuDO.getId(), menuDO); - List menuDOS = sysMenuService.listMenusFromCache(Collections.singletonList(1L), + List menuDOS = sysMenuService.listMenusFromCache(Collections.singletonList(1L), Collections.singletonList(MenuTypeEnum.MENU.getType()), Collections.singletonList(1)); assertEquals(menuDOS.size(), idMenuMap.size()); menuDOS.forEach(menu -> assertPojoEquals(idMenuMap.get(menu.getId()), menu)); @@ -280,7 +278,7 @@ public class SysMenuServiceTest extends BaseDbUnitTest { @Test public void testCheckParentResource_success() { - SysMenuDO menuDO = createMenuDO(MenuTypeEnum.MENU, "parent", 0L); + MenuDO menuDO = createMenuDO(MenuTypeEnum.MENU, "parent", 0L); menuMapper.insert(menuDO); Long parentId = menuDO.getId(); @@ -299,7 +297,7 @@ public class SysMenuServiceTest extends BaseDbUnitTest { @Test public void testCheckParentResource_parentTypeError() { - SysMenuDO menuDO = createMenuDO(MenuTypeEnum.BUTTON, "parent", 0L); + MenuDO menuDO = createMenuDO(MenuTypeEnum.BUTTON, "parent", 0L); menuMapper.insert(menuDO); Long parentId = menuDO.getId(); @@ -308,7 +306,7 @@ public class SysMenuServiceTest extends BaseDbUnitTest { @Test public void testCheckResource_success() { - SysMenuDO sonMenu = initParentAndSonMenuDO(); + MenuDO sonMenu = initParentAndSonMenuDO(); Long parentId = sonMenu.getParentId(); Long otherSonMenuId = randomLongId(); @@ -319,7 +317,7 @@ public class SysMenuServiceTest extends BaseDbUnitTest { @Test public void testCheckResource_sonMenuNameDuplicate(){ - SysMenuDO sonMenu=initParentAndSonMenuDO(); + MenuDO sonMenu=initParentAndSonMenuDO(); Long parentId=sonMenu.getParentId(); Long otherSonMenuId=randomLongId(); @@ -333,27 +331,27 @@ public class SysMenuServiceTest extends BaseDbUnitTest { * * @return */ - private SysMenuDO initParentAndSonMenuDO() { + private MenuDO initParentAndSonMenuDO() { //构造父子目录 - SysMenuDO menuDO = createMenuDO(MenuTypeEnum.MENU, "parent", 0L); + MenuDO menuDO = createMenuDO(MenuTypeEnum.MENU, "parent", 0L); menuMapper.insert(menuDO); Long parentId = menuDO.getId(); - SysMenuDO sonMenuDO = createMenuDO(MenuTypeEnum.MENU, "testSonName", parentId); + MenuDO sonMenuDO = createMenuDO(MenuTypeEnum.MENU, "testSonName", parentId); menuMapper.insert(sonMenuDO); return sonMenuDO; } - private SysMenuDO createMenuDO(MenuTypeEnum typeEnum, String menuName, Long parentId) { + private MenuDO createMenuDO(MenuTypeEnum typeEnum, String menuName, Long parentId) { return createMenuDO(typeEnum, menuName, parentId, randomCommonStatus()); } - private SysMenuDO createMenuDO(MenuTypeEnum typeEnum, String menuName, Long parentId, Integer status) { + private MenuDO createMenuDO(MenuTypeEnum typeEnum, String menuName, Long parentId, Integer status) { return createMenuDO(null, typeEnum, menuName, parentId, status); } - private SysMenuDO createMenuDO(Long id, MenuTypeEnum typeEnum, String menuName, Long parentId, Integer status) { - return randomPojo(SysMenuDO.class, o -> { + private MenuDO createMenuDO(Long id, MenuTypeEnum typeEnum, String menuName, Long parentId, Integer status) { + return randomPojo(MenuDO.class, o -> { o.setId(id); o.setParentId(parentId); o.setType(typeEnum.getType()); diff --git a/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/permission/SysPermissionServiceTest.java b/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/permission/PermissionServiceTest.java similarity index 83% rename from yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/permission/SysPermissionServiceTest.java rename to yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/permission/PermissionServiceTest.java index dde1a7bb7..3652c2ba3 100644 --- a/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/permission/SysPermissionServiceTest.java +++ b/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/permission/PermissionServiceTest.java @@ -3,12 +3,12 @@ package cn.iocoder.yudao.module.system.service.permission; import cn.hutool.core.collection.CollUtil; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.dept.SysDeptDO; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.permission.SysRoleDO; -import cn.iocoder.yudao.module.system.dal.dataobject.permission.SysRoleMenuDO; +import cn.iocoder.yudao.module.system.dal.dataobject.permission.RoleMenuDO; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.permission.SysUserRoleDO; import cn.iocoder.yudao.module.system.dal.mysql.permission.SysRoleMenuMapper; import cn.iocoder.yudao.module.system.dal.mysql.permission.SysUserRoleMapper; -import cn.iocoder.yudao.module.system.mq.producer.permission.SysPermissionProducer; -import cn.iocoder.yudao.module.system.service.dept.SysDeptService; +import cn.iocoder.yudao.module.system.mq.producer.permission.PermissionProducer; +import cn.iocoder.yudao.module.system.service.dept.DeptService; import cn.iocoder.yudao.framework.datapermission.core.dept.service.dto.DeptDataPermissionRespDTO; import cn.iocoder.yudao.framework.security.core.LoginUser; import cn.iocoder.yudao.framework.security.core.enums.DataScopeEnum; @@ -30,11 +30,11 @@ import static org.mockito.ArgumentMatchers.same; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -@Import(SysPermissionServiceImpl.class) -public class SysPermissionServiceTest extends BaseDbUnitTest { +@Import(PermissionServiceImpl.class) +public class PermissionServiceTest extends BaseDbUnitTest { @Resource - private SysPermissionServiceImpl permissionService; + private PermissionServiceImpl permissionService; @Resource private SysRoleMenuMapper roleMenuMapper; @@ -42,14 +42,14 @@ public class SysPermissionServiceTest extends BaseDbUnitTest { private SysUserRoleMapper userRoleMapper; @MockBean - private SysRoleService roleService; + private RoleService roleService; @MockBean - private SysMenuService menuService; + private MenuService menuService; @MockBean - private SysDeptService deptService; + private DeptService deptService; @MockBean - private SysPermissionProducer permissionProducer; + private PermissionProducer permissionProducer; @Test public void testProcessRoleDeleted() { @@ -61,15 +61,15 @@ public class SysPermissionServiceTest extends BaseDbUnitTest { SysUserRoleDO userRoleDO02 = randomPojo(SysUserRoleDO.class); // 不被删除 userRoleMapper.insert(userRoleDO02); // mock 数据 RoleMenu - SysRoleMenuDO roleMenuDO01 = randomPojo(SysRoleMenuDO.class, o -> o.setRoleId(roleId)); // 被删除 + RoleMenuDO roleMenuDO01 = randomPojo(RoleMenuDO.class, o -> o.setRoleId(roleId)); // 被删除 roleMenuMapper.insert(roleMenuDO01); - SysRoleMenuDO roleMenuDO02 = randomPojo(SysRoleMenuDO.class); // 不被删除 + RoleMenuDO roleMenuDO02 = randomPojo(RoleMenuDO.class); // 不被删除 roleMenuMapper.insert(roleMenuDO02); // 调用 permissionService.processRoleDeleted(roleId); // 断言数据 RoleMenuDO - List dbRoleMenus = roleMenuMapper.selectList(); + List dbRoleMenus = roleMenuMapper.selectList(); assertEquals(1, dbRoleMenus.size()); assertPojoEquals(dbRoleMenus.get(0), roleMenuDO02); // 断言数据 UserRoleDO @@ -85,15 +85,15 @@ public class SysPermissionServiceTest extends BaseDbUnitTest { // 准备参数 Long menuId = randomLongId(); // mock 数据 - SysRoleMenuDO roleMenuDO01 = randomPojo(SysRoleMenuDO.class, o -> o.setMenuId(menuId)); // 被删除 + RoleMenuDO roleMenuDO01 = randomPojo(RoleMenuDO.class, o -> o.setMenuId(menuId)); // 被删除 roleMenuMapper.insert(roleMenuDO01); - SysRoleMenuDO roleMenuDO02 = randomPojo(SysRoleMenuDO.class); // 不被删除 + RoleMenuDO roleMenuDO02 = randomPojo(RoleMenuDO.class); // 不被删除 roleMenuMapper.insert(roleMenuDO02); // 调用 permissionService.processMenuDeleted(menuId); // 断言数据 - List dbRoleMenus = roleMenuMapper.selectList(); + List dbRoleMenus = roleMenuMapper.selectList(); assertEquals(1, dbRoleMenus.size()); assertPojoEquals(dbRoleMenus.get(0), roleMenuDO02); // 断言调用 @@ -124,7 +124,7 @@ public class SysPermissionServiceTest extends BaseDbUnitTest { LoginUser loginUser = randomPojo(LoginUser.class); // mock 方法 DeptDataPermissionRespDTO respDTO = new DeptDataPermissionRespDTO(); - loginUser.setContext(SysPermissionServiceImpl.CONTEXT_KEY, respDTO); + loginUser.setContext(PermissionServiceImpl.CONTEXT_KEY, respDTO); // 调用 DeptDataPermissionRespDTO result = permissionService.getDeptDataPermission(loginUser); @@ -146,7 +146,7 @@ public class SysPermissionServiceTest extends BaseDbUnitTest { assertTrue(result.getAll()); assertFalse(result.getSelf()); assertTrue(CollUtil.isEmpty(result.getDeptIds())); - assertSame(result, loginUser.getContext(SysPermissionServiceImpl.CONTEXT_KEY, DeptDataPermissionRespDTO.class)); + assertSame(result, loginUser.getContext(PermissionServiceImpl.CONTEXT_KEY, DeptDataPermissionRespDTO.class)); } @Test @@ -165,7 +165,7 @@ public class SysPermissionServiceTest extends BaseDbUnitTest { assertEquals(roleDO.getDataScopeDeptIds().size() + 1, result.getDeptIds().size()); assertTrue(CollUtil.containsAll(result.getDeptIds(), roleDO.getDataScopeDeptIds())); assertTrue(CollUtil.contains(result.getDeptIds(), loginUser.getDeptId())); - assertSame(result, loginUser.getContext(SysPermissionServiceImpl.CONTEXT_KEY, DeptDataPermissionRespDTO.class)); + assertSame(result, loginUser.getContext(PermissionServiceImpl.CONTEXT_KEY, DeptDataPermissionRespDTO.class)); } @Test @@ -183,7 +183,7 @@ public class SysPermissionServiceTest extends BaseDbUnitTest { assertFalse(result.getSelf()); assertEquals(1, result.getDeptIds().size()); assertTrue(CollUtil.contains(result.getDeptIds(), loginUser.getDeptId())); - assertSame(result, loginUser.getContext(SysPermissionServiceImpl.CONTEXT_KEY, DeptDataPermissionRespDTO.class)); + assertSame(result, loginUser.getContext(PermissionServiceImpl.CONTEXT_KEY, DeptDataPermissionRespDTO.class)); } @Test @@ -205,7 +205,7 @@ public class SysPermissionServiceTest extends BaseDbUnitTest { assertFalse(result.getSelf()); assertEquals(1, result.getDeptIds().size()); assertTrue(CollUtil.contains(result.getDeptIds(), deptDO.getId())); - assertSame(result, loginUser.getContext(SysPermissionServiceImpl.CONTEXT_KEY, DeptDataPermissionRespDTO.class)); + assertSame(result, loginUser.getContext(PermissionServiceImpl.CONTEXT_KEY, DeptDataPermissionRespDTO.class)); } @Test @@ -222,7 +222,7 @@ public class SysPermissionServiceTest extends BaseDbUnitTest { assertFalse(result.getAll()); assertTrue(result.getSelf()); assertTrue(CollUtil.isEmpty(result.getDeptIds())); - assertSame(result, loginUser.getContext(SysPermissionServiceImpl.CONTEXT_KEY, DeptDataPermissionRespDTO.class)); + assertSame(result, loginUser.getContext(PermissionServiceImpl.CONTEXT_KEY, DeptDataPermissionRespDTO.class)); } } diff --git a/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/permission/SysRoleServiceTest.java b/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/permission/RoleServiceTest.java similarity index 72% rename from yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/permission/SysRoleServiceTest.java rename to yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/permission/RoleServiceTest.java index d58e68ad2..68e55926a 100644 --- a/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/permission/SysRoleServiceTest.java +++ b/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/permission/RoleServiceTest.java @@ -4,13 +4,13 @@ import cn.hutool.core.bean.BeanUtil; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.security.core.enums.DataScopeEnum; -import cn.iocoder.yudao.module.system.controller.permission.vo.role.SysRoleCreateReqVO; -import cn.iocoder.yudao.module.system.controller.permission.vo.role.SysRolePageReqVO; -import cn.iocoder.yudao.module.system.controller.permission.vo.role.SysRoleUpdateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.permission.vo.role.RoleCreateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.permission.vo.role.RolePageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.permission.vo.role.RoleUpdateReqVO; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.permission.SysRoleDO; import cn.iocoder.yudao.module.system.dal.mysql.permission.SysRoleMapper; -import cn.iocoder.yudao.module.system.enums.permission.SysRoleTypeEnum; -import cn.iocoder.yudao.module.system.mq.producer.permission.SysRoleProducer; +import cn.iocoder.yudao.module.system.enums.permission.RoleTypeEnum; +import cn.iocoder.yudao.module.system.mq.producer.permission.RoleProducer; import cn.iocoder.yudao.framework.common.util.spring.SpringAopUtils; import cn.iocoder.yudao.module.system.test.BaseDbUnitTest; import org.junit.jupiter.api.Test; @@ -21,7 +21,7 @@ import javax.annotation.Resource; import java.util.*; import java.util.stream.Collectors; -import static cn.iocoder.yudao.module.system.enums.SysErrorCodeConstants.*; +import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*; import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.max; @@ -29,26 +29,26 @@ import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.*; import static org.junit.jupiter.api.Assertions.*; import static org.mockito.Mockito.verify; -@Import(SysRoleServiceImpl.class) -public class SysRoleServiceTest extends BaseDbUnitTest { +@Import(RoleServiceImpl.class) +public class RoleServiceTest extends BaseDbUnitTest { @Resource - private SysRoleServiceImpl sysRoleService; + private RoleServiceImpl sysRoleService; @Resource private SysRoleMapper roleMapper; @MockBean - private SysPermissionService sysPermissionService; + private PermissionService sysPermissionService; @MockBean - private SysRoleProducer sysRoleProducer; + private RoleProducer sysRoleProducer; @Test public void testInitLocalCache_success() throws Exception { - SysRoleDO roleDO1 = createRoleDO("role1", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL); + SysRoleDO roleDO1 = createRoleDO("role1", RoleTypeEnum.CUSTOM, DataScopeEnum.ALL); roleMapper.insert(roleDO1); - SysRoleDO roleDO2 = createRoleDO("role2", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL); + SysRoleDO roleDO2 = createRoleDO("role2", RoleTypeEnum.CUSTOM, DataScopeEnum.ALL); roleMapper.insert(roleDO2); //调用 @@ -56,7 +56,7 @@ public class SysRoleServiceTest extends BaseDbUnitTest { //断言 //获取代理对象 - SysRoleServiceImpl target = (SysRoleServiceImpl) SpringAopUtils.getTarget(sysRoleService); + RoleServiceImpl target = (RoleServiceImpl) SpringAopUtils.getTarget(sysRoleService); Map roleCache = (Map) BeanUtil.getFieldValue(target, "roleCache"); assertPojoEquals(roleDO1, roleCache.get(roleDO1.getId())); @@ -68,11 +68,11 @@ public class SysRoleServiceTest extends BaseDbUnitTest { @Test public void testCreateRole_success() { - SysRoleCreateReqVO reqVO = randomPojo(SysRoleCreateReqVO.class, o -> { + RoleCreateReqVO reqVO = randomPojo(RoleCreateReqVO.class, o -> { o.setCode("role_code"); o.setName("role_name"); o.setRemark("remark"); - o.setType(SysRoleTypeEnum.CUSTOM.getType()); + o.setType(RoleTypeEnum.CUSTOM.getType()); o.setSort(1); }); Long roleId = sysRoleService.createRole(reqVO); @@ -87,16 +87,16 @@ public class SysRoleServiceTest extends BaseDbUnitTest { @Test public void testUpdateRole_success() { - SysRoleDO roleDO = createRoleDO("role_name", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL); + SysRoleDO roleDO = createRoleDO("role_name", RoleTypeEnum.CUSTOM, DataScopeEnum.ALL); roleMapper.insert(roleDO); Long roleId = roleDO.getId(); //调用 - SysRoleUpdateReqVO reqVO = randomPojo(SysRoleUpdateReqVO.class, o -> { + RoleUpdateReqVO reqVO = randomPojo(RoleUpdateReqVO.class, o -> { o.setId(roleId); o.setCode("role_code"); o.setName("update_name"); - o.setType(SysRoleTypeEnum.SYSTEM.getType()); + o.setType(RoleTypeEnum.SYSTEM.getType()); o.setSort(999); }); sysRoleService.updateRole(reqVO); @@ -110,7 +110,7 @@ public class SysRoleServiceTest extends BaseDbUnitTest { @Test public void testUpdateRoleStatus_success() { - SysRoleDO roleDO = createRoleDO("role_name", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL, CommonStatusEnum.ENABLE.getStatus()); + SysRoleDO roleDO = createRoleDO("role_name", RoleTypeEnum.CUSTOM, DataScopeEnum.ALL, CommonStatusEnum.ENABLE.getStatus()); roleMapper.insert(roleDO); Long roleId = roleDO.getId(); @@ -126,7 +126,7 @@ public class SysRoleServiceTest extends BaseDbUnitTest { @Test public void testUpdateRoleDataScope_success() { - SysRoleDO roleDO = createRoleDO("role_name", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL); + SysRoleDO roleDO = createRoleDO("role_name", RoleTypeEnum.CUSTOM, DataScopeEnum.ALL); roleMapper.insert(roleDO); Long roleId = roleDO.getId(); @@ -147,7 +147,7 @@ public class SysRoleServiceTest extends BaseDbUnitTest { @Test public void testDeleteRole_success() { - SysRoleDO roleDO = createRoleDO("role_name", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL); + SysRoleDO roleDO = createRoleDO("role_name", RoleTypeEnum.CUSTOM, DataScopeEnum.ALL); roleMapper.insert(roleDO); Long roleId = roleDO.getId(); @@ -165,16 +165,16 @@ public class SysRoleServiceTest extends BaseDbUnitTest { public void testGetRoles_success() { Map idRoleMap = new HashMap<>(); // 验证查询状态为1的角色 - SysRoleDO roleDO1 = createRoleDO("role1", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL, 1); + SysRoleDO roleDO1 = createRoleDO("role1", RoleTypeEnum.CUSTOM, DataScopeEnum.ALL, 1); roleMapper.insert(roleDO1); idRoleMap.put(roleDO1.getId(), roleDO1); - SysRoleDO roleDO2 = createRoleDO("role2", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL, 1); + SysRoleDO roleDO2 = createRoleDO("role2", RoleTypeEnum.CUSTOM, DataScopeEnum.ALL, 1); roleMapper.insert(roleDO2); idRoleMap.put(roleDO2.getId(), roleDO2); // 以下是排除的角色 - SysRoleDO roleDO3 = createRoleDO("role3", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL, 2); + SysRoleDO roleDO3 = createRoleDO("role3", RoleTypeEnum.CUSTOM, DataScopeEnum.ALL, 2); roleMapper.insert(roleDO3); //调用 @@ -191,21 +191,21 @@ public class SysRoleServiceTest extends BaseDbUnitTest { Map idRoleMap = new HashMap<>(); // 验证名称包含"role", 状态为1,code为"code"的角色 // 第一页 - SysRoleDO roleDO = createRoleDO("role1", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL, 1, "code"); + SysRoleDO roleDO = createRoleDO("role1", RoleTypeEnum.CUSTOM, DataScopeEnum.ALL, 1, "code"); roleMapper.insert(roleDO); idRoleMap.put(roleDO.getId(), roleDO); // 第二页 - roleDO = createRoleDO("role2", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL, 1, "code"); + roleDO = createRoleDO("role2", RoleTypeEnum.CUSTOM, DataScopeEnum.ALL, 1, "code"); roleMapper.insert(roleDO); // 以下是排除的角色 - roleDO = createRoleDO("role3", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL, 2, "code"); + roleDO = createRoleDO("role3", RoleTypeEnum.CUSTOM, DataScopeEnum.ALL, 2, "code"); roleMapper.insert(roleDO); - roleDO = createRoleDO("role4", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL, 1, "xxxxx"); + roleDO = createRoleDO("role4", RoleTypeEnum.CUSTOM, DataScopeEnum.ALL, 1, "xxxxx"); roleMapper.insert(roleDO); //调用 - SysRolePageReqVO reqVO = randomPojo(SysRolePageReqVO.class, o -> { + RolePageReqVO reqVO = randomPojo(RolePageReqVO.class, o -> { o.setName("role"); o.setCode("code"); o.setStatus(1); @@ -226,7 +226,7 @@ public class SysRoleServiceTest extends BaseDbUnitTest { @Test public void testCheckDuplicateRole_nameDuplicate() { - SysRoleDO roleDO = createRoleDO("role_name", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL); + SysRoleDO roleDO = createRoleDO("role_name", RoleTypeEnum.CUSTOM, DataScopeEnum.ALL); roleMapper.insert(roleDO); String duplicateName = "role_name"; @@ -239,7 +239,7 @@ public class SysRoleServiceTest extends BaseDbUnitTest { SysRoleDO roleDO = randomPojo(SysRoleDO.class, o -> { o.setName("role_999"); o.setCode("code"); - o.setType(SysRoleTypeEnum.CUSTOM.getType()); + o.setType(RoleTypeEnum.CUSTOM.getType()); o.setStatus(1); o.setDataScope(DataScopeEnum.ALL.getScope()); }); @@ -253,7 +253,7 @@ public class SysRoleServiceTest extends BaseDbUnitTest { @Test public void testCheckUpdateRole_success() { - SysRoleDO roleDO = createRoleDO("role_name", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL); + SysRoleDO roleDO = createRoleDO("role_name", RoleTypeEnum.CUSTOM, DataScopeEnum.ALL); roleMapper.insert(roleDO); Long roleId = roleDO.getId(); @@ -267,26 +267,26 @@ public class SysRoleServiceTest extends BaseDbUnitTest { @Test public void testCheckUpdateRole_systemRoleCanNotBeUpdate() { - SysRoleDO roleDO = createRoleDO("role_name", SysRoleTypeEnum.SYSTEM, DataScopeEnum.ALL); + SysRoleDO roleDO = createRoleDO("role_name", RoleTypeEnum.SYSTEM, DataScopeEnum.ALL); roleMapper.insert(roleDO); Long roleId = roleDO.getId(); assertServiceException(() -> sysRoleService.checkUpdateRole(roleId), ROLE_CAN_NOT_UPDATE_SYSTEM_TYPE_ROLE); } - private SysRoleDO createRoleDO(String name, SysRoleTypeEnum typeEnum, DataScopeEnum scopeEnum, Integer status) { + private SysRoleDO createRoleDO(String name, RoleTypeEnum typeEnum, DataScopeEnum scopeEnum, Integer status) { return createRoleDO( name, typeEnum, scopeEnum, status, randomString()); } - private SysRoleDO createRoleDO(String name, SysRoleTypeEnum typeEnum, DataScopeEnum scopeEnum, Integer status, String code) { + private SysRoleDO createRoleDO(String name, RoleTypeEnum typeEnum, DataScopeEnum scopeEnum, Integer status, String code) { return createRoleDO(null, name, typeEnum, scopeEnum, status, code); } - private SysRoleDO createRoleDO(String name, SysRoleTypeEnum typeEnum, DataScopeEnum scopeEnum) { + private SysRoleDO createRoleDO(String name, RoleTypeEnum typeEnum, DataScopeEnum scopeEnum) { return createRoleDO(null, name, typeEnum, scopeEnum, randomCommonStatus(), randomString()); } - private SysRoleDO createRoleDO(Long id, String name, SysRoleTypeEnum typeEnum, DataScopeEnum scopeEnum, Integer status, String code) { + private SysRoleDO createRoleDO(Long id, String name, RoleTypeEnum typeEnum, DataScopeEnum scopeEnum, Integer status, String code) { SysRoleDO roleDO = randomPojo(SysRoleDO.class, o -> { o.setId(id); o.setName(name); diff --git a/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/sms/SysSmsChannelServiceTest.java b/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/sms/SmsChannelServiceTest.java similarity index 86% rename from yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/sms/SysSmsChannelServiceTest.java rename to yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/sms/SmsChannelServiceTest.java index d3509f9e4..28d6b2703 100644 --- a/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/sms/SysSmsChannelServiceTest.java +++ b/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/sms/SmsChannelServiceTest.java @@ -1,11 +1,11 @@ package cn.iocoder.yudao.module.system.service.sms; import cn.hutool.core.bean.BeanUtil; -import cn.iocoder.yudao.module.system.controller.sms.vo.channel.SysSmsChannelCreateReqVO; -import cn.iocoder.yudao.module.system.controller.sms.vo.channel.SysSmsChannelPageReqVO; -import cn.iocoder.yudao.module.system.controller.sms.vo.channel.SysSmsChannelUpdateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel.SmsChannelCreateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel.SmsChannelPageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel.SmsChannelUpdateReqVO; import cn.iocoder.yudao.module.system.dal.mysql.sms.SysSmsChannelMapper; -import cn.iocoder.yudao.module.system.mq.producer.sms.SysSmsProducer; +import cn.iocoder.yudao.module.system.mq.producer.sms.SmsProducer; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.sms.SysSmsChannelDO; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.PageResult; @@ -22,8 +22,8 @@ import java.util.Date; import java.util.function.Consumer; import static cn.hutool.core.util.RandomUtil.randomEle; -import static cn.iocoder.yudao.module.system.enums.SysErrorCodeConstants.SMS_CHANNEL_HAS_CHILDREN; -import static cn.iocoder.yudao.module.system.enums.SysErrorCodeConstants.SMS_CHANNEL_NOT_EXISTS; +import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.SMS_CHANNEL_HAS_CHILDREN; +import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.SMS_CHANNEL_NOT_EXISTS; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime; import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.max; import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.*; @@ -32,11 +32,11 @@ import static org.junit.jupiter.api.Assertions.*; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.*; -@Import(SysSmsChannelServiceImpl.class) -public class SysSmsChannelServiceTest extends BaseDbUnitTest { +@Import(SmsChannelServiceImpl.class) +public class SmsChannelServiceTest extends BaseDbUnitTest { @Resource - private SysSmsChannelServiceImpl smsChannelService; + private SmsChannelServiceImpl smsChannelService; @Resource private SysSmsChannelMapper smsChannelMapper; @@ -44,9 +44,9 @@ public class SysSmsChannelServiceTest extends BaseDbUnitTest { @MockBean private SmsClientFactory smsClientFactory; @MockBean - private SysSmsTemplateService smsTemplateService; + private SmsTemplateService smsTemplateService; @MockBean - private SysSmsProducer smsProducer; + private SmsProducer smsProducer; @Test public void testInitLocalCache_success() { @@ -71,7 +71,7 @@ public class SysSmsChannelServiceTest extends BaseDbUnitTest { @Test public void testCreateSmsChannel_success() { // 准备参数 - SysSmsChannelCreateReqVO reqVO = randomPojo(SysSmsChannelCreateReqVO.class, o -> o.setStatus(randomCommonStatus())); + SmsChannelCreateReqVO reqVO = randomPojo(SmsChannelCreateReqVO.class, o -> o.setStatus(randomCommonStatus())); // 调用 Long smsChannelId = smsChannelService.createSmsChannel(reqVO); @@ -90,7 +90,7 @@ public class SysSmsChannelServiceTest extends BaseDbUnitTest { SysSmsChannelDO dbSmsChannel = randomSmsChannelDO(); smsChannelMapper.insert(dbSmsChannel);// @Sql: 先插入出一条存在的数据 // 准备参数 - SysSmsChannelUpdateReqVO reqVO = randomPojo(SysSmsChannelUpdateReqVO.class, o -> { + SmsChannelUpdateReqVO reqVO = randomPojo(SmsChannelUpdateReqVO.class, o -> { o.setId(dbSmsChannel.getId()); // 设置更新的 ID o.setStatus(randomCommonStatus()); o.setCallbackUrl(randomString()); @@ -108,7 +108,7 @@ public class SysSmsChannelServiceTest extends BaseDbUnitTest { @Test public void testUpdateSmsChannel_notExists() { // 准备参数 - SysSmsChannelUpdateReqVO reqVO = randomPojo(SysSmsChannelUpdateReqVO.class); + SmsChannelUpdateReqVO reqVO = randomPojo(SmsChannelUpdateReqVO.class); // 调用, 并断言异常 assertServiceException(() -> smsChannelService.updateSmsChannel(reqVO), SMS_CHANNEL_NOT_EXISTS); @@ -169,7 +169,7 @@ public class SysSmsChannelServiceTest extends BaseDbUnitTest { // 测试 createTime 不匹配 smsChannelMapper.insert(ObjectUtils.cloneIgnoreId(dbSmsChannel, o -> o.setCreateTime(buildTime(2020, 11, 11)))); // 准备参数 - SysSmsChannelPageReqVO reqVO = new SysSmsChannelPageReqVO(); + SmsChannelPageReqVO reqVO = new SmsChannelPageReqVO(); reqVO.setSignature("芋道"); reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); reqVO.setBeginCreateTime(buildTime(2020, 12, 1)); diff --git a/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/sms/SysSmsLogServiceTest.java b/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/sms/SmsLogServiceTest.java similarity index 94% rename from yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/sms/SysSmsLogServiceTest.java rename to yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/sms/SmsLogServiceTest.java index ae8e734e9..e74389731 100644 --- a/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/sms/SysSmsLogServiceTest.java +++ b/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/sms/SmsLogServiceTest.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.system.service.sms; import cn.hutool.core.map.MapUtil; -import cn.iocoder.yudao.module.system.controller.sms.vo.log.SysSmsLogExportReqVO; -import cn.iocoder.yudao.module.system.controller.sms.vo.log.SysSmsLogPageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.log.SmsLogExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.log.SmsLogPageReqVO; import cn.iocoder.yudao.module.system.dal.mysql.sms.SysSmsLogMapper; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.sms.SysSmsLogDO; import cn.iocoder.yudao.coreservice.modules.system.enums.sms.SysSmsReceiveStatusEnum; @@ -28,11 +28,11 @@ import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomPojo; import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomString; import static org.junit.jupiter.api.Assertions.assertEquals; -@Import(SysSmsLogServiceImpl.class) -public class SysSmsLogServiceTest extends BaseDbUnitTest { +@Import(SmsLogServiceImpl.class) +public class SmsLogServiceTest extends BaseDbUnitTest { @Resource - private SysSmsLogServiceImpl smsLogService; + private SmsLogServiceImpl smsLogService; @Resource private SysSmsLogMapper smsLogMapper; @@ -65,7 +65,7 @@ public class SysSmsLogServiceTest extends BaseDbUnitTest { // 测试 receiveTime 不匹配 smsLogMapper.insert(ObjectUtils.cloneIgnoreId(dbSmsLog, o -> o.setReceiveTime(buildTime(2021, 12, 12)))); // 准备参数 - SysSmsLogPageReqVO reqVO = new SysSmsLogPageReqVO(); + SmsLogPageReqVO reqVO = new SmsLogPageReqVO(); reqVO.setChannelId(1L); reqVO.setTemplateId(10L); reqVO.setMobile("156"); @@ -112,7 +112,7 @@ public class SysSmsLogServiceTest extends BaseDbUnitTest { // 测试 receiveTime 不匹配 smsLogMapper.insert(ObjectUtils.cloneIgnoreId(dbSmsLog, o -> o.setReceiveTime(buildTime(2021, 12, 12)))); // 准备参数 - SysSmsLogExportReqVO reqVO = new SysSmsLogExportReqVO(); + SmsLogExportReqVO reqVO = new SmsLogExportReqVO(); reqVO.setChannelId(1L); reqVO.setTemplateId(10L); reqVO.setMobile("156"); diff --git a/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/sms/SysSmsTemplateServiceTest.java b/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/sms/SmsTemplateServiceTest.java similarity index 92% rename from yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/sms/SysSmsTemplateServiceTest.java rename to yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/sms/SmsTemplateServiceTest.java index 1ee2c90fb..540c9a372 100644 --- a/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/sms/SysSmsTemplateServiceTest.java +++ b/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/sms/SmsTemplateServiceTest.java @@ -1,11 +1,11 @@ package cn.iocoder.yudao.module.system.service.sms; -import cn.iocoder.yudao.module.system.controller.sms.vo.template.SysSmsTemplateCreateReqVO; -import cn.iocoder.yudao.module.system.controller.sms.vo.template.SysSmsTemplateExportReqVO; -import cn.iocoder.yudao.module.system.controller.sms.vo.template.SysSmsTemplatePageReqVO; -import cn.iocoder.yudao.module.system.controller.sms.vo.template.SysSmsTemplateUpdateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.template.SmsTemplateCreateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.template.SmsTemplateExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.template.SmsTemplatePageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.template.SmsTemplateUpdateReqVO; import cn.iocoder.yudao.module.system.dal.mysql.sms.SysSmsTemplateMapper; -import cn.iocoder.yudao.module.system.mq.producer.sms.SysSmsProducer; +import cn.iocoder.yudao.module.system.mq.producer.sms.SmsProducer; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.sms.SysSmsChannelDO; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.sms.SysSmsTemplateDO; import cn.iocoder.yudao.coreservice.modules.system.enums.sms.SysSmsTemplateTypeEnum; @@ -29,7 +29,7 @@ import java.util.List; import java.util.function.Consumer; import static cn.hutool.core.util.RandomUtil.randomEle; -import static cn.iocoder.yudao.module.system.enums.SysErrorCodeConstants.*; +import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime; import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; @@ -38,23 +38,23 @@ import static org.junit.jupiter.api.Assertions.*; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.*; -@Import(SysSmsTemplateServiceImpl.class) -public class SysSmsTemplateServiceTest extends BaseDbUnitTest { +@Import(SmsTemplateServiceImpl.class) +public class SmsTemplateServiceTest extends BaseDbUnitTest { @Resource - private SysSmsTemplateServiceImpl smsTemplateService; + private SmsTemplateServiceImpl smsTemplateService; @Resource private SysSmsTemplateMapper smsTemplateMapper; @MockBean - private SysSmsChannelService smsChannelService; + private SmsChannelService smsChannelService; @MockBean private SmsClientFactory smsClientFactory; @MockBean private SmsClient smsClient; @MockBean - private SysSmsProducer smsProducer; + private SmsProducer smsProducer; @Test public void testParseTemplateContentParams() { @@ -72,7 +72,7 @@ public class SysSmsTemplateServiceTest extends BaseDbUnitTest { @SuppressWarnings("unchecked") public void testCreateSmsTemplate_success() { // 准备参数 - SysSmsTemplateCreateReqVO reqVO = randomPojo(SysSmsTemplateCreateReqVO.class, o -> { + SmsTemplateCreateReqVO reqVO = randomPojo(SmsTemplateCreateReqVO.class, o -> { o.setContent("正在进行登录操作{operation},您的验证码是{code}"); o.setStatus(randomEle(CommonStatusEnum.values()).getStatus()); // 保证 status 的范围 o.setType(randomEle(SysSmsTemplateTypeEnum.values()).getType()); // 保证 type 的 范围 @@ -108,7 +108,7 @@ public class SysSmsTemplateServiceTest extends BaseDbUnitTest { SysSmsTemplateDO dbSmsTemplate = randomSmsTemplateDO(); smsTemplateMapper.insert(dbSmsTemplate);// @Sql: 先插入出一条存在的数据 // 准备参数 - SysSmsTemplateUpdateReqVO reqVO = randomPojo(SysSmsTemplateUpdateReqVO.class, o -> { + SmsTemplateUpdateReqVO reqVO = randomPojo(SmsTemplateUpdateReqVO.class, o -> { o.setId(dbSmsTemplate.getId()); // 设置更新的 ID o.setContent("正在进行登录操作{operation},您的验证码是{code}"); o.setStatus(randomEle(CommonStatusEnum.values()).getStatus()); // 保证 status 的范围 @@ -139,7 +139,7 @@ public class SysSmsTemplateServiceTest extends BaseDbUnitTest { @Test public void testUpdateSmsTemplate_notExists() { // 准备参数 - SysSmsTemplateUpdateReqVO reqVO = randomPojo(SysSmsTemplateUpdateReqVO.class); + SmsTemplateUpdateReqVO reqVO = randomPojo(SmsTemplateUpdateReqVO.class); // 调用, 并断言异常 assertServiceException(() -> smsTemplateService.updateSmsTemplate(reqVO), SMS_TEMPLATE_NOT_EXISTS); @@ -198,7 +198,7 @@ public class SysSmsTemplateServiceTest extends BaseDbUnitTest { // 测试 createTime 不匹配 smsTemplateMapper.insert(ObjectUtils.cloneIgnoreId(dbSmsTemplate, o -> o.setCreateTime(buildTime(2021, 12, 12)))); // 准备参数 - SysSmsTemplatePageReqVO reqVO = new SysSmsTemplatePageReqVO(); + SmsTemplatePageReqVO reqVO = new SmsTemplatePageReqVO(); reqVO.setType(SysSmsTemplateTypeEnum.PROMOTION.getType()); reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); reqVO.setCode("yudao"); @@ -244,7 +244,7 @@ public class SysSmsTemplateServiceTest extends BaseDbUnitTest { // 测试 createTime 不匹配 smsTemplateMapper.insert(ObjectUtils.cloneIgnoreId(dbSmsTemplate, o -> o.setCreateTime(buildTime(2021, 12, 12)))); // 准备参数 - SysSmsTemplateExportReqVO reqVO = new SysSmsTemplateExportReqVO(); + SmsTemplateExportReqVO reqVO = new SmsTemplateExportReqVO(); reqVO.setType(SysSmsTemplateTypeEnum.PROMOTION.getType()); reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); reqVO.setCode("yudao"); diff --git a/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/tenant/SysTenantServiceTest.java b/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/tenant/TenantServiceTest.java similarity index 85% rename from yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/tenant/SysTenantServiceTest.java rename to yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/tenant/TenantServiceTest.java index a6199f706..93b31c074 100644 --- a/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/tenant/SysTenantServiceTest.java +++ b/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/tenant/TenantServiceTest.java @@ -1,9 +1,9 @@ package cn.iocoder.yudao.module.system.service.tenant; -import cn.iocoder.yudao.module.system.controller.tenant.vo.SysTenantCreateReqVO; -import cn.iocoder.yudao.module.system.controller.tenant.vo.SysTenantExportReqVO; -import cn.iocoder.yudao.module.system.controller.tenant.vo.SysTenantPageReqVO; -import cn.iocoder.yudao.module.system.controller.tenant.vo.SysTenantUpdateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.tenant.vo.TenantCreateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.tenant.vo.TenantExportReqVO; +import cn.iocoder.yudao.module.system.controller.admin.tenant.vo.TenantPageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.tenant.vo.TenantUpdateReqVO; import cn.iocoder.yudao.module.system.dal.mysql.tenant.SysTenantMapper; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.tenant.SysTenantDO; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; @@ -15,7 +15,7 @@ import org.springframework.context.annotation.Import; import javax.annotation.Resource; import java.util.List; -import static cn.iocoder.yudao.module.system.enums.SysErrorCodeConstants.TENANT_NOT_EXISTS; +import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.TENANT_NOT_EXISTS; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime; import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId; import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; @@ -23,16 +23,11 @@ import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServic import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.*; import static org.junit.jupiter.api.Assertions.*; -/** - * {@link SysTenantServiceImpl} 的单元测试类 - * - * @author 芋道源码 - */ -@Import(SysTenantServiceImpl.class) -public class SysTenantServiceTest extends BaseDbUnitTest { +@Import(TenantServiceImpl.class) +public class TenantServiceTest extends BaseDbUnitTest { @Resource - private SysTenantServiceImpl tenantService; + private TenantServiceImpl tenantService; @Resource private SysTenantMapper tenantMapper; @@ -40,7 +35,7 @@ public class SysTenantServiceTest extends BaseDbUnitTest { @Test public void testCreateTenant_success() { // 准备参数 - SysTenantCreateReqVO reqVO = randomPojo(SysTenantCreateReqVO.class, o -> o.setStatus(randomCommonStatus())); + TenantCreateReqVO reqVO = randomPojo(TenantCreateReqVO.class, o -> o.setStatus(randomCommonStatus())); // 调用 Long tenantId = tenantService.createTenant(reqVO); @@ -57,7 +52,7 @@ public class SysTenantServiceTest extends BaseDbUnitTest { SysTenantDO dbTenant = randomPojo(SysTenantDO.class, o -> o.setStatus(randomCommonStatus())); tenantMapper.insert(dbTenant);// @Sql: 先插入出一条存在的数据 // 准备参数 - SysTenantUpdateReqVO reqVO = randomPojo(SysTenantUpdateReqVO.class, o -> { + TenantUpdateReqVO reqVO = randomPojo(TenantUpdateReqVO.class, o -> { o.setId(dbTenant.getId()); // 设置更新的 ID o.setStatus(randomCommonStatus()); }); @@ -72,7 +67,7 @@ public class SysTenantServiceTest extends BaseDbUnitTest { @Test public void testUpdateTenant_notExists() { // 准备参数 - SysTenantUpdateReqVO reqVO = randomPojo(SysTenantUpdateReqVO.class); + TenantUpdateReqVO reqVO = randomPojo(TenantUpdateReqVO.class); // 调用, 并断言异常 assertServiceException(() -> tenantService.updateTenant(reqVO), TENANT_NOT_EXISTS); @@ -124,7 +119,7 @@ public class SysTenantServiceTest extends BaseDbUnitTest { // 测试 createTime 不匹配 tenantMapper.insert(cloneIgnoreId(dbTenant, o -> o.setCreateTime(buildTime(2021, 12, 12)))); // 准备参数 - SysTenantPageReqVO reqVO = new SysTenantPageReqVO(); + TenantPageReqVO reqVO = new TenantPageReqVO(); reqVO.setName("芋道"); reqVO.setContactName("艿"); reqVO.setContactMobile("1560"); @@ -162,7 +157,7 @@ public class SysTenantServiceTest extends BaseDbUnitTest { // 测试 createTime 不匹配 tenantMapper.insert(cloneIgnoreId(dbTenant, o -> o.setCreateTime(buildTime(2021, 12, 12)))); // 准备参数 - SysTenantExportReqVO reqVO = new SysTenantExportReqVO(); + TenantExportReqVO reqVO = new TenantExportReqVO(); reqVO.setName("芋道"); reqVO.setContactName("艿"); reqVO.setContactMobile("1560"); diff --git a/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/user/SysUserServiceImplTest.java b/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/user/UserServiceImplTest.java similarity index 91% rename from yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/user/SysUserServiceImplTest.java rename to yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/user/UserServiceImplTest.java index fc53a658b..8256f1de5 100644 --- a/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/user/SysUserServiceImplTest.java +++ b/yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/service/user/UserServiceImplTest.java @@ -2,15 +2,15 @@ package cn.iocoder.yudao.module.system.service.user; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.RandomUtil; -import cn.iocoder.yudao.module.system.controller.user.vo.profile.SysUserProfileUpdatePasswordReqVO; -import cn.iocoder.yudao.module.system.controller.user.vo.profile.SysUserProfileUpdateReqVO; -import cn.iocoder.yudao.module.system.controller.user.vo.user.*; +import cn.iocoder.yudao.module.system.controller.admin.user.vo.profile.UserProfileUpdatePasswordReqVO; +import cn.iocoder.yudao.module.system.controller.admin.user.vo.profile.UserProfileUpdateReqVO; +import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.*; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.dept.SysDeptDO; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.dept.SysPostDO; import cn.iocoder.yudao.module.system.dal.mysql.user.SysUserMapper; -import cn.iocoder.yudao.module.system.service.dept.SysDeptService; -import cn.iocoder.yudao.module.system.service.dept.SysPostService; -import cn.iocoder.yudao.module.system.service.permission.SysPermissionService; +import cn.iocoder.yudao.module.system.service.dept.DeptService; +import cn.iocoder.yudao.module.system.service.dept.PostService; +import cn.iocoder.yudao.module.system.service.permission.PermissionService; import cn.iocoder.yudao.coreservice.modules.infra.service.file.InfFileCoreService; import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.user.SysUserDO; import cn.iocoder.yudao.coreservice.modules.system.enums.common.SysSexEnum; @@ -34,7 +34,7 @@ import java.util.function.Consumer; import static cn.hutool.core.util.RandomUtil.randomBytes; import static cn.hutool.core.util.RandomUtil.randomEle; -import static cn.iocoder.yudao.module.system.enums.SysErrorCodeConstants.*; +import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime; import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; @@ -45,29 +45,24 @@ import static org.junit.jupiter.api.Assertions.assertNull; import static org.mockito.ArgumentMatchers.*; import static org.mockito.Mockito.*; -/** - * {@link SysUserService} 的单元测试类 - * - * @author zxl - */ -@Import(SysUserServiceImpl.class) -public class SysUserServiceImplTest extends BaseDbUnitTest { +@Import(UserServiceImpl.class) +public class UserServiceImplTest extends BaseDbUnitTest { @Resource - private SysUserServiceImpl userService; + private UserServiceImpl userService; @Resource private SysUserMapper userMapper; @MockBean - private SysDeptService deptService; + private DeptService deptService; @MockBean private SysDeptCoreService deptCoreService; @MockBean - private SysPostService postService; + private PostService postService; @MockBean - private SysPermissionService permissionService; + private PermissionService permissionService; @MockBean private PasswordEncoder passwordEncoder; @MockBean @@ -76,7 +71,7 @@ public class SysUserServiceImplTest extends BaseDbUnitTest { @Test public void testCreatUser_success() { // 准备参数 - SysUserCreateReqVO reqVO = randomPojo(SysUserCreateReqVO.class, o -> { + UserCreateReqVO reqVO = randomPojo(UserCreateReqVO.class, o -> { o.setSex(RandomUtil.randomEle(SysSexEnum.values()).getSex()); o.setMobile(randomString()); }); @@ -111,7 +106,7 @@ public class SysUserServiceImplTest extends BaseDbUnitTest { SysUserDO dbUser = randomSysUserDO(); userMapper.insert(dbUser); // 准备参数 - SysUserUpdateReqVO reqVO = randomPojo(SysUserUpdateReqVO.class, o -> { + UserUpdateReqVO reqVO = randomPojo(UserUpdateReqVO.class, o -> { o.setId(dbUser.getId()); o.setSex(RandomUtil.randomEle(SysSexEnum.values()).getSex()); o.setMobile(randomString()); @@ -144,7 +139,7 @@ public class SysUserServiceImplTest extends BaseDbUnitTest { userMapper.insert(dbUser); // 准备参数 Long userId = dbUser.getId(); - SysUserProfileUpdateReqVO reqVO = randomPojo(SysUserProfileUpdateReqVO.class, o -> { + UserProfileUpdateReqVO reqVO = randomPojo(UserProfileUpdateReqVO.class, o -> { o.setMobile(randomString()); o.setSex(RandomUtil.randomEle(SysSexEnum.values()).getSex()); }); @@ -163,7 +158,7 @@ public class SysUserServiceImplTest extends BaseDbUnitTest { userMapper.insert(dbUser); // 准备参数 Long userId = dbUser.getId(); - SysUserProfileUpdatePasswordReqVO reqVO = randomPojo(SysUserProfileUpdatePasswordReqVO.class, o -> { + UserProfileUpdatePasswordReqVO reqVO = randomPojo(UserProfileUpdatePasswordReqVO.class, o -> { o.setOldPassword("yudao"); o.setNewPassword("yuanma"); }); @@ -255,7 +250,7 @@ public class SysUserServiceImplTest extends BaseDbUnitTest { // mock 数据 SysUserDO dbUser = initGetUserPageData(); // 准备参数 - SysUserPageReqVO reqVO = new SysUserPageReqVO(); + UserPageReqVO reqVO = new UserPageReqVO(); reqVO.setUsername("yudao"); reqVO.setMobile("1560"); reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); @@ -279,7 +274,7 @@ public class SysUserServiceImplTest extends BaseDbUnitTest { // mock 数据 SysUserDO dbUser = initGetUserPageData(); // 准备参数 - SysUserExportReqVO reqVO = new SysUserExportReqVO(); + UserExportReqVO reqVO = new UserExportReqVO(); reqVO.setUsername("yudao"); reqVO.setMobile("1560"); reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); @@ -329,11 +324,11 @@ public class SysUserServiceImplTest extends BaseDbUnitTest { @Test public void testImportUsers_01() { // 准备参数 - SysUserImportExcelVO importUser = randomPojo(SysUserImportExcelVO.class); + UserImportExcelVO importUser = randomPojo(UserImportExcelVO.class); // mock 方法 // 调用 - SysUserImportRespVO respVO = userService.importUsers(newArrayList(importUser), true); + UserImportRespVO respVO = userService.importUsers(newArrayList(importUser), true); // 断言 assertEquals(0, respVO.getCreateUsernames().size()); assertEquals(0, respVO.getUpdateUsernames().size()); @@ -347,7 +342,7 @@ public class SysUserServiceImplTest extends BaseDbUnitTest { @Test public void testImportUsers_02() { // 准备参数 - SysUserImportExcelVO importUser = randomPojo(SysUserImportExcelVO.class, o -> { + UserImportExcelVO importUser = randomPojo(UserImportExcelVO.class, o -> { o.setStatus(randomEle(CommonStatusEnum.values()).getStatus()); // 保证 status 的范围 o.setSex(randomEle(SysSexEnum.values()).getSex()); // 保证 sex 的范围 }); @@ -361,7 +356,7 @@ public class SysUserServiceImplTest extends BaseDbUnitTest { when(passwordEncoder.encode(eq("yudaoyuanma"))).thenReturn("java"); // 调用 - SysUserImportRespVO respVO = userService.importUsers(newArrayList(importUser), true); + UserImportRespVO respVO = userService.importUsers(newArrayList(importUser), true); // 断言 assertEquals(1, respVO.getCreateUsernames().size()); SysUserDO user = userMapper.selectByUsername(respVO.getCreateUsernames().get(0)); @@ -380,7 +375,7 @@ public class SysUserServiceImplTest extends BaseDbUnitTest { SysUserDO dbUser = randomSysUserDO(); userMapper.insert(dbUser); // 准备参数 - SysUserImportExcelVO importUser = randomPojo(SysUserImportExcelVO.class, o -> { + UserImportExcelVO importUser = randomPojo(UserImportExcelVO.class, o -> { o.setStatus(randomEle(CommonStatusEnum.values()).getStatus()); // 保证 status 的范围 o.setSex(randomEle(SysSexEnum.values()).getSex()); // 保证 sex 的范围 o.setUsername(dbUser.getUsername()); @@ -393,7 +388,7 @@ public class SysUserServiceImplTest extends BaseDbUnitTest { when(deptCoreService.getDept(eq(dept.getId()))).thenReturn(dept); // 调用 - SysUserImportRespVO respVO = userService.importUsers(newArrayList(importUser), false); + UserImportRespVO respVO = userService.importUsers(newArrayList(importUser), false); // 断言 assertEquals(0, respVO.getCreateUsernames().size()); assertEquals(0, respVO.getUpdateUsernames().size()); @@ -410,7 +405,7 @@ public class SysUserServiceImplTest extends BaseDbUnitTest { SysUserDO dbUser = randomSysUserDO(); userMapper.insert(dbUser); // 准备参数 - SysUserImportExcelVO importUser = randomPojo(SysUserImportExcelVO.class, o -> { + UserImportExcelVO importUser = randomPojo(UserImportExcelVO.class, o -> { o.setStatus(randomEle(CommonStatusEnum.values()).getStatus()); // 保证 status 的范围 o.setSex(randomEle(SysSexEnum.values()).getSex()); // 保证 sex 的范围 o.setUsername(dbUser.getUsername()); @@ -423,7 +418,7 @@ public class SysUserServiceImplTest extends BaseDbUnitTest { when(deptCoreService.getDept(eq(dept.getId()))).thenReturn(dept); // 调用 - SysUserImportRespVO respVO = userService.importUsers(newArrayList(importUser), true); + UserImportRespVO respVO = userService.importUsers(newArrayList(importUser), true); // 断言 assertEquals(0, respVO.getCreateUsernames().size()); assertEquals(1, respVO.getUpdateUsernames().size()); diff --git a/更新日志.md b/更新日志.md index b1f34099e..13fc8320b 100644 --- a/更新日志.md +++ b/更新日志.md @@ -19,6 +19,9 @@ ### ⭐ New Features *【优化】操作日志新增用户类型,实现 APP 端的 API 的操作日志的记录 +*【重构】大模块按照多 Maven Module 的方式拆分,提升可维护性,为后续重构 onemall 提供基础 +*【重构】Spring Security 支持读取多种用户类型,从不同的数据库表,从而实现单项目提供管理后台、用户 APP 的不同 RESTful API 接口 + ### 🐞 Bug Fixes