From 4ffc2cb8154af5ad7b18c9f2bf9b6f66d816e753 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 17 Apr 2020 19:25:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=A7=8B=E9=87=8D=E6=9E=84=20system?= =?UTF-8?q?=20=E6=A8=A1=E5=9D=97=E7=9A=84=E4=BB=A3=E7=A0=81=EF=BC=8C?= =?UTF-8?q?=E5=85=88=E4=BF=AE=E6=94=B9=E8=AE=A4=E8=AF=81=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin-web/config/proxy/index.js | 1 + .../framework/util/ServiceExceptionUtil.java | 28 ++++- .../boot/web/AdminMVCAutoConfiguration.java | 4 +- .../web/handler/GlobalExceptionHandler.java | 6 +- .../web/interceptor/AccessLogInterceptor.java | 4 +- mobile-web/package.json | 2 +- .../controller/users/OrderController.java | 4 +- .../users/OrderLogisticsController.java | 4 +- .../users/OrderReturnController.java | 4 +- .../biz/service/OrderReturnServiceImpl.java | 4 +- .../admins/AdminsProductAttrController.java | 2 +- .../admins/AdminsProductBrandController.java | 2 +- .../AdminsProductCategoryController.java | 2 +- .../admins/AdminsProductSpuController.java | 2 +- .../admins/AdminsBannerController.java | 2 +- .../admins/AdminsCouponController.java | 2 +- .../AdminsProductRecommendController.java | 2 +- system/pom.xml | 7 +- system/system-application/pom.xml | 85 +------------- .../application/convert/AccessLogConvert.java | 36 ------ .../system/application/SystemApplication.java | 24 ++++ .../src/main/resources/application.yaml | 31 ----- system/system-biz/pom.xml | 68 +++++++++++ .../mall/system/biz/bo/account/AccountBO.java | 26 +++++ .../account/AccountUsernameAuthorizeBO.java | 22 ++++ .../mall/system/biz/bo/admin/AdminBO.java | 22 ++++ .../biz/bo/ouath2/OAuth2AccessTokenBO.java | 32 ++++++ .../mall/system/biz/bo/package-info.java | 1 + .../biz/config/DatabaseConfiguration.java | 28 +++++ .../config/ServiceExceptionConfiguration.java | 19 ++++ .../biz/constant/SystemErrorCodeEnum.java | 91 +++++++++++++++ .../system/biz/convert/AccountConvert.java | 15 +++ .../mall/system/biz/convert/AdminConvert.java | 15 +++ .../system/biz/convert/OAuth2Convert.java | 15 +++ .../system/biz/dao/account/AccountMapper.java | 17 +++ .../system/biz/dao/admin/AdminMapper.java | 10 ++ .../dao/oauth2/OAuth2AccessTokenMapper.java | 24 ++++ .../dao/oauth2/OAuth2RefreshTokenMapper.java | 18 +++ .../biz/dataobject/account/AccountDO.java | 66 +++++++++++ .../system/biz/dataobject/admin/AdminDO.java | 40 +++++++ .../biz/dataobject/admin/DepartmentDO.java | 35 ++++++ .../oauth2/OAuth2AccessTokenDO.java | 49 ++++++++ .../oauth2/OAuth2RefreshTokenDO.java | 45 ++++++++ .../system/biz/dataobject/user/UserDO.java | 38 +++++++ .../oatuh2/OAuth2UsernameAuthenticateDTO.java | 14 +++ .../mall/system/biz/dto/package-info.java | 1 + .../biz/service/account/AccountService.java | 14 +++ .../account/impl/AccountServiceImpl.java | 30 +++++ .../biz/service/admin/AdminService.java | 9 ++ .../service/admin/impl/AdminServiceImpl.java | 23 ++++ .../biz/service/oauth2/OAuth2Service.java | 13 +++ .../oauth2/impl/OAuth2ServiceImpl.java | 95 ++++++++++++++++ .../src/main/resources/biz.properties | 4 + system/system-biz/src/main/resources/biz.yaml | 20 ++++ system/system-rest/pom.xml | 41 +++++++ .../admin/AdminsOAuth2Controller.java | 50 ++++++++ .../convert/admin/AdminsAdminConvert.java | 15 +++ .../convert/oauth2/AdminsOAuth2Convert.java | 29 +++++ ...minsOAuth2UsernameAuthenticateRequest.java | 28 +++++ .../system/rest/request/package-info.java | 1 + .../AdminsAuthorizeUsernameLoginResponse.java | 40 +++++++ .../system-rest/src/main/resources/rest.yaml | 5 + system/system-rpc-api/pom.xml | 15 +++ .../iocoder/mall/system/rpc/package-info.java | 4 + system/system-rpc/pom.xml | 15 +++ .../iocoder/mall/system/rpc/package-info.java | 4 + .../iocoder/mall/admin/sdk/package-info.java | 6 - .../sdk/annotation/RequiresPermissions.java | 2 +- .../sdk/constant/LogicalEnum.java | 2 +- .../sdk/context/AdminSecurityContext.java | 2 +- .../context/AdminSecurityContextHolder.java | 2 +- .../sdk/interceptor/AdminDemoInterceptor.java | 8 +- .../interceptor/AdminSecurityInterceptor.java | 20 ++-- .../iocoder/mall/system/sdk/package-info.java | 6 + .../{admin => system}/api/AdminService.java | 11 +- .../api/DataDictService.java | 8 +- .../api/DeptmentService.java | 10 +- .../{admin => system}/api/OAuth2Service.java | 14 +-- .../api/ResourceService.java | 8 +- .../{admin => system}/api/RoleService.java | 12 +- .../{admin => system}/api/SmsService.java | 14 +-- .../api/SystemLogService.java | 11 +- .../api/bo/admin/AdminAuthenticationBO.java | 4 +- .../api/bo/admin/AdminAuthorizationBO.java | 2 +- .../api/bo/admin/AdminBO.java | 2 +- .../api/bo/admin/AdminPageBO.java | 2 +- .../api/bo/datadict/DataDictBO.java | 2 +- .../api/bo/deptment/DeptmentBO.java | 2 +- .../api/bo/oauth2/OAuth2AccessTokenBO.java | 2 +- .../api/bo/oauth2/OAuth2AuthenticationBO.java | 2 +- .../api/bo/resource/ResourceBO.java | 2 +- .../{admin => system}/api/bo/role/RoleBO.java | 2 +- .../api/bo/sms/PageSmsSignBO.java | 2 +- .../api/bo/sms/PageSmsTemplateBO.java | 2 +- .../api/bo/sms/SmsSignBO.java | 2 +- .../api/bo/sms/SmsTemplateBO.java | 2 +- .../api/bo/systemlog/AccessLogBO.java | 2 +- .../api/bo/systemlog/AccessLogPageBO.java | 2 +- .../api/constant/AdminConstants.java | 2 +- .../api/constant/AdminErrorCodeEnum.java | 2 +- .../api/constant/DeptmentConstants.java | 2 +- .../api/constant/DictKeyConstants.java | 2 +- .../api/constant/ResourceConstants.java | 2 +- .../api/constant/ResourceTypeEnum.java | 2 +- .../api/constant/SmsApplyStatusEnum.java | 2 +- .../api/constant/SmsPlatformEnum.java | 2 +- .../api/constant/SmsTypeEnum.java | 2 +- .../api/dto/admin/AdminAddDTO.java | 2 +- .../api/dto/admin/AdminAssignRoleDTO.java | 2 +- .../api/dto/admin/AdminAuthenticationDTO.java | 2 +- .../api/dto/admin/AdminPageDTO.java | 2 +- .../api/dto/admin/AdminUpdateDTO.java | 2 +- .../api/dto/admin/AdminUpdateStatusDTO.java | 2 +- .../api/dto/datadict/DataDictAddDTO.java | 2 +- .../api/dto/datadict/DataDictUpdateDTO.java | 2 +- .../api/dto/depetment/DeptmentAddDTO.java | 2 +- .../api/dto/depetment/DeptmentPageDTO.java | 2 +- .../api/dto/depetment/DeptmentUpdateDTO.java | 2 +- .../api/dto/oauth2/OAuth2CreateTokenDTO.java | 4 +- .../api/dto/oauth2/OAuth2GetTokenDTO.java | 4 +- .../api/dto/oauth2/OAuth2RefreshTokenDTO.java | 4 +- .../oauth2/OAuth2RemoveTokenByUserDTO.java | 4 +- .../api/dto/resource/ResourceAddDTO.java | 4 +- .../api/dto/resource/ResourceUpdateDTO.java | 4 +- .../api/dto/role/RoleAddDTO.java | 2 +- .../api/dto/role/RoleAssignResourceDTO.java | 2 +- .../api/dto/role/RolePageDTO.java | 2 +- .../api/dto/role/RoleUpdateDTO.java | 2 +- .../api/dto/sms/PageQuerySmsSignDTO.java | 2 +- .../api/dto/sms/PageQuerySmsTemplateDTO.java | 2 +- .../api/dto/systemlog/AccessLogAddDTO.java | 2 +- .../api/dto/systemlog/AccessLogPageDTO.java | 2 +- .../api/dto/systemlog/ExceptionLogAddDTO.java | 2 +- .../mall/admin/client/SmsYunPianClient.java | 2 +- .../config/ServiceExceptionConfiguration.java | 2 +- .../mall/admin/convert/AccessLogConvert.java | 7 +- .../mall/admin/convert/AdminConvert.java | 8 +- .../mall/admin/convert/DataDictConvert.java | 6 +- .../mall/admin/convert/DeptmentConvert.java | 6 +- .../mall/admin/convert/OAuth2Convert.java | 4 +- .../mall/admin/convert/ResourceConvert.java | 6 +- .../mall/admin/convert/RoleConvert.java | 6 +- .../mall/admin/convert/SmsSignConvert.java | 5 +- .../admin/convert/SmsTemplateConvert.java | 4 +- .../mall/admin/dao/AccessLogMapper.java | 4 +- .../iocoder/mall/admin/dao/AdminMapper.java | 3 +- .../mall/admin/dao/DeptmentMapper.java | 4 +- .../cn/iocoder/mall/admin/dao/RoleMapper.java | 2 +- .../mall/admin/dataobject/AccessLogDO.java | 2 +- .../mall/admin/dataobject/AdminDO.java | 2 + .../mall/admin/dataobject/ExceptionLogDO.java | 2 +- .../mall/admin/service/AdminServiceImpl.java | 22 ++-- .../admin/service/DataDictServiceImpl.java | 10 +- .../admin/service/DeptmentServiceImpl.java | 16 ++- .../mall/admin/service/OAuth2ServiceImpl.java | 16 +-- .../admin/service/ResourceServiceImpl.java | 12 +- .../mall/admin/service/RoleServiceImpl.java | 14 +-- .../mall/admin/service/SmsServiceImpl.java | 21 ++-- .../admin/service/SystemLogServiceImpl.java | 12 +- .../admin/service/SmsServiceImplTest.java | 8 +- .../service/SystemLogServiceImplTest.java | 6 +- system/system-start/pom.xml | 107 ++++++++++++++++++ .../application/SystemApplication.java | 4 +- .../config/QiniuConfiguration.java | 2 +- .../controller/admins/AdminController.java | 36 +++--- .../controller/admins/DataDictController.java | 18 +-- .../controller/admins/DeptmentController.java | 24 ++-- .../controller/admins/FileController.java | 2 +- .../controller/admins/PassportController.java | 11 +- .../controller/admins/ResourceController.java | 18 +-- .../controller/admins/RoleController.java | 26 ++--- .../controller/admins/SmsSignController.java | 8 +- .../admins/SmsTemplateController.java | 13 +-- .../admins/SystemLogController.java | 12 +- .../application/convert/AccessLogConvert.java | 30 +++++ .../application/convert/AdminConvert.java | 14 +-- .../application/convert/DataDictConvert.java | 6 +- .../application/convert/DeptmentConvert.java | 8 +- .../application/convert/PassportConvert.java | 6 +- .../application/convert/ResourceConvert.java | 12 +- .../application/convert/RoleConvert.java | 2 +- .../system}/application/po/package-info.java | 2 +- .../application/po/sms/SmsTemplateAddPO.java | 6 +- .../po/sms/SmsTemplateUpdatePO.java | 6 +- .../application/vo/PassportLoginVO.java | 2 +- .../application/vo/admin/AdminInfoVO.java | 2 +- .../vo/admin/AdminMenuTreeNodeVO.java | 2 +- .../application/vo/admin/AdminRoleVO.java | 2 +- .../system}/application/vo/admin/AdminVO.java | 4 +- .../vo/datadict/DataDictEnumVO.java | 2 +- .../application/vo/deptment/DeptmentVO.java | 4 +- .../application/vo/log/AccessLogPageVo.java | 2 +- .../application/vo/log/AccessLogVo.java | 2 +- .../vo/resource/ResourceTreeNodeVO.java | 4 +- .../application/vo/resource/ResourceVO.java | 2 +- .../vo/role/RoleResourceTreeNodeVO.java | 2 +- .../src/main/resources/application.yaml | 34 ++++++ .../controller/users/PassportController.java | 6 +- .../interceptor/UserSecurityInterceptor.java | 8 +- .../api/bo/user/UserAuthenticationBO.java | 2 +- .../user/biz/service/UserServiceImpl.java | 8 +- 201 files changed, 1788 insertions(+), 561 deletions(-) delete mode 100644 system/system-application/src/main/java/cn/iocoder/mall/admin/application/convert/AccessLogConvert.java create mode 100644 system/system-application/src/main/java/cn/iocoder/mall/system/application/SystemApplication.java create mode 100644 system/system-biz/pom.xml create mode 100644 system/system-biz/src/main/java/cn/iocoder/mall/system/biz/bo/account/AccountBO.java create mode 100644 system/system-biz/src/main/java/cn/iocoder/mall/system/biz/bo/account/AccountUsernameAuthorizeBO.java create mode 100644 system/system-biz/src/main/java/cn/iocoder/mall/system/biz/bo/admin/AdminBO.java create mode 100644 system/system-biz/src/main/java/cn/iocoder/mall/system/biz/bo/ouath2/OAuth2AccessTokenBO.java create mode 100644 system/system-biz/src/main/java/cn/iocoder/mall/system/biz/bo/package-info.java create mode 100644 system/system-biz/src/main/java/cn/iocoder/mall/system/biz/config/DatabaseConfiguration.java create mode 100644 system/system-biz/src/main/java/cn/iocoder/mall/system/biz/config/ServiceExceptionConfiguration.java create mode 100644 system/system-biz/src/main/java/cn/iocoder/mall/system/biz/constant/SystemErrorCodeEnum.java create mode 100644 system/system-biz/src/main/java/cn/iocoder/mall/system/biz/convert/AccountConvert.java create mode 100644 system/system-biz/src/main/java/cn/iocoder/mall/system/biz/convert/AdminConvert.java create mode 100644 system/system-biz/src/main/java/cn/iocoder/mall/system/biz/convert/OAuth2Convert.java create mode 100644 system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dao/account/AccountMapper.java create mode 100644 system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dao/admin/AdminMapper.java create mode 100644 system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dao/oauth2/OAuth2AccessTokenMapper.java create mode 100644 system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dao/oauth2/OAuth2RefreshTokenMapper.java create mode 100644 system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dataobject/account/AccountDO.java create mode 100644 system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dataobject/admin/AdminDO.java create mode 100644 system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dataobject/admin/DepartmentDO.java create mode 100644 system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dataobject/oauth2/OAuth2AccessTokenDO.java create mode 100644 system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dataobject/oauth2/OAuth2RefreshTokenDO.java create mode 100644 system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dataobject/user/UserDO.java create mode 100644 system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dto/oatuh2/OAuth2UsernameAuthenticateDTO.java create mode 100644 system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dto/package-info.java create mode 100644 system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/account/AccountService.java create mode 100644 system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/account/impl/AccountServiceImpl.java create mode 100644 system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/admin/AdminService.java create mode 100644 system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/admin/impl/AdminServiceImpl.java create mode 100644 system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/oauth2/OAuth2Service.java create mode 100644 system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/oauth2/impl/OAuth2ServiceImpl.java create mode 100644 system/system-biz/src/main/resources/biz.properties create mode 100644 system/system-biz/src/main/resources/biz.yaml create mode 100644 system/system-rest/pom.xml create mode 100644 system/system-rest/src/main/java/cn/iocoder/mall/system/rest/controller/admin/AdminsOAuth2Controller.java create mode 100644 system/system-rest/src/main/java/cn/iocoder/mall/system/rest/convert/admin/AdminsAdminConvert.java create mode 100644 system/system-rest/src/main/java/cn/iocoder/mall/system/rest/convert/oauth2/AdminsOAuth2Convert.java create mode 100644 system/system-rest/src/main/java/cn/iocoder/mall/system/rest/request/oauth2/AdminsOAuth2UsernameAuthenticateRequest.java create mode 100644 system/system-rest/src/main/java/cn/iocoder/mall/system/rest/request/package-info.java create mode 100644 system/system-rest/src/main/java/cn/iocoder/mall/system/rest/response/AdminsAuthorizeUsernameLoginResponse.java create mode 100644 system/system-rest/src/main/resources/rest.yaml create mode 100644 system/system-rpc-api/pom.xml create mode 100644 system/system-rpc-api/src/main/java/cn/iocoder/mall/system/rpc/package-info.java create mode 100644 system/system-rpc/pom.xml create mode 100644 system/system-rpc/src/main/java/cn/iocoder/mall/system/rpc/package-info.java delete mode 100644 system/system-sdk/src/main/java/cn/iocoder/mall/admin/sdk/package-info.java rename system/system-sdk/src/main/java/cn/iocoder/mall/{admin => system}/sdk/annotation/RequiresPermissions.java (92%) rename system/system-sdk/src/main/java/cn/iocoder/mall/{admin => system}/sdk/constant/LogicalEnum.java (75%) rename system/system-sdk/src/main/java/cn/iocoder/mall/{admin => system}/sdk/context/AdminSecurityContext.java (90%) rename system/system-sdk/src/main/java/cn/iocoder/mall/{admin => system}/sdk/context/AdminSecurityContextHolder.java (94%) rename system/system-sdk/src/main/java/cn/iocoder/mall/{admin => system}/sdk/interceptor/AdminDemoInterceptor.java (81%) rename system/system-sdk/src/main/java/cn/iocoder/mall/{admin => system}/sdk/interceptor/AdminSecurityInterceptor.java (88%) create mode 100644 system/system-sdk/src/main/java/cn/iocoder/mall/system/sdk/package-info.java rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/AdminService.java (85%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/DataDictService.java (82%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/DeptmentService.java (67%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/OAuth2Service.java (69%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/ResourceService.java (80%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/RoleService.java (66%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/SmsService.java (84%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/SystemLogService.java (50%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/bo/admin/AdminAuthenticationBO.java (82%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/bo/admin/AdminAuthorizationBO.java (93%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/bo/admin/AdminBO.java (95%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/bo/admin/AdminPageBO.java (88%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/bo/datadict/DataDictBO.java (93%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/bo/deptment/DeptmentBO.java (93%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/bo/oauth2/OAuth2AccessTokenBO.java (93%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/bo/oauth2/OAuth2AuthenticationBO.java (92%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/bo/resource/ResourceBO.java (96%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/bo/role/RoleBO.java (90%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/bo/sms/PageSmsSignBO.java (96%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/bo/sms/PageSmsTemplateBO.java (98%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/bo/sms/SmsSignBO.java (93%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/bo/sms/SmsTemplateBO.java (94%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/bo/systemlog/AccessLogBO.java (92%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/bo/systemlog/AccessLogPageBO.java (89%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/constant/AdminConstants.java (84%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/constant/AdminErrorCodeEnum.java (98%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/constant/DeptmentConstants.java (81%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/constant/DictKeyConstants.java (69%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/constant/ResourceConstants.java (86%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/constant/ResourceTypeEnum.java (95%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/constant/SmsApplyStatusEnum.java (91%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/constant/SmsPlatformEnum.java (94%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/constant/SmsTypeEnum.java (94%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/dto/admin/AdminAddDTO.java (96%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/dto/admin/AdminAssignRoleDTO.java (92%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/dto/admin/AdminAuthenticationDTO.java (95%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/dto/admin/AdminPageDTO.java (91%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/dto/admin/AdminUpdateDTO.java (97%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/dto/admin/AdminUpdateStatusDTO.java (94%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/dto/datadict/DataDictAddDTO.java (95%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/dto/datadict/DataDictUpdateDTO.java (96%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/dto/depetment/DeptmentAddDTO.java (94%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/dto/depetment/DeptmentPageDTO.java (91%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/dto/depetment/DeptmentUpdateDTO.java (95%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/dto/oauth2/OAuth2CreateTokenDTO.java (88%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/dto/oauth2/OAuth2GetTokenDTO.java (89%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/dto/oauth2/OAuth2RefreshTokenDTO.java (89%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/dto/oauth2/OAuth2RemoveTokenByUserDTO.java (88%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/dto/resource/ResourceAddDTO.java (93%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/dto/resource/ResourceUpdateDTO.java (93%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/dto/role/RoleAddDTO.java (92%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/dto/role/RoleAssignResourceDTO.java (92%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/dto/role/RolePageDTO.java (90%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/dto/role/RoleUpdateDTO.java (94%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/dto/sms/PageQuerySmsSignDTO.java (94%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/dto/sms/PageQuerySmsTemplateDTO.java (92%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/dto/systemlog/AccessLogAddDTO.java (96%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/dto/systemlog/AccessLogPageDTO.java (90%) rename system/system-service-api/src/main/java/cn/iocoder/mall/{admin => system}/api/dto/systemlog/ExceptionLogAddDTO.java (97%) create mode 100644 system/system-start/pom.xml rename system/{system-application/src/main/java/cn/iocoder/mall/admin => system-start/src/main/java/cn/iocoder/mall/system}/application/SystemApplication.java (76%) rename system/{system-application/src/main/java/cn/iocoder/mall/admin => system-start/src/main/java/cn/iocoder/mall/system}/application/config/QiniuConfiguration.java (90%) rename system/{system-application/src/main/java/cn/iocoder/mall/admin => system-start/src/main/java/cn/iocoder/mall/system}/application/controller/admins/AdminController.java (87%) rename system/{system-application/src/main/java/cn/iocoder/mall/admin => system-start/src/main/java/cn/iocoder/mall/system}/application/controller/admins/DataDictController.java (84%) rename system/{system-application/src/main/java/cn/iocoder/mall/admin => system-start/src/main/java/cn/iocoder/mall/system}/application/controller/admins/DeptmentController.java (83%) rename system/{system-application/src/main/java/cn/iocoder/mall/admin => system-start/src/main/java/cn/iocoder/mall/system}/application/controller/admins/FileController.java (94%) rename system/{system-application/src/main/java/cn/iocoder/mall/admin => system-start/src/main/java/cn/iocoder/mall/system}/application/controller/admins/PassportController.java (82%) rename system/{system-application/src/main/java/cn/iocoder/mall/admin => system-start/src/main/java/cn/iocoder/mall/system}/application/controller/admins/ResourceController.java (84%) rename system/{system-application/src/main/java/cn/iocoder/mall/admin => system-start/src/main/java/cn/iocoder/mall/system}/application/controller/admins/RoleController.java (85%) rename system/{system-application/src/main/java/cn/iocoder/mall/admin => system-start/src/main/java/cn/iocoder/mall/system}/application/controller/admins/SmsSignController.java (88%) rename system/{system-application/src/main/java/cn/iocoder/mall/admin => system-start/src/main/java/cn/iocoder/mall/system}/application/controller/admins/SmsTemplateController.java (82%) rename system/{system-application/src/main/java/cn/iocoder/mall/admin => system-start/src/main/java/cn/iocoder/mall/system}/application/controller/admins/SystemLogController.java (84%) create mode 100644 system/system-start/src/main/java/cn/iocoder/mall/system/application/convert/AccessLogConvert.java rename system/{system-application/src/main/java/cn/iocoder/mall/admin => system-start/src/main/java/cn/iocoder/mall/system}/application/convert/AdminConvert.java (67%) rename system/{system-application/src/main/java/cn/iocoder/mall/admin => system-start/src/main/java/cn/iocoder/mall/system}/application/convert/DataDictConvert.java (64%) rename system/{system-application/src/main/java/cn/iocoder/mall/admin => system-start/src/main/java/cn/iocoder/mall/system}/application/convert/DeptmentConvert.java (68%) rename system/{system-application/src/main/java/cn/iocoder/mall/admin => system-start/src/main/java/cn/iocoder/mall/system}/application/convert/PassportConvert.java (72%) rename system/{system-application/src/main/java/cn/iocoder/mall/admin => system-start/src/main/java/cn/iocoder/mall/system}/application/convert/ResourceConvert.java (62%) rename system/{system-application/src/main/java/cn/iocoder/mall/admin => system-start/src/main/java/cn/iocoder/mall/system}/application/convert/RoleConvert.java (77%) rename system/{system-application/src/main/java/cn/iocoder/mall/admin => system-start/src/main/java/cn/iocoder/mall/system}/application/po/package-info.java (52%) rename system/{system-application/src/main/java/cn/iocoder/mall/admin => system-start/src/main/java/cn/iocoder/mall/system}/application/po/sms/SmsTemplateAddPO.java (87%) rename system/{system-application/src/main/java/cn/iocoder/mall/admin => system-start/src/main/java/cn/iocoder/mall/system}/application/po/sms/SmsTemplateUpdatePO.java (88%) rename system/{system-application/src/main/java/cn/iocoder/mall/admin => system-start/src/main/java/cn/iocoder/mall/system}/application/vo/PassportLoginVO.java (93%) rename system/{system-application/src/main/java/cn/iocoder/mall/admin => system-start/src/main/java/cn/iocoder/mall/system}/application/vo/admin/AdminInfoVO.java (90%) rename system/{system-application/src/main/java/cn/iocoder/mall/admin => system-start/src/main/java/cn/iocoder/mall/system}/application/vo/admin/AdminMenuTreeNodeVO.java (95%) rename system/{system-application/src/main/java/cn/iocoder/mall/admin => system-start/src/main/java/cn/iocoder/mall/system}/application/vo/admin/AdminRoleVO.java (91%) rename system/{system-application/src/main/java/cn/iocoder/mall/admin => system-start/src/main/java/cn/iocoder/mall/system}/application/vo/admin/AdminVO.java (91%) rename system/{system-application/src/main/java/cn/iocoder/mall/admin => system-start/src/main/java/cn/iocoder/mall/system}/application/vo/datadict/DataDictEnumVO.java (93%) rename system/{system-application/src/main/java/cn/iocoder/mall/admin => system-start/src/main/java/cn/iocoder/mall/system}/application/vo/deptment/DeptmentVO.java (76%) rename system/{system-application/src/main/java/cn/iocoder/mall/admin => system-start/src/main/java/cn/iocoder/mall/system}/application/vo/log/AccessLogPageVo.java (90%) rename system/{system-application/src/main/java/cn/iocoder/mall/admin => system-start/src/main/java/cn/iocoder/mall/system}/application/vo/log/AccessLogVo.java (96%) rename system/{system-application/src/main/java/cn/iocoder/mall/admin => system-start/src/main/java/cn/iocoder/mall/system}/application/vo/resource/ResourceTreeNodeVO.java (77%) rename system/{system-application/src/main/java/cn/iocoder/mall/admin => system-start/src/main/java/cn/iocoder/mall/system}/application/vo/resource/ResourceVO.java (95%) rename system/{system-application/src/main/java/cn/iocoder/mall/admin => system-start/src/main/java/cn/iocoder/mall/system}/application/vo/role/RoleResourceTreeNodeVO.java (95%) create mode 100644 system/system-start/src/main/resources/application.yaml diff --git a/admin-web/config/proxy/index.js b/admin-web/config/proxy/index.js index 079f6dc16..5ed684340 100644 --- a/admin-web/config/proxy/index.js +++ b/admin-web/config/proxy/index.js @@ -19,6 +19,7 @@ function basePathBuilder(proxys, basePath) { } export default function(NODE_ENV, basePath) { + NODE_ENV = 'prod'; let proxys = NODE_ENV === 'development' || NODE_ENV === 'undefined' ? proxyDev : proxyProd; if (basePath) { proxys = basePathBuilder(proxys, basePath); diff --git a/common/common-framework/src/main/java/cn/iocoder/common/framework/util/ServiceExceptionUtil.java b/common/common-framework/src/main/java/cn/iocoder/common/framework/util/ServiceExceptionUtil.java index 4a3d45878..422f7659e 100644 --- a/common/common-framework/src/main/java/cn/iocoder/common/framework/util/ServiceExceptionUtil.java +++ b/common/common-framework/src/main/java/cn/iocoder/common/framework/util/ServiceExceptionUtil.java @@ -26,6 +26,15 @@ public class ServiceExceptionUtil { private static final Logger LOGGER = LoggerFactory.getLogger(ServiceExceptionUtil.class); + /** + * 错误枚举的接口 + */ + public interface Enumerable { + + int getCode(); + + } + /** * 错误码提示模板 */ @@ -39,16 +48,31 @@ public class ServiceExceptionUtil { ServiceExceptionUtil.messages.put(code, message); } - // TODO 芋艿,可能不是目前最优解,目前暂时这样 枚举实现接口 + public static CommonResult error(Enumerable enumerable) { + return error(enumerable.getCode()); + } + + public static CommonResult error(Enumerable enumerable, Object... params) { + return error(enumerable.getCode(), params); + } + public static CommonResult error(Integer code) { return CommonResult.error(code, messages.get(code)); } - public static CommonResult error(Integer code, Object... params) { + public static CommonResult error(Integer code, Object... params) { String message = doFormat(code, messages.get(code), params); return CommonResult.error(code, message); } + public static ServiceException exception(Enumerable enumerable) { + return exception(enumerable.getCode()); + } + + public static ServiceException exception(Enumerable enumerable, Object... params) { + return exception(enumerable.getCode(), params); + } + /** * 创建指定编号的 ServiceException 的异常 * diff --git a/common/mall-spring-boot/src/main/java/cn/iocoder/mall/spring/boot/web/AdminMVCAutoConfiguration.java b/common/mall-spring-boot/src/main/java/cn/iocoder/mall/spring/boot/web/AdminMVCAutoConfiguration.java index 9161d4a2a..9aab19c7b 100644 --- a/common/mall-spring-boot/src/main/java/cn/iocoder/mall/spring/boot/web/AdminMVCAutoConfiguration.java +++ b/common/mall-spring-boot/src/main/java/cn/iocoder/mall/spring/boot/web/AdminMVCAutoConfiguration.java @@ -2,9 +2,9 @@ package cn.iocoder.mall.spring.boot.web; import cn.iocoder.common.framework.constant.MallConstants; import cn.iocoder.common.framework.servlet.CorsFilter; -import cn.iocoder.mall.admin.sdk.interceptor.AdminDemoInterceptor; +import cn.iocoder.mall.system.sdk.interceptor.AdminDemoInterceptor; import cn.iocoder.mall.spring.boot.web.interceptor.AccessLogInterceptor; -import cn.iocoder.mall.admin.sdk.interceptor.AdminSecurityInterceptor; +import cn.iocoder.mall.system.sdk.interceptor.AdminSecurityInterceptor; import cn.iocoder.mall.spring.boot.web.handler.GlobalExceptionHandler; import cn.iocoder.mall.spring.boot.web.handler.GlobalResponseBodyHandler; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; diff --git a/common/mall-spring-boot/src/main/java/cn/iocoder/mall/spring/boot/web/handler/GlobalExceptionHandler.java b/common/mall-spring-boot/src/main/java/cn/iocoder/mall/spring/boot/web/handler/GlobalExceptionHandler.java index 748b4add3..98d9f8b75 100644 --- a/common/mall-spring-boot/src/main/java/cn/iocoder/mall/spring/boot/web/handler/GlobalExceptionHandler.java +++ b/common/mall-spring-boot/src/main/java/cn/iocoder/mall/spring/boot/web/handler/GlobalExceptionHandler.java @@ -6,9 +6,9 @@ import cn.iocoder.common.framework.util.ExceptionUtil; import cn.iocoder.common.framework.util.HttpUtil; import cn.iocoder.common.framework.util.MallUtil; import cn.iocoder.common.framework.vo.CommonResult; -import cn.iocoder.mall.admin.api.SystemLogService; -import cn.iocoder.mall.admin.api.dto.systemlog.AccessLogAddDTO; -import cn.iocoder.mall.admin.api.dto.systemlog.ExceptionLogAddDTO; +import cn.iocoder.mall.system.api.SystemLogService; +import cn.iocoder.mall.system.api.dto.systemlog.AccessLogAddDTO; +import cn.iocoder.mall.system.api.dto.systemlog.ExceptionLogAddDTO; import com.alibaba.fastjson.JSON; import io.micrometer.core.instrument.Counter; import io.micrometer.core.instrument.Metrics; diff --git a/common/mall-spring-boot/src/main/java/cn/iocoder/mall/spring/boot/web/interceptor/AccessLogInterceptor.java b/common/mall-spring-boot/src/main/java/cn/iocoder/mall/spring/boot/web/interceptor/AccessLogInterceptor.java index fed0d679b..a0e951a2c 100644 --- a/common/mall-spring-boot/src/main/java/cn/iocoder/mall/spring/boot/web/interceptor/AccessLogInterceptor.java +++ b/common/mall-spring-boot/src/main/java/cn/iocoder/mall/spring/boot/web/interceptor/AccessLogInterceptor.java @@ -3,8 +3,8 @@ package cn.iocoder.mall.spring.boot.web.interceptor; import cn.iocoder.common.framework.util.HttpUtil; import cn.iocoder.common.framework.util.MallUtil; import cn.iocoder.common.framework.vo.CommonResult; -import cn.iocoder.mall.admin.api.SystemLogService; -import cn.iocoder.mall.admin.api.dto.systemlog.AccessLogAddDTO; +import cn.iocoder.mall.system.api.SystemLogService; +import cn.iocoder.mall.system.api.dto.systemlog.AccessLogAddDTO; import com.alibaba.fastjson.JSON; import org.apache.commons.lang3.exception.ExceptionUtils; import org.apache.dubbo.config.annotation.Reference; diff --git a/mobile-web/package.json b/mobile-web/package.json index 3a8b773ca..e80d54cc8 100644 --- a/mobile-web/package.json +++ b/mobile-web/package.json @@ -12,7 +12,7 @@ "axios": "^0.18.0", "moment": "^2.24.0", "pingpp-js": "^2.2.13", - "vant": "^2.2.14", + "vant": "^1.3.1", "vue": "^2.5.17", "vue-router": "^3.0.1", "vuex": "^3.1.0" diff --git a/order/order-application/src/main/java/cn/iocoder/mall/order/application/controller/users/OrderController.java b/order/order-application/src/main/java/cn/iocoder/mall/order/application/controller/users/OrderController.java index 3f235c0cb..2d53ae44d 100644 --- a/order/order-application/src/main/java/cn/iocoder/mall/order/application/controller/users/OrderController.java +++ b/order/order-application/src/main/java/cn/iocoder/mall/order/application/controller/users/OrderController.java @@ -3,8 +3,8 @@ package cn.iocoder.mall.order.application.controller.users; import cn.iocoder.common.framework.util.HttpUtil; import cn.iocoder.common.framework.util.ServiceExceptionUtil; import cn.iocoder.common.framework.vo.CommonResult; -import cn.iocoder.mall.admin.api.DataDictService; -import cn.iocoder.mall.admin.api.bo.datadict.DataDictBO; +import cn.iocoder.mall.system.api.DataDictService; +import cn.iocoder.mall.system.api.bo.datadict.DataDictBO; import cn.iocoder.mall.order.api.CartService; import cn.iocoder.mall.order.api.OrderService; import cn.iocoder.mall.order.api.bo.*; diff --git a/order/order-application/src/main/java/cn/iocoder/mall/order/application/controller/users/OrderLogisticsController.java b/order/order-application/src/main/java/cn/iocoder/mall/order/application/controller/users/OrderLogisticsController.java index e3a96ee09..918b92ac2 100644 --- a/order/order-application/src/main/java/cn/iocoder/mall/order/application/controller/users/OrderLogisticsController.java +++ b/order/order-application/src/main/java/cn/iocoder/mall/order/application/controller/users/OrderLogisticsController.java @@ -2,8 +2,8 @@ package cn.iocoder.mall.order.application.controller.users; import cn.iocoder.common.framework.util.ServiceExceptionUtil; import cn.iocoder.common.framework.vo.CommonResult; -import cn.iocoder.mall.admin.api.DataDictService; -import cn.iocoder.mall.admin.api.bo.datadict.DataDictBO; +import cn.iocoder.mall.system.api.DataDictService; +import cn.iocoder.mall.system.api.bo.datadict.DataDictBO; import cn.iocoder.mall.order.api.OrderLogisticsService; import cn.iocoder.mall.order.api.bo.OrderLogisticsInfoBO; import cn.iocoder.mall.order.api.bo.OrderLogisticsInfoWithOrderBO; diff --git a/order/order-application/src/main/java/cn/iocoder/mall/order/application/controller/users/OrderReturnController.java b/order/order-application/src/main/java/cn/iocoder/mall/order/application/controller/users/OrderReturnController.java index 2a78b1c05..ff5503dbc 100644 --- a/order/order-application/src/main/java/cn/iocoder/mall/order/application/controller/users/OrderReturnController.java +++ b/order/order-application/src/main/java/cn/iocoder/mall/order/application/controller/users/OrderReturnController.java @@ -1,8 +1,8 @@ package cn.iocoder.mall.order.application.controller.users; import cn.iocoder.common.framework.vo.CommonResult; -import cn.iocoder.mall.admin.api.DataDictService; -import cn.iocoder.mall.admin.api.bo.datadict.DataDictBO; +import cn.iocoder.mall.system.api.DataDictService; +import cn.iocoder.mall.system.api.bo.datadict.DataDictBO; import cn.iocoder.mall.order.api.OrderReturnService; import cn.iocoder.mall.order.api.bo.OrderReturnInfoBO; import cn.iocoder.mall.order.api.constant.DictKeyConstants; diff --git a/order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/service/OrderReturnServiceImpl.java b/order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/service/OrderReturnServiceImpl.java index 2505ea60b..cc456a7d8 100644 --- a/order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/service/OrderReturnServiceImpl.java +++ b/order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/service/OrderReturnServiceImpl.java @@ -3,8 +3,8 @@ package cn.iocoder.mall.order.biz.service; import cn.iocoder.common.framework.constant.DeletedStatusEnum; import cn.iocoder.common.framework.util.ServiceExceptionUtil; import cn.iocoder.common.framework.vo.CommonResult; -import cn.iocoder.mall.admin.api.DataDictService; -import cn.iocoder.mall.admin.api.bo.datadict.DataDictBO; +import cn.iocoder.mall.system.api.DataDictService; +import cn.iocoder.mall.system.api.bo.datadict.DataDictBO; import cn.iocoder.mall.order.api.OrderLogisticsService; import cn.iocoder.mall.order.api.OrderReturnService; import cn.iocoder.mall.order.api.bo.OrderLastLogisticsInfoBO; diff --git a/product/product-application/src/main/java/cn/iocoder/mall/product/application/controller/admins/AdminsProductAttrController.java b/product/product-application/src/main/java/cn/iocoder/mall/product/application/controller/admins/AdminsProductAttrController.java index cd1693fab..3b2a406c0 100644 --- a/product/product-application/src/main/java/cn/iocoder/mall/product/application/controller/admins/AdminsProductAttrController.java +++ b/product/product-application/src/main/java/cn/iocoder/mall/product/application/controller/admins/AdminsProductAttrController.java @@ -1,7 +1,7 @@ package cn.iocoder.mall.product.application.controller.admins; import cn.iocoder.common.framework.vo.CommonResult; -import cn.iocoder.mall.admin.sdk.context.AdminSecurityContextHolder; +import cn.iocoder.mall.system.sdk.context.AdminSecurityContextHolder; import cn.iocoder.mall.product.api.ProductAttrService; import cn.iocoder.mall.product.api.bo.ProductAttrBO; import cn.iocoder.mall.product.api.bo.ProductAttrPageBO; diff --git a/product/product-application/src/main/java/cn/iocoder/mall/product/application/controller/admins/AdminsProductBrandController.java b/product/product-application/src/main/java/cn/iocoder/mall/product/application/controller/admins/AdminsProductBrandController.java index 0fbda1c4c..470b69c90 100644 --- a/product/product-application/src/main/java/cn/iocoder/mall/product/application/controller/admins/AdminsProductBrandController.java +++ b/product/product-application/src/main/java/cn/iocoder/mall/product/application/controller/admins/AdminsProductBrandController.java @@ -1,7 +1,7 @@ package cn.iocoder.mall.product.application.controller.admins; import cn.iocoder.common.framework.vo.CommonResult; -import cn.iocoder.mall.admin.sdk.context.AdminSecurityContextHolder; +import cn.iocoder.mall.system.sdk.context.AdminSecurityContextHolder; import cn.iocoder.mall.product.api.ProductBrandService; import cn.iocoder.mall.product.api.bo.ProductBrandBO; import cn.iocoder.mall.product.api.bo.ProductBrangPageBO; diff --git a/product/product-application/src/main/java/cn/iocoder/mall/product/application/controller/admins/AdminsProductCategoryController.java b/product/product-application/src/main/java/cn/iocoder/mall/product/application/controller/admins/AdminsProductCategoryController.java index b02a271f3..b9a468ce9 100644 --- a/product/product-application/src/main/java/cn/iocoder/mall/product/application/controller/admins/AdminsProductCategoryController.java +++ b/product/product-application/src/main/java/cn/iocoder/mall/product/application/controller/admins/AdminsProductCategoryController.java @@ -1,7 +1,7 @@ package cn.iocoder.mall.product.application.controller.admins; import cn.iocoder.common.framework.vo.CommonResult; -import cn.iocoder.mall.admin.sdk.context.AdminSecurityContextHolder; +import cn.iocoder.mall.system.sdk.context.AdminSecurityContextHolder; import cn.iocoder.mall.product.api.ProductCategoryService; import cn.iocoder.mall.product.api.bo.ProductCategoryBO; import cn.iocoder.mall.product.api.constant.ProductCategoryConstants; diff --git a/product/product-application/src/main/java/cn/iocoder/mall/product/application/controller/admins/AdminsProductSpuController.java b/product/product-application/src/main/java/cn/iocoder/mall/product/application/controller/admins/AdminsProductSpuController.java index e167e5db8..db3b6727c 100644 --- a/product/product-application/src/main/java/cn/iocoder/mall/product/application/controller/admins/AdminsProductSpuController.java +++ b/product/product-application/src/main/java/cn/iocoder/mall/product/application/controller/admins/AdminsProductSpuController.java @@ -1,7 +1,7 @@ package cn.iocoder.mall.product.application.controller.admins; import cn.iocoder.common.framework.vo.CommonResult; -import cn.iocoder.mall.admin.sdk.context.AdminSecurityContextHolder; +import cn.iocoder.mall.system.sdk.context.AdminSecurityContextHolder; import cn.iocoder.mall.product.api.ProductSpuService; import cn.iocoder.mall.product.api.bo.ProductSpuBO; import cn.iocoder.mall.product.api.bo.ProductSpuDetailBO; diff --git a/promotion/promotion-application/src/main/java/cn/iocoder/mall/promotion/application/controller/admins/AdminsBannerController.java b/promotion/promotion-application/src/main/java/cn/iocoder/mall/promotion/application/controller/admins/AdminsBannerController.java index 74a7cda06..30ca5e58c 100644 --- a/promotion/promotion-application/src/main/java/cn/iocoder/mall/promotion/application/controller/admins/AdminsBannerController.java +++ b/promotion/promotion-application/src/main/java/cn/iocoder/mall/promotion/application/controller/admins/AdminsBannerController.java @@ -1,7 +1,7 @@ package cn.iocoder.mall.promotion.application.controller.admins; import cn.iocoder.common.framework.vo.CommonResult; -import cn.iocoder.mall.admin.sdk.context.AdminSecurityContextHolder; +import cn.iocoder.mall.system.sdk.context.AdminSecurityContextHolder; import cn.iocoder.mall.promotion.api.BannerService; import cn.iocoder.mall.promotion.api.bo.BannerPageBO; import cn.iocoder.mall.promotion.api.dto.BannerAddDTO; diff --git a/promotion/promotion-application/src/main/java/cn/iocoder/mall/promotion/application/controller/admins/AdminsCouponController.java b/promotion/promotion-application/src/main/java/cn/iocoder/mall/promotion/application/controller/admins/AdminsCouponController.java index 00ccc2c15..476ae30fc 100644 --- a/promotion/promotion-application/src/main/java/cn/iocoder/mall/promotion/application/controller/admins/AdminsCouponController.java +++ b/promotion/promotion-application/src/main/java/cn/iocoder/mall/promotion/application/controller/admins/AdminsCouponController.java @@ -2,7 +2,7 @@ package cn.iocoder.mall.promotion.application.controller.admins; import cn.iocoder.common.framework.util.DateUtil; import cn.iocoder.common.framework.vo.CommonResult; -import cn.iocoder.mall.admin.sdk.context.AdminSecurityContextHolder; +import cn.iocoder.mall.system.sdk.context.AdminSecurityContextHolder; import cn.iocoder.mall.promotion.api.CouponService; import cn.iocoder.mall.promotion.api.bo.CouponTemplateBO; import cn.iocoder.mall.promotion.api.bo.CouponTemplatePageBO; diff --git a/promotion/promotion-application/src/main/java/cn/iocoder/mall/promotion/application/controller/admins/AdminsProductRecommendController.java b/promotion/promotion-application/src/main/java/cn/iocoder/mall/promotion/application/controller/admins/AdminsProductRecommendController.java index 245e67d13..4737a85c1 100644 --- a/promotion/promotion-application/src/main/java/cn/iocoder/mall/promotion/application/controller/admins/AdminsProductRecommendController.java +++ b/promotion/promotion-application/src/main/java/cn/iocoder/mall/promotion/application/controller/admins/AdminsProductRecommendController.java @@ -1,7 +1,7 @@ package cn.iocoder.mall.promotion.application.controller.admins; import cn.iocoder.common.framework.vo.CommonResult; -import cn.iocoder.mall.admin.sdk.context.AdminSecurityContextHolder; +import cn.iocoder.mall.system.sdk.context.AdminSecurityContextHolder; import cn.iocoder.mall.product.api.ProductSpuService; import cn.iocoder.mall.product.api.bo.ProductSpuBO; import cn.iocoder.mall.promotion.api.ProductRecommendService; diff --git a/system/pom.xml b/system/pom.xml index 85f74a4cc..786c001bc 100644 --- a/system/pom.xml +++ b/system/pom.xml @@ -14,10 +14,15 @@ pom - system-application + system-sdk system-service-api system-service-impl + system-rpc-api + system-rpc + system-rest + system-biz + system-application diff --git a/system/system-application/pom.xml b/system/system-application/pom.xml index 28ef2e7fd..631757bc5 100644 --- a/system/system-application/pom.xml +++ b/system/system-application/pom.xml @@ -15,93 +15,10 @@ cn.iocoder.mall - common-framework + system-rest 1.0-SNAPSHOT - - cn.iocoder.mall - mall-spring-boot - 1.0-SNAPSHOT - - - cn.iocoder.mall - system-service-impl - 1.0-SNAPSHOT - - - cn.iocoder.mall - system-sdk - 1.0-SNAPSHOT - - - - - org.springframework.boot - spring-boot-starter-web - - - - io.springfox - springfox-swagger2 - - - com.github.xiaoymin - swagger-bootstrap-ui - - - - - com.qiniu - qiniu-java-sdk - - - - - com.alibaba.cloud - spring-cloud-starter-alibaba-sentinel - - - - - de.codecentric - spring-boot-admin-starter-client - - - - org.springframework.boot - spring-boot-starter-actuator - - - - io.micrometer - micrometer-registry-prometheus - - - - - org.springframework.boot - spring-boot-starter-test - test - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - - - diff --git a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/convert/AccessLogConvert.java b/system/system-application/src/main/java/cn/iocoder/mall/admin/application/convert/AccessLogConvert.java deleted file mode 100644 index f48db4be4..000000000 --- a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/convert/AccessLogConvert.java +++ /dev/null @@ -1,36 +0,0 @@ -package cn.iocoder.mall.admin.application.convert; - -import cn.iocoder.common.framework.vo.PageResult; -import cn.iocoder.mall.admin.api.bo.admin.AdminBO; -import cn.iocoder.mall.admin.api.bo.systemlog.AccessLogBO; -import cn.iocoder.mall.admin.api.bo.systemlog.AccessLogPageBO; -import cn.iocoder.mall.admin.application.vo.log.AccessLogPageVo; -import cn.iocoder.mall.admin.application.vo.log.AccessLogVo; -import cn.iocoder.mall.admin.dataobject.AccessLogDO; -import cn.iocoder.mall.admin.dataobject.AdminDO; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.mapstruct.Mapper; -import org.mapstruct.Mapping; -import org.mapstruct.Mappings; -import org.mapstruct.factory.Mappers; - -/** - * @author:ycjx - * @descriptio - * @create:2019-06-23 17:36 - */ -@Mapper -public interface AccessLogConvert { - - - AccessLogConvert INSTANCE = Mappers.getMapper(AccessLogConvert.class); - - @Mappings({}) - AccessLogPageVo convert(AccessLogPageBO result); - - @Mappings({}) - AccessLogVo convert(AccessLogBO result); - - - -} diff --git a/system/system-application/src/main/java/cn/iocoder/mall/system/application/SystemApplication.java b/system/system-application/src/main/java/cn/iocoder/mall/system/application/SystemApplication.java new file mode 100644 index 000000000..6463929b5 --- /dev/null +++ b/system/system-application/src/main/java/cn/iocoder/mall/system/application/SystemApplication.java @@ -0,0 +1,24 @@ +package cn.iocoder.mall.system.application; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.context.config.ConfigFileApplicationListener; + +@SpringBootApplication(scanBasePackages = {"cn.iocoder.mall.system"}) +public class SystemApplication { + + /** + * 设置需要读取的配置文件的名字。 + * 基于 {@link org.springframework.boot.context.config.ConfigFileApplicationListener#CONFIG_NAME_PROPERTY} 实现。 + */ + private static final String CONFIG_NAME_VALUE = "biz,rest,application"; + + public static void main(String[] args) { + // 设置环境变量 + System.setProperty(ConfigFileApplicationListener.CONFIG_NAME_PROPERTY, CONFIG_NAME_VALUE); + + // 启动 Spring Boot 应用 + SpringApplication.run(SystemApplication.class, args); + } + +} diff --git a/system/system-application/src/main/resources/application.yaml b/system/system-application/src/main/resources/application.yaml index edd2d3eb0..65ece6198 100644 --- a/system/system-application/src/main/resources/application.yaml +++ b/system/system-application/src/main/resources/application.yaml @@ -1,34 +1,3 @@ spring: application: name: admin-application - - # Spring Cloud 配置项 - cloud: - # Spring Cloud Sentinel 配置项 - sentinel: - transport: - dashboard: s1.iocoder.cn:12088 # Sentinel Dashboard 服务地址 - eager: true # 项目启动时,直接连接到 Sentinel - -# server -server: - port: 18083 - servlet: - context-path: /admin-api/ - -admins: - security: - ignore_urls: /admin-api/admins/passport/login, /admin-api/admins/file/get_qiniu_token - -# qiniu -qiniu: - access-key: YldfyUC7OewoWM63TPYTairqnq8GMJvNek9EGoID - secret-key: zZ7Q8wwZRyaklVvkyLmVydA4WygOBqtc_gTYzalS - bucket: onemall - -swagger: - enable: true # 暂时不去掉 - title: 管理员子系统 - description: 管理员子系统 - version: 1.0.0 - base-package: cn.iocoder.mall.admin.application.controller diff --git a/system/system-biz/pom.xml b/system/system-biz/pom.xml new file mode 100644 index 000000000..fa74d3961 --- /dev/null +++ b/system/system-biz/pom.xml @@ -0,0 +1,68 @@ + + + + system + cn.iocoder.mall + 1.0-SNAPSHOT + + 4.0.0 + + system-biz + + + + + cn.iocoder.mall + common-framework + 1.0-SNAPSHOT + + + + + org.springframework.boot + spring-boot-starter + + + + + mysql + mysql-connector-java + + + + org.springframework + spring-tx + + + org.springframework + spring-jdbc + + + com.alibaba + druid-spring-boot-starter + + + + com.baomidou + mybatis-plus-boot-starter + + + + + org.mapstruct + mapstruct + + + org.mapstruct + mapstruct-jdk8 + + + + org.projectlombok + lombok + + + + diff --git a/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/bo/account/AccountBO.java b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/bo/account/AccountBO.java new file mode 100644 index 000000000..cd942e307 --- /dev/null +++ b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/bo/account/AccountBO.java @@ -0,0 +1,26 @@ +package cn.iocoder.mall.system.biz.bo.account; + +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * 账号信息 BO + */ +@Data +@Accessors(chain = true) +public class AccountBO { + + /** + * 账号编号 + */ + private Integer id; + /** + * 登陆账号 + */ + private String username; + /** + * 登陆密码 + */ + private String password; + +} diff --git a/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/bo/account/AccountUsernameAuthorizeBO.java b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/bo/account/AccountUsernameAuthorizeBO.java new file mode 100644 index 000000000..1dcb0d57a --- /dev/null +++ b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/bo/account/AccountUsernameAuthorizeBO.java @@ -0,0 +1,22 @@ +package cn.iocoder.mall.system.biz.bo.account; + +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * 账号模块 - 用户名登陆 BO + */ +@Data +@Accessors(chain = true) +public class AccountUsernameAuthorizeBO { + + /** + * 用户名 + */ + private String username; + /** + * 密码 + */ + private String password; + +} diff --git a/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/bo/admin/AdminBO.java b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/bo/admin/AdminBO.java new file mode 100644 index 000000000..27900eef2 --- /dev/null +++ b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/bo/admin/AdminBO.java @@ -0,0 +1,22 @@ +package cn.iocoder.mall.system.biz.bo.admin; + +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * 管理员模块 - 账号信息 BO + */ +@Data +@Accessors(chain = true) +public class AdminBO { + + /** + * 管理员编号 + */ + private Integer id; + /** + * 真实名字 + */ + private String name; + +} diff --git a/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/bo/ouath2/OAuth2AccessTokenBO.java b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/bo/ouath2/OAuth2AccessTokenBO.java new file mode 100644 index 000000000..40e146422 --- /dev/null +++ b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/bo/ouath2/OAuth2AccessTokenBO.java @@ -0,0 +1,32 @@ +package cn.iocoder.mall.system.biz.bo.ouath2; + +import lombok.Data; +import lombok.experimental.Accessors; + +import java.util.Date; + +/** + * TODO 注释 + */ +@Data +@Accessors(chain = true) +public class OAuth2AccessTokenBO { + + /** + * 访问令牌 + */ + private String id; + /** + * 刷新令牌 + */ + private String refreshToken; + /** + * 账号编号 + */ + private Integer accountId; + /** + * 过期时间 + */ + private Date expiresTime; + +} diff --git a/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/bo/package-info.java b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/bo/package-info.java new file mode 100644 index 000000000..ef2a840a2 --- /dev/null +++ b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/bo/package-info.java @@ -0,0 +1 @@ +package cn.iocoder.mall.system.biz.bo; diff --git a/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/config/DatabaseConfiguration.java b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/config/DatabaseConfiguration.java new file mode 100644 index 000000000..95ced3e8a --- /dev/null +++ b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/config/DatabaseConfiguration.java @@ -0,0 +1,28 @@ +package cn.iocoder.mall.system.biz.config; + +import com.baomidou.mybatisplus.core.injector.DefaultSqlInjector; +import com.baomidou.mybatisplus.core.injector.ISqlInjector; +import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor; +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.transaction.annotation.EnableTransactionManagement; + +@Configuration +@MapperScan("cn.iocoder.mall.system.biz.dao") // 扫描对应的 Mapper 接口 +@EnableTransactionManagement(proxyTargetClass = true) // 启动事务管理。为什么使用 proxyTargetClass 参数,参见 https://blog.csdn.net/huang_550/article/details/76492600 +public class DatabaseConfiguration { + + // 数据库连接池 Druid + + @Bean + public ISqlInjector sqlInjector() { + return new DefaultSqlInjector(); // MyBatis Plus 逻辑删除 + } + + @Bean + public PaginationInterceptor paginationInterceptor() { + return new PaginationInterceptor(); // MyBatis Plus 分页插件 + } + +} diff --git a/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/config/ServiceExceptionConfiguration.java b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/config/ServiceExceptionConfiguration.java new file mode 100644 index 000000000..653ebbaeb --- /dev/null +++ b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/config/ServiceExceptionConfiguration.java @@ -0,0 +1,19 @@ +package cn.iocoder.mall.system.biz.config; + +import cn.iocoder.common.framework.util.ServiceExceptionUtil; +import cn.iocoder.mall.system.biz.constant.SystemErrorCodeEnum; +import org.springframework.boot.context.event.ApplicationReadyEvent; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.event.EventListener; + +@Configuration +public class ServiceExceptionConfiguration { + + @EventListener(ApplicationReadyEvent.class) // 可参考 https://www.cnblogs.com/ssslinppp/p/7607509.html + public void initMessages() { + for (SystemErrorCodeEnum item : SystemErrorCodeEnum.values()) { + ServiceExceptionUtil.put(item.getCode(), item.getMessage()); + } + } + +} diff --git a/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/constant/SystemErrorCodeEnum.java b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/constant/SystemErrorCodeEnum.java new file mode 100644 index 000000000..e9e397eb1 --- /dev/null +++ b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/constant/SystemErrorCodeEnum.java @@ -0,0 +1,91 @@ +package cn.iocoder.mall.system.biz.constant; + +import cn.iocoder.common.framework.util.ServiceExceptionUtil; + +/** + * 错误码枚举类 + * + * system 系统,使用 1-002-000-000 段 + */ +public enum SystemErrorCodeEnum implements ServiceExceptionUtil.Enumerable { + + // ========== OAUTH2 模块 ========== + OAUTH2_UNKNOWN(1001001000, "未知错误"), // 预留 + OAUTH2_ACCOUNT_NOT_FOUND(1001001001, "账号不存在"), + OAUTH2_ACCOUNT_PASSWORD_ERROR(1001001002, "密码不正确"), +//// OAUTH2_INVALID_GRANT_USERNAME_NOT_FOUND(1001001002, "账号不存在"), // 暂时没用到 +//// OAUTH2_INVALID_GRANT(1001001010, ""), // 预留 +// OAUTH2_INVALID_TOKEN_NOT_FOUND(1002001011, "访问令牌不存在"), +// OAUTH2_INVALID_TOKEN_EXPIRED(1002001012, "访问令牌已过期"), +// OAUTH2_INVALID_TOKEN_INVALID(1002001013, "访问令牌已失效"), +// OAUTH2_NOT_LOGIN(1002001015, "账号未登陆"), +// OAUTH2_INVALID_TOKEN_ERROR_USER_TYPE(1002001016, "访问令牌用户类型不正确"), +// OAUTH_INVALID_REFRESH_TOKEN_NOT_FOUND(1002001017, "刷新令牌不存在"), +// OAUTH_INVALID_REFRESH_TOKEN_EXPIRED(1002001018, "访问令牌已过期"), +// OAUTH_INVALID_REFRESH_TOKEN_INVALID(1002001019, "刷新令牌已失效"), + + + // ========== 管理员模块 1002002000 ========== + ADMIN_NOT_FOUND(1002002000, "管理员不存在"), +// 废弃 ADMIN_USERNAME_NOT_REGISTERED(1002002000, "账号不存在"), +// 废弃 ADMIN_PASSWORD_ERROR(1002002001, "密码不正确"), +// ADMIN_IS_DISABLE(1002002002, "账号被禁用"), +// ADMIN_USERNAME_EXISTS(1002002002, "账号已经存在"), +// ADMIN_STATUS_EQUALS(1002002003, "账号已经是该状态"), +// ADMIN_DELETE_ONLY_DISABLE(1002002004, "只有关闭的账号才可以删除"), +// ADMIN_ADMIN_STATUS_CAN_NOT_UPDATE(1002002005, "管理员的账号状态不允许变更"), +// ADMIN_ASSIGN_ROLE_NOT_EXISTS(1002002006, "分配员工角色时,有角色不存在"), +// ADMIN_INVALID_PERMISSION(1002002007, "没有该操作权限"), +// ADMIN_ADMIN_CAN_NOT_UPDATE(1002002008, "管理员的账号不允许变更"), +// ADMIN_DEMO_CAN_NOT_WRITE(1002002009, "演示账号,暂不允许写操作。欢迎加入我们的交流群:http://t.cn/EKEr5WE"), + + // ========== 资源模块 1002003000 ========== +// RESOURCE_NAME_DUPLICATE(1002003000, "已经存在该名字的资源"), +// RESOURCE_PARENT_NOT_EXISTS(1002003001, "父资源不存在"), +// RESOURCE_PARENT_ERROR(1002003002, "不能设置自己为父资源"), +// RESOURCE_NOT_EXISTS(1002003003, "资源不存在"), +// RESOURCE_EXISTS_CHILDREN(1002003004, "存在子资源,无法删除"), +// RESOURCE_PARENT_NOT_MENU(1002003005, "父资源的类型必须是菜单"), + + // ========== 角色模块 1002004000 ========== +// ROLE_NOT_EXISTS(1002004000, "角色不存在"), +// ROLE_ASSIGN_RESOURCE_NOT_EXISTS(1002004001, "分配角色资源时,有资源不存在"), + + // ========== 数据字典模块 1002005000 ========== +// DATA_DICT_EXISTS(1002005000, "该数据字典已经存在"), +// DATA_DICT_NOT_EXISTS(1002005001, "该数据字典不存在"), + + // ========== 短信模板 1002006000 ========== +// SMS_PLATFORM_FAIL(1002006000, "短信平台调用失败【具体错误会动态替换】"), +// SMS_SIGN_NOT_EXISTENT(1002006001, "短信签名不存在"), +// SMS_SIGN_IS_EXISTENT(1002006002, "短信签名已存在"), +// SMS_TEMPLATE_NOT_EXISTENT(1002006020, "短信签名不存在"), +// SMS_TEMPLATE_IS_EXISTENT(1002006021, "短信签名不存在"), +// SMS_NOT_SEND_CLIENT(1002006030, "短信没有发送的client"), + + // ========== 部门模块 1002007000 ========== +// DEPT_SAME_LEVEL_NAME_EXITS(1002007001,"当前级别部门名字已存在"), +// DEPT_PARENT_NOT_EXITS(1002007002,"父级部门不存在"), +// DEPT_NOT_EXITS(1002007003, "当前部门不存在"), +// DEPT_EXITS_CHILDREN(1002007004, "当前部门存在子部门"), +// DEPT_PARENT_NOT_LEGAL(1002007005, "父级部门不合法"), + ; + + private final int code; + private final String message; + + SystemErrorCodeEnum(int code, String message) { + this.code = code; + this.message = message; + } + + @Override + public int getCode() { + return code; + } + + public String getMessage() { + return message; + } + +} diff --git a/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/convert/AccountConvert.java b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/convert/AccountConvert.java new file mode 100644 index 000000000..e88629874 --- /dev/null +++ b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/convert/AccountConvert.java @@ -0,0 +1,15 @@ +package cn.iocoder.mall.system.biz.convert; + +import cn.iocoder.mall.system.biz.bo.account.AccountBO; +import cn.iocoder.mall.system.biz.dataobject.account.AccountDO; +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; + +@Mapper +public interface AccountConvert { + + AccountConvert INSTANCE = Mappers.getMapper(AccountConvert.class); + + AccountBO convert(AccountDO accountDO); + +} diff --git a/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/convert/AdminConvert.java b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/convert/AdminConvert.java new file mode 100644 index 000000000..d3e162d01 --- /dev/null +++ b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/convert/AdminConvert.java @@ -0,0 +1,15 @@ +package cn.iocoder.mall.system.biz.convert; + +import cn.iocoder.mall.system.biz.bo.admin.AdminBO; +import cn.iocoder.mall.system.biz.dataobject.admin.AdminDO; +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; + +@Mapper +public interface AdminConvert { + + AdminConvert INSTANCE = Mappers.getMapper(AdminConvert.class); + + AdminBO convert(AdminDO adminDO); + +} diff --git a/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/convert/OAuth2Convert.java b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/convert/OAuth2Convert.java new file mode 100644 index 000000000..0fdf60483 --- /dev/null +++ b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/convert/OAuth2Convert.java @@ -0,0 +1,15 @@ +package cn.iocoder.mall.system.biz.convert; + +import cn.iocoder.mall.system.biz.bo.ouath2.OAuth2AccessTokenBO; +import cn.iocoder.mall.system.biz.dataobject.oauth2.OAuth2AccessTokenDO; +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; + +@Mapper +public interface OAuth2Convert { + + OAuth2Convert INSTANCE = Mappers.getMapper(OAuth2Convert.class); + + OAuth2AccessTokenBO convert(OAuth2AccessTokenDO accessTokenDO); + +} diff --git a/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dao/account/AccountMapper.java b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dao/account/AccountMapper.java new file mode 100644 index 000000000..8637b1102 --- /dev/null +++ b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dao/account/AccountMapper.java @@ -0,0 +1,17 @@ +package cn.iocoder.mall.system.biz.dao.account; + +import cn.iocoder.mall.system.biz.dataobject.account.AccountDO; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.springframework.stereotype.Repository; + +@Repository +public interface AccountMapper extends BaseMapper { + + default AccountDO selectByUsername(String username) { + return selectOne(new QueryWrapper() + .eq("username", username) + ); + } + +} diff --git a/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dao/admin/AdminMapper.java b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dao/admin/AdminMapper.java new file mode 100644 index 000000000..30d453b08 --- /dev/null +++ b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dao/admin/AdminMapper.java @@ -0,0 +1,10 @@ +package cn.iocoder.mall.system.biz.dao.admin; + +import cn.iocoder.mall.system.biz.dataobject.admin.AdminDO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.springframework.stereotype.Repository; + +@Repository +public interface AdminMapper extends BaseMapper { + +} diff --git a/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dao/oauth2/OAuth2AccessTokenMapper.java b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dao/oauth2/OAuth2AccessTokenMapper.java new file mode 100644 index 000000000..c8de98178 --- /dev/null +++ b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dao/oauth2/OAuth2AccessTokenMapper.java @@ -0,0 +1,24 @@ +package cn.iocoder.mall.system.biz.dao.oauth2; + +import cn.iocoder.mall.system.biz.dataobject.oauth2.OAuth2AccessTokenDO; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.springframework.stereotype.Repository; + +@Repository +public interface OAuth2AccessTokenMapper extends BaseMapper { + + default int updateToInvalid(Integer accountId) { + QueryWrapper query = new QueryWrapper() + .eq("account_id", accountId) + .eq("valid", true); + return update(new OAuth2AccessTokenDO().setValid(false), query); + } + + default int updateToInvalidByRefreshToken(String refreshToken) { + QueryWrapper query = new QueryWrapper() + .eq("refresh_token", refreshToken).eq("valid", true); + return update(new OAuth2AccessTokenDO().setValid(false), query); + } + +} diff --git a/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dao/oauth2/OAuth2RefreshTokenMapper.java b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dao/oauth2/OAuth2RefreshTokenMapper.java new file mode 100644 index 000000000..ebb7c9240 --- /dev/null +++ b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dao/oauth2/OAuth2RefreshTokenMapper.java @@ -0,0 +1,18 @@ +package cn.iocoder.mall.system.biz.dao.oauth2; + +import cn.iocoder.mall.system.biz.dataobject.oauth2.OAuth2RefreshTokenDO; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.springframework.stereotype.Repository; + +@Repository +public interface OAuth2RefreshTokenMapper extends BaseMapper { + + default int updateToInvalid(Integer accountId) { + QueryWrapper query = new QueryWrapper() + .eq("account_id", accountId) + .eq("valid", true); + return update(new OAuth2RefreshTokenDO().setValid(false), query); + } + +} diff --git a/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dataobject/account/AccountDO.java b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dataobject/account/AccountDO.java new file mode 100644 index 000000000..b93dd1811 --- /dev/null +++ b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dataobject/account/AccountDO.java @@ -0,0 +1,66 @@ +package cn.iocoder.mall.system.biz.dataobject.account; + +import cn.iocoder.common.framework.dataobject.DeletableDO; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.util.Date; + +/** + * 账号实体 + */ +@TableName(value = "account") +@Data +@EqualsAndHashCode(callSuper = true) +@Accessors(chain = true) +public class AccountDO extends DeletableDO { + + /** + * 账号编号 + */ + private Integer id; + /** + * 登陆账号 + */ + private String username; + /** + * 手机号 + */ + private String mobile; + /** + * 邮箱 + */ + private String email; + /** + * 密码 + * + * // TODO 芋艿 暂时明文 + */ + private String password; + /** + * 账号状态 + * + * {@link cn.iocoder.common.framework.constant.CommonStatusEnum} + */ + private Integer status; + + /** + * 创建 IP + */ + private String createIp; + /** + * 最后登陆时间 + */ + private Date lastLoginTime; + /** + * 最后登陆 IP + */ + private String lastLoginIp; + /** + * 登陆次数 + */ + private Integer loginTimes; + +} diff --git a/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dataobject/admin/AdminDO.java b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dataobject/admin/AdminDO.java new file mode 100644 index 000000000..647fa2bbc --- /dev/null +++ b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dataobject/admin/AdminDO.java @@ -0,0 +1,40 @@ +package cn.iocoder.mall.system.biz.dataobject.admin; + +import cn.iocoder.common.framework.dataobject.DeletableDO; +import cn.iocoder.mall.system.biz.dataobject.account.AccountDO; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + * 管理员实体 + */ +@TableName(value = "admin") +@Data +@EqualsAndHashCode(callSuper = true) +@Accessors(chain = true) +public class AdminDO extends DeletableDO { + + /** + * 管理员编号 + */ + private Integer id; + /** + * 账号编号 + * + * 关联 {@link AccountDO#getId()} + */ + private Integer accountId; + /** + * 真实名字 + */ + private String name; + /** + * 科室编号 + * + * 关联 {@link DepartmentDO#getId()} + */ + private Integer departmentId; + +} diff --git a/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dataobject/admin/DepartmentDO.java b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dataobject/admin/DepartmentDO.java new file mode 100644 index 000000000..ddc354058 --- /dev/null +++ b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dataobject/admin/DepartmentDO.java @@ -0,0 +1,35 @@ +package cn.iocoder.mall.system.biz.dataobject.admin; + +import cn.iocoder.common.framework.dataobject.DeletableDO; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + * 部门实体 + */ +@TableName(value = "department") +@Data +@EqualsAndHashCode(callSuper = true) +@Accessors(chain = true) +public class DepartmentDO extends DeletableDO { + + /** + * 部门编号 + */ + private Integer id; + /** + * 部门名称 + */ + private String name; + /** + * 排序值 + */ + private Integer sort; + /** + * 父级部门编号 + */ + private Integer pid; + +} diff --git a/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dataobject/oauth2/OAuth2AccessTokenDO.java b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dataobject/oauth2/OAuth2AccessTokenDO.java new file mode 100644 index 000000000..bec913377 --- /dev/null +++ b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dataobject/oauth2/OAuth2AccessTokenDO.java @@ -0,0 +1,49 @@ +package cn.iocoder.mall.system.biz.dataobject.oauth2; + +import cn.iocoder.common.framework.dataobject.BaseDO; +import cn.iocoder.mall.system.biz.dataobject.account.AccountDO; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.util.Date; + +/** + * OAuth2 访问令牌 + */ +@TableName("oauth2_access_token") +@Data +@EqualsAndHashCode(callSuper = true) +@Accessors(chain = true) +public class OAuth2AccessTokenDO extends BaseDO { + + /** + * 访问令牌 + */ + @TableId(type = IdType.INPUT) + private String id; + /** + * 刷新令牌 + * + * 关联 {@link OAuth2RefreshTokenDO#getId()} + */ + private String refreshToken; + /** + * 账号编号 + * + * 关联 {@link AccountDO#getId()} + */ + private Integer accountId; + /** + * 过期时间 + */ + private Date expiresTime; + /** + * 是否有效 + */ + private Boolean valid; + +} diff --git a/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dataobject/oauth2/OAuth2RefreshTokenDO.java b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dataobject/oauth2/OAuth2RefreshTokenDO.java new file mode 100644 index 000000000..ddd4e51b7 --- /dev/null +++ b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dataobject/oauth2/OAuth2RefreshTokenDO.java @@ -0,0 +1,45 @@ +package cn.iocoder.mall.system.biz.dataobject.oauth2; + +import cn.iocoder.common.framework.dataobject.BaseDO; +import cn.iocoder.mall.system.biz.dataobject.account.AccountDO; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.util.Date; + +/** + * OAuth2 刷新令牌 + * + * idx_uid + */ +@TableName("oauth2_refresh_token") +@Data +@EqualsAndHashCode(callSuper = true) +@Accessors(chain = true) +public class OAuth2RefreshTokenDO extends BaseDO { + + /** + * 刷新令牌 + */ + @TableId(type = IdType.INPUT) + private String id; + /** + * 账号编号 + * + * 关联 {@link AccountDO#getId()} + */ + private Integer accountId; + /** + * 是否有效 + */ + private Boolean valid; + /** + * 过期时间 + */ + private Date expiresTime; + +} diff --git a/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dataobject/user/UserDO.java b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dataobject/user/UserDO.java new file mode 100644 index 000000000..8a6ca010b --- /dev/null +++ b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dataobject/user/UserDO.java @@ -0,0 +1,38 @@ +package cn.iocoder.mall.system.biz.dataobject.user; + +import cn.iocoder.common.framework.dataobject.DeletableDO; +import cn.iocoder.mall.system.biz.dataobject.account.AccountDO; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + * 用户实体 + */ +@TableName(value = "user") +@Data +@EqualsAndHashCode(callSuper = true) +@Accessors(chain = true) +public class UserDO extends DeletableDO { + + /** + * 用户编号 + */ + private Integer id; + /** + * 账号编号 + * + * 关联 {@link AccountDO#getId()} + */ + private Integer accountId; + /** + * 昵称 + */ + private String nickname; + /** + * 头像 + */ + private String avatar; + +} diff --git a/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dto/oatuh2/OAuth2UsernameAuthenticateDTO.java b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dto/oatuh2/OAuth2UsernameAuthenticateDTO.java new file mode 100644 index 000000000..c132c4118 --- /dev/null +++ b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dto/oatuh2/OAuth2UsernameAuthenticateDTO.java @@ -0,0 +1,14 @@ +package cn.iocoder.mall.system.biz.dto.oatuh2; + +import lombok.Data; +import lombok.experimental.Accessors; + +// TODO 注释 +@Data +@Accessors(chain = true) +public class OAuth2UsernameAuthenticateDTO { + + private String username; + private String password; + +} diff --git a/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dto/package-info.java b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dto/package-info.java new file mode 100644 index 000000000..9aec12d5c --- /dev/null +++ b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dto/package-info.java @@ -0,0 +1 @@ +package cn.iocoder.mall.system.biz.dto; diff --git a/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/account/AccountService.java b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/account/AccountService.java new file mode 100644 index 000000000..9c50c2ace --- /dev/null +++ b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/account/AccountService.java @@ -0,0 +1,14 @@ +package cn.iocoder.mall.system.biz.service.account; + +import cn.iocoder.mall.system.biz.bo.account.AccountBO; + +/** + * 账号 Service 接口 + */ +public interface AccountService { + + AccountBO getByUsername(String username); + + boolean matchPassword(String rawPassword, String encodedPassword); + +} diff --git a/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/account/impl/AccountServiceImpl.java b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/account/impl/AccountServiceImpl.java new file mode 100644 index 000000000..cffa8e338 --- /dev/null +++ b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/account/impl/AccountServiceImpl.java @@ -0,0 +1,30 @@ +package cn.iocoder.mall.system.biz.service.account.impl; + +import cn.iocoder.mall.system.biz.bo.account.AccountBO; +import cn.iocoder.mall.system.biz.convert.AccountConvert; +import cn.iocoder.mall.system.biz.dao.account.AccountMapper; +import cn.iocoder.mall.system.biz.dataobject.account.AccountDO; +import cn.iocoder.mall.system.biz.service.account.AccountService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Objects; + +@Service +public class AccountServiceImpl implements AccountService { + + @Autowired + private AccountMapper accountMapper; + + @Override + public AccountBO getByUsername(String username) { + AccountDO accountDO = accountMapper.selectByUsername(username); + return AccountConvert.INSTANCE.convert(accountDO); + } + + @Override + public boolean matchPassword(String rawPassword, String encodedPassword) { + return Objects.equals(rawPassword, encodedPassword); + } + +} diff --git a/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/admin/AdminService.java b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/admin/AdminService.java new file mode 100644 index 000000000..b5221e904 --- /dev/null +++ b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/admin/AdminService.java @@ -0,0 +1,9 @@ +package cn.iocoder.mall.system.biz.service.admin; + +import cn.iocoder.mall.system.biz.bo.admin.AdminBO; + +public interface AdminService { + + AdminBO get(Integer id); + +} diff --git a/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/admin/impl/AdminServiceImpl.java b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/admin/impl/AdminServiceImpl.java new file mode 100644 index 000000000..f2abd65d9 --- /dev/null +++ b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/admin/impl/AdminServiceImpl.java @@ -0,0 +1,23 @@ +package cn.iocoder.mall.system.biz.service.admin.impl; + +import cn.iocoder.mall.system.biz.bo.admin.AdminBO; +import cn.iocoder.mall.system.biz.convert.AdminConvert; +import cn.iocoder.mall.system.biz.dao.admin.AdminMapper; +import cn.iocoder.mall.system.biz.dataobject.admin.AdminDO; +import cn.iocoder.mall.system.biz.service.admin.AdminService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class AdminServiceImpl implements AdminService { + + @Autowired + private AdminMapper adminMapper; + + @Override + public AdminBO get(Integer id) { + AdminDO adminDO = adminMapper.selectById(id); + return AdminConvert.INSTANCE.convert(adminDO); + } + +} diff --git a/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/oauth2/OAuth2Service.java b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/oauth2/OAuth2Service.java new file mode 100644 index 000000000..93969079d --- /dev/null +++ b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/oauth2/OAuth2Service.java @@ -0,0 +1,13 @@ +package cn.iocoder.mall.system.biz.service.oauth2; + +import cn.iocoder.mall.system.biz.bo.ouath2.OAuth2AccessTokenBO; +import cn.iocoder.mall.system.biz.dto.oatuh2.OAuth2UsernameAuthenticateDTO; + +/** + * OAuth2 Service 接口 + */ +public interface OAuth2Service { + + OAuth2AccessTokenBO authenticate(OAuth2UsernameAuthenticateDTO usernameAuthenticateDTO); + +} diff --git a/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/oauth2/impl/OAuth2ServiceImpl.java b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/oauth2/impl/OAuth2ServiceImpl.java new file mode 100644 index 000000000..1f15c498d --- /dev/null +++ b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/oauth2/impl/OAuth2ServiceImpl.java @@ -0,0 +1,95 @@ +package cn.iocoder.mall.system.biz.service.oauth2.impl; + +import cn.iocoder.common.framework.util.ServiceExceptionUtil; +import cn.iocoder.mall.system.biz.bo.account.AccountBO; +import cn.iocoder.mall.system.biz.bo.ouath2.OAuth2AccessTokenBO; +import cn.iocoder.mall.system.biz.convert.OAuth2Convert; +import cn.iocoder.mall.system.biz.dao.oauth2.OAuth2AccessTokenMapper; +import cn.iocoder.mall.system.biz.dao.oauth2.OAuth2RefreshTokenMapper; +import cn.iocoder.mall.system.biz.dataobject.oauth2.OAuth2AccessTokenDO; +import cn.iocoder.mall.system.biz.dataobject.oauth2.OAuth2RefreshTokenDO; +import cn.iocoder.mall.system.biz.dto.oatuh2.OAuth2UsernameAuthenticateDTO; +import cn.iocoder.mall.system.biz.service.account.AccountService; +import cn.iocoder.mall.system.biz.service.oauth2.OAuth2Service; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Date; +import java.util.UUID; + +import static cn.iocoder.mall.system.biz.constant.SystemErrorCodeEnum.OAUTH2_ACCOUNT_NOT_FOUND; +import static cn.iocoder.mall.system.biz.constant.SystemErrorCodeEnum.OAUTH2_ACCOUNT_PASSWORD_ERROR; + +@Service +public class OAuth2ServiceImpl implements OAuth2Service { + + /** + * 访问令牌过期时间,单位:毫秒 + */ + @Value("${modules.oauth2-code-service.access-token-expire-time-millis}") + private int accessTokenExpireTimeMillis; + /** + * 刷新令牌过期时间,单位:毫秒 + */ + @Value("${modules.oauth2-code-service.refresh-token-expire-time-millis}") + private int refreshTokenExpireTimeMillis; + + @Autowired + private AccountService accountService; + + @Autowired + private OAuth2AccessTokenMapper oauth2AccessTokenMapper; + @Autowired + private OAuth2RefreshTokenMapper oauth2RefreshTokenMapper; + + @Override + @Transactional + public OAuth2AccessTokenBO authenticate(OAuth2UsernameAuthenticateDTO usernameAuthenticateDTO) { + // 获得账号 + AccountBO accountBO = accountService.getByUsername(usernameAuthenticateDTO.getUsername()); + if (accountBO == null) { + throw ServiceExceptionUtil.exception(OAUTH2_ACCOUNT_NOT_FOUND); + } + // 校验密码 + if (!accountService.matchPassword(usernameAuthenticateDTO.getPassword(), accountBO.getPassword())) { + throw ServiceExceptionUtil.exception(OAUTH2_ACCOUNT_PASSWORD_ERROR); + } + // 创建刷新令牌 + 访问令牌 + OAuth2RefreshTokenDO oauth2RefreshTokenDO = createOAuth2RefreshToken(accountBO.getId()); + OAuth2AccessTokenDO oauth2AccessTokenDO = createOAuth2AccessToken(accountBO.getId(), oauth2RefreshTokenDO.getId()); + // 返回访问令牌 + return OAuth2Convert.INSTANCE.convert(oauth2AccessTokenDO); + } + + private OAuth2AccessTokenDO createOAuth2AccessToken(Integer accountId, String refreshToken) { + OAuth2AccessTokenDO accessToken = new OAuth2AccessTokenDO() + .setId(generateAccessToken()) + .setAccountId(accountId) + .setRefreshToken(refreshToken) + .setExpiresTime(new Date(System.currentTimeMillis() + accessTokenExpireTimeMillis)) + .setValid(true); + oauth2AccessTokenMapper.insert(accessToken); + return accessToken; + } + + private OAuth2RefreshTokenDO createOAuth2RefreshToken(Integer accountId) { + OAuth2RefreshTokenDO refreshToken = new OAuth2RefreshTokenDO() + .setId(generateRefreshToken()) + .setAccountId(accountId) + .setExpiresTime(new Date(System.currentTimeMillis() + refreshTokenExpireTimeMillis)) + .setValid(true); + oauth2RefreshTokenMapper.insert(refreshToken); + return refreshToken; + } + + private String generateAccessToken() { + return UUID.randomUUID().toString().replaceAll("-", ""); + } + + private String generateRefreshToken() { + return UUID.randomUUID().toString().replaceAll("-", ""); + } + +} diff --git a/system/system-biz/src/main/resources/biz.properties b/system/system-biz/src/main/resources/biz.properties new file mode 100644 index 000000000..2196c16be --- /dev/null +++ b/system/system-biz/src/main/resources/biz.properties @@ -0,0 +1,4 @@ +##################### 业务模块 ##################### +## OAuth2CodeService +modules.oauth2-code-service.access-token-expire-time-millis = 2880000 +modules.oauth2-code-service.refresh-token-expire-time-millis = 43200000 \ No newline at end of file diff --git a/system/system-biz/src/main/resources/biz.yaml b/system/system-biz/src/main/resources/biz.yaml new file mode 100644 index 000000000..133cfe8d1 --- /dev/null +++ b/system/system-biz/src/main/resources/biz.yaml @@ -0,0 +1,20 @@ +spring: + # 数据源配置项 + datasource: + url: jdbc:mysql://s1.iocoder.cn:3306/mall_system?useSSL=false&useUnicode=true&characterEncoding=UTF-8 + driver-class-name: com.mysql.jdbc.Driver + username: root + password: ${MALL_MYSQL_PASSWORD} + +# MyBatis Plus 配置项 +mybatis-plus: + configuration: + map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。 + global-config: + db-config: + id-type: auto + logic-delete-value: 1 # 逻辑已删除值(默认为 1) + logic-not-delete-value: 0 # 逻辑未删除值(默认为 0) + mapper-locations: classpath*:mapper/*.xml + type-aliases-package: cn.iocoder.mall.system.biz.dataobject + diff --git a/system/system-rest/pom.xml b/system/system-rest/pom.xml new file mode 100644 index 000000000..ba66e1fb3 --- /dev/null +++ b/system/system-rest/pom.xml @@ -0,0 +1,41 @@ + + + + system + cn.iocoder.mall + 1.0-SNAPSHOT + + 4.0.0 + + system-rest + 提供 system 服务的 Rest 接口的实现,提供对外调用 + + + + + cn.iocoder.mall + system-biz + 1.0-SNAPSHOT + + + + + org.springframework.boot + spring-boot-starter-web + + + + + io.springfox + springfox-swagger2 + + + com.github.xiaoymin + swagger-bootstrap-ui + + + + + diff --git a/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/controller/admin/AdminsOAuth2Controller.java b/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/controller/admin/AdminsOAuth2Controller.java new file mode 100644 index 000000000..37a074ba8 --- /dev/null +++ b/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/controller/admin/AdminsOAuth2Controller.java @@ -0,0 +1,50 @@ +package cn.iocoder.mall.system.rest.controller.admin; + +import cn.iocoder.common.framework.constant.MallConstants; +import cn.iocoder.common.framework.util.ServiceExceptionUtil; +import cn.iocoder.common.framework.vo.CommonResult; +import cn.iocoder.mall.system.biz.bo.admin.AdminBO; +import cn.iocoder.mall.system.biz.bo.ouath2.OAuth2AccessTokenBO; +import cn.iocoder.mall.system.biz.dto.oatuh2.OAuth2UsernameAuthenticateDTO; +import cn.iocoder.mall.system.biz.service.admin.AdminService; +import cn.iocoder.mall.system.biz.service.oauth2.OAuth2Service; +import cn.iocoder.mall.system.rest.convert.oauth2.AdminsOAuth2Convert; +import cn.iocoder.mall.system.rest.request.oauth2.AdminsOAuth2UsernameAuthenticateRequest; +import cn.iocoder.mall.system.rest.response.AdminsAuthorizeUsernameLoginResponse; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import static cn.iocoder.mall.system.biz.constant.SystemErrorCodeEnum.*; + +@RestController +@RequestMapping(MallConstants.ROOT_PATH_ADMIN + "/oauth2") +@Api(tags = "管理员 - OAuth2 API") +public class AdminsOAuth2Controller { + + @Autowired + private OAuth2Service oauth2Service; + @Autowired + private AdminService adminService; + + @PostMapping("/username_authenticate") + @ApiOperation("用户名认证") + public CommonResult usernameAuthenticate(AdminsOAuth2UsernameAuthenticateRequest request) { + // 执行认证 + OAuth2UsernameAuthenticateDTO usernameAuthenticateDTO = AdminsOAuth2Convert.INSTANCE.convert(request); + OAuth2AccessTokenBO accessTokenBO = oauth2Service.authenticate(usernameAuthenticateDTO); + // 获得 Admin 信息 + AdminBO adminBO = adminService.get(accessTokenBO.getAccountId()); + if (adminBO == null) { + throw ServiceExceptionUtil.exception(ADMIN_NOT_FOUND); + } + // 转换返回 + return CommonResult.success( + AdminsOAuth2Convert.INSTANCE.convert(adminBO, accessTokenBO) + ); + } + +} diff --git a/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/convert/admin/AdminsAdminConvert.java b/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/convert/admin/AdminsAdminConvert.java new file mode 100644 index 000000000..59ccceb50 --- /dev/null +++ b/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/convert/admin/AdminsAdminConvert.java @@ -0,0 +1,15 @@ +package cn.iocoder.mall.system.rest.convert.admin; + +import cn.iocoder.mall.system.biz.bo.account.AccountUsernameAuthorizeBO; +import cn.iocoder.mall.system.rest.request.oauth2.AdminsOAuth2UsernameAuthenticateRequest; +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; + +@Mapper +public interface AdminsAdminConvert { + + AdminsAdminConvert INSTANCE = Mappers.getMapper(AdminsAdminConvert.class); + + AccountUsernameAuthorizeBO convert(AdminsOAuth2UsernameAuthenticateRequest request); + +} diff --git a/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/convert/oauth2/AdminsOAuth2Convert.java b/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/convert/oauth2/AdminsOAuth2Convert.java new file mode 100644 index 000000000..9c5a64890 --- /dev/null +++ b/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/convert/oauth2/AdminsOAuth2Convert.java @@ -0,0 +1,29 @@ +package cn.iocoder.mall.system.rest.convert.oauth2; + +import cn.iocoder.mall.system.biz.bo.admin.AdminBO; +import cn.iocoder.mall.system.biz.bo.ouath2.OAuth2AccessTokenBO; +import cn.iocoder.mall.system.biz.dto.oatuh2.OAuth2UsernameAuthenticateDTO; +import cn.iocoder.mall.system.rest.request.oauth2.AdminsOAuth2UsernameAuthenticateRequest; +import cn.iocoder.mall.system.rest.response.AdminsAuthorizeUsernameLoginResponse; +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; +import org.mapstruct.Mappings; +import org.mapstruct.factory.Mappers; + +@Mapper +public interface AdminsOAuth2Convert { + + AdminsOAuth2Convert INSTANCE = Mappers.getMapper(AdminsOAuth2Convert.class); + + OAuth2UsernameAuthenticateDTO convert(AdminsOAuth2UsernameAuthenticateRequest request); + + @Mappings(value = { + @Mapping(source = "adminBO.id", target = "id"), + @Mapping(source = "adminBO.name", target = "name"), + @Mapping(source = "accessTokenBO.id", target = "token.accessToken"), + @Mapping(source = "accessTokenBO.refreshToken", target = "token.refreshToken"), + @Mapping(source = "accessTokenBO.expiresTime", target = "token.expiresTime"), + }) + AdminsAuthorizeUsernameLoginResponse convert(AdminBO adminBO, OAuth2AccessTokenBO accessTokenBO); + +} diff --git a/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/request/oauth2/AdminsOAuth2UsernameAuthenticateRequest.java b/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/request/oauth2/AdminsOAuth2UsernameAuthenticateRequest.java new file mode 100644 index 000000000..2388568f3 --- /dev/null +++ b/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/request/oauth2/AdminsOAuth2UsernameAuthenticateRequest.java @@ -0,0 +1,28 @@ +package cn.iocoder.mall.system.rest.request.oauth2; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.Pattern; + +@ApiModel("管理员 - OAuth2 模块 - 用户名认证请求") +@Data +@Accessors(chain = true) +public class AdminsOAuth2UsernameAuthenticateRequest { + + @ApiModelProperty(value = "用户名", required = true, example = "yudaoyuanma") + @NotEmpty(message = "登陆账号不能为空") + @Length(min = 5, max = 16, message = "账号长度为 5-16 位") + @Pattern(regexp = "^[A-Za-z0-9]+$", message = "账号格式为数字以及字母") + private String username; + + @ApiModelProperty(value = "用户名", required = true, example = "buzhidao") + @NotEmpty(message = "密码不能为空") + @Length(min = 4, max = 16, message = "密码长度为 4-16 位") + private String password; + +} diff --git a/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/request/package-info.java b/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/request/package-info.java new file mode 100644 index 000000000..e32a10993 --- /dev/null +++ b/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/request/package-info.java @@ -0,0 +1 @@ +package cn.iocoder.mall.system.rest.request; diff --git a/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/response/AdminsAuthorizeUsernameLoginResponse.java b/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/response/AdminsAuthorizeUsernameLoginResponse.java new file mode 100644 index 000000000..becfb23a6 --- /dev/null +++ b/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/response/AdminsAuthorizeUsernameLoginResponse.java @@ -0,0 +1,40 @@ +package cn.iocoder.mall.system.rest.response; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; + +import java.util.Date; + +@ApiModel("管理员 - 认证 - 用户名登陆响应") +@Data +@Accessors(chain = true) +public class AdminsAuthorizeUsernameLoginResponse { + + @Data + public static class Token { + + @ApiModelProperty(value = "access token", required = true, example = "001e8f49b20e47f7b3a2de774497cd50") + private String accessToken; + + @ApiModelProperty(value = "refresh token", required = true, example = "001e8f49b20e47f7b3a2de774497cd50") + private String refreshToken; + + @ApiModelProperty(value = "过期时间", required = true) + private Date expiresTime; + + } + + @ApiModelProperty(value = "管理员编号", required = true, example = "1") + private Integer id; + + @ApiModelProperty(value = "真实名字", required = true, example = "小王") + private String name; + + /** + * TODO 晚点测试下 swagger 的表现 + */ + private Token token; + +} diff --git a/system/system-rest/src/main/resources/rest.yaml b/system/system-rest/src/main/resources/rest.yaml new file mode 100644 index 000000000..1cc2e20a1 --- /dev/null +++ b/system/system-rest/src/main/resources/rest.yaml @@ -0,0 +1,5 @@ +# 服务器的配置项 +server: + port: 18083 + servlet: + context-path: /system-api/ diff --git a/system/system-rpc-api/pom.xml b/system/system-rpc-api/pom.xml new file mode 100644 index 000000000..383439704 --- /dev/null +++ b/system/system-rpc-api/pom.xml @@ -0,0 +1,15 @@ + + + + system + cn.iocoder.mall + 1.0-SNAPSHOT + + 4.0.0 + + system-rpc-api + + + diff --git a/system/system-rpc-api/src/main/java/cn/iocoder/mall/system/rpc/package-info.java b/system/system-rpc-api/src/main/java/cn/iocoder/mall/system/rpc/package-info.java new file mode 100644 index 000000000..92296b181 --- /dev/null +++ b/system/system-rpc-api/src/main/java/cn/iocoder/mall/system/rpc/package-info.java @@ -0,0 +1,4 @@ +/** + * 提供 system 服务的 RPC 接口的定义,提供内部调用 + */ +package cn.iocoder.mall.system.rpc; diff --git a/system/system-rpc/pom.xml b/system/system-rpc/pom.xml new file mode 100644 index 000000000..6f4e454bf --- /dev/null +++ b/system/system-rpc/pom.xml @@ -0,0 +1,15 @@ + + + + system + cn.iocoder.mall + 1.0-SNAPSHOT + + 4.0.0 + + system-rpc + + + diff --git a/system/system-rpc/src/main/java/cn/iocoder/mall/system/rpc/package-info.java b/system/system-rpc/src/main/java/cn/iocoder/mall/system/rpc/package-info.java new file mode 100644 index 000000000..24f83ae9e --- /dev/null +++ b/system/system-rpc/src/main/java/cn/iocoder/mall/system/rpc/package-info.java @@ -0,0 +1,4 @@ +/** + * 提供 system 服务的 RPC 接口的实现,提供内部调用 + */ +package cn.iocoder.mall.system.rpc; diff --git a/system/system-sdk/src/main/java/cn/iocoder/mall/admin/sdk/package-info.java b/system/system-sdk/src/main/java/cn/iocoder/mall/admin/sdk/package-info.java deleted file mode 100644 index 6bf9633cd..000000000 --- a/system/system-sdk/src/main/java/cn/iocoder/mall/admin/sdk/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -/** - * 提供 SDK 给其它服务,使用如下功能: - * - * 1. 通过 {@link cn.iocoder.mall.admin.sdk.interceptor.AdminSecurityInterceptor} 拦截器,实现需要登陆 URL 的鉴权 - */ -package cn.iocoder.mall.admin.sdk; diff --git a/system/system-sdk/src/main/java/cn/iocoder/mall/admin/sdk/annotation/RequiresPermissions.java b/system/system-sdk/src/main/java/cn/iocoder/mall/system/sdk/annotation/RequiresPermissions.java similarity index 92% rename from system/system-sdk/src/main/java/cn/iocoder/mall/admin/sdk/annotation/RequiresPermissions.java rename to system/system-sdk/src/main/java/cn/iocoder/mall/system/sdk/annotation/RequiresPermissions.java index 4dee66263..e1d472823 100644 --- a/system/system-sdk/src/main/java/cn/iocoder/mall/admin/sdk/annotation/RequiresPermissions.java +++ b/system/system-sdk/src/main/java/cn/iocoder/mall/system/sdk/annotation/RequiresPermissions.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.sdk.annotation; +package cn.iocoder.mall.system.sdk.annotation; import java.lang.annotation.*; diff --git a/system/system-sdk/src/main/java/cn/iocoder/mall/admin/sdk/constant/LogicalEnum.java b/system/system-sdk/src/main/java/cn/iocoder/mall/system/sdk/constant/LogicalEnum.java similarity index 75% rename from system/system-sdk/src/main/java/cn/iocoder/mall/admin/sdk/constant/LogicalEnum.java rename to system/system-sdk/src/main/java/cn/iocoder/mall/system/sdk/constant/LogicalEnum.java index b417c3d1d..edc626b9f 100644 --- a/system/system-sdk/src/main/java/cn/iocoder/mall/admin/sdk/constant/LogicalEnum.java +++ b/system/system-sdk/src/main/java/cn/iocoder/mall/system/sdk/constant/LogicalEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.sdk.constant; +package cn.iocoder.mall.system.sdk.constant; /** * 逻辑类型枚举 diff --git a/system/system-sdk/src/main/java/cn/iocoder/mall/admin/sdk/context/AdminSecurityContext.java b/system/system-sdk/src/main/java/cn/iocoder/mall/system/sdk/context/AdminSecurityContext.java similarity index 90% rename from system/system-sdk/src/main/java/cn/iocoder/mall/admin/sdk/context/AdminSecurityContext.java rename to system/system-sdk/src/main/java/cn/iocoder/mall/system/sdk/context/AdminSecurityContext.java index 053d407f1..c1679f789 100644 --- a/system/system-sdk/src/main/java/cn/iocoder/mall/admin/sdk/context/AdminSecurityContext.java +++ b/system/system-sdk/src/main/java/cn/iocoder/mall/system/sdk/context/AdminSecurityContext.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.sdk.context; +package cn.iocoder.mall.system.sdk.context; import lombok.Data; import lombok.experimental.Accessors; diff --git a/system/system-sdk/src/main/java/cn/iocoder/mall/admin/sdk/context/AdminSecurityContextHolder.java b/system/system-sdk/src/main/java/cn/iocoder/mall/system/sdk/context/AdminSecurityContextHolder.java similarity index 94% rename from system/system-sdk/src/main/java/cn/iocoder/mall/admin/sdk/context/AdminSecurityContextHolder.java rename to system/system-sdk/src/main/java/cn/iocoder/mall/system/sdk/context/AdminSecurityContextHolder.java index 7e110ce8a..569d91f4a 100644 --- a/system/system-sdk/src/main/java/cn/iocoder/mall/admin/sdk/context/AdminSecurityContextHolder.java +++ b/system/system-sdk/src/main/java/cn/iocoder/mall/system/sdk/context/AdminSecurityContextHolder.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.sdk.context; +package cn.iocoder.mall.system.sdk.context; /** * {@link AdminSecurityContext} Holder diff --git a/system/system-sdk/src/main/java/cn/iocoder/mall/admin/sdk/interceptor/AdminDemoInterceptor.java b/system/system-sdk/src/main/java/cn/iocoder/mall/system/sdk/interceptor/AdminDemoInterceptor.java similarity index 81% rename from system/system-sdk/src/main/java/cn/iocoder/mall/admin/sdk/interceptor/AdminDemoInterceptor.java rename to system/system-sdk/src/main/java/cn/iocoder/mall/system/sdk/interceptor/AdminDemoInterceptor.java index e28a30e78..e605f42b3 100644 --- a/system/system-sdk/src/main/java/cn/iocoder/mall/admin/sdk/interceptor/AdminDemoInterceptor.java +++ b/system/system-sdk/src/main/java/cn/iocoder/mall/system/sdk/interceptor/AdminDemoInterceptor.java @@ -1,9 +1,9 @@ -package cn.iocoder.mall.admin.sdk.interceptor; +package cn.iocoder.mall.system.sdk.interceptor; import cn.iocoder.common.framework.util.ServiceExceptionUtil; -import cn.iocoder.mall.admin.api.constant.AdminConstants; -import cn.iocoder.mall.admin.api.constant.AdminErrorCodeEnum; -import cn.iocoder.mall.admin.sdk.context.AdminSecurityContextHolder; +import cn.iocoder.mall.system.api.constant.AdminConstants; +import cn.iocoder.mall.system.api.constant.AdminErrorCodeEnum; +import cn.iocoder.mall.system.sdk.context.AdminSecurityContextHolder; import org.springframework.http.HttpMethod; import org.springframework.stereotype.Component; import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; diff --git a/system/system-sdk/src/main/java/cn/iocoder/mall/admin/sdk/interceptor/AdminSecurityInterceptor.java b/system/system-sdk/src/main/java/cn/iocoder/mall/system/sdk/interceptor/AdminSecurityInterceptor.java similarity index 88% rename from system/system-sdk/src/main/java/cn/iocoder/mall/admin/sdk/interceptor/AdminSecurityInterceptor.java rename to system/system-sdk/src/main/java/cn/iocoder/mall/system/sdk/interceptor/AdminSecurityInterceptor.java index fe0201fbc..da0a5d303 100644 --- a/system/system-sdk/src/main/java/cn/iocoder/mall/admin/sdk/interceptor/AdminSecurityInterceptor.java +++ b/system/system-sdk/src/main/java/cn/iocoder/mall/system/sdk/interceptor/AdminSecurityInterceptor.java @@ -1,19 +1,19 @@ -package cn.iocoder.mall.admin.sdk.interceptor; +package cn.iocoder.mall.system.sdk.interceptor; import cn.iocoder.common.framework.constant.UserTypeEnum; import cn.iocoder.common.framework.exception.ServiceException; import cn.iocoder.common.framework.util.HttpUtil; import cn.iocoder.common.framework.util.MallUtil; import cn.iocoder.common.framework.util.StringUtil; -import cn.iocoder.mall.admin.api.AdminService; -import cn.iocoder.mall.admin.api.OAuth2Service; -import cn.iocoder.mall.admin.api.bo.admin.AdminAuthorizationBO; -import cn.iocoder.mall.admin.api.bo.oauth2.OAuth2AuthenticationBO; -import cn.iocoder.mall.admin.api.constant.AdminErrorCodeEnum; -import cn.iocoder.mall.admin.api.dto.oauth2.OAuth2GetTokenDTO; -import cn.iocoder.mall.admin.sdk.annotation.RequiresPermissions; -import cn.iocoder.mall.admin.sdk.context.AdminSecurityContext; -import cn.iocoder.mall.admin.sdk.context.AdminSecurityContextHolder; +import cn.iocoder.mall.system.api.AdminService; +import cn.iocoder.mall.system.api.OAuth2Service; +import cn.iocoder.mall.system.api.bo.admin.AdminAuthorizationBO; +import cn.iocoder.mall.system.api.bo.oauth2.OAuth2AuthenticationBO; +import cn.iocoder.mall.system.api.constant.AdminErrorCodeEnum; +import cn.iocoder.mall.system.api.dto.oauth2.OAuth2GetTokenDTO; +import cn.iocoder.mall.system.sdk.annotation.RequiresPermissions; +import cn.iocoder.mall.system.sdk.context.AdminSecurityContext; +import cn.iocoder.mall.system.sdk.context.AdminSecurityContextHolder; import org.apache.dubbo.config.annotation.Reference; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; diff --git a/system/system-sdk/src/main/java/cn/iocoder/mall/system/sdk/package-info.java b/system/system-sdk/src/main/java/cn/iocoder/mall/system/sdk/package-info.java new file mode 100644 index 000000000..d0f606584 --- /dev/null +++ b/system/system-sdk/src/main/java/cn/iocoder/mall/system/sdk/package-info.java @@ -0,0 +1,6 @@ +/** + * 提供 SDK 给其它服务,使用如下功能: + * + * 1. 通过 {@link cn.iocoder.mall.system.sdk.interceptor.AdminSecurityInterceptor} 拦截器,实现需要登陆 URL 的鉴权 + */ +package cn.iocoder.mall.system.sdk; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/AdminService.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/AdminService.java similarity index 85% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/AdminService.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/AdminService.java index dac695c57..90dcdbc44 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/AdminService.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/AdminService.java @@ -1,11 +1,12 @@ -package cn.iocoder.mall.admin.api; +package cn.iocoder.mall.system.api; import cn.iocoder.common.framework.vo.PageResult; -import cn.iocoder.mall.admin.api.bo.admin.AdminAuthenticationBO; -import cn.iocoder.mall.admin.api.bo.admin.AdminAuthorizationBO; -import cn.iocoder.mall.admin.api.bo.admin.AdminBO; -import cn.iocoder.mall.admin.api.bo.role.RoleBO; +import cn.iocoder.mall.system.api.bo.admin.AdminAuthenticationBO; +import cn.iocoder.mall.system.api.bo.admin.AdminAuthorizationBO; +import cn.iocoder.mall.system.api.bo.admin.AdminBO; +import cn.iocoder.mall.system.api.bo.role.RoleBO; import cn.iocoder.mall.admin.api.dto.admin.*; +import cn.iocoder.mall.system.api.dto.admin.*; import java.util.Collection; import java.util.List; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/DataDictService.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/DataDictService.java similarity index 82% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/DataDictService.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/DataDictService.java index 2d3da6bd3..ab7d60d61 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/DataDictService.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/DataDictService.java @@ -1,9 +1,9 @@ -package cn.iocoder.mall.admin.api; +package cn.iocoder.mall.system.api; import cn.iocoder.common.framework.vo.CommonResult; -import cn.iocoder.mall.admin.api.bo.datadict.DataDictBO; -import cn.iocoder.mall.admin.api.dto.datadict.DataDictAddDTO; -import cn.iocoder.mall.admin.api.dto.datadict.DataDictUpdateDTO; +import cn.iocoder.mall.system.api.bo.datadict.DataDictBO; +import cn.iocoder.mall.system.api.dto.datadict.DataDictAddDTO; +import cn.iocoder.mall.system.api.dto.datadict.DataDictUpdateDTO; import java.util.Collection; import java.util.List; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/DeptmentService.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/DeptmentService.java similarity index 67% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/DeptmentService.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/DeptmentService.java index 66c4f4d74..8fc87aa1e 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/DeptmentService.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/DeptmentService.java @@ -1,10 +1,10 @@ -package cn.iocoder.mall.admin.api; +package cn.iocoder.mall.system.api; import cn.iocoder.common.framework.vo.PageResult; -import cn.iocoder.mall.admin.api.bo.deptment.DeptmentBO; -import cn.iocoder.mall.admin.api.dto.depetment.DeptmentAddDTO; -import cn.iocoder.mall.admin.api.dto.depetment.DeptmentPageDTO; -import cn.iocoder.mall.admin.api.dto.depetment.DeptmentUpdateDTO; +import cn.iocoder.mall.system.api.bo.deptment.DeptmentBO; +import cn.iocoder.mall.system.api.dto.depetment.DeptmentAddDTO; +import cn.iocoder.mall.system.api.dto.depetment.DeptmentPageDTO; +import cn.iocoder.mall.system.api.dto.depetment.DeptmentUpdateDTO; import java.util.List; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/OAuth2Service.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/OAuth2Service.java similarity index 69% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/OAuth2Service.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/OAuth2Service.java index ac38310a3..1065ce71b 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/OAuth2Service.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/OAuth2Service.java @@ -1,11 +1,11 @@ -package cn.iocoder.mall.admin.api; +package cn.iocoder.mall.system.api; -import cn.iocoder.mall.admin.api.bo.oauth2.OAuth2AccessTokenBO; -import cn.iocoder.mall.admin.api.bo.oauth2.OAuth2AuthenticationBO; -import cn.iocoder.mall.admin.api.dto.oauth2.OAuth2CreateTokenDTO; -import cn.iocoder.mall.admin.api.dto.oauth2.OAuth2GetTokenDTO; -import cn.iocoder.mall.admin.api.dto.oauth2.OAuth2RefreshTokenDTO; -import cn.iocoder.mall.admin.api.dto.oauth2.OAuth2RemoveTokenByUserDTO; +import cn.iocoder.mall.system.api.bo.oauth2.OAuth2AccessTokenBO; +import cn.iocoder.mall.system.api.bo.oauth2.OAuth2AuthenticationBO; +import cn.iocoder.mall.system.api.dto.oauth2.OAuth2CreateTokenDTO; +import cn.iocoder.mall.system.api.dto.oauth2.OAuth2GetTokenDTO; +import cn.iocoder.mall.system.api.dto.oauth2.OAuth2RefreshTokenDTO; +import cn.iocoder.mall.system.api.dto.oauth2.OAuth2RemoveTokenByUserDTO; /** * Oauth2 服务接口 diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/ResourceService.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/ResourceService.java similarity index 80% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/ResourceService.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/ResourceService.java index 0af97d266..1ef996b47 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/ResourceService.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/ResourceService.java @@ -1,8 +1,8 @@ -package cn.iocoder.mall.admin.api; +package cn.iocoder.mall.system.api; -import cn.iocoder.mall.admin.api.bo.resource.ResourceBO; -import cn.iocoder.mall.admin.api.dto.resource.ResourceAddDTO; -import cn.iocoder.mall.admin.api.dto.resource.ResourceUpdateDTO; +import cn.iocoder.mall.system.api.bo.resource.ResourceBO; +import cn.iocoder.mall.system.api.dto.resource.ResourceAddDTO; +import cn.iocoder.mall.system.api.dto.resource.ResourceUpdateDTO; import org.springframework.lang.Nullable; import java.util.List; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/RoleService.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/RoleService.java similarity index 66% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/RoleService.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/RoleService.java index 22358ad53..1efed86b3 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/RoleService.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/RoleService.java @@ -1,11 +1,11 @@ -package cn.iocoder.mall.admin.api; +package cn.iocoder.mall.system.api; import cn.iocoder.common.framework.vo.PageResult; -import cn.iocoder.mall.admin.api.bo.role.RoleBO; -import cn.iocoder.mall.admin.api.dto.role.RoleAddDTO; -import cn.iocoder.mall.admin.api.dto.role.RoleAssignResourceDTO; -import cn.iocoder.mall.admin.api.dto.role.RolePageDTO; -import cn.iocoder.mall.admin.api.dto.role.RoleUpdateDTO; +import cn.iocoder.mall.system.api.bo.role.RoleBO; +import cn.iocoder.mall.system.api.dto.role.RoleAddDTO; +import cn.iocoder.mall.system.api.dto.role.RoleAssignResourceDTO; +import cn.iocoder.mall.system.api.dto.role.RolePageDTO; +import cn.iocoder.mall.system.api.dto.role.RoleUpdateDTO; import java.util.Collection; import java.util.List; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/SmsService.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/SmsService.java similarity index 84% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/SmsService.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/SmsService.java index 6b8835963..fe15355c7 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/SmsService.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/SmsService.java @@ -1,11 +1,11 @@ -package cn.iocoder.mall.admin.api; +package cn.iocoder.mall.system.api; -import cn.iocoder.mall.admin.api.bo.sms.SmsSignBO; -import cn.iocoder.mall.admin.api.bo.sms.PageSmsSignBO; -import cn.iocoder.mall.admin.api.bo.sms.SmsTemplateBO; -import cn.iocoder.mall.admin.api.bo.sms.PageSmsTemplateBO; -import cn.iocoder.mall.admin.api.dto.sms.PageQuerySmsSignDTO; -import cn.iocoder.mall.admin.api.dto.sms.PageQuerySmsTemplateDTO; +import cn.iocoder.mall.system.api.bo.sms.SmsSignBO; +import cn.iocoder.mall.system.api.bo.sms.PageSmsSignBO; +import cn.iocoder.mall.system.api.bo.sms.SmsTemplateBO; +import cn.iocoder.mall.system.api.bo.sms.PageSmsTemplateBO; +import cn.iocoder.mall.system.api.dto.sms.PageQuerySmsSignDTO; +import cn.iocoder.mall.system.api.dto.sms.PageQuerySmsTemplateDTO; import java.util.List; import java.util.Map; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/SystemLogService.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/SystemLogService.java similarity index 50% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/SystemLogService.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/SystemLogService.java index fb57da530..da1aab87b 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/SystemLogService.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/SystemLogService.java @@ -1,10 +1,9 @@ -package cn.iocoder.mall.admin.api; +package cn.iocoder.mall.system.api; -import cn.iocoder.common.framework.vo.PageResult; -import cn.iocoder.mall.admin.api.bo.systemlog.AccessLogPageBO; -import cn.iocoder.mall.admin.api.dto.systemlog.AccessLogAddDTO; -import cn.iocoder.mall.admin.api.dto.systemlog.AccessLogPageDTO; -import cn.iocoder.mall.admin.api.dto.systemlog.ExceptionLogAddDTO; +import cn.iocoder.mall.system.api.bo.systemlog.AccessLogPageBO; +import cn.iocoder.mall.system.api.dto.systemlog.AccessLogAddDTO; +import cn.iocoder.mall.system.api.dto.systemlog.AccessLogPageDTO; +import cn.iocoder.mall.system.api.dto.systemlog.ExceptionLogAddDTO; /** * 系统日志 Service 接口 diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/admin/AdminAuthenticationBO.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/admin/AdminAuthenticationBO.java similarity index 82% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/admin/AdminAuthenticationBO.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/admin/AdminAuthenticationBO.java index 905061d36..3e6db4b32 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/admin/AdminAuthenticationBO.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/admin/AdminAuthenticationBO.java @@ -1,6 +1,6 @@ -package cn.iocoder.mall.admin.api.bo.admin; +package cn.iocoder.mall.system.api.bo.admin; -import cn.iocoder.mall.admin.api.bo.oauth2.OAuth2AccessTokenBO; +import cn.iocoder.mall.system.api.bo.oauth2.OAuth2AccessTokenBO; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/admin/AdminAuthorizationBO.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/admin/AdminAuthorizationBO.java similarity index 93% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/admin/AdminAuthorizationBO.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/admin/AdminAuthorizationBO.java index 116a2208f..642a369e5 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/admin/AdminAuthorizationBO.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/admin/AdminAuthorizationBO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.bo.admin; +package cn.iocoder.mall.system.api.bo.admin; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/admin/AdminBO.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/admin/AdminBO.java similarity index 95% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/admin/AdminBO.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/admin/AdminBO.java index 517bff1fc..3af6e1dfa 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/admin/AdminBO.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/admin/AdminBO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.bo.admin; +package cn.iocoder.mall.system.api.bo.admin; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/admin/AdminPageBO.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/admin/AdminPageBO.java similarity index 88% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/admin/AdminPageBO.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/admin/AdminPageBO.java index a93a69e78..18d19c27b 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/admin/AdminPageBO.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/admin/AdminPageBO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.bo.admin; +package cn.iocoder.mall.system.api.bo.admin; import lombok.Data; import lombok.experimental.Accessors; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/datadict/DataDictBO.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/datadict/DataDictBO.java similarity index 93% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/datadict/DataDictBO.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/datadict/DataDictBO.java index 03eafa2c8..71a0dd84a 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/datadict/DataDictBO.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/datadict/DataDictBO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.bo.datadict; +package cn.iocoder.mall.system.api.bo.datadict; import lombok.Data; import lombok.experimental.Accessors; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/deptment/DeptmentBO.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/deptment/DeptmentBO.java similarity index 93% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/deptment/DeptmentBO.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/deptment/DeptmentBO.java index 37d8d874d..d5258edad 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/deptment/DeptmentBO.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/deptment/DeptmentBO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.bo.deptment; +package cn.iocoder.mall.system.api.bo.deptment; import io.swagger.annotations.ApiModel; import lombok.Data; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/oauth2/OAuth2AccessTokenBO.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/oauth2/OAuth2AccessTokenBO.java similarity index 93% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/oauth2/OAuth2AccessTokenBO.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/oauth2/OAuth2AccessTokenBO.java index 8c7126527..f80796f8f 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/oauth2/OAuth2AccessTokenBO.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/oauth2/OAuth2AccessTokenBO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.bo.oauth2; +package cn.iocoder.mall.system.api.bo.oauth2; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/oauth2/OAuth2AuthenticationBO.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/oauth2/OAuth2AuthenticationBO.java similarity index 92% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/oauth2/OAuth2AuthenticationBO.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/oauth2/OAuth2AuthenticationBO.java index 2e5146538..49d21a876 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/oauth2/OAuth2AuthenticationBO.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/oauth2/OAuth2AuthenticationBO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.bo.oauth2; +package cn.iocoder.mall.system.api.bo.oauth2; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/resource/ResourceBO.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/resource/ResourceBO.java similarity index 96% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/resource/ResourceBO.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/resource/ResourceBO.java index 20365719a..0f37593da 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/resource/ResourceBO.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/resource/ResourceBO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.bo.resource; +package cn.iocoder.mall.system.api.bo.resource; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/role/RoleBO.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/role/RoleBO.java similarity index 90% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/role/RoleBO.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/role/RoleBO.java index 6ade9ca96..577cac83c 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/role/RoleBO.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/role/RoleBO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.bo.role; +package cn.iocoder.mall.system.api.bo.role; import lombok.Data; import lombok.experimental.Accessors; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/sms/PageSmsSignBO.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/sms/PageSmsSignBO.java similarity index 96% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/sms/PageSmsSignBO.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/sms/PageSmsSignBO.java index da23d814d..a4482d2b0 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/sms/PageSmsSignBO.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/sms/PageSmsSignBO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.bo.sms; +package cn.iocoder.mall.system.api.bo.sms; import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/sms/PageSmsTemplateBO.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/sms/PageSmsTemplateBO.java similarity index 98% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/sms/PageSmsTemplateBO.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/sms/PageSmsTemplateBO.java index 76c870738..ece12fc9c 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/sms/PageSmsTemplateBO.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/sms/PageSmsTemplateBO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.bo.sms; +package cn.iocoder.mall.system.api.bo.sms; import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/sms/SmsSignBO.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/sms/SmsSignBO.java similarity index 93% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/sms/SmsSignBO.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/sms/SmsSignBO.java index 220b01856..699cc359d 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/sms/SmsSignBO.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/sms/SmsSignBO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.bo.sms; +package cn.iocoder.mall.system.api.bo.sms; import lombok.Data; import lombok.experimental.Accessors; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/sms/SmsTemplateBO.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/sms/SmsTemplateBO.java similarity index 94% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/sms/SmsTemplateBO.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/sms/SmsTemplateBO.java index e2094eeee..35d5f50f1 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/sms/SmsTemplateBO.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/sms/SmsTemplateBO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.bo.sms; +package cn.iocoder.mall.system.api.bo.sms; import lombok.Data; import lombok.experimental.Accessors; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/systemlog/AccessLogBO.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/systemlog/AccessLogBO.java similarity index 92% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/systemlog/AccessLogBO.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/systemlog/AccessLogBO.java index 2a68864af..87ac846f2 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/systemlog/AccessLogBO.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/systemlog/AccessLogBO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.bo.systemlog; +package cn.iocoder.mall.system.api.bo.systemlog; import lombok.Data; import lombok.experimental.Accessors; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/systemlog/AccessLogPageBO.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/systemlog/AccessLogPageBO.java similarity index 89% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/systemlog/AccessLogPageBO.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/systemlog/AccessLogPageBO.java index 92c0a46c5..ec7618fdf 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/systemlog/AccessLogPageBO.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/systemlog/AccessLogPageBO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.bo.systemlog; +package cn.iocoder.mall.system.api.bo.systemlog; import lombok.Data; import lombok.experimental.Accessors; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/constant/AdminConstants.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/constant/AdminConstants.java similarity index 84% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/constant/AdminConstants.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/constant/AdminConstants.java index 3585514a1..3188b4df4 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/constant/AdminConstants.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/constant/AdminConstants.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.constant; +package cn.iocoder.mall.system.api.constant; public class AdminConstants { diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/constant/AdminErrorCodeEnum.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/constant/AdminErrorCodeEnum.java similarity index 98% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/constant/AdminErrorCodeEnum.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/constant/AdminErrorCodeEnum.java index f249fdd28..404706fa3 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/constant/AdminErrorCodeEnum.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/constant/AdminErrorCodeEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.constant; +package cn.iocoder.mall.system.api.constant; /** * 错误码枚举类 diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/constant/DeptmentConstants.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/constant/DeptmentConstants.java similarity index 81% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/constant/DeptmentConstants.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/constant/DeptmentConstants.java index 14a939885..2e94fe987 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/constant/DeptmentConstants.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/constant/DeptmentConstants.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.constant; +package cn.iocoder.mall.system.api.constant; /** * Description: diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/constant/DictKeyConstants.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/constant/DictKeyConstants.java similarity index 69% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/constant/DictKeyConstants.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/constant/DictKeyConstants.java index 363206126..5fb263172 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/constant/DictKeyConstants.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/constant/DictKeyConstants.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.constant; +package cn.iocoder.mall.system.api.constant; /** * 字典 key diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/constant/ResourceConstants.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/constant/ResourceConstants.java similarity index 86% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/constant/ResourceConstants.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/constant/ResourceConstants.java index ee31f1898..58aee79f2 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/constant/ResourceConstants.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/constant/ResourceConstants.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.constant; +package cn.iocoder.mall.system.api.constant; /** * 资源类型 diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/constant/ResourceTypeEnum.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/constant/ResourceTypeEnum.java similarity index 95% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/constant/ResourceTypeEnum.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/constant/ResourceTypeEnum.java index 47e0653bf..94e3dd5ef 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/constant/ResourceTypeEnum.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/constant/ResourceTypeEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.constant; +package cn.iocoder.mall.system.api.constant; import cn.iocoder.common.framework.core.IntArrayValuable; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/constant/SmsApplyStatusEnum.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/constant/SmsApplyStatusEnum.java similarity index 91% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/constant/SmsApplyStatusEnum.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/constant/SmsApplyStatusEnum.java index 4273b8aef..be3203a9f 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/constant/SmsApplyStatusEnum.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/constant/SmsApplyStatusEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.constant; +package cn.iocoder.mall.system.api.constant; /** * 短信审核状态 diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/constant/SmsPlatformEnum.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/constant/SmsPlatformEnum.java similarity index 94% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/constant/SmsPlatformEnum.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/constant/SmsPlatformEnum.java index 50b067ada..28d888c5c 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/constant/SmsPlatformEnum.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/constant/SmsPlatformEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.constant; +package cn.iocoder.mall.system.api.constant; import cn.iocoder.common.framework.core.IntArrayValuable; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/constant/SmsTypeEnum.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/constant/SmsTypeEnum.java similarity index 94% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/constant/SmsTypeEnum.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/constant/SmsTypeEnum.java index aa862efca..d957d8b9c 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/constant/SmsTypeEnum.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/constant/SmsTypeEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.constant; +package cn.iocoder.mall.system.api.constant; import cn.iocoder.common.framework.core.IntArrayValuable; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/admin/AdminAddDTO.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/admin/AdminAddDTO.java similarity index 96% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/admin/AdminAddDTO.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/admin/AdminAddDTO.java index 748b77399..1288e16af 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/admin/AdminAddDTO.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/admin/AdminAddDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.dto.admin; +package cn.iocoder.mall.system.api.dto.admin; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/admin/AdminAssignRoleDTO.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/admin/AdminAssignRoleDTO.java similarity index 92% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/admin/AdminAssignRoleDTO.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/admin/AdminAssignRoleDTO.java index ad42d01b1..0e62933ee 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/admin/AdminAssignRoleDTO.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/admin/AdminAssignRoleDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.dto.admin; +package cn.iocoder.mall.system.api.dto.admin; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/admin/AdminAuthenticationDTO.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/admin/AdminAuthenticationDTO.java similarity index 95% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/admin/AdminAuthenticationDTO.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/admin/AdminAuthenticationDTO.java index ab607dc13..8f273dfd5 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/admin/AdminAuthenticationDTO.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/admin/AdminAuthenticationDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.dto.admin; +package cn.iocoder.mall.system.api.dto.admin; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/admin/AdminPageDTO.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/admin/AdminPageDTO.java similarity index 91% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/admin/AdminPageDTO.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/admin/AdminPageDTO.java index f1e8a1ee7..16fd757eb 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/admin/AdminPageDTO.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/admin/AdminPageDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.dto.admin; +package cn.iocoder.mall.system.api.dto.admin; import cn.iocoder.common.framework.vo.PageParam; import io.swagger.annotations.ApiModel; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/admin/AdminUpdateDTO.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/admin/AdminUpdateDTO.java similarity index 97% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/admin/AdminUpdateDTO.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/admin/AdminUpdateDTO.java index c88c6e05b..b55dde4f8 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/admin/AdminUpdateDTO.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/admin/AdminUpdateDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.dto.admin; +package cn.iocoder.mall.system.api.dto.admin; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/admin/AdminUpdateStatusDTO.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/admin/AdminUpdateStatusDTO.java similarity index 94% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/admin/AdminUpdateStatusDTO.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/admin/AdminUpdateStatusDTO.java index 4155ae8dd..288841217 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/admin/AdminUpdateStatusDTO.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/admin/AdminUpdateStatusDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.dto.admin; +package cn.iocoder.mall.system.api.dto.admin; import cn.iocoder.common.framework.constant.CommonStatusEnum; import cn.iocoder.common.framework.validator.InEnum; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/datadict/DataDictAddDTO.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/datadict/DataDictAddDTO.java similarity index 95% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/datadict/DataDictAddDTO.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/datadict/DataDictAddDTO.java index 378dc5bcb..c22f0309e 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/datadict/DataDictAddDTO.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/datadict/DataDictAddDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.dto.datadict; +package cn.iocoder.mall.system.api.dto.datadict; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/datadict/DataDictUpdateDTO.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/datadict/DataDictUpdateDTO.java similarity index 96% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/datadict/DataDictUpdateDTO.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/datadict/DataDictUpdateDTO.java index bfaa8b747..351075fb5 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/datadict/DataDictUpdateDTO.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/datadict/DataDictUpdateDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.dto.datadict; +package cn.iocoder.mall.system.api.dto.datadict; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/depetment/DeptmentAddDTO.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/depetment/DeptmentAddDTO.java similarity index 94% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/depetment/DeptmentAddDTO.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/depetment/DeptmentAddDTO.java index ba6d9a2c6..611059bec 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/depetment/DeptmentAddDTO.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/depetment/DeptmentAddDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.dto.depetment; +package cn.iocoder.mall.system.api.dto.depetment; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/depetment/DeptmentPageDTO.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/depetment/DeptmentPageDTO.java similarity index 91% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/depetment/DeptmentPageDTO.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/depetment/DeptmentPageDTO.java index 5522c79d4..df3f48c1e 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/depetment/DeptmentPageDTO.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/depetment/DeptmentPageDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.dto.depetment; +package cn.iocoder.mall.system.api.dto.depetment; import cn.iocoder.common.framework.vo.PageParam; import io.swagger.annotations.ApiModel; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/depetment/DeptmentUpdateDTO.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/depetment/DeptmentUpdateDTO.java similarity index 95% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/depetment/DeptmentUpdateDTO.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/depetment/DeptmentUpdateDTO.java index f2539dc14..b094fb64d 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/depetment/DeptmentUpdateDTO.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/depetment/DeptmentUpdateDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.dto.depetment; +package cn.iocoder.mall.system.api.dto.depetment; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/oauth2/OAuth2CreateTokenDTO.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/oauth2/OAuth2CreateTokenDTO.java similarity index 88% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/oauth2/OAuth2CreateTokenDTO.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/oauth2/OAuth2CreateTokenDTO.java index fbd46456c..a34793445 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/oauth2/OAuth2CreateTokenDTO.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/oauth2/OAuth2CreateTokenDTO.java @@ -1,7 +1,7 @@ -package cn.iocoder.mall.admin.api.dto.oauth2; +package cn.iocoder.mall.system.api.dto.oauth2; import cn.iocoder.common.framework.validator.InEnum; -import cn.iocoder.mall.admin.api.constant.ResourceTypeEnum; +import cn.iocoder.mall.system.api.constant.ResourceTypeEnum; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/oauth2/OAuth2GetTokenDTO.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/oauth2/OAuth2GetTokenDTO.java similarity index 89% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/oauth2/OAuth2GetTokenDTO.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/oauth2/OAuth2GetTokenDTO.java index b2d2b602a..4a3c4b323 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/oauth2/OAuth2GetTokenDTO.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/oauth2/OAuth2GetTokenDTO.java @@ -1,7 +1,7 @@ -package cn.iocoder.mall.admin.api.dto.oauth2; +package cn.iocoder.mall.system.api.dto.oauth2; import cn.iocoder.common.framework.validator.InEnum; -import cn.iocoder.mall.admin.api.constant.ResourceTypeEnum; +import cn.iocoder.mall.system.api.constant.ResourceTypeEnum; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/oauth2/OAuth2RefreshTokenDTO.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/oauth2/OAuth2RefreshTokenDTO.java similarity index 89% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/oauth2/OAuth2RefreshTokenDTO.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/oauth2/OAuth2RefreshTokenDTO.java index 9004746a6..61915028c 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/oauth2/OAuth2RefreshTokenDTO.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/oauth2/OAuth2RefreshTokenDTO.java @@ -1,7 +1,7 @@ -package cn.iocoder.mall.admin.api.dto.oauth2; +package cn.iocoder.mall.system.api.dto.oauth2; import cn.iocoder.common.framework.validator.InEnum; -import cn.iocoder.mall.admin.api.constant.ResourceTypeEnum; +import cn.iocoder.mall.system.api.constant.ResourceTypeEnum; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/oauth2/OAuth2RemoveTokenByUserDTO.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/oauth2/OAuth2RemoveTokenByUserDTO.java similarity index 88% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/oauth2/OAuth2RemoveTokenByUserDTO.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/oauth2/OAuth2RemoveTokenByUserDTO.java index a41d7bd14..d9445c364 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/oauth2/OAuth2RemoveTokenByUserDTO.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/oauth2/OAuth2RemoveTokenByUserDTO.java @@ -1,7 +1,7 @@ -package cn.iocoder.mall.admin.api.dto.oauth2; +package cn.iocoder.mall.system.api.dto.oauth2; import cn.iocoder.common.framework.validator.InEnum; -import cn.iocoder.mall.admin.api.constant.ResourceTypeEnum; +import cn.iocoder.mall.system.api.constant.ResourceTypeEnum; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/resource/ResourceAddDTO.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/resource/ResourceAddDTO.java similarity index 93% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/resource/ResourceAddDTO.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/resource/ResourceAddDTO.java index a39ffae19..a2f99d010 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/resource/ResourceAddDTO.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/resource/ResourceAddDTO.java @@ -1,7 +1,7 @@ -package cn.iocoder.mall.admin.api.dto.resource; +package cn.iocoder.mall.system.api.dto.resource; import cn.iocoder.common.framework.validator.InEnum; -import cn.iocoder.mall.admin.api.constant.ResourceTypeEnum; +import cn.iocoder.mall.system.api.constant.ResourceTypeEnum; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/resource/ResourceUpdateDTO.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/resource/ResourceUpdateDTO.java similarity index 93% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/resource/ResourceUpdateDTO.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/resource/ResourceUpdateDTO.java index 9c14186e9..75d744d25 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/resource/ResourceUpdateDTO.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/resource/ResourceUpdateDTO.java @@ -1,7 +1,7 @@ -package cn.iocoder.mall.admin.api.dto.resource; +package cn.iocoder.mall.system.api.dto.resource; import cn.iocoder.common.framework.validator.InEnum; -import cn.iocoder.mall.admin.api.constant.ResourceTypeEnum; +import cn.iocoder.mall.system.api.constant.ResourceTypeEnum; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/role/RoleAddDTO.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/role/RoleAddDTO.java similarity index 92% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/role/RoleAddDTO.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/role/RoleAddDTO.java index 53591c497..2f4e43f64 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/role/RoleAddDTO.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/role/RoleAddDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.dto.role; +package cn.iocoder.mall.system.api.dto.role; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/role/RoleAssignResourceDTO.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/role/RoleAssignResourceDTO.java similarity index 92% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/role/RoleAssignResourceDTO.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/role/RoleAssignResourceDTO.java index 64b1027fb..776b5c929 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/role/RoleAssignResourceDTO.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/role/RoleAssignResourceDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.dto.role; +package cn.iocoder.mall.system.api.dto.role; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/role/RolePageDTO.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/role/RolePageDTO.java similarity index 90% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/role/RolePageDTO.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/role/RolePageDTO.java index 7fe363d70..a9e0f35f8 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/role/RolePageDTO.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/role/RolePageDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.dto.role; +package cn.iocoder.mall.system.api.dto.role; import cn.iocoder.common.framework.vo.PageParam; import io.swagger.annotations.ApiModel; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/role/RoleUpdateDTO.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/role/RoleUpdateDTO.java similarity index 94% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/role/RoleUpdateDTO.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/role/RoleUpdateDTO.java index fc50fe3e3..6cb107f9b 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/role/RoleUpdateDTO.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/role/RoleUpdateDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.dto.role; +package cn.iocoder.mall.system.api.dto.role; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/sms/PageQuerySmsSignDTO.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/sms/PageQuerySmsSignDTO.java similarity index 94% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/sms/PageQuerySmsSignDTO.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/sms/PageQuerySmsSignDTO.java index b69a3193d..38286698d 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/sms/PageQuerySmsSignDTO.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/sms/PageQuerySmsSignDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.dto.sms; +package cn.iocoder.mall.system.api.dto.sms; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/sms/PageQuerySmsTemplateDTO.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/sms/PageQuerySmsTemplateDTO.java similarity index 92% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/sms/PageQuerySmsTemplateDTO.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/sms/PageQuerySmsTemplateDTO.java index 82e13f430..cf0707155 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/sms/PageQuerySmsTemplateDTO.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/sms/PageQuerySmsTemplateDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.dto.sms; +package cn.iocoder.mall.system.api.dto.sms; import lombok.Data; import lombok.experimental.Accessors; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/systemlog/AccessLogAddDTO.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/systemlog/AccessLogAddDTO.java similarity index 96% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/systemlog/AccessLogAddDTO.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/systemlog/AccessLogAddDTO.java index 289f2056c..0c2cb8a7d 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/systemlog/AccessLogAddDTO.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/systemlog/AccessLogAddDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.dto.systemlog; +package cn.iocoder.mall.system.api.dto.systemlog; import lombok.Data; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/systemlog/AccessLogPageDTO.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/systemlog/AccessLogPageDTO.java similarity index 90% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/systemlog/AccessLogPageDTO.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/systemlog/AccessLogPageDTO.java index c4047da63..37f30e9e5 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/systemlog/AccessLogPageDTO.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/systemlog/AccessLogPageDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.dto.systemlog; +package cn.iocoder.mall.system.api.dto.systemlog; import lombok.Data; import lombok.experimental.Accessors; diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/systemlog/ExceptionLogAddDTO.java b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/systemlog/ExceptionLogAddDTO.java similarity index 97% rename from system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/systemlog/ExceptionLogAddDTO.java rename to system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/systemlog/ExceptionLogAddDTO.java index 7cdc61b0e..6bf083c0b 100644 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/dto/systemlog/ExceptionLogAddDTO.java +++ b/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/systemlog/ExceptionLogAddDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.api.dto.systemlog; +package cn.iocoder.mall.system.api.dto.systemlog; import lombok.Data; import lombok.experimental.Accessors; diff --git a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/client/SmsYunPianClient.java b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/client/SmsYunPianClient.java index e9b56f510..db78bcb2e 100644 --- a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/client/SmsYunPianClient.java +++ b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/client/SmsYunPianClient.java @@ -1,7 +1,7 @@ package cn.iocoder.mall.admin.client; import cn.iocoder.common.framework.exception.ServiceException; -import cn.iocoder.mall.admin.api.constant.AdminErrorCodeEnum; +import cn.iocoder.mall.system.api.constant.AdminErrorCodeEnum; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import org.apache.http.HttpEntity; diff --git a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/config/ServiceExceptionConfiguration.java b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/config/ServiceExceptionConfiguration.java index 2a37244b3..b66ff4fc4 100644 --- a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/config/ServiceExceptionConfiguration.java +++ b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/config/ServiceExceptionConfiguration.java @@ -1,7 +1,7 @@ package cn.iocoder.mall.admin.config; import cn.iocoder.common.framework.util.ServiceExceptionUtil; -import cn.iocoder.mall.admin.api.constant.AdminErrorCodeEnum; +import cn.iocoder.mall.system.api.constant.AdminErrorCodeEnum; import org.springframework.boot.context.event.ApplicationReadyEvent; import org.springframework.context.annotation.Configuration; import org.springframework.context.event.EventListener; diff --git a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/convert/AccessLogConvert.java b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/convert/AccessLogConvert.java index ef62fc71c..4e8fdafea 100644 --- a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/convert/AccessLogConvert.java +++ b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/convert/AccessLogConvert.java @@ -1,10 +1,9 @@ package cn.iocoder.mall.admin.convert; import cn.iocoder.common.framework.vo.PageResult; -import cn.iocoder.mall.admin.api.bo.systemlog.AccessLogBO; -import cn.iocoder.mall.admin.api.bo.systemlog.AccessLogPageBO; -import cn.iocoder.mall.admin.api.dto.systemlog.AccessLogAddDTO; -import cn.iocoder.mall.admin.api.dto.systemlog.ExceptionLogAddDTO; +import cn.iocoder.mall.system.api.bo.systemlog.AccessLogBO; +import cn.iocoder.mall.system.api.dto.systemlog.AccessLogAddDTO; +import cn.iocoder.mall.system.api.dto.systemlog.ExceptionLogAddDTO; import cn.iocoder.mall.admin.dataobject.AccessLogDO; import cn.iocoder.mall.admin.dataobject.ExceptionLogDO; import com.baomidou.mybatisplus.core.metadata.IPage; diff --git a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/convert/AdminConvert.java b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/convert/AdminConvert.java index 7909b2091..f91c79fe7 100644 --- a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/convert/AdminConvert.java +++ b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/convert/AdminConvert.java @@ -1,10 +1,10 @@ package cn.iocoder.mall.admin.convert; import cn.iocoder.common.framework.vo.PageResult; -import cn.iocoder.mall.admin.api.bo.admin.AdminAuthenticationBO; -import cn.iocoder.mall.admin.api.bo.admin.AdminBO; -import cn.iocoder.mall.admin.api.dto.admin.AdminAddDTO; -import cn.iocoder.mall.admin.api.dto.admin.AdminUpdateDTO; +import cn.iocoder.mall.system.api.bo.admin.AdminAuthenticationBO; +import cn.iocoder.mall.system.api.bo.admin.AdminBO; +import cn.iocoder.mall.system.api.dto.admin.AdminAddDTO; +import cn.iocoder.mall.system.api.dto.admin.AdminUpdateDTO; import cn.iocoder.mall.admin.dataobject.AdminDO; import com.baomidou.mybatisplus.core.metadata.IPage; import org.mapstruct.Mapper; diff --git a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/convert/DataDictConvert.java b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/convert/DataDictConvert.java index d5dcb15ce..c8f2a29e8 100644 --- a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/convert/DataDictConvert.java +++ b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/convert/DataDictConvert.java @@ -1,8 +1,8 @@ package cn.iocoder.mall.admin.convert; -import cn.iocoder.mall.admin.api.bo.datadict.DataDictBO; -import cn.iocoder.mall.admin.api.dto.datadict.DataDictAddDTO; -import cn.iocoder.mall.admin.api.dto.datadict.DataDictUpdateDTO; +import cn.iocoder.mall.system.api.bo.datadict.DataDictBO; +import cn.iocoder.mall.system.api.dto.datadict.DataDictAddDTO; +import cn.iocoder.mall.system.api.dto.datadict.DataDictUpdateDTO; import cn.iocoder.mall.admin.dataobject.DataDictDO; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; diff --git a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/convert/DeptmentConvert.java b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/convert/DeptmentConvert.java index 94b7479ee..6eb95c60c 100644 --- a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/convert/DeptmentConvert.java +++ b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/convert/DeptmentConvert.java @@ -1,9 +1,9 @@ package cn.iocoder.mall.admin.convert; import cn.iocoder.common.framework.vo.PageResult; -import cn.iocoder.mall.admin.api.bo.deptment.DeptmentBO; -import cn.iocoder.mall.admin.api.dto.depetment.DeptmentAddDTO; -import cn.iocoder.mall.admin.api.dto.depetment.DeptmentUpdateDTO; +import cn.iocoder.mall.system.api.bo.deptment.DeptmentBO; +import cn.iocoder.mall.system.api.dto.depetment.DeptmentAddDTO; +import cn.iocoder.mall.system.api.dto.depetment.DeptmentUpdateDTO; import cn.iocoder.mall.admin.dataobject.DeptmentDO; import com.baomidou.mybatisplus.core.metadata.IPage; import org.mapstruct.Mapper; diff --git a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/convert/OAuth2Convert.java b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/convert/OAuth2Convert.java index 177dadf64..f5d9ebc05 100644 --- a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/convert/OAuth2Convert.java +++ b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/convert/OAuth2Convert.java @@ -1,7 +1,7 @@ package cn.iocoder.mall.admin.convert; -import cn.iocoder.mall.admin.api.bo.oauth2.OAuth2AccessTokenBO; -import cn.iocoder.mall.admin.api.bo.oauth2.OAuth2AuthenticationBO; +import cn.iocoder.mall.system.api.bo.oauth2.OAuth2AccessTokenBO; +import cn.iocoder.mall.system.api.bo.oauth2.OAuth2AuthenticationBO; import cn.iocoder.mall.admin.dataobject.OAuth2AccessTokenDO; import org.mapstruct.Mapper; import org.mapstruct.Mapping; diff --git a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/convert/ResourceConvert.java b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/convert/ResourceConvert.java index 6437fa465..43a5dbf3f 100644 --- a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/convert/ResourceConvert.java +++ b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/convert/ResourceConvert.java @@ -1,9 +1,9 @@ package cn.iocoder.mall.admin.convert; import cn.iocoder.common.framework.util.StringUtil; -import cn.iocoder.mall.admin.api.bo.resource.ResourceBO; -import cn.iocoder.mall.admin.api.dto.resource.ResourceAddDTO; -import cn.iocoder.mall.admin.api.dto.resource.ResourceUpdateDTO; +import cn.iocoder.mall.system.api.bo.resource.ResourceBO; +import cn.iocoder.mall.system.api.dto.resource.ResourceAddDTO; +import cn.iocoder.mall.system.api.dto.resource.ResourceUpdateDTO; import cn.iocoder.mall.admin.dataobject.ResourceDO; import org.mapstruct.Mapper; import org.mapstruct.Mapping; diff --git a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/convert/RoleConvert.java b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/convert/RoleConvert.java index e1657fc4b..ab6ca0169 100644 --- a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/convert/RoleConvert.java +++ b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/convert/RoleConvert.java @@ -1,9 +1,9 @@ package cn.iocoder.mall.admin.convert; import cn.iocoder.common.framework.vo.PageResult; -import cn.iocoder.mall.admin.api.bo.role.RoleBO; -import cn.iocoder.mall.admin.api.dto.role.RoleAddDTO; -import cn.iocoder.mall.admin.api.dto.role.RoleUpdateDTO; +import cn.iocoder.mall.system.api.bo.role.RoleBO; +import cn.iocoder.mall.system.api.dto.role.RoleAddDTO; +import cn.iocoder.mall.system.api.dto.role.RoleUpdateDTO; import cn.iocoder.mall.admin.dataobject.RoleDO; import com.baomidou.mybatisplus.core.metadata.IPage; import org.mapstruct.Mapper; diff --git a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/convert/SmsSignConvert.java b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/convert/SmsSignConvert.java index d8f8a1e60..deaa743ed 100644 --- a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/convert/SmsSignConvert.java +++ b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/convert/SmsSignConvert.java @@ -1,8 +1,7 @@ package cn.iocoder.mall.admin.convert; -import cn.iocoder.mall.admin.api.bo.sms.PageSmsSignBO; -import cn.iocoder.mall.admin.api.bo.sms.PageSmsTemplateBO; -import cn.iocoder.mall.admin.api.bo.sms.SmsSignBO; +import cn.iocoder.mall.system.api.bo.sms.PageSmsSignBO; +import cn.iocoder.mall.system.api.bo.sms.SmsSignBO; import cn.iocoder.mall.admin.dataobject.SmsSignDO; import org.mapstruct.Mapper; import org.mapstruct.Mappings; diff --git a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/convert/SmsTemplateConvert.java b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/convert/SmsTemplateConvert.java index 6743552c5..8a6e5e609 100644 --- a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/convert/SmsTemplateConvert.java +++ b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/convert/SmsTemplateConvert.java @@ -1,7 +1,7 @@ package cn.iocoder.mall.admin.convert; -import cn.iocoder.mall.admin.api.bo.sms.PageSmsTemplateBO; -import cn.iocoder.mall.admin.api.bo.sms.SmsTemplateBO; +import cn.iocoder.mall.system.api.bo.sms.PageSmsTemplateBO; +import cn.iocoder.mall.system.api.bo.sms.SmsTemplateBO; import cn.iocoder.mall.admin.dataobject.SmsSignDO; import cn.iocoder.mall.admin.dataobject.SmsTemplateDO; import org.mapstruct.Mapper; diff --git a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dao/AccessLogMapper.java b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dao/AccessLogMapper.java index 6d21d7a6d..c0b9f84cf 100644 --- a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dao/AccessLogMapper.java +++ b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dao/AccessLogMapper.java @@ -1,10 +1,8 @@ package cn.iocoder.mall.admin.dao; import cn.iocoder.common.framework.mybatis.QueryWrapperX; -import cn.iocoder.mall.admin.api.dto.admin.AdminPageDTO; -import cn.iocoder.mall.admin.api.dto.systemlog.AccessLogPageDTO; +import cn.iocoder.mall.system.api.dto.systemlog.AccessLogPageDTO; import cn.iocoder.mall.admin.dataobject.AccessLogDO; -import cn.iocoder.mall.admin.dataobject.AdminDO; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; diff --git a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dao/AdminMapper.java b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dao/AdminMapper.java index a15c940cd..ec5395808 100644 --- a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dao/AdminMapper.java +++ b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dao/AdminMapper.java @@ -1,14 +1,13 @@ package cn.iocoder.mall.admin.dao; import cn.iocoder.common.framework.mybatis.QueryWrapperX; -import cn.iocoder.mall.admin.api.dto.admin.AdminPageDTO; +import cn.iocoder.mall.system.api.dto.admin.AdminPageDTO; import cn.iocoder.mall.admin.dataobject.AdminDO; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.apache.ibatis.annotations.Param; -import org.omg.PortableInterceptor.INACTIVE; import org.springframework.stereotype.Repository; @Repository diff --git a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dao/DeptmentMapper.java b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dao/DeptmentMapper.java index 040ab6175..8a783ef74 100644 --- a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dao/DeptmentMapper.java +++ b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dao/DeptmentMapper.java @@ -1,14 +1,12 @@ package cn.iocoder.mall.admin.dao; import cn.iocoder.common.framework.mybatis.QueryWrapperX; -import cn.iocoder.mall.admin.api.dto.depetment.DeptmentPageDTO; -import cn.iocoder.mall.admin.dataobject.AdminDO; +import cn.iocoder.mall.system.api.dto.depetment.DeptmentPageDTO; import cn.iocoder.mall.admin.dataobject.DeptmentDO; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import org.apache.ibatis.annotations.Param; import java.util.List; diff --git a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dao/RoleMapper.java b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dao/RoleMapper.java index ae4d3aa09..9ff13b49e 100644 --- a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dao/RoleMapper.java +++ b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dao/RoleMapper.java @@ -1,7 +1,7 @@ package cn.iocoder.mall.admin.dao; import cn.iocoder.common.framework.mybatis.QueryWrapperX; -import cn.iocoder.mall.admin.api.dto.role.RolePageDTO; +import cn.iocoder.mall.system.api.dto.role.RolePageDTO; import cn.iocoder.mall.admin.dataobject.RoleDO; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; diff --git a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dataobject/AccessLogDO.java b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dataobject/AccessLogDO.java index 34ce8a1e2..5447b0862 100644 --- a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dataobject/AccessLogDO.java +++ b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dataobject/AccessLogDO.java @@ -2,7 +2,7 @@ package cn.iocoder.mall.admin.dataobject; import cn.iocoder.common.framework.dataobject.BaseDO; import cn.iocoder.common.framework.vo.CommonResult; -import cn.iocoder.mall.admin.api.dto.systemlog.AccessLogAddDTO; +import cn.iocoder.mall.system.api.dto.systemlog.AccessLogAddDTO; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; import lombok.experimental.Accessors; diff --git a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dataobject/AdminDO.java b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dataobject/AdminDO.java index 88f7643d6..fd644c72c 100644 --- a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dataobject/AdminDO.java +++ b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dataobject/AdminDO.java @@ -3,6 +3,7 @@ package cn.iocoder.mall.admin.dataobject; import cn.iocoder.common.framework.dataobject.DeletableDO; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; +import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; /** @@ -10,6 +11,7 @@ import lombok.experimental.Accessors; */ @TableName(value = "admin") @Data +@EqualsAndHashCode(callSuper = true) @Accessors(chain = true) public class AdminDO extends DeletableDO { diff --git a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dataobject/ExceptionLogDO.java b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dataobject/ExceptionLogDO.java index 236ad95a3..e324c58e1 100644 --- a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dataobject/ExceptionLogDO.java +++ b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dataobject/ExceptionLogDO.java @@ -1,7 +1,7 @@ package cn.iocoder.mall.admin.dataobject; import cn.iocoder.common.framework.dataobject.BaseDO; -import cn.iocoder.mall.admin.api.dto.systemlog.AccessLogAddDTO; +import cn.iocoder.mall.system.api.dto.systemlog.AccessLogAddDTO; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; import lombok.experimental.Accessors; diff --git a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/service/AdminServiceImpl.java b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/service/AdminServiceImpl.java index 0137ade70..b7e11e49e 100644 --- a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/service/AdminServiceImpl.java +++ b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/service/AdminServiceImpl.java @@ -6,17 +6,17 @@ import cn.iocoder.common.framework.constant.UserTypeEnum; import cn.iocoder.common.framework.util.CollectionUtil; import cn.iocoder.common.framework.util.ServiceExceptionUtil; import cn.iocoder.common.framework.vo.PageResult; -import cn.iocoder.mall.admin.api.AdminService; -import cn.iocoder.mall.admin.api.bo.admin.AdminAuthenticationBO; -import cn.iocoder.mall.admin.api.bo.admin.AdminAuthorizationBO; -import cn.iocoder.mall.admin.api.bo.admin.AdminBO; -import cn.iocoder.mall.admin.api.bo.oauth2.OAuth2AccessTokenBO; -import cn.iocoder.mall.admin.api.bo.role.RoleBO; -import cn.iocoder.mall.admin.api.constant.AdminConstants; -import cn.iocoder.mall.admin.api.constant.AdminErrorCodeEnum; -import cn.iocoder.mall.admin.api.dto.admin.*; -import cn.iocoder.mall.admin.api.dto.oauth2.OAuth2CreateTokenDTO; -import cn.iocoder.mall.admin.api.dto.oauth2.OAuth2RemoveTokenByUserDTO; +import cn.iocoder.mall.system.api.AdminService; +import cn.iocoder.mall.system.api.bo.admin.AdminAuthenticationBO; +import cn.iocoder.mall.system.api.bo.admin.AdminAuthorizationBO; +import cn.iocoder.mall.system.api.bo.admin.AdminBO; +import cn.iocoder.mall.system.api.bo.oauth2.OAuth2AccessTokenBO; +import cn.iocoder.mall.system.api.bo.role.RoleBO; +import cn.iocoder.mall.system.api.constant.AdminConstants; +import cn.iocoder.mall.system.api.constant.AdminErrorCodeEnum; +import cn.iocoder.mall.system.api.dto.admin.*; +import cn.iocoder.mall.system.api.dto.oauth2.OAuth2CreateTokenDTO; +import cn.iocoder.mall.system.api.dto.oauth2.OAuth2RemoveTokenByUserDTO; import cn.iocoder.mall.admin.convert.AdminConvert; import cn.iocoder.mall.admin.dao.AdminMapper; import cn.iocoder.mall.admin.dao.AdminRoleMapper; diff --git a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/service/DataDictServiceImpl.java b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/service/DataDictServiceImpl.java index f0f566d24..48e7afe54 100644 --- a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/service/DataDictServiceImpl.java +++ b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/service/DataDictServiceImpl.java @@ -3,11 +3,11 @@ package cn.iocoder.mall.admin.service; import cn.iocoder.common.framework.constant.DeletedStatusEnum; import cn.iocoder.common.framework.util.ServiceExceptionUtil; import cn.iocoder.common.framework.vo.CommonResult; -import cn.iocoder.mall.admin.api.DataDictService; -import cn.iocoder.mall.admin.api.bo.datadict.DataDictBO; -import cn.iocoder.mall.admin.api.constant.AdminErrorCodeEnum; -import cn.iocoder.mall.admin.api.dto.datadict.DataDictAddDTO; -import cn.iocoder.mall.admin.api.dto.datadict.DataDictUpdateDTO; +import cn.iocoder.mall.system.api.DataDictService; +import cn.iocoder.mall.system.api.bo.datadict.DataDictBO; +import cn.iocoder.mall.system.api.constant.AdminErrorCodeEnum; +import cn.iocoder.mall.system.api.dto.datadict.DataDictAddDTO; +import cn.iocoder.mall.system.api.dto.datadict.DataDictUpdateDTO; import cn.iocoder.mall.admin.convert.DataDictConvert; import cn.iocoder.mall.admin.dao.DataDictMapper; import cn.iocoder.mall.admin.dataobject.DataDictDO; diff --git a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/service/DeptmentServiceImpl.java b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/service/DeptmentServiceImpl.java index 2a02040cb..f1050c5ce 100644 --- a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/service/DeptmentServiceImpl.java +++ b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/service/DeptmentServiceImpl.java @@ -1,15 +1,14 @@ package cn.iocoder.mall.admin.service; -import cn.iocoder.common.framework.util.ExceptionUtil; import cn.iocoder.common.framework.util.ServiceExceptionUtil; import cn.iocoder.common.framework.vo.PageResult; -import cn.iocoder.mall.admin.api.DeptmentService; -import cn.iocoder.mall.admin.api.bo.deptment.DeptmentBO; -import cn.iocoder.mall.admin.api.constant.AdminErrorCodeEnum; -import cn.iocoder.mall.admin.api.constant.DeptmentConstants; -import cn.iocoder.mall.admin.api.dto.depetment.DeptmentAddDTO; -import cn.iocoder.mall.admin.api.dto.depetment.DeptmentPageDTO; -import cn.iocoder.mall.admin.api.dto.depetment.DeptmentUpdateDTO; +import cn.iocoder.mall.system.api.DeptmentService; +import cn.iocoder.mall.system.api.bo.deptment.DeptmentBO; +import cn.iocoder.mall.system.api.constant.AdminErrorCodeEnum; +import cn.iocoder.mall.system.api.constant.DeptmentConstants; +import cn.iocoder.mall.system.api.dto.depetment.DeptmentAddDTO; +import cn.iocoder.mall.system.api.dto.depetment.DeptmentPageDTO; +import cn.iocoder.mall.system.api.dto.depetment.DeptmentUpdateDTO; import cn.iocoder.mall.admin.convert.DeptmentConvert; import cn.iocoder.mall.admin.dao.AdminMapper; import cn.iocoder.mall.admin.dao.DeptmentMapper; @@ -17,7 +16,6 @@ import cn.iocoder.mall.admin.dao.DeptmentRoleMapper; import cn.iocoder.mall.admin.dataobject.DeptmentDO; import com.baomidou.mybatisplus.core.metadata.IPage; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.autoconfigure.kafka.KafkaProperties; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; diff --git a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/service/OAuth2ServiceImpl.java b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/service/OAuth2ServiceImpl.java index 595ac0e23..e6c83d143 100644 --- a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/service/OAuth2ServiceImpl.java +++ b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/service/OAuth2ServiceImpl.java @@ -1,14 +1,14 @@ package cn.iocoder.mall.admin.service; import cn.iocoder.common.framework.util.ServiceExceptionUtil; -import cn.iocoder.mall.admin.api.OAuth2Service; -import cn.iocoder.mall.admin.api.bo.oauth2.OAuth2AccessTokenBO; -import cn.iocoder.mall.admin.api.bo.oauth2.OAuth2AuthenticationBO; -import cn.iocoder.mall.admin.api.constant.AdminErrorCodeEnum; -import cn.iocoder.mall.admin.api.dto.oauth2.OAuth2CreateTokenDTO; -import cn.iocoder.mall.admin.api.dto.oauth2.OAuth2GetTokenDTO; -import cn.iocoder.mall.admin.api.dto.oauth2.OAuth2RefreshTokenDTO; -import cn.iocoder.mall.admin.api.dto.oauth2.OAuth2RemoveTokenByUserDTO; +import cn.iocoder.mall.system.api.OAuth2Service; +import cn.iocoder.mall.system.api.bo.oauth2.OAuth2AccessTokenBO; +import cn.iocoder.mall.system.api.bo.oauth2.OAuth2AuthenticationBO; +import cn.iocoder.mall.system.api.constant.AdminErrorCodeEnum; +import cn.iocoder.mall.system.api.dto.oauth2.OAuth2CreateTokenDTO; +import cn.iocoder.mall.system.api.dto.oauth2.OAuth2GetTokenDTO; +import cn.iocoder.mall.system.api.dto.oauth2.OAuth2RefreshTokenDTO; +import cn.iocoder.mall.system.api.dto.oauth2.OAuth2RemoveTokenByUserDTO; import cn.iocoder.mall.admin.convert.OAuth2Convert; import cn.iocoder.mall.admin.dao.OAuth2AccessTokenMapper; import cn.iocoder.mall.admin.dao.OAuth2RefreshTokenMapper; diff --git a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/service/ResourceServiceImpl.java b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/service/ResourceServiceImpl.java index 659b5bce1..382e8d674 100644 --- a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/service/ResourceServiceImpl.java +++ b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/service/ResourceServiceImpl.java @@ -3,12 +3,12 @@ package cn.iocoder.mall.admin.service; import cn.iocoder.common.framework.constant.DeletedStatusEnum; import cn.iocoder.common.framework.util.ServiceExceptionUtil; import cn.iocoder.common.framework.util.StringUtil; -import cn.iocoder.mall.admin.api.ResourceService; -import cn.iocoder.mall.admin.api.bo.resource.ResourceBO; -import cn.iocoder.mall.admin.api.constant.AdminErrorCodeEnum; -import cn.iocoder.mall.admin.api.constant.ResourceConstants; -import cn.iocoder.mall.admin.api.dto.resource.ResourceAddDTO; -import cn.iocoder.mall.admin.api.dto.resource.ResourceUpdateDTO; +import cn.iocoder.mall.system.api.ResourceService; +import cn.iocoder.mall.system.api.bo.resource.ResourceBO; +import cn.iocoder.mall.system.api.constant.AdminErrorCodeEnum; +import cn.iocoder.mall.system.api.constant.ResourceConstants; +import cn.iocoder.mall.system.api.dto.resource.ResourceAddDTO; +import cn.iocoder.mall.system.api.dto.resource.ResourceUpdateDTO; import cn.iocoder.mall.admin.convert.ResourceConvert; import cn.iocoder.mall.admin.dao.ResourceMapper; import cn.iocoder.mall.admin.dao.RoleResourceMapper; diff --git a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/service/RoleServiceImpl.java b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/service/RoleServiceImpl.java index f43ba6a8c..1c60a2319 100644 --- a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/service/RoleServiceImpl.java +++ b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/service/RoleServiceImpl.java @@ -4,13 +4,13 @@ import cn.iocoder.common.framework.constant.DeletedStatusEnum; import cn.iocoder.common.framework.util.CollectionUtil; import cn.iocoder.common.framework.util.ServiceExceptionUtil; import cn.iocoder.common.framework.vo.PageResult; -import cn.iocoder.mall.admin.api.RoleService; -import cn.iocoder.mall.admin.api.bo.role.RoleBO; -import cn.iocoder.mall.admin.api.constant.AdminErrorCodeEnum; -import cn.iocoder.mall.admin.api.dto.role.RoleAddDTO; -import cn.iocoder.mall.admin.api.dto.role.RoleAssignResourceDTO; -import cn.iocoder.mall.admin.api.dto.role.RolePageDTO; -import cn.iocoder.mall.admin.api.dto.role.RoleUpdateDTO; +import cn.iocoder.mall.system.api.RoleService; +import cn.iocoder.mall.system.api.bo.role.RoleBO; +import cn.iocoder.mall.system.api.constant.AdminErrorCodeEnum; +import cn.iocoder.mall.system.api.dto.role.RoleAddDTO; +import cn.iocoder.mall.system.api.dto.role.RoleAssignResourceDTO; +import cn.iocoder.mall.system.api.dto.role.RolePageDTO; +import cn.iocoder.mall.system.api.dto.role.RoleUpdateDTO; import cn.iocoder.mall.admin.convert.RoleConvert; import cn.iocoder.mall.admin.dao.AdminRoleMapper; import cn.iocoder.mall.admin.dao.RoleMapper; diff --git a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/service/SmsServiceImpl.java b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/service/SmsServiceImpl.java index 70bce07b1..6c37b399c 100644 --- a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/service/SmsServiceImpl.java +++ b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/service/SmsServiceImpl.java @@ -2,17 +2,16 @@ package cn.iocoder.mall.admin.service; import cn.iocoder.common.framework.constant.DeletedStatusEnum; import cn.iocoder.common.framework.exception.ServiceException; -import cn.iocoder.mall.admin.api.SmsService; -import cn.iocoder.mall.admin.api.bo.sms.PageSmsSignBO; -import cn.iocoder.mall.admin.api.bo.sms.PageSmsTemplateBO; -import cn.iocoder.mall.admin.api.bo.sms.SmsSignBO; -import cn.iocoder.mall.admin.api.bo.sms.SmsTemplateBO; -import cn.iocoder.mall.admin.api.constant.AdminErrorCodeEnum; -import cn.iocoder.mall.admin.api.constant.SmsApplyStatusEnum; -import cn.iocoder.mall.admin.api.constant.SmsPlatformEnum; -import cn.iocoder.mall.admin.api.dto.sms.PageQuerySmsSignDTO; -import cn.iocoder.mall.admin.api.dto.sms.PageQuerySmsTemplateDTO; -import cn.iocoder.mall.admin.client.SmsAliYunClient; +import cn.iocoder.mall.system.api.SmsService; +import cn.iocoder.mall.system.api.bo.sms.PageSmsSignBO; +import cn.iocoder.mall.system.api.bo.sms.PageSmsTemplateBO; +import cn.iocoder.mall.system.api.bo.sms.SmsSignBO; +import cn.iocoder.mall.system.api.bo.sms.SmsTemplateBO; +import cn.iocoder.mall.system.api.constant.AdminErrorCodeEnum; +import cn.iocoder.mall.system.api.constant.SmsApplyStatusEnum; +import cn.iocoder.mall.system.api.constant.SmsPlatformEnum; +import cn.iocoder.mall.system.api.dto.sms.PageQuerySmsSignDTO; +import cn.iocoder.mall.system.api.dto.sms.PageQuerySmsTemplateDTO; import cn.iocoder.mall.admin.client.SmsClient; import cn.iocoder.mall.admin.convert.SmsSignConvert; import cn.iocoder.mall.admin.convert.SmsTemplateConvert; diff --git a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/service/SystemLogServiceImpl.java b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/service/SystemLogServiceImpl.java index 8ae00b41a..f12841af7 100644 --- a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/service/SystemLogServiceImpl.java +++ b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/service/SystemLogServiceImpl.java @@ -2,12 +2,12 @@ package cn.iocoder.mall.admin.service; import cn.iocoder.common.framework.util.StringUtil; import cn.iocoder.common.framework.vo.PageResult; -import cn.iocoder.mall.admin.api.SystemLogService; -import cn.iocoder.mall.admin.api.bo.systemlog.AccessLogBO; -import cn.iocoder.mall.admin.api.bo.systemlog.AccessLogPageBO; -import cn.iocoder.mall.admin.api.dto.systemlog.AccessLogAddDTO; -import cn.iocoder.mall.admin.api.dto.systemlog.AccessLogPageDTO; -import cn.iocoder.mall.admin.api.dto.systemlog.ExceptionLogAddDTO; +import cn.iocoder.mall.system.api.SystemLogService; +import cn.iocoder.mall.system.api.bo.systemlog.AccessLogBO; +import cn.iocoder.mall.system.api.bo.systemlog.AccessLogPageBO; +import cn.iocoder.mall.system.api.dto.systemlog.AccessLogAddDTO; +import cn.iocoder.mall.system.api.dto.systemlog.AccessLogPageDTO; +import cn.iocoder.mall.system.api.dto.systemlog.ExceptionLogAddDTO; import cn.iocoder.mall.admin.convert.AccessLogConvert; import cn.iocoder.mall.admin.dao.AccessLogMapper; import cn.iocoder.mall.admin.dao.ExceptionLogMapper; diff --git a/system/system-service-impl/src/test/java/cn/iocoder/mall/admin/service/SmsServiceImplTest.java b/system/system-service-impl/src/test/java/cn/iocoder/mall/admin/service/SmsServiceImplTest.java index 11a531c3b..9b9c1e64f 100644 --- a/system/system-service-impl/src/test/java/cn/iocoder/mall/admin/service/SmsServiceImplTest.java +++ b/system/system-service-impl/src/test/java/cn/iocoder/mall/admin/service/SmsServiceImplTest.java @@ -2,10 +2,10 @@ package cn.iocoder.mall.admin.service; import cn.iocoder.common.framework.exception.ServiceException; import cn.iocoder.mall.admin.SystemApplicationTest; -import cn.iocoder.mall.admin.api.SmsService; -import cn.iocoder.mall.admin.api.bo.sms.SmsSignBO; -import cn.iocoder.mall.admin.api.constant.SmsPlatformEnum; -import cn.iocoder.mall.admin.api.constant.SmsTypeEnum; +import cn.iocoder.mall.system.api.SmsService; +import cn.iocoder.mall.system.api.bo.sms.SmsSignBO; +import cn.iocoder.mall.system.api.constant.SmsPlatformEnum; +import cn.iocoder.mall.system.api.constant.SmsTypeEnum; import com.google.common.collect.ImmutableMap; import org.assertj.core.util.Lists; import org.junit.Assert; diff --git a/system/system-service-impl/src/test/java/cn/iocoder/mall/admin/service/SystemLogServiceImplTest.java b/system/system-service-impl/src/test/java/cn/iocoder/mall/admin/service/SystemLogServiceImplTest.java index a4b34a207..cb4bd9df2 100644 --- a/system/system-service-impl/src/test/java/cn/iocoder/mall/admin/service/SystemLogServiceImplTest.java +++ b/system/system-service-impl/src/test/java/cn/iocoder/mall/admin/service/SystemLogServiceImplTest.java @@ -1,8 +1,8 @@ package cn.iocoder.mall.admin.service; -import cn.iocoder.mall.admin.api.SystemLogService; -import cn.iocoder.mall.admin.api.bo.systemlog.AccessLogPageBO; -import cn.iocoder.mall.admin.api.dto.systemlog.AccessLogPageDTO; +import cn.iocoder.mall.system.api.SystemLogService; +import cn.iocoder.mall.system.api.bo.systemlog.AccessLogPageBO; +import cn.iocoder.mall.system.api.dto.systemlog.AccessLogPageDTO; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; diff --git a/system/system-start/pom.xml b/system/system-start/pom.xml new file mode 100644 index 000000000..4e403bd56 --- /dev/null +++ b/system/system-start/pom.xml @@ -0,0 +1,107 @@ + + + + system + cn.iocoder.mall + 1.0-SNAPSHOT + + 4.0.0 + + system-start + + + + + cn.iocoder.mall + common-framework + 1.0-SNAPSHOT + + + cn.iocoder.mall + mall-spring-boot + 1.0-SNAPSHOT + + + cn.iocoder.mall + system-service-impl + 1.0-SNAPSHOT + + + cn.iocoder.mall + system-sdk + 1.0-SNAPSHOT + + + + + org.springframework.boot + spring-boot-starter-web + + + + io.springfox + springfox-swagger2 + + + com.github.xiaoymin + swagger-bootstrap-ui + + + + + com.qiniu + qiniu-java-sdk + + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-sentinel + + + + + de.codecentric + spring-boot-admin-starter-client + + + + org.springframework.boot + spring-boot-starter-actuator + + + + io.micrometer + micrometer-registry-prometheus + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + + diff --git a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/SystemApplication.java b/system/system-start/src/main/java/cn/iocoder/mall/system/application/SystemApplication.java similarity index 76% rename from system/system-application/src/main/java/cn/iocoder/mall/admin/application/SystemApplication.java rename to system/system-start/src/main/java/cn/iocoder/mall/system/application/SystemApplication.java index 9792b390d..4b4f647cb 100644 --- a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/SystemApplication.java +++ b/system/system-start/src/main/java/cn/iocoder/mall/system/application/SystemApplication.java @@ -1,10 +1,10 @@ -package cn.iocoder.mall.admin.application; +package cn.iocoder.mall.system.application; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.scheduling.annotation.EnableAsync; -@SpringBootApplication(scanBasePackages = {"cn.iocoder.mall.admin"}) +@SpringBootApplication(scanBasePackages = {"cn.iocoder.mall.system"}) @EnableAsync(proxyTargetClass = true) public class SystemApplication { diff --git a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/config/QiniuConfiguration.java b/system/system-start/src/main/java/cn/iocoder/mall/system/application/config/QiniuConfiguration.java similarity index 90% rename from system/system-application/src/main/java/cn/iocoder/mall/admin/application/config/QiniuConfiguration.java rename to system/system-start/src/main/java/cn/iocoder/mall/system/application/config/QiniuConfiguration.java index f01bf37f7..0d3626de6 100644 --- a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/config/QiniuConfiguration.java +++ b/system/system-start/src/main/java/cn/iocoder/mall/system/application/config/QiniuConfiguration.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.application.config; +package cn.iocoder.mall.system.application.config; import com.qiniu.util.Auth; import org.springframework.beans.factory.annotation.Value; diff --git a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/controller/admins/AdminController.java b/system/system-start/src/main/java/cn/iocoder/mall/system/application/controller/admins/AdminController.java similarity index 87% rename from system/system-application/src/main/java/cn/iocoder/mall/admin/application/controller/admins/AdminController.java rename to system/system-start/src/main/java/cn/iocoder/mall/system/application/controller/admins/AdminController.java index 9a72166f7..8bc1009ed 100644 --- a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/controller/admins/AdminController.java +++ b/system/system-start/src/main/java/cn/iocoder/mall/system/application/controller/admins/AdminController.java @@ -1,26 +1,26 @@ -package cn.iocoder.mall.admin.application.controller.admins; +package cn.iocoder.mall.system.application.controller.admins; import cn.iocoder.common.framework.constant.MallConstants; import cn.iocoder.common.framework.util.CollectionUtil; import cn.iocoder.common.framework.vo.CommonResult; import cn.iocoder.common.framework.vo.PageResult; -import cn.iocoder.mall.admin.api.AdminService; -import cn.iocoder.mall.admin.api.DeptmentService; -import cn.iocoder.mall.admin.api.ResourceService; -import cn.iocoder.mall.admin.api.RoleService; -import cn.iocoder.mall.admin.api.bo.deptment.DeptmentBO; -import cn.iocoder.mall.admin.api.bo.resource.ResourceBO; -import cn.iocoder.mall.admin.api.bo.role.RoleBO; -import cn.iocoder.mall.admin.api.bo.admin.AdminBO; -import cn.iocoder.mall.admin.api.constant.ResourceConstants; -import cn.iocoder.mall.admin.api.dto.admin.*; -import cn.iocoder.mall.admin.application.convert.AdminConvert; -import cn.iocoder.mall.admin.application.convert.ResourceConvert; -import cn.iocoder.mall.admin.application.vo.admin.AdminMenuTreeNodeVO; -import cn.iocoder.mall.admin.application.vo.admin.AdminRoleVO; -import cn.iocoder.mall.admin.application.vo.admin.AdminVO; -import cn.iocoder.mall.admin.sdk.annotation.RequiresPermissions; -import cn.iocoder.mall.admin.sdk.context.AdminSecurityContextHolder; +import cn.iocoder.mall.system.api.AdminService; +import cn.iocoder.mall.system.api.DeptmentService; +import cn.iocoder.mall.system.api.ResourceService; +import cn.iocoder.mall.system.api.RoleService; +import cn.iocoder.mall.system.api.bo.deptment.DeptmentBO; +import cn.iocoder.mall.system.api.bo.resource.ResourceBO; +import cn.iocoder.mall.system.api.bo.role.RoleBO; +import cn.iocoder.mall.system.api.bo.admin.AdminBO; +import cn.iocoder.mall.system.api.constant.ResourceConstants; +import cn.iocoder.mall.system.api.dto.admin.*; +import cn.iocoder.mall.system.application.convert.AdminConvert; +import cn.iocoder.mall.system.application.convert.ResourceConvert; +import cn.iocoder.mall.system.application.vo.admin.AdminMenuTreeNodeVO; +import cn.iocoder.mall.system.application.vo.admin.AdminRoleVO; +import cn.iocoder.mall.system.application.vo.admin.AdminVO; +import cn.iocoder.mall.system.sdk.annotation.RequiresPermissions; +import cn.iocoder.mall.system.sdk.context.AdminSecurityContextHolder; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; diff --git a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/controller/admins/DataDictController.java b/system/system-start/src/main/java/cn/iocoder/mall/system/application/controller/admins/DataDictController.java similarity index 84% rename from system/system-application/src/main/java/cn/iocoder/mall/admin/application/controller/admins/DataDictController.java rename to system/system-start/src/main/java/cn/iocoder/mall/system/application/controller/admins/DataDictController.java index 59b64fa44..8d8fb9513 100644 --- a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/controller/admins/DataDictController.java +++ b/system/system-start/src/main/java/cn/iocoder/mall/system/application/controller/admins/DataDictController.java @@ -1,14 +1,14 @@ -package cn.iocoder.mall.admin.application.controller.admins; +package cn.iocoder.mall.system.application.controller.admins; import cn.iocoder.common.framework.vo.CommonResult; -import cn.iocoder.mall.admin.api.DataDictService; -import cn.iocoder.mall.admin.api.bo.datadict.DataDictBO; -import cn.iocoder.mall.admin.api.dto.datadict.DataDictAddDTO; -import cn.iocoder.mall.admin.api.dto.datadict.DataDictUpdateDTO; -import cn.iocoder.mall.admin.application.convert.DataDictConvert; -import cn.iocoder.mall.admin.application.vo.datadict.DataDictEnumVO; -import cn.iocoder.mall.admin.sdk.annotation.RequiresPermissions; -import cn.iocoder.mall.admin.sdk.context.AdminSecurityContextHolder; +import cn.iocoder.mall.system.api.DataDictService; +import cn.iocoder.mall.system.api.bo.datadict.DataDictBO; +import cn.iocoder.mall.system.api.dto.datadict.DataDictAddDTO; +import cn.iocoder.mall.system.api.dto.datadict.DataDictUpdateDTO; +import cn.iocoder.mall.system.application.convert.DataDictConvert; +import cn.iocoder.mall.system.application.vo.datadict.DataDictEnumVO; +import cn.iocoder.mall.system.sdk.annotation.RequiresPermissions; +import cn.iocoder.mall.system.sdk.context.AdminSecurityContextHolder; import com.google.common.collect.ImmutableListMultimap; import com.google.common.collect.Multimaps; import io.swagger.annotations.Api; diff --git a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/controller/admins/DeptmentController.java b/system/system-start/src/main/java/cn/iocoder/mall/system/application/controller/admins/DeptmentController.java similarity index 83% rename from system/system-application/src/main/java/cn/iocoder/mall/admin/application/controller/admins/DeptmentController.java rename to system/system-start/src/main/java/cn/iocoder/mall/system/application/controller/admins/DeptmentController.java index 1a74a8572..4923366b8 100644 --- a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/controller/admins/DeptmentController.java +++ b/system/system-start/src/main/java/cn/iocoder/mall/system/application/controller/admins/DeptmentController.java @@ -1,18 +1,16 @@ -package cn.iocoder.mall.admin.application.controller.admins; +package cn.iocoder.mall.system.application.controller.admins; import cn.iocoder.common.framework.vo.CommonResult; import cn.iocoder.common.framework.vo.PageResult; -import cn.iocoder.mall.admin.api.DeptmentService; -import cn.iocoder.mall.admin.api.bo.deptment.DeptmentBO; -import cn.iocoder.mall.admin.api.constant.ResourceConstants; -import cn.iocoder.mall.admin.api.dto.depetment.DeptmentAddDTO; -import cn.iocoder.mall.admin.api.dto.depetment.DeptmentPageDTO; -import cn.iocoder.mall.admin.api.dto.depetment.DeptmentUpdateDTO; -import cn.iocoder.mall.admin.application.convert.DeptmentConvert; -import cn.iocoder.mall.admin.application.vo.deptment.DeptmentVO; -import cn.iocoder.mall.admin.application.vo.resource.ResourceTreeNodeVO; -import cn.iocoder.mall.admin.sdk.context.AdminSecurityContext; -import cn.iocoder.mall.admin.sdk.context.AdminSecurityContextHolder; +import cn.iocoder.mall.system.api.DeptmentService; +import cn.iocoder.mall.system.api.bo.deptment.DeptmentBO; +import cn.iocoder.mall.system.api.constant.ResourceConstants; +import cn.iocoder.mall.system.api.dto.depetment.DeptmentAddDTO; +import cn.iocoder.mall.system.api.dto.depetment.DeptmentPageDTO; +import cn.iocoder.mall.system.api.dto.depetment.DeptmentUpdateDTO; +import cn.iocoder.mall.system.application.convert.DeptmentConvert; +import cn.iocoder.mall.system.application.vo.deptment.DeptmentVO; +import cn.iocoder.mall.system.sdk.context.AdminSecurityContextHolder; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; @@ -20,9 +18,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -import javax.validation.Valid; import java.util.ArrayList; -import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.stream.Collectors; diff --git a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/controller/admins/FileController.java b/system/system-start/src/main/java/cn/iocoder/mall/system/application/controller/admins/FileController.java similarity index 94% rename from system/system-application/src/main/java/cn/iocoder/mall/admin/application/controller/admins/FileController.java rename to system/system-start/src/main/java/cn/iocoder/mall/system/application/controller/admins/FileController.java index 5000528d9..b4e5256d3 100644 --- a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/controller/admins/FileController.java +++ b/system/system-start/src/main/java/cn/iocoder/mall/system/application/controller/admins/FileController.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.application.controller.admins; +package cn.iocoder.mall.system.application.controller.admins; import cn.iocoder.common.framework.vo.CommonResult; import com.qiniu.util.Auth; diff --git a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/controller/admins/PassportController.java b/system/system-start/src/main/java/cn/iocoder/mall/system/application/controller/admins/PassportController.java similarity index 82% rename from system/system-application/src/main/java/cn/iocoder/mall/admin/application/controller/admins/PassportController.java rename to system/system-start/src/main/java/cn/iocoder/mall/system/application/controller/admins/PassportController.java index 461781566..b2947e4d4 100644 --- a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/controller/admins/PassportController.java +++ b/system/system-start/src/main/java/cn/iocoder/mall/system/application/controller/admins/PassportController.java @@ -1,10 +1,10 @@ -package cn.iocoder.mall.admin.application.controller.admins; +package cn.iocoder.mall.system.application.controller.admins; import cn.iocoder.common.framework.vo.CommonResult; -import cn.iocoder.mall.admin.api.AdminService; -import cn.iocoder.mall.admin.api.OAuth2Service; -import cn.iocoder.mall.admin.api.bo.admin.AdminAuthenticationBO; -import cn.iocoder.mall.admin.api.dto.admin.AdminAuthenticationDTO; +import cn.iocoder.mall.system.api.AdminService; +import cn.iocoder.mall.system.api.OAuth2Service; +import cn.iocoder.mall.system.api.bo.admin.AdminAuthenticationBO; +import cn.iocoder.mall.system.api.dto.admin.AdminAuthenticationDTO; import io.micrometer.core.instrument.Counter; import io.micrometer.core.instrument.Metrics; import io.swagger.annotations.Api; @@ -19,6 +19,7 @@ import static cn.iocoder.common.framework.vo.CommonResult.success; @RestController @RequestMapping("admins/passport") @Api("Admin Passport 模块") +@Deprecated public class PassportController { /** diff --git a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/controller/admins/ResourceController.java b/system/system-start/src/main/java/cn/iocoder/mall/system/application/controller/admins/ResourceController.java similarity index 84% rename from system/system-application/src/main/java/cn/iocoder/mall/admin/application/controller/admins/ResourceController.java rename to system/system-start/src/main/java/cn/iocoder/mall/system/application/controller/admins/ResourceController.java index 71a31013a..6ed8d6240 100644 --- a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/controller/admins/ResourceController.java +++ b/system/system-start/src/main/java/cn/iocoder/mall/system/application/controller/admins/ResourceController.java @@ -1,14 +1,14 @@ -package cn.iocoder.mall.admin.application.controller.admins; +package cn.iocoder.mall.system.application.controller.admins; import cn.iocoder.common.framework.vo.CommonResult; -import cn.iocoder.mall.admin.api.ResourceService; -import cn.iocoder.mall.admin.api.bo.resource.ResourceBO; -import cn.iocoder.mall.admin.api.constant.ResourceConstants; -import cn.iocoder.mall.admin.api.dto.resource.ResourceAddDTO; -import cn.iocoder.mall.admin.api.dto.resource.ResourceUpdateDTO; -import cn.iocoder.mall.admin.application.convert.ResourceConvert; -import cn.iocoder.mall.admin.application.vo.resource.ResourceTreeNodeVO; -import cn.iocoder.mall.admin.sdk.context.AdminSecurityContextHolder; +import cn.iocoder.mall.system.api.ResourceService; +import cn.iocoder.mall.system.api.bo.resource.ResourceBO; +import cn.iocoder.mall.system.api.constant.ResourceConstants; +import cn.iocoder.mall.system.api.dto.resource.ResourceAddDTO; +import cn.iocoder.mall.system.api.dto.resource.ResourceUpdateDTO; +import cn.iocoder.mall.system.application.convert.ResourceConvert; +import cn.iocoder.mall.system.application.vo.resource.ResourceTreeNodeVO; +import cn.iocoder.mall.system.sdk.context.AdminSecurityContextHolder; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; diff --git a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/controller/admins/RoleController.java b/system/system-start/src/main/java/cn/iocoder/mall/system/application/controller/admins/RoleController.java similarity index 85% rename from system/system-application/src/main/java/cn/iocoder/mall/admin/application/controller/admins/RoleController.java rename to system/system-start/src/main/java/cn/iocoder/mall/system/application/controller/admins/RoleController.java index fa6460922..4ca4d2257 100644 --- a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/controller/admins/RoleController.java +++ b/system/system-start/src/main/java/cn/iocoder/mall/system/application/controller/admins/RoleController.java @@ -1,20 +1,20 @@ -package cn.iocoder.mall.admin.application.controller.admins; +package cn.iocoder.mall.system.application.controller.admins; import cn.iocoder.common.framework.util.CollectionUtil; import cn.iocoder.common.framework.vo.CommonResult; import cn.iocoder.common.framework.vo.PageResult; -import cn.iocoder.mall.admin.api.ResourceService; -import cn.iocoder.mall.admin.api.RoleService; -import cn.iocoder.mall.admin.api.bo.resource.ResourceBO; -import cn.iocoder.mall.admin.api.bo.role.RoleBO; -import cn.iocoder.mall.admin.api.constant.ResourceConstants; -import cn.iocoder.mall.admin.api.dto.role.RoleAddDTO; -import cn.iocoder.mall.admin.api.dto.role.RoleAssignResourceDTO; -import cn.iocoder.mall.admin.api.dto.role.RolePageDTO; -import cn.iocoder.mall.admin.api.dto.role.RoleUpdateDTO; -import cn.iocoder.mall.admin.application.convert.ResourceConvert; -import cn.iocoder.mall.admin.application.vo.role.RoleResourceTreeNodeVO; -import cn.iocoder.mall.admin.sdk.context.AdminSecurityContextHolder; +import cn.iocoder.mall.system.api.ResourceService; +import cn.iocoder.mall.system.api.RoleService; +import cn.iocoder.mall.system.api.bo.resource.ResourceBO; +import cn.iocoder.mall.system.api.bo.role.RoleBO; +import cn.iocoder.mall.system.api.constant.ResourceConstants; +import cn.iocoder.mall.system.api.dto.role.RoleAddDTO; +import cn.iocoder.mall.system.api.dto.role.RoleAssignResourceDTO; +import cn.iocoder.mall.system.api.dto.role.RolePageDTO; +import cn.iocoder.mall.system.api.dto.role.RoleUpdateDTO; +import cn.iocoder.mall.system.application.convert.ResourceConvert; +import cn.iocoder.mall.system.application.vo.role.RoleResourceTreeNodeVO; +import cn.iocoder.mall.system.sdk.context.AdminSecurityContextHolder; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; diff --git a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/controller/admins/SmsSignController.java b/system/system-start/src/main/java/cn/iocoder/mall/system/application/controller/admins/SmsSignController.java similarity index 88% rename from system/system-application/src/main/java/cn/iocoder/mall/admin/application/controller/admins/SmsSignController.java rename to system/system-start/src/main/java/cn/iocoder/mall/system/application/controller/admins/SmsSignController.java index 49e367caa..62fa02c4a 100644 --- a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/controller/admins/SmsSignController.java +++ b/system/system-start/src/main/java/cn/iocoder/mall/system/application/controller/admins/SmsSignController.java @@ -1,9 +1,9 @@ -package cn.iocoder.mall.admin.application.controller.admins; +package cn.iocoder.mall.system.application.controller.admins; import cn.iocoder.common.framework.vo.CommonResult; -import cn.iocoder.mall.admin.api.SmsService; -import cn.iocoder.mall.admin.api.bo.sms.PageSmsSignBO; -import cn.iocoder.mall.admin.api.dto.sms.PageQuerySmsSignDTO; +import cn.iocoder.mall.system.api.SmsService; +import cn.iocoder.mall.system.api.bo.sms.PageSmsSignBO; +import cn.iocoder.mall.system.api.dto.sms.PageQuerySmsSignDTO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; diff --git a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/controller/admins/SmsTemplateController.java b/system/system-start/src/main/java/cn/iocoder/mall/system/application/controller/admins/SmsTemplateController.java similarity index 82% rename from system/system-application/src/main/java/cn/iocoder/mall/admin/application/controller/admins/SmsTemplateController.java rename to system/system-start/src/main/java/cn/iocoder/mall/system/application/controller/admins/SmsTemplateController.java index ae5739b12..d0f000d9d 100644 --- a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/controller/admins/SmsTemplateController.java +++ b/system/system-start/src/main/java/cn/iocoder/mall/system/application/controller/admins/SmsTemplateController.java @@ -1,12 +1,11 @@ -package cn.iocoder.mall.admin.application.controller.admins; +package cn.iocoder.mall.system.application.controller.admins; import cn.iocoder.common.framework.vo.CommonResult; -import cn.iocoder.mall.admin.api.SmsService; -import cn.iocoder.mall.admin.api.bo.sms.PageSmsTemplateBO; -import cn.iocoder.mall.admin.api.dto.sms.PageQuerySmsSignDTO; -import cn.iocoder.mall.admin.api.dto.sms.PageQuerySmsTemplateDTO; -import cn.iocoder.mall.admin.application.po.sms.SmsTemplateAddPO; -import cn.iocoder.mall.admin.application.po.sms.SmsTemplateUpdatePO; +import cn.iocoder.mall.system.api.SmsService; +import cn.iocoder.mall.system.api.bo.sms.PageSmsTemplateBO; +import cn.iocoder.mall.system.api.dto.sms.PageQuerySmsTemplateDTO; +import cn.iocoder.mall.system.application.po.sms.SmsTemplateAddPO; +import cn.iocoder.mall.system.application.po.sms.SmsTemplateUpdatePO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; diff --git a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/controller/admins/SystemLogController.java b/system/system-start/src/main/java/cn/iocoder/mall/system/application/controller/admins/SystemLogController.java similarity index 84% rename from system/system-application/src/main/java/cn/iocoder/mall/admin/application/controller/admins/SystemLogController.java rename to system/system-start/src/main/java/cn/iocoder/mall/system/application/controller/admins/SystemLogController.java index c2b67e7b3..91b8dee5e 100644 --- a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/controller/admins/SystemLogController.java +++ b/system/system-start/src/main/java/cn/iocoder/mall/system/application/controller/admins/SystemLogController.java @@ -1,11 +1,11 @@ -package cn.iocoder.mall.admin.application.controller.admins; +package cn.iocoder.mall.system.application.controller.admins; import cn.iocoder.common.framework.vo.CommonResult; -import cn.iocoder.mall.admin.api.SystemLogService; -import cn.iocoder.mall.admin.api.bo.systemlog.AccessLogPageBO; -import cn.iocoder.mall.admin.api.dto.systemlog.AccessLogPageDTO; -import cn.iocoder.mall.admin.application.convert.AccessLogConvert; -import cn.iocoder.mall.admin.application.vo.log.AccessLogPageVo; +import cn.iocoder.mall.system.api.SystemLogService; +import cn.iocoder.mall.system.api.bo.systemlog.AccessLogPageBO; +import cn.iocoder.mall.system.api.dto.systemlog.AccessLogPageDTO; +import cn.iocoder.mall.system.application.convert.AccessLogConvert; +import cn.iocoder.mall.system.application.vo.log.AccessLogPageVo; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; diff --git a/system/system-start/src/main/java/cn/iocoder/mall/system/application/convert/AccessLogConvert.java b/system/system-start/src/main/java/cn/iocoder/mall/system/application/convert/AccessLogConvert.java new file mode 100644 index 000000000..93d7b53df --- /dev/null +++ b/system/system-start/src/main/java/cn/iocoder/mall/system/application/convert/AccessLogConvert.java @@ -0,0 +1,30 @@ +package cn.iocoder.mall.system.application.convert; + +import cn.iocoder.mall.system.api.bo.systemlog.AccessLogBO; +import cn.iocoder.mall.system.api.bo.systemlog.AccessLogPageBO; +import cn.iocoder.mall.system.application.vo.log.AccessLogPageVo; +import cn.iocoder.mall.system.application.vo.log.AccessLogVo; +import org.mapstruct.Mapper; +import org.mapstruct.Mappings; +import org.mapstruct.factory.Mappers; + +/** + * @author:ycjx + * @descriptio + * @create:2019-06-23 17:36 + */ +@Mapper +public interface AccessLogConvert { + + + AccessLogConvert INSTANCE = Mappers.getMapper(AccessLogConvert.class); + + @Mappings({}) + AccessLogPageVo convert(AccessLogPageBO result); + + @Mappings({}) + AccessLogVo convert(AccessLogBO result); + + + +} diff --git a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/convert/AdminConvert.java b/system/system-start/src/main/java/cn/iocoder/mall/system/application/convert/AdminConvert.java similarity index 67% rename from system/system-application/src/main/java/cn/iocoder/mall/admin/application/convert/AdminConvert.java rename to system/system-start/src/main/java/cn/iocoder/mall/system/application/convert/AdminConvert.java index 0c3a459fd..84a2d5bdb 100644 --- a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/convert/AdminConvert.java +++ b/system/system-start/src/main/java/cn/iocoder/mall/system/application/convert/AdminConvert.java @@ -1,13 +1,13 @@ -package cn.iocoder.mall.admin.application.convert; +package cn.iocoder.mall.system.application.convert; import cn.iocoder.common.framework.vo.CommonResult; import cn.iocoder.common.framework.vo.PageResult; -import cn.iocoder.mall.admin.api.bo.role.RoleBO; -import cn.iocoder.mall.admin.api.bo.admin.AdminBO; -import cn.iocoder.mall.admin.application.vo.admin.AdminInfoVO; -import cn.iocoder.mall.admin.application.vo.admin.AdminRoleVO; -import cn.iocoder.mall.admin.application.vo.admin.AdminVO; -import cn.iocoder.mall.admin.sdk.context.AdminSecurityContext; +import cn.iocoder.mall.system.api.bo.role.RoleBO; +import cn.iocoder.mall.system.api.bo.admin.AdminBO; +import cn.iocoder.mall.system.application.vo.admin.AdminInfoVO; +import cn.iocoder.mall.system.application.vo.admin.AdminRoleVO; +import cn.iocoder.mall.system.application.vo.admin.AdminVO; +import cn.iocoder.mall.system.sdk.context.AdminSecurityContext; import org.mapstruct.Mapper; import org.mapstruct.Mappings; import org.mapstruct.factory.Mappers; diff --git a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/convert/DataDictConvert.java b/system/system-start/src/main/java/cn/iocoder/mall/system/application/convert/DataDictConvert.java similarity index 64% rename from system/system-application/src/main/java/cn/iocoder/mall/admin/application/convert/DataDictConvert.java rename to system/system-start/src/main/java/cn/iocoder/mall/system/application/convert/DataDictConvert.java index c9b8a867f..24886799c 100644 --- a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/convert/DataDictConvert.java +++ b/system/system-start/src/main/java/cn/iocoder/mall/system/application/convert/DataDictConvert.java @@ -1,7 +1,7 @@ -package cn.iocoder.mall.admin.application.convert; +package cn.iocoder.mall.system.application.convert; -import cn.iocoder.mall.admin.api.bo.datadict.DataDictBO; -import cn.iocoder.mall.admin.application.vo.datadict.DataDictEnumVO; +import cn.iocoder.mall.system.api.bo.datadict.DataDictBO; +import cn.iocoder.mall.system.application.vo.datadict.DataDictEnumVO; import org.mapstruct.Mapper; import org.mapstruct.Mappings; import org.mapstruct.factory.Mappers; diff --git a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/convert/DeptmentConvert.java b/system/system-start/src/main/java/cn/iocoder/mall/system/application/convert/DeptmentConvert.java similarity index 68% rename from system/system-application/src/main/java/cn/iocoder/mall/admin/application/convert/DeptmentConvert.java rename to system/system-start/src/main/java/cn/iocoder/mall/system/application/convert/DeptmentConvert.java index 61f0caeb3..cf5553d4a 100644 --- a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/convert/DeptmentConvert.java +++ b/system/system-start/src/main/java/cn/iocoder/mall/system/application/convert/DeptmentConvert.java @@ -1,10 +1,8 @@ -package cn.iocoder.mall.admin.application.convert; +package cn.iocoder.mall.system.application.convert; import cn.iocoder.common.framework.vo.PageResult; -import cn.iocoder.mall.admin.api.bo.deptment.DeptmentBO; -import cn.iocoder.mall.admin.application.vo.deptment.DeptmentVO; -import cn.iocoder.mall.admin.dataobject.DeptmentDO; -import com.baomidou.mybatisplus.core.metadata.IPage; +import cn.iocoder.mall.system.api.bo.deptment.DeptmentBO; +import cn.iocoder.mall.system.application.vo.deptment.DeptmentVO; import org.mapstruct.Mapper; import org.mapstruct.Mapping; import org.mapstruct.Mappings; diff --git a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/convert/PassportConvert.java b/system/system-start/src/main/java/cn/iocoder/mall/system/application/convert/PassportConvert.java similarity index 72% rename from system/system-application/src/main/java/cn/iocoder/mall/admin/application/convert/PassportConvert.java rename to system/system-start/src/main/java/cn/iocoder/mall/system/application/convert/PassportConvert.java index ee82785d1..2ca06657b 100644 --- a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/convert/PassportConvert.java +++ b/system/system-start/src/main/java/cn/iocoder/mall/system/application/convert/PassportConvert.java @@ -1,8 +1,8 @@ -package cn.iocoder.mall.admin.application.convert; +package cn.iocoder.mall.system.application.convert; import cn.iocoder.common.framework.vo.CommonResult; -import cn.iocoder.mall.admin.api.bo.oauth2.OAuth2AccessTokenBO; -import cn.iocoder.mall.admin.application.vo.PassportLoginVO; +import cn.iocoder.mall.system.api.bo.oauth2.OAuth2AccessTokenBO; +import cn.iocoder.mall.system.application.vo.PassportLoginVO; import org.mapstruct.Mapper; import org.mapstruct.Mappings; import org.mapstruct.factory.Mappers; diff --git a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/convert/ResourceConvert.java b/system/system-start/src/main/java/cn/iocoder/mall/system/application/convert/ResourceConvert.java similarity index 62% rename from system/system-application/src/main/java/cn/iocoder/mall/admin/application/convert/ResourceConvert.java rename to system/system-start/src/main/java/cn/iocoder/mall/system/application/convert/ResourceConvert.java index 223ac6689..db70dd56f 100644 --- a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/convert/ResourceConvert.java +++ b/system/system-start/src/main/java/cn/iocoder/mall/system/application/convert/ResourceConvert.java @@ -1,11 +1,11 @@ -package cn.iocoder.mall.admin.application.convert; +package cn.iocoder.mall.system.application.convert; import cn.iocoder.common.framework.vo.CommonResult; -import cn.iocoder.mall.admin.api.bo.resource.ResourceBO; -import cn.iocoder.mall.admin.application.vo.admin.AdminMenuTreeNodeVO; -import cn.iocoder.mall.admin.application.vo.resource.ResourceTreeNodeVO; -import cn.iocoder.mall.admin.application.vo.resource.ResourceVO; -import cn.iocoder.mall.admin.application.vo.role.RoleResourceTreeNodeVO; +import cn.iocoder.mall.system.api.bo.resource.ResourceBO; +import cn.iocoder.mall.system.application.vo.admin.AdminMenuTreeNodeVO; +import cn.iocoder.mall.system.application.vo.resource.ResourceTreeNodeVO; +import cn.iocoder.mall.system.application.vo.resource.ResourceVO; +import cn.iocoder.mall.system.application.vo.role.RoleResourceTreeNodeVO; import org.mapstruct.Mapper; import org.mapstruct.Mappings; import org.mapstruct.factory.Mappers; diff --git a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/convert/RoleConvert.java b/system/system-start/src/main/java/cn/iocoder/mall/system/application/convert/RoleConvert.java similarity index 77% rename from system/system-application/src/main/java/cn/iocoder/mall/admin/application/convert/RoleConvert.java rename to system/system-start/src/main/java/cn/iocoder/mall/system/application/convert/RoleConvert.java index eb365885e..787134556 100644 --- a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/convert/RoleConvert.java +++ b/system/system-start/src/main/java/cn/iocoder/mall/system/application/convert/RoleConvert.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.application.convert; +package cn.iocoder.mall.system.application.convert; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; diff --git a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/po/package-info.java b/system/system-start/src/main/java/cn/iocoder/mall/system/application/po/package-info.java similarity index 52% rename from system/system-application/src/main/java/cn/iocoder/mall/admin/application/po/package-info.java rename to system/system-start/src/main/java/cn/iocoder/mall/system/application/po/package-info.java index 2ce55ddfa..65d2029cc 100644 --- a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/po/package-info.java +++ b/system/system-start/src/main/java/cn/iocoder/mall/system/application/po/package-info.java @@ -2,4 +2,4 @@ * @author Sin * @time 2019/5/26 12:36 PM */ -package cn.iocoder.mall.admin.application.po; \ No newline at end of file +package cn.iocoder.mall.system.application.po; diff --git a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/po/sms/SmsTemplateAddPO.java b/system/system-start/src/main/java/cn/iocoder/mall/system/application/po/sms/SmsTemplateAddPO.java similarity index 87% rename from system/system-application/src/main/java/cn/iocoder/mall/admin/application/po/sms/SmsTemplateAddPO.java rename to system/system-start/src/main/java/cn/iocoder/mall/system/application/po/sms/SmsTemplateAddPO.java index 5201c18c0..9385c9677 100644 --- a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/po/sms/SmsTemplateAddPO.java +++ b/system/system-start/src/main/java/cn/iocoder/mall/system/application/po/sms/SmsTemplateAddPO.java @@ -1,8 +1,8 @@ -package cn.iocoder.mall.admin.application.po.sms; +package cn.iocoder.mall.system.application.po.sms; import cn.iocoder.common.framework.validator.InEnum; -import cn.iocoder.mall.admin.api.constant.SmsPlatformEnum; -import cn.iocoder.mall.admin.api.constant.SmsTypeEnum; +import cn.iocoder.mall.system.api.constant.SmsPlatformEnum; +import cn.iocoder.mall.system.api.constant.SmsTypeEnum; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/po/sms/SmsTemplateUpdatePO.java b/system/system-start/src/main/java/cn/iocoder/mall/system/application/po/sms/SmsTemplateUpdatePO.java similarity index 88% rename from system/system-application/src/main/java/cn/iocoder/mall/admin/application/po/sms/SmsTemplateUpdatePO.java rename to system/system-start/src/main/java/cn/iocoder/mall/system/application/po/sms/SmsTemplateUpdatePO.java index c83915d78..f477804c3 100644 --- a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/po/sms/SmsTemplateUpdatePO.java +++ b/system/system-start/src/main/java/cn/iocoder/mall/system/application/po/sms/SmsTemplateUpdatePO.java @@ -1,8 +1,8 @@ -package cn.iocoder.mall.admin.application.po.sms; +package cn.iocoder.mall.system.application.po.sms; import cn.iocoder.common.framework.validator.InEnum; -import cn.iocoder.mall.admin.api.constant.SmsPlatformEnum; -import cn.iocoder.mall.admin.api.constant.SmsTypeEnum; +import cn.iocoder.mall.system.api.constant.SmsPlatformEnum; +import cn.iocoder.mall.system.api.constant.SmsTypeEnum; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/vo/PassportLoginVO.java b/system/system-start/src/main/java/cn/iocoder/mall/system/application/vo/PassportLoginVO.java similarity index 93% rename from system/system-application/src/main/java/cn/iocoder/mall/admin/application/vo/PassportLoginVO.java rename to system/system-start/src/main/java/cn/iocoder/mall/system/application/vo/PassportLoginVO.java index 7bfd92ecb..85b1e601c 100644 --- a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/vo/PassportLoginVO.java +++ b/system/system-start/src/main/java/cn/iocoder/mall/system/application/vo/PassportLoginVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.application.vo; +package cn.iocoder.mall.system.application.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/vo/admin/AdminInfoVO.java b/system/system-start/src/main/java/cn/iocoder/mall/system/application/vo/admin/AdminInfoVO.java similarity index 90% rename from system/system-application/src/main/java/cn/iocoder/mall/admin/application/vo/admin/AdminInfoVO.java rename to system/system-start/src/main/java/cn/iocoder/mall/system/application/vo/admin/AdminInfoVO.java index 931d34c68..f463efb7d 100644 --- a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/vo/admin/AdminInfoVO.java +++ b/system/system-start/src/main/java/cn/iocoder/mall/system/application/vo/admin/AdminInfoVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.application.vo.admin; +package cn.iocoder.mall.system.application.vo.admin; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/vo/admin/AdminMenuTreeNodeVO.java b/system/system-start/src/main/java/cn/iocoder/mall/system/application/vo/admin/AdminMenuTreeNodeVO.java similarity index 95% rename from system/system-application/src/main/java/cn/iocoder/mall/admin/application/vo/admin/AdminMenuTreeNodeVO.java rename to system/system-start/src/main/java/cn/iocoder/mall/system/application/vo/admin/AdminMenuTreeNodeVO.java index e88174be2..e3b612b68 100644 --- a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/vo/admin/AdminMenuTreeNodeVO.java +++ b/system/system-start/src/main/java/cn/iocoder/mall/system/application/vo/admin/AdminMenuTreeNodeVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.application.vo.admin; +package cn.iocoder.mall.system.application.vo.admin; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/vo/admin/AdminRoleVO.java b/system/system-start/src/main/java/cn/iocoder/mall/system/application/vo/admin/AdminRoleVO.java similarity index 91% rename from system/system-application/src/main/java/cn/iocoder/mall/admin/application/vo/admin/AdminRoleVO.java rename to system/system-start/src/main/java/cn/iocoder/mall/system/application/vo/admin/AdminRoleVO.java index 417d86b91..bfd0ca706 100644 --- a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/vo/admin/AdminRoleVO.java +++ b/system/system-start/src/main/java/cn/iocoder/mall/system/application/vo/admin/AdminRoleVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.application.vo.admin; +package cn.iocoder.mall.system.application.vo.admin; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/vo/admin/AdminVO.java b/system/system-start/src/main/java/cn/iocoder/mall/system/application/vo/admin/AdminVO.java similarity index 91% rename from system/system-application/src/main/java/cn/iocoder/mall/admin/application/vo/admin/AdminVO.java rename to system/system-start/src/main/java/cn/iocoder/mall/system/application/vo/admin/AdminVO.java index 6847d1829..64cf008d4 100644 --- a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/vo/admin/AdminVO.java +++ b/system/system-start/src/main/java/cn/iocoder/mall/system/application/vo/admin/AdminVO.java @@ -1,6 +1,6 @@ -package cn.iocoder.mall.admin.application.vo.admin; +package cn.iocoder.mall.system.application.vo.admin; -import cn.iocoder.mall.admin.api.bo.admin.AdminBO; +import cn.iocoder.mall.system.api.bo.admin.AdminBO; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; diff --git a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/vo/datadict/DataDictEnumVO.java b/system/system-start/src/main/java/cn/iocoder/mall/system/application/vo/datadict/DataDictEnumVO.java similarity index 93% rename from system/system-application/src/main/java/cn/iocoder/mall/admin/application/vo/datadict/DataDictEnumVO.java rename to system/system-start/src/main/java/cn/iocoder/mall/system/application/vo/datadict/DataDictEnumVO.java index 936b0496e..fb769c788 100644 --- a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/vo/datadict/DataDictEnumVO.java +++ b/system/system-start/src/main/java/cn/iocoder/mall/system/application/vo/datadict/DataDictEnumVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.application.vo.datadict; +package cn.iocoder.mall.system.application.vo.datadict; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/vo/deptment/DeptmentVO.java b/system/system-start/src/main/java/cn/iocoder/mall/system/application/vo/deptment/DeptmentVO.java similarity index 76% rename from system/system-application/src/main/java/cn/iocoder/mall/admin/application/vo/deptment/DeptmentVO.java rename to system/system-start/src/main/java/cn/iocoder/mall/system/application/vo/deptment/DeptmentVO.java index ebf99bda9..03878376b 100644 --- a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/vo/deptment/DeptmentVO.java +++ b/system/system-start/src/main/java/cn/iocoder/mall/system/application/vo/deptment/DeptmentVO.java @@ -1,6 +1,6 @@ -package cn.iocoder.mall.admin.application.vo.deptment; +package cn.iocoder.mall.system.application.vo.deptment; -import cn.iocoder.mall.admin.api.bo.deptment.DeptmentBO; +import cn.iocoder.mall.system.api.bo.deptment.DeptmentBO; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/vo/log/AccessLogPageVo.java b/system/system-start/src/main/java/cn/iocoder/mall/system/application/vo/log/AccessLogPageVo.java similarity index 90% rename from system/system-application/src/main/java/cn/iocoder/mall/admin/application/vo/log/AccessLogPageVo.java rename to system/system-start/src/main/java/cn/iocoder/mall/system/application/vo/log/AccessLogPageVo.java index 872205100..f518457d1 100644 --- a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/vo/log/AccessLogPageVo.java +++ b/system/system-start/src/main/java/cn/iocoder/mall/system/application/vo/log/AccessLogPageVo.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.application.vo.log; +package cn.iocoder.mall.system.application.vo.log; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/vo/log/AccessLogVo.java b/system/system-start/src/main/java/cn/iocoder/mall/system/application/vo/log/AccessLogVo.java similarity index 96% rename from system/system-application/src/main/java/cn/iocoder/mall/admin/application/vo/log/AccessLogVo.java rename to system/system-start/src/main/java/cn/iocoder/mall/system/application/vo/log/AccessLogVo.java index 146ba23c1..35140eed5 100644 --- a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/vo/log/AccessLogVo.java +++ b/system/system-start/src/main/java/cn/iocoder/mall/system/application/vo/log/AccessLogVo.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.application.vo.log; +package cn.iocoder.mall.system.application.vo.log; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/vo/resource/ResourceTreeNodeVO.java b/system/system-start/src/main/java/cn/iocoder/mall/system/application/vo/resource/ResourceTreeNodeVO.java similarity index 77% rename from system/system-application/src/main/java/cn/iocoder/mall/admin/application/vo/resource/ResourceTreeNodeVO.java rename to system/system-start/src/main/java/cn/iocoder/mall/system/application/vo/resource/ResourceTreeNodeVO.java index 115d1e54a..05671252b 100644 --- a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/vo/resource/ResourceTreeNodeVO.java +++ b/system/system-start/src/main/java/cn/iocoder/mall/system/application/vo/resource/ResourceTreeNodeVO.java @@ -1,6 +1,6 @@ -package cn.iocoder.mall.admin.application.vo.resource; +package cn.iocoder.mall.system.application.vo.resource; -import cn.iocoder.mall.admin.api.bo.resource.ResourceBO; +import cn.iocoder.mall.system.api.bo.resource.ResourceBO; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/vo/resource/ResourceVO.java b/system/system-start/src/main/java/cn/iocoder/mall/system/application/vo/resource/ResourceVO.java similarity index 95% rename from system/system-application/src/main/java/cn/iocoder/mall/admin/application/vo/resource/ResourceVO.java rename to system/system-start/src/main/java/cn/iocoder/mall/system/application/vo/resource/ResourceVO.java index d7078d7e1..d976b8aeb 100644 --- a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/vo/resource/ResourceVO.java +++ b/system/system-start/src/main/java/cn/iocoder/mall/system/application/vo/resource/ResourceVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.application.vo.resource; +package cn.iocoder.mall.system.application.vo.resource; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/vo/role/RoleResourceTreeNodeVO.java b/system/system-start/src/main/java/cn/iocoder/mall/system/application/vo/role/RoleResourceTreeNodeVO.java similarity index 95% rename from system/system-application/src/main/java/cn/iocoder/mall/admin/application/vo/role/RoleResourceTreeNodeVO.java rename to system/system-start/src/main/java/cn/iocoder/mall/system/application/vo/role/RoleResourceTreeNodeVO.java index 386ae3b01..39d0553ec 100644 --- a/system/system-application/src/main/java/cn/iocoder/mall/admin/application/vo/role/RoleResourceTreeNodeVO.java +++ b/system/system-start/src/main/java/cn/iocoder/mall/system/application/vo/role/RoleResourceTreeNodeVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.admin.application.vo.role; +package cn.iocoder.mall.system.application.vo.role; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/system/system-start/src/main/resources/application.yaml b/system/system-start/src/main/resources/application.yaml new file mode 100644 index 000000000..edd2d3eb0 --- /dev/null +++ b/system/system-start/src/main/resources/application.yaml @@ -0,0 +1,34 @@ +spring: + application: + name: admin-application + + # Spring Cloud 配置项 + cloud: + # Spring Cloud Sentinel 配置项 + sentinel: + transport: + dashboard: s1.iocoder.cn:12088 # Sentinel Dashboard 服务地址 + eager: true # 项目启动时,直接连接到 Sentinel + +# server +server: + port: 18083 + servlet: + context-path: /admin-api/ + +admins: + security: + ignore_urls: /admin-api/admins/passport/login, /admin-api/admins/file/get_qiniu_token + +# qiniu +qiniu: + access-key: YldfyUC7OewoWM63TPYTairqnq8GMJvNek9EGoID + secret-key: zZ7Q8wwZRyaklVvkyLmVydA4WygOBqtc_gTYzalS + bucket: onemall + +swagger: + enable: true # 暂时不去掉 + title: 管理员子系统 + description: 管理员子系统 + version: 1.0.0 + base-package: cn.iocoder.mall.admin.application.controller diff --git a/user/user-application/src/main/java/cn/iocoder/mall/user/application/controller/users/PassportController.java b/user/user-application/src/main/java/cn/iocoder/mall/user/application/controller/users/PassportController.java index 04312a646..fe4c4f322 100644 --- a/user/user-application/src/main/java/cn/iocoder/mall/user/application/controller/users/PassportController.java +++ b/user/user-application/src/main/java/cn/iocoder/mall/user/application/controller/users/PassportController.java @@ -2,9 +2,9 @@ package cn.iocoder.mall.user.application.controller.users; import cn.iocoder.common.framework.constant.UserTypeEnum; import cn.iocoder.common.framework.vo.CommonResult; -import cn.iocoder.mall.admin.api.OAuth2Service; -import cn.iocoder.mall.admin.api.bo.oauth2.OAuth2AccessTokenBO; -import cn.iocoder.mall.admin.api.dto.oauth2.OAuth2RefreshTokenDTO; +import cn.iocoder.mall.system.api.OAuth2Service; +import cn.iocoder.mall.system.api.bo.oauth2.OAuth2AccessTokenBO; +import cn.iocoder.mall.system.api.dto.oauth2.OAuth2RefreshTokenDTO; import cn.iocoder.mall.user.api.MobileCodeService; import cn.iocoder.mall.user.api.UserService; import cn.iocoder.mall.user.api.bo.user.UserAuthenticationBO; diff --git a/user/user-sdk/src/main/java/cn/iocoder/mall/user/sdk/interceptor/UserSecurityInterceptor.java b/user/user-sdk/src/main/java/cn/iocoder/mall/user/sdk/interceptor/UserSecurityInterceptor.java index 0c61fa9ac..ee54f243a 100644 --- a/user/user-sdk/src/main/java/cn/iocoder/mall/user/sdk/interceptor/UserSecurityInterceptor.java +++ b/user/user-sdk/src/main/java/cn/iocoder/mall/user/sdk/interceptor/UserSecurityInterceptor.java @@ -5,10 +5,10 @@ import cn.iocoder.common.framework.exception.ServiceException; import cn.iocoder.common.framework.util.HttpUtil; import cn.iocoder.common.framework.util.MallUtil; import cn.iocoder.common.framework.util.StringUtil; -import cn.iocoder.mall.admin.api.OAuth2Service; -import cn.iocoder.mall.admin.api.bo.oauth2.OAuth2AuthenticationBO; -import cn.iocoder.mall.admin.api.constant.AdminErrorCodeEnum; -import cn.iocoder.mall.admin.api.dto.oauth2.OAuth2GetTokenDTO; +import cn.iocoder.mall.system.api.OAuth2Service; +import cn.iocoder.mall.system.api.bo.oauth2.OAuth2AuthenticationBO; +import cn.iocoder.mall.system.api.constant.AdminErrorCodeEnum; +import cn.iocoder.mall.system.api.dto.oauth2.OAuth2GetTokenDTO; import cn.iocoder.mall.user.sdk.annotation.RequiresLogin; import cn.iocoder.mall.user.sdk.context.UserSecurityContext; import cn.iocoder.mall.user.sdk.context.UserSecurityContextHolder; diff --git a/user/user-service-api/src/main/java/cn/iocoder/mall/user/api/bo/user/UserAuthenticationBO.java b/user/user-service-api/src/main/java/cn/iocoder/mall/user/api/bo/user/UserAuthenticationBO.java index 06e401011..50b942051 100644 --- a/user/user-service-api/src/main/java/cn/iocoder/mall/user/api/bo/user/UserAuthenticationBO.java +++ b/user/user-service-api/src/main/java/cn/iocoder/mall/user/api/bo/user/UserAuthenticationBO.java @@ -1,6 +1,6 @@ package cn.iocoder.mall.user.api.bo.user; -import cn.iocoder.mall.admin.api.bo.oauth2.OAuth2AccessTokenBO; +import cn.iocoder.mall.system.api.bo.oauth2.OAuth2AccessTokenBO; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/user/user-service-impl/src/main/java/cn/iocoder/mall/user/biz/service/UserServiceImpl.java b/user/user-service-impl/src/main/java/cn/iocoder/mall/user/biz/service/UserServiceImpl.java index 212d086a2..29c8e5cb4 100644 --- a/user/user-service-impl/src/main/java/cn/iocoder/mall/user/biz/service/UserServiceImpl.java +++ b/user/user-service-impl/src/main/java/cn/iocoder/mall/user/biz/service/UserServiceImpl.java @@ -6,10 +6,10 @@ import cn.iocoder.common.framework.constant.SysErrorCodeEnum; import cn.iocoder.common.framework.constant.UserTypeEnum; import cn.iocoder.common.framework.util.ServiceExceptionUtil; import cn.iocoder.common.framework.util.ValidationUtil; -import cn.iocoder.mall.admin.api.OAuth2Service; -import cn.iocoder.mall.admin.api.bo.oauth2.OAuth2AccessTokenBO; -import cn.iocoder.mall.admin.api.dto.oauth2.OAuth2CreateTokenDTO; -import cn.iocoder.mall.admin.api.dto.oauth2.OAuth2RemoveTokenByUserDTO; +import cn.iocoder.mall.system.api.OAuth2Service; +import cn.iocoder.mall.system.api.bo.oauth2.OAuth2AccessTokenBO; +import cn.iocoder.mall.system.api.dto.oauth2.OAuth2CreateTokenDTO; +import cn.iocoder.mall.system.api.dto.oauth2.OAuth2RemoveTokenByUserDTO; import cn.iocoder.mall.user.api.UserService; import cn.iocoder.mall.user.api.bo.user.UserAuthenticationBO; import cn.iocoder.mall.user.api.bo.UserBO;