mirror of
https://github.com/zykzhangyukang/Xinguan.git
synced 2024-09-20 06:46:03 +08:00
更新代码
This commit is contained in:
parent
3718064850
commit
9a1c233233
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -6,4 +6,3 @@ xinguan-vue/dist/
|
|||
*.ipr
|
||||
xinguan-web/src/main/resources/3828034_www.zykhome.club.pfx
|
||||
xinguan-web/src/main/resources/pfx-password.txt
|
||||
xinguan-api.iml
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
<outputRelativeToContentRoot value="true" />
|
||||
<module name="xinguan-generator" />
|
||||
<module name="xinguan-web" />
|
||||
<module name="xinguan-common" />
|
||||
<module name="xinguan-system" />
|
||||
|
@ -17,6 +18,7 @@
|
|||
<module name="xinguan-api" target="1.8" />
|
||||
<module name="xinguan-business" target="1.8" />
|
||||
<module name="xinguan-common" target="1.8" />
|
||||
<module name="xinguan-generator" target="1.8" />
|
||||
<module name="xinguan-system" target="1.8" />
|
||||
<module name="xinguan-web" target="1.8" />
|
||||
</bytecodeTargetLevel>
|
||||
|
@ -26,6 +28,7 @@
|
|||
<module name="xinguan-api" options="-parameters" />
|
||||
<module name="xinguan-business" options="-parameters" />
|
||||
<module name="xinguan-common" options="-parameters" />
|
||||
<module name="xinguan-generator" options="-parameters" />
|
||||
<module name="xinguan-system" options="-parameters" />
|
||||
<module name="xinguan-web" options="-parameters" />
|
||||
</option>
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
<component name="Encoding">
|
||||
<file url="file://$PROJECT_DIR$/xinguan-business/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/xinguan-common/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/xinguan-generator/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/xinguan-system/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/xinguan-web/src/main/java" charset="UTF-8" />
|
||||
</component>
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
<module fileurl="file://$PROJECT_DIR$/xinguan-api.iml" filepath="$PROJECT_DIR$/xinguan-api.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/xinguan-business/xinguan-business.iml" filepath="$PROJECT_DIR$/xinguan-business/xinguan-business.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/xinguan-common/xinguan-common.iml" filepath="$PROJECT_DIR$/xinguan-common/xinguan-common.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/xinguan-generator/xinguan-generator.iml" filepath="$PROJECT_DIR$/xinguan-generator/xinguan-generator.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/xinguan-system/xinguan-system.iml" filepath="$PROJECT_DIR$/xinguan-system/xinguan-system.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/xinguan-web/xinguan-web.iml" filepath="$PROJECT_DIR$/xinguan-web/xinguan-web.iml" />
|
||||
</modules>
|
||||
|
|
|
@ -1,26 +1,115 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="BranchesTreeState">
|
||||
<expand>
|
||||
<path>
|
||||
<item name="ROOT" type="e8cecc67:BranchNodeDescriptor" />
|
||||
<item name="LOCAL_ROOT" type="e8cecc67:BranchNodeDescriptor" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="ROOT" type="e8cecc67:BranchNodeDescriptor" />
|
||||
<item name="REMOTE_ROOT" type="e8cecc67:BranchNodeDescriptor" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="ROOT" type="e8cecc67:BranchNodeDescriptor" />
|
||||
<item name="REMOTE_ROOT" type="e8cecc67:BranchNodeDescriptor" />
|
||||
<item name="GROUP_NODE:origin" type="e8cecc67:BranchNodeDescriptor" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="ROOT" type="e8cecc67:BranchNodeDescriptor" />
|
||||
<item name="REMOTE_ROOT" type="e8cecc67:BranchNodeDescriptor" />
|
||||
<item name="GROUP_NODE:origin" type="e8cecc67:BranchNodeDescriptor" />
|
||||
<item name="GROUP_NODE:dependabot" type="e8cecc67:BranchNodeDescriptor" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="ROOT" type="e8cecc67:BranchNodeDescriptor" />
|
||||
<item name="REMOTE_ROOT" type="e8cecc67:BranchNodeDescriptor" />
|
||||
<item name="GROUP_NODE:origin" type="e8cecc67:BranchNodeDescriptor" />
|
||||
<item name="GROUP_NODE:dependabot" type="e8cecc67:BranchNodeDescriptor" />
|
||||
<item name="GROUP_NODE:npm_and_yarn" type="e8cecc67:BranchNodeDescriptor" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="ROOT" type="e8cecc67:BranchNodeDescriptor" />
|
||||
<item name="REMOTE_ROOT" type="e8cecc67:BranchNodeDescriptor" />
|
||||
<item name="GROUP_NODE:origin" type="e8cecc67:BranchNodeDescriptor" />
|
||||
<item name="GROUP_NODE:dependabot" type="e8cecc67:BranchNodeDescriptor" />
|
||||
<item name="GROUP_NODE:npm_and_yarn" type="e8cecc67:BranchNodeDescriptor" />
|
||||
<item name="GROUP_NODE:xinguan-vue" type="e8cecc67:BranchNodeDescriptor" />
|
||||
</path>
|
||||
</expand>
|
||||
<select />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="bc0098de-1555-475b-b0df-4f7e5b9cd099" name="Default Changelist" comment="">
|
||||
<change afterPath="$PROJECT_DIR$/xinguan-generator/pom.xml" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/xinguan-generator/src/main/java/com/coderman/generator/MybatisGenerator.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.gitignore" beforeDir="false" afterPath="$PROJECT_DIR$/.gitignore" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/compiler.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/compiler.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/encodings.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/encodings.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/modules.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/modules.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/doc/images/1.PNG" beforeDir="false" afterPath="$PROJECT_DIR$/document/images/1.PNG" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/doc/images/2.PNG" beforeDir="false" afterPath="$PROJECT_DIR$/document/images/2.PNG" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/doc/images/3.PNG" beforeDir="false" afterPath="$PROJECT_DIR$/document/images/3.PNG" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/doc/images/4.PNG" beforeDir="false" afterPath="$PROJECT_DIR$/document/images/4.PNG" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/mbg.xml" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-generator/src/main/resources/mybatis-generator.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/document/xinguan.sql" beforeDir="false" afterPath="$PROJECT_DIR$/document/xinguan.sql" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/pom.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-business/src/main/java/com/coderman/business/service/HealthService.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-business/src/main/java/com/coderman/business/service/HealthService.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-business/src/main/java/com/coderman/business/service/InStockService.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-business/src/main/java/com/coderman/business/service/InStockService.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-business/src/main/java/com/coderman/business/service/OutStockService.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-business/src/main/java/com/coderman/business/service/OutStockService.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-business/src/main/java/com/coderman/business/service/ProductCategoryService.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-business/src/main/java/com/coderman/business/service/ProductCategoryService.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-business/src/main/java/com/coderman/business/service/ProductService.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-business/src/main/java/com/coderman/business/service/ProductService.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-business/src/main/java/com/coderman/business/service/imp/HealthServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-business/src/main/java/com/coderman/business/service/imp/HealthServiceImpl.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-business/src/main/java/com/coderman/business/service/imp/InStockServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-business/src/main/java/com/coderman/business/service/imp/InStockServiceImpl.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-business/src/main/java/com/coderman/business/service/imp/OutStockServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-business/src/main/java/com/coderman/business/service/imp/OutStockServiceImpl.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-business/src/main/java/com/coderman/business/service/imp/ProductCategoryServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-business/src/main/java/com/coderman/business/service/imp/ProductCategoryServiceImpl.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-business/src/main/java/com/coderman/business/service/imp/ProductServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-business/src/main/java/com/coderman/business/service/imp/ProductServiceImpl.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-business/xinguan-business.iml" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-business/xinguan-business.iml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-common/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-common/pom.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-common/src/main/java/com/coderman/common/dto/UserLoginDTO.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-common/src/main/java/com/coderman/common/dto/UserLoginDTO.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-common/src/main/java/com/coderman/common/error/BaseError.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-common/src/main/java/com/coderman/common/error/BaseError.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-common/src/main/java/com/coderman/common/error/BusinessCodeEnum.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-common/src/main/java/com/coderman/common/error/BusinessCodeEnum.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-common/src/main/java/com/coderman/common/error/BusinessException.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-common/src/main/java/com/coderman/common/error/BusinessException.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-common/src/main/java/com/coderman/common/error/SystemCodeEnum.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-common/src/main/java/com/coderman/common/error/SystemCodeEnum.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-common/src/main/java/com/coderman/common/error/SystemException.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-common/src/main/java/com/coderman/common/error/SystemException.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-common/src/main/java/com/coderman/common/response/ResponseBean.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-common/src/main/java/com/coderman/common/response/ResponseBean.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-common/src/main/java/com/coderman/common/utils/AddressUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-common/src/main/java/com/coderman/common/utils/AddressUtil.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-common/src/main/java/com/coderman/common/utils/FdfsUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-common/src/main/java/com/coderman/common/utils/FdfsUtil.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-common/src/main/java/com/coderman/common/utils/IPUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-common/src/main/java/com/coderman/common/utils/IPUtil.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-common/src/main/java/com/coderman/common/vo/system/UserInfoVO.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-common/src/main/java/com/coderman/common/vo/system/UserInfoVO.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-common/xinguan-common.iml" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-common/xinguan-common.iml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-system/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-system/pom.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-system/src/main/java/com/coderman/system/service/DepartmentService.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-system/src/main/java/com/coderman/system/service/DepartmentService.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-system/src/main/java/com/coderman/system/service/LogService.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-system/src/main/java/com/coderman/system/service/LogService.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-system/src/main/java/com/coderman/system/service/LoginLogService.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-system/src/main/java/com/coderman/system/service/LoginLogService.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-system/src/main/java/com/coderman/system/service/MenuService.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-system/src/main/java/com/coderman/system/service/MenuService.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-system/src/main/java/com/coderman/system/service/RoleService.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-system/src/main/java/com/coderman/system/service/RoleService.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-system/src/main/java/com/coderman/system/service/UploadService.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-system/src/main/java/com/coderman/system/service/UploadService.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-system/src/main/java/com/coderman/system/service/UserService.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-system/src/main/java/com/coderman/system/service/UserService.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-system/src/main/java/com/coderman/system/service/impl/DepartmentServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-system/src/main/java/com/coderman/system/service/impl/DepartmentServiceImpl.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-system/src/main/java/com/coderman/system/service/impl/LogServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-system/src/main/java/com/coderman/system/service/impl/LogServiceImpl.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-system/src/main/java/com/coderman/system/service/impl/LoginLogServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-system/src/main/java/com/coderman/system/service/impl/LoginLogServiceImpl.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-system/src/main/java/com/coderman/system/service/impl/MenuServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-system/src/main/java/com/coderman/system/service/impl/MenuServiceImpl.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-system/src/main/java/com/coderman/system/service/impl/RoleServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-system/src/main/java/com/coderman/system/service/impl/RoleServiceImpl.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-system/src/main/java/com/coderman/system/service/impl/UploadServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-system/src/main/java/com/coderman/system/service/impl/UploadServiceImpl.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-system/src/main/java/com/coderman/system/service/impl/UserServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-system/src/main/java/com/coderman/system/service/impl/UserServiceImpl.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-system/src/main/java/com/coderman/system/shiro/JWTFilter.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-system/src/main/java/com/coderman/system/shiro/JWTFilter.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-system/src/main/java/com/coderman/system/shiro/ShiroConfig.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-system/src/main/java/com/coderman/system/shiro/ShiroConfig.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-system/src/main/java/com/coderman/system/shiro/UserRealm.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-system/src/main/java/com/coderman/system/shiro/UserRealm.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-system/xinguan-system.iml" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-system/xinguan-system.iml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-web/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-web/pom.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-web/src/main/java/com/coderman/config/MyMebMvcConfigurer.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-web/src/main/java/com/coderman/config/MyMebMvcConfigurer.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-web/src/main/java/com/coderman/config/SSLConfig.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-web/src/main/java/com/coderman/config/SSLConfig.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-web/src/main/java/com/coderman/config/SwaggerConfig.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-web/src/main/java/com/coderman/config/SwaggerConfig.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-web/src/main/java/com/coderman/controller/business/ConsumerController.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-web/src/main/java/com/coderman/controller/business/ConsumerController.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-web/src/main/java/com/coderman/controller/business/HealthController.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-web/src/main/java/com/coderman/controller/business/HealthController.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-web/src/main/java/com/coderman/controller/business/InStockController.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-web/src/main/java/com/coderman/controller/business/InStockController.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-web/src/main/java/com/coderman/controller/business/OutStockController.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-web/src/main/java/com/coderman/controller/business/OutStockController.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-web/src/main/java/com/coderman/controller/business/ProductCategoryController.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-web/src/main/java/com/coderman/controller/business/ProductCategoryController.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-web/src/main/java/com/coderman/controller/business/ProductController.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-web/src/main/java/com/coderman/controller/business/ProductController.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-web/src/main/java/com/coderman/controller/business/SupplierController.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-web/src/main/java/com/coderman/controller/business/SupplierController.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-web/src/main/java/com/coderman/controller/system/DepartmentController.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-web/src/main/java/com/coderman/controller/system/DepartmentController.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-web/src/main/java/com/coderman/controller/system/LogController.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-web/src/main/java/com/coderman/controller/system/LogController.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-web/src/main/java/com/coderman/controller/system/LoginLogController.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-web/src/main/java/com/coderman/controller/system/LoginLogController.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-web/src/main/java/com/coderman/controller/system/MenuController.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-web/src/main/java/com/coderman/controller/system/MenuController.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-web/src/main/java/com/coderman/controller/system/RoleController.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-web/src/main/java/com/coderman/controller/system/RoleController.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-web/src/main/java/com/coderman/controller/system/UploadController.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-web/src/main/java/com/coderman/controller/system/UploadController.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-web/src/main/java/com/coderman/controller/system/UserController.java" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-web/src/main/java/com/coderman/controller/system/UserController.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan-web/xinguan-web.iml" beforeDir="false" afterPath="$PROJECT_DIR$/xinguan-web/xinguan-web.iml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/xinguan.sql" beforeDir="false" afterPath="$PROJECT_DIR$/document/xinguan.sql" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
@ -30,12 +119,12 @@
|
|||
<component name="FileTemplateManagerImpl">
|
||||
<option name="RECENT_TEMPLATES">
|
||||
<list>
|
||||
<option value="Enum" />
|
||||
<option value="JUnit5 Test Class" />
|
||||
<option value="Interface" />
|
||||
<option value="Class" />
|
||||
<option value="JavaScript File" />
|
||||
<option value="Vue Single File Component" />
|
||||
<option value="Enum" />
|
||||
<option value="Class" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
|
@ -55,7 +144,6 @@
|
|||
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
|
||||
<component name="ProjectViewState">
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showExcludedFiles" value="false" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent">
|
||||
|
@ -76,7 +164,7 @@
|
|||
<property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrary" value="JUnit5" />
|
||||
<property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrarySuperClass.JUnit5" value="" />
|
||||
<property name="extract.method.default.visibility" value="private" />
|
||||
<property name="last_opened_file_path" value="$PROJECT_DIR$/xinguan-generator/src/main/java/com/coderman/generator" />
|
||||
<property name="last_opened_file_path" value="$PROJECT_DIR$/document" />
|
||||
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
|
||||
<property name="nodejs_npm_path_reset_for_default_project" value="true" />
|
||||
<property name="nodejs_package_manager_path" value="npm" />
|
||||
|
@ -93,11 +181,11 @@
|
|||
<recent name="" />
|
||||
</key>
|
||||
<key name="MoveFile.RECENT_KEYS">
|
||||
<recent name="D:\myworkspace\workspace_idea2\xinguan-api\doc" />
|
||||
<recent name="D:\myworkspace\workspace_idea2\xinguan-api\xinguan-vue\src\views\error" />
|
||||
<recent name="D:\myworkspace\workspace_idea2\xinguan-api\xinguan-vue\src\views\business\product" />
|
||||
<recent name="D:\myworkspace\workspace_idea2\xinguan-api\xinguan-vue\src\views\business" />
|
||||
<recent name="D:\myworkspace\workspace_idea2\xinguan-api\xinguan-web\src\main\resources\static" />
|
||||
<recent name="D:\myworkspace\workspace_idea2\xinguan-api\xinguan-vue\src\views\monitor" />
|
||||
<recent name="D:\myworkspace\workspace_idea2\xinguan-api\xinguan-common\src\main\resources" />
|
||||
<recent name="D:\myworkspace\workspace_idea2\xinguan-api\xinguan-web\src\main\resources\json" />
|
||||
<recent name="D:\myworkspace\workspace_idea2\xinguan-api\doc" />
|
||||
</key>
|
||||
<key name="CopyClassDialog.RECENTS_KEY">
|
||||
<recent name="com.coderman.system.shiro" />
|
||||
|
@ -107,11 +195,11 @@
|
|||
<recent name="com.coderman.common.response" />
|
||||
</key>
|
||||
<key name="CopyFile.RECENT_KEYS">
|
||||
<recent name="D:\myworkspace\workspace_idea2\xinguan-api\xinguan-generator\src\main\java\com\coderman\generator" />
|
||||
<recent name="D:\myworkspace\workspace_idea2\xinguan-api\xinguan-generator\src\main\resources" />
|
||||
<recent name="D:\myworkspace\workspace_idea2\xinguan-api" />
|
||||
<recent name="D:\myworkspace\workspace_idea2\xinguan-api\xinguan-vue\src\views" />
|
||||
<recent name="D:\myworkspace\workspace_idea2\xinguan-api\xinguan-vue\src\views\business\covid19" />
|
||||
<recent name="D:\myworkspace\workspace_idea2\xinguan-api\document" />
|
||||
<recent name="D:\myworkspace\workspace_idea2\xinguan-api\xinguan-vue\public\js" />
|
||||
<recent name="D:\myworkspace\workspace_idea2\xinguan-api\xinguan-web\src\main\java\com\coderman\config" />
|
||||
<recent name="D:\myworkspace\workspace_idea2\xinguan-api\xinguan-web\src\main\resources\ip2region" />
|
||||
<recent name="D:\myworkspace\workspace_idea2\xinguan-api\xinguan-web\src\main\resources" />
|
||||
</key>
|
||||
<key name="CreateClassDialog.RecentsKey">
|
||||
<recent name="com.coderman.api.biz.vo" />
|
||||
|
@ -2449,8 +2537,19 @@
|
|||
<workItem from="1608008023525" duration="3187000" />
|
||||
<workItem from="1608012093553" duration="21295000" />
|
||||
<workItem from="1608039255285" duration="2098000" />
|
||||
<workItem from="1608090675022" duration="562000" />
|
||||
<workItem from="1608090675022" duration="5750000" />
|
||||
<workItem from="1608103262264" duration="129000" />
|
||||
<workItem from="1608114625205" duration="13438000" />
|
||||
<workItem from="1608201379872" duration="13538000" />
|
||||
</task>
|
||||
<task id="LOCAL-00001" summary="添加代码生成器">
|
||||
<created>1608091380480</created>
|
||||
<option name="number" value="00001" />
|
||||
<option name="presentableId" value="LOCAL-00001" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1608091380480</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="2" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TodoView">
|
||||
|
@ -2465,15 +2564,39 @@
|
|||
<component name="TypeScriptGeneratedFilesManager">
|
||||
<option name="version" value="2" />
|
||||
</component>
|
||||
<component name="Vcs.Log.Tabs.Properties">
|
||||
<option name="TAB_STATES">
|
||||
<map>
|
||||
<entry key="MAIN">
|
||||
<value>
|
||||
<State />
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
<option name="oldMeFiltersMigrated" value="true" />
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value="添加代码生成器" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="添加代码生成器" />
|
||||
</component>
|
||||
<component name="WindowStateProjectService">
|
||||
<state x="249" y="0" key="#Project_Structure" timestamp="1608090888851">
|
||||
<screen x="0" y="0" width="1536" height="834" />
|
||||
</state>
|
||||
<state x="249" y="0" key="#Project_Structure/0.0.1536.834@0.0.1536.834" timestamp="1608090888851" />
|
||||
<state x="223" y="72" key="#com.intellij.execution.impl.EditConfigurationsDialog" timestamp="1608021207862">
|
||||
<state x="223" y="72" key="#com.intellij.execution.impl.EditConfigurationsDialog" timestamp="1608117167242">
|
||||
<screen x="0" y="0" width="1536" height="834" />
|
||||
</state>
|
||||
<state x="223" y="72" key="#com.intellij.execution.impl.EditConfigurationsDialog/0.0.1536.834@0.0.1536.834" timestamp="1608021207862" />
|
||||
<state x="223" y="72" key="#com.intellij.execution.impl.EditConfigurationsDialog/0.0.1536.834@0.0.1536.834" timestamp="1608117167242" />
|
||||
<state x="418" y="219" key="#com.intellij.fileTypes.FileTypeChooser" timestamp="1608116812301">
|
||||
<screen x="0" y="0" width="1536" height="834" />
|
||||
</state>
|
||||
<state x="418" y="219" key="#com.intellij.fileTypes.FileTypeChooser/0.0.1536.834@0.0.1536.834" timestamp="1608116812301" />
|
||||
<state x="574" y="123" key="#com.intellij.ide.util.MemberChooser" timestamp="1608094896779">
|
||||
<screen x="0" y="0" width="1536" height="834" />
|
||||
</state>
|
||||
<state x="574" y="123" key="#com.intellij.ide.util.MemberChooser/0.0.1536.834@0.0.1536.834" timestamp="1608094896779" />
|
||||
<state x="499" y="164" key="#com.intellij.refactoring.safeDelete.UnsafeUsagesDialog" timestamp="1608034809535">
|
||||
<screen x="0" y="0" width="1536" height="834" />
|
||||
</state>
|
||||
|
@ -2482,58 +2605,62 @@
|
|||
<screen x="0" y="0" width="1536" height="834" />
|
||||
</state>
|
||||
<state x="350" y="241" width="707" height="593" key="#xdebugger.evaluate/0.0.1536.834@0.0.1536.834" timestamp="1608020791750" />
|
||||
<state x="206" y="0" key="CommitChangelistDialog2" timestamp="1608091377600">
|
||||
<screen x="0" y="0" width="1536" height="834" />
|
||||
</state>
|
||||
<state x="206" y="0" key="CommitChangelistDialog2/0.0.1536.834@0.0.1536.834" timestamp="1608091377600" />
|
||||
<state x="542" y="172" key="FileChooserDialogImpl" timestamp="1607511929001">
|
||||
<screen x="0" y="0" width="1536" height="834" />
|
||||
</state>
|
||||
<state x="542" y="172" key="FileChooserDialogImpl/0.0.1536.834@0.0.1536.834" timestamp="1607511929001" />
|
||||
<state width="1495" height="337" key="GridCell.Tab.0.bottom" timestamp="1608042745340">
|
||||
<state width="1495" height="336" key="GridCell.Tab.0.bottom" timestamp="1608215778730">
|
||||
<screen x="0" y="0" width="1536" height="834" />
|
||||
</state>
|
||||
<state width="1495" height="337" key="GridCell.Tab.0.bottom/0.0.1536.834@0.0.1536.834" timestamp="1608042745340" />
|
||||
<state width="1495" height="337" key="GridCell.Tab.0.center" timestamp="1608042745340">
|
||||
<state width="1495" height="336" key="GridCell.Tab.0.bottom/0.0.1536.834@0.0.1536.834" timestamp="1608215778730" />
|
||||
<state width="1495" height="336" key="GridCell.Tab.0.center" timestamp="1608215778730">
|
||||
<screen x="0" y="0" width="1536" height="834" />
|
||||
</state>
|
||||
<state width="1495" height="337" key="GridCell.Tab.0.center/0.0.1536.834@0.0.1536.834" timestamp="1608042745340" />
|
||||
<state width="1495" height="337" key="GridCell.Tab.0.left" timestamp="1608042745340">
|
||||
<state width="1495" height="336" key="GridCell.Tab.0.center/0.0.1536.834@0.0.1536.834" timestamp="1608215778730" />
|
||||
<state width="1495" height="336" key="GridCell.Tab.0.left" timestamp="1608215778730">
|
||||
<screen x="0" y="0" width="1536" height="834" />
|
||||
</state>
|
||||
<state width="1495" height="337" key="GridCell.Tab.0.left/0.0.1536.834@0.0.1536.834" timestamp="1608042745340" />
|
||||
<state width="1495" height="337" key="GridCell.Tab.0.right" timestamp="1608042745340">
|
||||
<state width="1495" height="336" key="GridCell.Tab.0.left/0.0.1536.834@0.0.1536.834" timestamp="1608215778730" />
|
||||
<state width="1495" height="336" key="GridCell.Tab.0.right" timestamp="1608215778730">
|
||||
<screen x="0" y="0" width="1536" height="834" />
|
||||
</state>
|
||||
<state width="1495" height="337" key="GridCell.Tab.0.right/0.0.1536.834@0.0.1536.834" timestamp="1608042745340" />
|
||||
<state width="1495" height="337" key="GridCell.Tab.1.bottom" timestamp="1608042745340">
|
||||
<state width="1495" height="336" key="GridCell.Tab.0.right/0.0.1536.834@0.0.1536.834" timestamp="1608215778730" />
|
||||
<state width="1495" height="336" key="GridCell.Tab.1.bottom" timestamp="1608215778730">
|
||||
<screen x="0" y="0" width="1536" height="834" />
|
||||
</state>
|
||||
<state width="1495" height="337" key="GridCell.Tab.1.bottom/0.0.1536.834@0.0.1536.834" timestamp="1608042745340" />
|
||||
<state width="1495" height="337" key="GridCell.Tab.1.center" timestamp="1608042745340">
|
||||
<state width="1495" height="336" key="GridCell.Tab.1.bottom/0.0.1536.834@0.0.1536.834" timestamp="1608215778730" />
|
||||
<state width="1495" height="336" key="GridCell.Tab.1.center" timestamp="1608215778730">
|
||||
<screen x="0" y="0" width="1536" height="834" />
|
||||
</state>
|
||||
<state width="1495" height="337" key="GridCell.Tab.1.center/0.0.1536.834@0.0.1536.834" timestamp="1608042745340" />
|
||||
<state width="1495" height="337" key="GridCell.Tab.1.left" timestamp="1608042745340">
|
||||
<state width="1495" height="336" key="GridCell.Tab.1.center/0.0.1536.834@0.0.1536.834" timestamp="1608215778730" />
|
||||
<state width="1495" height="336" key="GridCell.Tab.1.left" timestamp="1608215778730">
|
||||
<screen x="0" y="0" width="1536" height="834" />
|
||||
</state>
|
||||
<state width="1495" height="337" key="GridCell.Tab.1.left/0.0.1536.834@0.0.1536.834" timestamp="1608042745340" />
|
||||
<state width="1495" height="337" key="GridCell.Tab.1.right" timestamp="1608042745340">
|
||||
<state width="1495" height="336" key="GridCell.Tab.1.left/0.0.1536.834@0.0.1536.834" timestamp="1608215778730" />
|
||||
<state width="1495" height="336" key="GridCell.Tab.1.right" timestamp="1608215778730">
|
||||
<screen x="0" y="0" width="1536" height="834" />
|
||||
</state>
|
||||
<state width="1495" height="337" key="GridCell.Tab.1.right/0.0.1536.834@0.0.1536.834" timestamp="1608042745340" />
|
||||
<state width="1495" height="337" key="GridCell.Tab.2.bottom" timestamp="1608042745340">
|
||||
<state width="1495" height="336" key="GridCell.Tab.1.right/0.0.1536.834@0.0.1536.834" timestamp="1608215778730" />
|
||||
<state width="1495" height="336" key="GridCell.Tab.2.bottom" timestamp="1608215778730">
|
||||
<screen x="0" y="0" width="1536" height="834" />
|
||||
</state>
|
||||
<state width="1495" height="337" key="GridCell.Tab.2.bottom/0.0.1536.834@0.0.1536.834" timestamp="1608042745340" />
|
||||
<state width="1495" height="337" key="GridCell.Tab.2.center" timestamp="1608042745340">
|
||||
<state width="1495" height="336" key="GridCell.Tab.2.bottom/0.0.1536.834@0.0.1536.834" timestamp="1608215778730" />
|
||||
<state width="1495" height="336" key="GridCell.Tab.2.center" timestamp="1608215778730">
|
||||
<screen x="0" y="0" width="1536" height="834" />
|
||||
</state>
|
||||
<state width="1495" height="337" key="GridCell.Tab.2.center/0.0.1536.834@0.0.1536.834" timestamp="1608042745340" />
|
||||
<state width="1495" height="337" key="GridCell.Tab.2.left" timestamp="1608042745340">
|
||||
<state width="1495" height="336" key="GridCell.Tab.2.center/0.0.1536.834@0.0.1536.834" timestamp="1608215778730" />
|
||||
<state width="1495" height="336" key="GridCell.Tab.2.left" timestamp="1608215778730">
|
||||
<screen x="0" y="0" width="1536" height="834" />
|
||||
</state>
|
||||
<state width="1495" height="337" key="GridCell.Tab.2.left/0.0.1536.834@0.0.1536.834" timestamp="1608042745340" />
|
||||
<state width="1495" height="337" key="GridCell.Tab.2.right" timestamp="1608042745340">
|
||||
<state width="1495" height="336" key="GridCell.Tab.2.left/0.0.1536.834@0.0.1536.834" timestamp="1608215778730" />
|
||||
<state width="1495" height="336" key="GridCell.Tab.2.right" timestamp="1608215778730">
|
||||
<screen x="0" y="0" width="1536" height="834" />
|
||||
</state>
|
||||
<state width="1495" height="337" key="GridCell.Tab.2.right/0.0.1536.834@0.0.1536.834" timestamp="1608042745340" />
|
||||
<state width="1495" height="336" key="GridCell.Tab.2.right/0.0.1536.834@0.0.1536.834" timestamp="1608215778730" />
|
||||
<state x="384" y="121" key="NewModule_or_Project.wizard" timestamp="1607511635086">
|
||||
<screen x="0" y="0" width="1536" height="834" />
|
||||
</state>
|
||||
|
@ -2542,14 +2669,22 @@
|
|||
<screen x="0" y="0" width="1536" height="834" />
|
||||
</state>
|
||||
<state x="250" y="0" key="SettingsEditor/0.0.1536.834@0.0.1536.834" timestamp="1607512543267" />
|
||||
<state x="490" y="159" width="540" height="524" key="StructurePopup" timestamp="1608116424660">
|
||||
<screen x="0" y="0" width="1536" height="834" />
|
||||
</state>
|
||||
<state x="490" y="159" width="540" height="524" key="StructurePopup/0.0.1536.834@0.0.1536.834" timestamp="1608116424660" />
|
||||
<state x="460" y="157" width="671" height="578" key="find.popup" timestamp="1608093171158">
|
||||
<screen x="0" y="0" width="1536" height="834" />
|
||||
</state>
|
||||
<state x="460" y="157" width="671" height="578" key="find.popup/0.0.1536.834@0.0.1536.834" timestamp="1608093171158" />
|
||||
<state x="194" y="65" width="1179" height="678" key="new project wizard" timestamp="1608090853316">
|
||||
<screen x="0" y="0" width="1536" height="834" />
|
||||
</state>
|
||||
<state x="194" y="65" width="1179" height="678" key="new project wizard/0.0.1536.834@0.0.1536.834" timestamp="1608090853316" />
|
||||
<state x="431" y="155" width="672" height="678" key="search.everywhere.popup" timestamp="1608042242615">
|
||||
<state x="431" y="155" width="672" height="678" key="search.everywhere.popup" timestamp="1608215565042">
|
||||
<screen x="0" y="0" width="1536" height="834" />
|
||||
</state>
|
||||
<state x="431" y="155" width="672" height="678" key="search.everywhere.popup/0.0.1536.834@0.0.1536.834" timestamp="1608042242615" />
|
||||
<state x="431" y="155" width="672" height="678" key="search.everywhere.popup/0.0.1536.834@0.0.1536.834" timestamp="1608215565042" />
|
||||
</component>
|
||||
<component name="XDebuggerManager">
|
||||
<breakpoint-manager>
|
||||
|
@ -2559,6 +2694,16 @@
|
|||
<line>79</line>
|
||||
<option name="timeStamp" value="2" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="java-line">
|
||||
<url>file://$PROJECT_DIR$/xinguan-common/src/main/java/com/coderman/common/error/SystemException.java</url>
|
||||
<line>26</line>
|
||||
<option name="timeStamp" value="10" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="java-line">
|
||||
<url>file://$PROJECT_DIR$/xinguan-common/src/main/java/com/coderman/common/error/SystemException.java</url>
|
||||
<line>31</line>
|
||||
<option name="timeStamp" value="11" />
|
||||
</line-breakpoint>
|
||||
</breakpoints>
|
||||
</breakpoint-manager>
|
||||
</component>
|
||||
|
|
2258
document/xinguan.sql
2258
document/xinguan.sql
File diff suppressed because one or more lines are too long
12
pom.xml
12
pom.xml
|
@ -41,7 +41,7 @@
|
|||
<shiro-spring.version>1.3.2</shiro-spring.version>
|
||||
<java-jwt.version>3.2.0</java-jwt.version>
|
||||
<fastdfs-client.version>1.26.1-RELEASE</fastdfs-client.version>
|
||||
<ip2region.version>1.7</ip2region.version>
|
||||
<ip2region.version>1.7.2</ip2region.version>
|
||||
<UserAgentUtils.version>1.20</UserAgentUtils.version>
|
||||
</properties>
|
||||
|
||||
|
@ -143,14 +143,4 @@
|
|||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.coderman.business.service;
|
||||
|
||||
|
||||
import com.coderman.common.error.BusinessException;
|
||||
import com.coderman.common.model.business.Health;
|
||||
import com.coderman.common.vo.business.HealthVO;
|
||||
import com.coderman.common.vo.system.PageVO;
|
||||
|
@ -16,7 +17,7 @@ public interface HealthService {
|
|||
* 健康上报
|
||||
* @param healthVO
|
||||
*/
|
||||
void report(HealthVO healthVO);
|
||||
void report(HealthVO healthVO) throws BusinessException;
|
||||
|
||||
/**
|
||||
* 今日是否已经报备
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.coderman.business.service;
|
||||
|
||||
|
||||
import com.coderman.common.error.BusinessException;
|
||||
import com.coderman.common.vo.business.InStockDetailVO;
|
||||
import com.coderman.common.vo.business.InStockVO;
|
||||
import com.coderman.common.vo.system.PageVO;
|
||||
|
@ -27,35 +28,35 @@ public interface InStockService {
|
|||
* @param id
|
||||
* @return
|
||||
*/
|
||||
InStockDetailVO detail(Long id, int pageNo, int pageSize);
|
||||
InStockDetailVO detail(Long id, int pageNo, int pageSize) throws BusinessException;
|
||||
|
||||
/**
|
||||
* 删除入库单
|
||||
* @param id
|
||||
*/
|
||||
void delete(Long id);
|
||||
void delete(Long id) throws BusinessException;
|
||||
|
||||
/**
|
||||
* 物资入库
|
||||
* @param inStockVO
|
||||
*/
|
||||
void addIntoStock(InStockVO inStockVO);
|
||||
void addIntoStock(InStockVO inStockVO) throws BusinessException;
|
||||
|
||||
/**
|
||||
* 移入回收站
|
||||
* @param id
|
||||
*/
|
||||
void remove(Long id);
|
||||
void remove(Long id) throws BusinessException;
|
||||
|
||||
/**
|
||||
* 还原从回收站中
|
||||
* @param id
|
||||
*/
|
||||
void back(Long id);
|
||||
void back(Long id) throws BusinessException;
|
||||
|
||||
/**
|
||||
* 入库审核
|
||||
* @param id
|
||||
*/
|
||||
void publish(Long id);
|
||||
void publish(Long id) throws BusinessException;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.coderman.business.service;
|
||||
|
||||
|
||||
import com.coderman.common.error.BusinessException;
|
||||
import com.coderman.common.vo.business.OutStockDetailVO;
|
||||
import com.coderman.common.vo.business.OutStockVO;
|
||||
import com.coderman.common.vo.system.PageVO;
|
||||
|
@ -25,19 +26,19 @@ public interface OutStockService {
|
|||
* 提交物资发放单
|
||||
* @param outStockVO
|
||||
*/
|
||||
void addOutStock(OutStockVO outStockVO);
|
||||
void addOutStock(OutStockVO outStockVO) throws BusinessException;
|
||||
|
||||
/**
|
||||
* 移入回收站
|
||||
* @param id
|
||||
*/
|
||||
void remove(Long id);
|
||||
void remove(Long id) throws BusinessException;
|
||||
|
||||
/**
|
||||
* 恢复发放单
|
||||
* @param id
|
||||
*/
|
||||
void back(Long id);
|
||||
void back(Long id) throws BusinessException;
|
||||
|
||||
/**
|
||||
* 发放单详情
|
||||
|
@ -46,17 +47,17 @@ public interface OutStockService {
|
|||
* @param pageSize
|
||||
* @return
|
||||
*/
|
||||
OutStockDetailVO detail(Long id, Integer pageNum, Integer pageSize);
|
||||
OutStockDetailVO detail(Long id, Integer pageNum, Integer pageSize) throws BusinessException;
|
||||
|
||||
/**
|
||||
* 删除发放单
|
||||
* @param id
|
||||
*/
|
||||
void delete(Long id);
|
||||
void delete(Long id) throws BusinessException;
|
||||
|
||||
/**
|
||||
* 发放单审核
|
||||
* @param id
|
||||
*/
|
||||
void publish(Long id);
|
||||
void publish(Long id) throws BusinessException;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.coderman.business.service;
|
||||
|
||||
|
||||
import com.coderman.common.error.BusinessException;
|
||||
import com.coderman.common.vo.business.ProductCategoryTreeNodeVO;
|
||||
import com.coderman.common.vo.business.ProductCategoryVO;
|
||||
import com.coderman.common.vo.system.PageVO;
|
||||
|
@ -49,7 +50,7 @@ public interface ProductCategoryService {
|
|||
* 删除物资类别
|
||||
* @param id
|
||||
*/
|
||||
void delete(Long id);
|
||||
void delete(Long id) throws BusinessException;
|
||||
|
||||
/**
|
||||
* 查询所物资类别
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.coderman.business.service;
|
||||
|
||||
|
||||
import com.coderman.common.error.BusinessException;
|
||||
import com.coderman.common.vo.business.ProductStockVO;
|
||||
import com.coderman.common.vo.business.ProductVO;
|
||||
import com.coderman.common.vo.system.PageVO;
|
||||
|
@ -49,7 +50,7 @@ public interface ProductService {
|
|||
* 删除商品
|
||||
* @param id
|
||||
*/
|
||||
void delete(Long id);
|
||||
void delete(Long id) throws BusinessException;
|
||||
|
||||
/**
|
||||
* 库存列表
|
||||
|
@ -70,19 +71,19 @@ public interface ProductService {
|
|||
* 移入回收站
|
||||
* @param id
|
||||
*/
|
||||
void remove(Long id);
|
||||
void remove(Long id) throws BusinessException;
|
||||
|
||||
/**
|
||||
* 从回收站恢复数据
|
||||
* @param id
|
||||
*/
|
||||
void back(Long id);
|
||||
void back(Long id) throws BusinessException;
|
||||
|
||||
/**
|
||||
* 物资添加审核
|
||||
* @param id
|
||||
*/
|
||||
void publish(Long id);
|
||||
void publish(Long id) throws BusinessException;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -2,7 +2,8 @@ package com.coderman.business.service.imp;
|
|||
|
||||
import com.coderman.business.mapper.HealthMapper;
|
||||
import com.coderman.business.service.HealthService;
|
||||
import com.coderman.common.exception.ServiceException;
|
||||
import com.coderman.common.error.BusinessCodeEnum;
|
||||
import com.coderman.common.error.BusinessException;
|
||||
import com.coderman.common.model.business.Health;
|
||||
import com.coderman.common.vo.business.HealthVO;
|
||||
import com.coderman.common.vo.system.PageVO;
|
||||
|
@ -32,16 +33,15 @@ public class HealthServiceImpl implements HealthService {
|
|||
* @param healthVO
|
||||
*/
|
||||
@Override
|
||||
public void report(HealthVO healthVO) {
|
||||
public void report(HealthVO healthVO) throws BusinessException {
|
||||
Health report = isReport(healthVO.getUserId());
|
||||
if(report!=null) {
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR, "今日已经打卡,无法重复打卡!");
|
||||
}
|
||||
Health health = new Health();
|
||||
BeanUtils.copyProperties(healthVO,health);
|
||||
health.setCreateTime(new Date());
|
||||
Health report = isReport(healthVO.getUserId());
|
||||
if(report!=null){
|
||||
throw new ServiceException("今日您已经打卡");
|
||||
}else {
|
||||
healthMapper.insert(health);
|
||||
}
|
||||
healthMapper.insert(health);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -51,7 +51,6 @@ public class HealthServiceImpl implements HealthService {
|
|||
*/
|
||||
@Override
|
||||
public Health isReport(Long id) {
|
||||
|
||||
List<Health> health=healthMapper.isReport(id);
|
||||
if(health.size()>0){
|
||||
return health.get(0);
|
||||
|
|
|
@ -3,8 +3,8 @@ package com.coderman.business.service.imp;
|
|||
import com.coderman.business.converter.InStockConverter;
|
||||
import com.coderman.business.mapper.*;
|
||||
import com.coderman.business.service.InStockService;
|
||||
import com.coderman.common.exception.ErrorCodeEnum;
|
||||
import com.coderman.common.exception.ServiceException;
|
||||
import com.coderman.common.error.BusinessCodeEnum;
|
||||
import com.coderman.common.error.BusinessException;
|
||||
import com.coderman.common.model.business.*;
|
||||
import com.coderman.common.response.ActiveUser;
|
||||
import com.coderman.common.vo.business.InStockDetailVO;
|
||||
|
@ -94,16 +94,16 @@ public class InStockServiceImpl implements InStockService {
|
|||
* @return
|
||||
*/
|
||||
@Override
|
||||
public InStockDetailVO detail(Long id, int pageNum, int pageSize) {
|
||||
public InStockDetailVO detail(Long id, int pageNum, int pageSize) throws BusinessException {
|
||||
InStockDetailVO inStockDetailVO = new InStockDetailVO();
|
||||
InStock inStock = inStockMapper.selectByPrimaryKey(id);
|
||||
if(inStock==null){
|
||||
throw new ServiceException("入库单不存在");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"入库单不存在");
|
||||
}
|
||||
BeanUtils.copyProperties(inStock,inStockDetailVO);
|
||||
Supplier supplier = supplierMapper.selectByPrimaryKey(inStock.getSupplierId());
|
||||
if(supplier==null){
|
||||
throw new ServiceException("提供物资方不存在,或已被删除");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"提供物资方不存在,或已被删除");
|
||||
}
|
||||
SupplierVO supplierVO = new SupplierVO();
|
||||
BeanUtils.copyProperties(supplier,supplierVO);
|
||||
|
@ -129,29 +129,28 @@ public class InStockServiceImpl implements InStockService {
|
|||
inStockItemVO.setCount(inStockInfo.getProductNumber());
|
||||
inStockDetailVO.getItemVOS().add(inStockItemVO);
|
||||
}else {
|
||||
throw new ServiceException("编号为:["+pNum+"]的物资找不到,或已被删除");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"编号为:["+pNum+"]的物资找不到,或已被删除");
|
||||
}
|
||||
}
|
||||
}else {
|
||||
throw new ServiceException("入库编号为:["+inNum+"]的明细找不到,或已被删除");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"入库编号为:["+inNum+"]的明细找不到,或已被删除");
|
||||
}
|
||||
return inStockDetailVO;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void delete(Long id) {
|
||||
public void delete(Long id) throws BusinessException {
|
||||
InStock in = new InStock();
|
||||
in.setId(id);
|
||||
InStock inStock = inStockMapper.selectByPrimaryKey(in);
|
||||
//只有处于回收站,或者待审核的情况下可删除
|
||||
if(inStock==null){
|
||||
throw new ServiceException("入库单不存在");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"入库单不存在");
|
||||
}else if(inStock.getStatus()!=1&&inStock.getStatus()!=2){
|
||||
throw new ServiceException("入库单状态错误,无法删除");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"入库单状态错误,无法删除");
|
||||
}else {
|
||||
int i = inStockMapper.deleteByPrimaryKey(id);
|
||||
System.out.println(i);
|
||||
inStockMapper.deleteByPrimaryKey(id);
|
||||
}
|
||||
String inNum = inStock.getInNum();//单号
|
||||
Example o = new Example(InStockInfo.class);
|
||||
|
@ -165,7 +164,7 @@ public class InStockServiceImpl implements InStockService {
|
|||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public void addIntoStock(InStockVO inStockVO) {
|
||||
public void addIntoStock(InStockVO inStockVO) throws BusinessException {
|
||||
//随机生成入库单号
|
||||
String IN_STOCK_NUM = UUID.randomUUID().toString().substring(0, 32).replace("-","");
|
||||
int itemNumber=0;//记录该单的总数
|
||||
|
@ -180,13 +179,13 @@ public class InStockServiceImpl implements InStockService {
|
|||
Integer productId = (Integer) item.get("productId");
|
||||
Product dbProduct = productMapper.selectByPrimaryKey(productId);
|
||||
if (dbProduct == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.PRODUCT_NOT_FOUND);
|
||||
throw new BusinessException(BusinessCodeEnum.PRODUCT_NOT_FOUND);
|
||||
}else if(dbProduct.getStatus()==1) {
|
||||
throw new ServiceException(ErrorCodeEnum.PRODUCT_IS_REMOVE, dbProduct.getName() + "物资已被回收,无法入库");
|
||||
throw new BusinessException(BusinessCodeEnum.PRODUCT_IS_REMOVE, dbProduct.getName() + "物资已被回收,无法入库");
|
||||
} else if(dbProduct.getStatus()==2){
|
||||
throw new ServiceException(ErrorCodeEnum.PRODUCT_WAIT_PASS, dbProduct.getName() + "物资待审核,无法入库");
|
||||
throw new BusinessException(BusinessCodeEnum.PRODUCT_WAIT_PASS, dbProduct.getName() + "物资待审核,无法入库");
|
||||
}else if(productNumber<=0){
|
||||
throw new ServiceException(ErrorCodeEnum.PRODUCT_IN_STOCK_NUMBER_ERROR,dbProduct.getName()+"入库数量不合法,无法入库");
|
||||
throw new BusinessException(BusinessCodeEnum.PRODUCT_IN_STOCK_NUMBER_ERROR,dbProduct.getName()+"入库数量不合法,无法入库");
|
||||
} else {
|
||||
itemNumber += productNumber;
|
||||
//插入入库单明细
|
||||
|
@ -213,7 +212,7 @@ public class InStockServiceImpl implements InStockService {
|
|||
inStock.setStatus(2);
|
||||
inStockMapper.insert(inStock);
|
||||
}else {
|
||||
throw new ServiceException(ErrorCodeEnum.PRODUCT_IN_STOCK_EMPTY);
|
||||
throw new BusinessException(BusinessCodeEnum.PRODUCT_IN_STOCK_EMPTY);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -222,15 +221,15 @@ public class InStockServiceImpl implements InStockService {
|
|||
* @param id
|
||||
*/
|
||||
@Override
|
||||
public void remove(Long id) {
|
||||
public void remove(Long id) throws BusinessException {
|
||||
InStock inStock = inStockMapper.selectByPrimaryKey(id);
|
||||
if(inStock==null){
|
||||
throw new ServiceException("入库单不存在");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"入库单不存在");
|
||||
}
|
||||
Integer status = inStock.getStatus();
|
||||
//只有status=0,正常的情况下,才可移入回收站
|
||||
if(status!=0){
|
||||
throw new ServiceException("入库单状态不正确");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"入库单状态不正确");
|
||||
}else {
|
||||
InStock in = new InStock();
|
||||
in.setStatus(1);
|
||||
|
@ -244,12 +243,12 @@ public class InStockServiceImpl implements InStockService {
|
|||
* @param id
|
||||
*/
|
||||
@Override
|
||||
public void back(Long id) {
|
||||
public void back(Long id) throws BusinessException {
|
||||
InStock t = new InStock();
|
||||
t.setId(id);
|
||||
InStock inStock = inStockMapper.selectByPrimaryKey(t);
|
||||
if(inStock.getStatus()!=1){
|
||||
throw new ServiceException("入库单状态不正确");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"入库单状态不正确");
|
||||
}else {
|
||||
t.setStatus(0);
|
||||
inStockMapper.updateByPrimaryKeySelective(t);
|
||||
|
@ -261,17 +260,17 @@ public class InStockServiceImpl implements InStockService {
|
|||
* @param id
|
||||
*/
|
||||
@Override
|
||||
public void publish(Long id) {
|
||||
public void publish(Long id) throws BusinessException {
|
||||
InStock inStock = inStockMapper.selectByPrimaryKey(id);
|
||||
Supplier supplier = supplierMapper.selectByPrimaryKey(inStock.getSupplierId());
|
||||
if(inStock==null){
|
||||
throw new ServiceException("入库单不存在");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"入库单不存在");
|
||||
}
|
||||
if(inStock.getStatus()!=2){
|
||||
throw new ServiceException("入库单状态错误");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"入库单状态错误");
|
||||
}
|
||||
if(supplier==null){
|
||||
throw new ServiceException("入库来源信息错误");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"入库来源信息错误");
|
||||
}
|
||||
String inNum = inStock.getInNum();//单号
|
||||
Example o = new Example(InStockInfo.class);
|
||||
|
@ -307,11 +306,11 @@ public class InStockServiceImpl implements InStockService {
|
|||
inStock.setStatus(0);
|
||||
inStockMapper.updateByPrimaryKeySelective(inStock);
|
||||
}else {
|
||||
throw new ServiceException("物资编号为:["+pNum+"]的物资不存在");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"物资编号为:["+pNum+"]的物资不存在");
|
||||
}
|
||||
}
|
||||
}else {
|
||||
throw new ServiceException("入库的明细不能为空");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"入库的明细不能为空");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,8 +3,8 @@ package com.coderman.business.service.imp;
|
|||
import com.coderman.business.converter.OutStockConverter;
|
||||
import com.coderman.business.mapper.*;
|
||||
import com.coderman.business.service.OutStockService;
|
||||
import com.coderman.common.exception.ErrorCodeEnum;
|
||||
import com.coderman.common.exception.ServiceException;
|
||||
import com.coderman.common.error.BusinessCodeEnum;
|
||||
import com.coderman.common.error.BusinessException;
|
||||
import com.coderman.common.model.business.*;
|
||||
import com.coderman.common.response.ActiveUser;
|
||||
import com.coderman.common.vo.business.ConsumerVO;
|
||||
|
@ -88,7 +88,7 @@ public class OutStockServiceImpl implements OutStockService {
|
|||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public void addOutStock(OutStockVO outStockVO) {
|
||||
public void addOutStock(OutStockVO outStockVO) throws BusinessException {
|
||||
//随机生成发放单号
|
||||
String OUT_STOCK_NUM = UUID.randomUUID().toString().substring(0, 32).replace("-","");
|
||||
int itemNumber=0;//记录该单的总数
|
||||
|
@ -103,19 +103,19 @@ public class OutStockServiceImpl implements OutStockService {
|
|||
Integer productId = (Integer) item.get("productId");
|
||||
Product dbProduct = productMapper.selectByPrimaryKey(productId);
|
||||
if (dbProduct == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.PRODUCT_NOT_FOUND);
|
||||
throw new BusinessException(BusinessCodeEnum.PRODUCT_NOT_FOUND);
|
||||
}else if(productNumber<=0){
|
||||
throw new ServiceException(ErrorCodeEnum.PRODUCT_OUT_STOCK_NUMBER_ERROR,dbProduct.getName()+"发放数量不合法,无法入库");
|
||||
throw new BusinessException(BusinessCodeEnum.PRODUCT_OUT_STOCK_NUMBER_ERROR,dbProduct.getName()+"发放数量不合法,无法入库");
|
||||
} else {
|
||||
//校验库存
|
||||
Example o=new Example(ProductStock.class);
|
||||
o.createCriteria().andEqualTo("pNum",dbProduct.getPNum());
|
||||
ProductStock productStock = productStockMapper.selectOneByExample(o);
|
||||
if(productStock==null){
|
||||
throw new ServiceException("该物资在库存中不存在");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"该物资在库存中不存在");
|
||||
}
|
||||
if(productNumber>productStock.getStock()){
|
||||
throw new ServiceException(ErrorCodeEnum.PRODUCT_STOCK_ERROR,dbProduct.getName()+"库存不足,库存剩余:"+productStock);
|
||||
throw new BusinessException(BusinessCodeEnum.PRODUCT_STOCK_ERROR,dbProduct.getName()+"库存不足,库存剩余:"+productStock);
|
||||
}
|
||||
itemNumber += productNumber;
|
||||
//入库单明细
|
||||
|
@ -140,7 +140,7 @@ public class OutStockServiceImpl implements OutStockService {
|
|||
outStock.setStatus(2);
|
||||
outStockMapper.insert(outStock);
|
||||
}else {
|
||||
throw new ServiceException(ErrorCodeEnum.PRODUCT_OUT_STOCK_EMPTY);
|
||||
throw new BusinessException(BusinessCodeEnum.PRODUCT_OUT_STOCK_EMPTY);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -149,15 +149,15 @@ public class OutStockServiceImpl implements OutStockService {
|
|||
* @param id
|
||||
*/
|
||||
@Override
|
||||
public void remove(Long id) {
|
||||
public void remove(Long id) throws BusinessException {
|
||||
OutStock outStock = outStockMapper.selectByPrimaryKey(id);
|
||||
if(outStock==null){
|
||||
throw new ServiceException("发放单不存在");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"发放单不存在");
|
||||
}
|
||||
Integer status = outStock.getStatus();
|
||||
//只有status=0,正常的情况下,才可移入回收站
|
||||
if(status!=0){
|
||||
throw new ServiceException("发放单状态不正确");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"发放单状态不正确");
|
||||
}else {
|
||||
OutStock out = new OutStock();
|
||||
out.setStatus(1);
|
||||
|
@ -171,12 +171,12 @@ public class OutStockServiceImpl implements OutStockService {
|
|||
* @param id
|
||||
*/
|
||||
@Override
|
||||
public void back(Long id) {
|
||||
public void back(Long id) throws BusinessException {
|
||||
OutStock t = new OutStock();
|
||||
t.setId(id);
|
||||
OutStock outStock = outStockMapper.selectByPrimaryKey(t);
|
||||
if(outStock.getStatus()!=1){
|
||||
throw new ServiceException("发放单状态不正确");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"发放单状态不正确");
|
||||
}else {
|
||||
t.setStatus(0);
|
||||
outStockMapper.updateByPrimaryKeySelective(t);
|
||||
|
@ -191,16 +191,16 @@ public class OutStockServiceImpl implements OutStockService {
|
|||
* @return
|
||||
*/
|
||||
@Override
|
||||
public OutStockDetailVO detail(Long id, Integer pageNum, Integer pageSize) {
|
||||
public OutStockDetailVO detail(Long id, Integer pageNum, Integer pageSize) throws BusinessException {
|
||||
OutStockDetailVO outStockDetailVO = new OutStockDetailVO();
|
||||
OutStock outStock = outStockMapper.selectByPrimaryKey(id);
|
||||
if(outStock==null){
|
||||
throw new ServiceException("发放单不存在");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"发放单不存在");
|
||||
}
|
||||
BeanUtils.copyProperties(outStock,outStockDetailVO);
|
||||
Consumer consumer = consumerMapper.selectByPrimaryKey(outStock.getConsumerId());
|
||||
if(consumer==null){
|
||||
throw new ServiceException("物资领取方不存在,或已被删除");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"物资领取方不存在,或已被删除");
|
||||
}
|
||||
ConsumerVO consumerVO = new ConsumerVO();
|
||||
BeanUtils.copyProperties(consumer,consumerVO);
|
||||
|
@ -227,11 +227,11 @@ public class OutStockServiceImpl implements OutStockService {
|
|||
outStockItemVO.setCount(outStockInfo.getProductNumber());
|
||||
outStockDetailVO.getItemVOS().add(outStockItemVO);
|
||||
}else {
|
||||
throw new ServiceException("编号为:["+pNum+"]的物资找不到,或已被删除");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"编号为:["+pNum+"]的物资找不到,或已被删除");
|
||||
}
|
||||
}
|
||||
}else {
|
||||
throw new ServiceException("发放编号为:["+outNum+"]的明细找不到,或已被删除");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"发放编号为:["+outNum+"]的明细找不到,或已被删除");
|
||||
}
|
||||
return outStockDetailVO;
|
||||
}
|
||||
|
@ -241,12 +241,12 @@ public class OutStockServiceImpl implements OutStockService {
|
|||
* @param id
|
||||
*/
|
||||
@Override
|
||||
public void delete(Long id) {
|
||||
public void delete(Long id) throws BusinessException {
|
||||
OutStock outStock = outStockMapper.selectByPrimaryKey(id);
|
||||
if(outStock==null){
|
||||
throw new ServiceException("发放单不存在");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"发放单不存在");
|
||||
}else if(outStock.getStatus()!=1&&outStock.getStatus()!=2){
|
||||
throw new ServiceException("发放单状态错误,无法删除");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"发放单状态错误,无法删除");
|
||||
}else {
|
||||
outStockMapper.deleteByPrimaryKey(id);
|
||||
}
|
||||
|
@ -261,17 +261,17 @@ public class OutStockServiceImpl implements OutStockService {
|
|||
* @param id
|
||||
*/
|
||||
@Override
|
||||
public void publish(Long id) {
|
||||
public void publish(Long id) throws BusinessException {
|
||||
OutStock outStock = outStockMapper.selectByPrimaryKey(id);
|
||||
Consumer consumer = consumerMapper.selectByPrimaryKey(outStock.getConsumerId());
|
||||
if(outStock==null){
|
||||
throw new ServiceException("发放单不存在");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"发放单不存在");
|
||||
}
|
||||
if(outStock.getStatus()!=2){
|
||||
throw new ServiceException("发放单状态错误");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"发放单状态错误");
|
||||
}
|
||||
if(consumer==null){
|
||||
throw new ServiceException("发放来源信息错误");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"发放来源信息错误");
|
||||
}
|
||||
String outNum = outStock.getOutNum();//发放单号
|
||||
Example o = new Example(OutStockInfo.class);
|
||||
|
@ -295,23 +295,23 @@ public class OutStockServiceImpl implements OutStockService {
|
|||
//更新数量
|
||||
ProductStock productStock = productStocks.get(0);
|
||||
if(productStock.getStock()<productNumber){
|
||||
throw new ServiceException("物资:"+product.getName()+"的库存不足");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"物资:"+product.getName()+"的库存不足");
|
||||
}
|
||||
productStock.setStock(productStock.getStock()-productNumber);
|
||||
productStockMapper.updateByPrimaryKey(productStock);
|
||||
}else {
|
||||
throw new ServiceException("该物资在库存中找不到");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"该物资在库存中找不到");
|
||||
}
|
||||
//修改入库单状态.
|
||||
outStock.setCreateTime(new Date());
|
||||
outStock.setStatus(0);
|
||||
outStockMapper.updateByPrimaryKeySelective(outStock);
|
||||
}else {
|
||||
throw new ServiceException("物资编号为:["+pNum+"]的物资不存在");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"物资编号为:["+pNum+"]的物资不存在");
|
||||
}
|
||||
}
|
||||
}else {
|
||||
throw new ServiceException("发放的明细不能为空");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"发放的明细不能为空");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,8 @@ import com.coderman.business.converter.ProductCategoryConverter;
|
|||
import com.coderman.business.mapper.ProductCategoryMapper;
|
||||
import com.coderman.business.mapper.ProductMapper;
|
||||
import com.coderman.business.service.ProductCategoryService;
|
||||
import com.coderman.common.exception.ServiceException;
|
||||
import com.coderman.common.error.BusinessCodeEnum;
|
||||
import com.coderman.common.error.BusinessException;
|
||||
import com.coderman.common.model.business.Product;
|
||||
import com.coderman.common.model.business.ProductCategory;
|
||||
import com.coderman.common.utils.CategoryTreeBuilder;
|
||||
|
@ -103,17 +104,17 @@ public class ProductCategoryServiceImpl implements ProductCategoryService {
|
|||
* @param id
|
||||
*/
|
||||
@Override
|
||||
public void delete(Long id) {
|
||||
public void delete(Long id) throws BusinessException {
|
||||
ProductCategory category = productCategoryMapper.selectByPrimaryKey(id);
|
||||
if(null==category){
|
||||
throw new ServiceException("该分类不存在");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"该分类不存在");
|
||||
}else {
|
||||
//检查是否存在子分类
|
||||
Example o = new Example(ProductCategory.class);
|
||||
o.createCriteria().andEqualTo("pid",id);
|
||||
int childCount=productCategoryMapper.selectCountByExample(o);
|
||||
if(childCount!=0){
|
||||
throw new ServiceException("存在子节点,无法直接删除");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"存在子节点,无法直接删除");
|
||||
}
|
||||
//检查该分类是否有物资引用
|
||||
Example o1 = new Example(Product.class);
|
||||
|
@ -121,7 +122,7 @@ public class ProductCategoryServiceImpl implements ProductCategoryService {
|
|||
.orEqualTo("twoCategoryId",id)
|
||||
.orEqualTo("threeCategoryId",id);
|
||||
if(productMapper.selectCountByExample(o1)!=0){
|
||||
throw new ServiceException("该分类存在物资引用,无法直接删除");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"该分类存在物资引用,无法直接删除");
|
||||
}
|
||||
productCategoryMapper.deleteByPrimaryKey(id);
|
||||
}
|
||||
|
|
|
@ -4,8 +4,8 @@ import com.coderman.business.converter.ProductConverter;
|
|||
import com.coderman.business.mapper.ProductMapper;
|
||||
import com.coderman.business.mapper.ProductStockMapper;
|
||||
import com.coderman.business.service.ProductService;
|
||||
import com.coderman.common.exception.ErrorCodeEnum;
|
||||
import com.coderman.common.exception.ServiceException;
|
||||
import com.coderman.common.error.BusinessCodeEnum;
|
||||
import com.coderman.common.error.BusinessException;
|
||||
import com.coderman.common.model.business.Product;
|
||||
import com.coderman.common.vo.business.ProductStockVO;
|
||||
import com.coderman.common.vo.business.ProductVO;
|
||||
|
@ -151,13 +151,13 @@ public class ProductServiceImpl implements ProductService {
|
|||
* @param id
|
||||
*/
|
||||
@Override
|
||||
public void delete(Long id) {
|
||||
public void delete(Long id) throws BusinessException {
|
||||
Product t = new Product();
|
||||
t.setId(id);
|
||||
Product product = productMapper.selectByPrimaryKey(t);
|
||||
//只有物资处于回收站,或者待审核的情况下可删除
|
||||
if(product.getStatus()!=1&&product.getStatus()!=2){
|
||||
throw new ServiceException(ErrorCodeEnum.PRODUCT_STATUS_ERROR);
|
||||
throw new BusinessException(BusinessCodeEnum.PRODUCT_STATUS_ERROR);
|
||||
}else {
|
||||
productMapper.deleteByPrimaryKey(id);
|
||||
}
|
||||
|
@ -193,12 +193,12 @@ public class ProductServiceImpl implements ProductService {
|
|||
* @param id
|
||||
*/
|
||||
@Override
|
||||
public void remove(Long id) {
|
||||
public void remove(Long id) throws BusinessException {
|
||||
Product t = new Product();
|
||||
t.setId(id);
|
||||
Product product = productMapper.selectByPrimaryKey(t);
|
||||
if(product.getStatus()!=0){
|
||||
throw new ServiceException(ErrorCodeEnum.PRODUCT_STATUS_ERROR);
|
||||
throw new BusinessException(BusinessCodeEnum.PRODUCT_STATUS_ERROR);
|
||||
}else {
|
||||
t.setStatus(1);
|
||||
productMapper.updateByPrimaryKeySelective(t);
|
||||
|
@ -210,12 +210,12 @@ public class ProductServiceImpl implements ProductService {
|
|||
* @param id
|
||||
*/
|
||||
@Override
|
||||
public void back(Long id) {
|
||||
public void back(Long id) throws BusinessException {
|
||||
Product t = new Product();
|
||||
t.setId(id);
|
||||
Product product = productMapper.selectByPrimaryKey(t);
|
||||
if(product.getStatus()!=1){
|
||||
throw new ServiceException(ErrorCodeEnum.PRODUCT_STATUS_ERROR);
|
||||
throw new BusinessException(BusinessCodeEnum.PRODUCT_STATUS_ERROR);
|
||||
}else {
|
||||
t.setStatus(0);
|
||||
productMapper.updateByPrimaryKeySelective(t);
|
||||
|
@ -227,12 +227,12 @@ public class ProductServiceImpl implements ProductService {
|
|||
* @param id
|
||||
*/
|
||||
@Override
|
||||
public void publish(Long id) {
|
||||
public void publish(Long id) throws BusinessException {
|
||||
Product t = new Product();
|
||||
t.setId(id);
|
||||
Product product = productMapper.selectByPrimaryKey(t);
|
||||
if(product.getStatus()!=2){
|
||||
throw new ServiceException(ErrorCodeEnum.PRODUCT_STATUS_ERROR);
|
||||
throw new BusinessException(BusinessCodeEnum.PRODUCT_STATUS_ERROR);
|
||||
}else {
|
||||
t.setStatus(0);
|
||||
productMapper.updateByPrimaryKeySelective(t);
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.8.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-web:1.3.2" level="project" />
|
||||
<orderEntry type="module" module-name="xinguan-common" />
|
||||
<orderEntry type="library" name="Maven: org.lionsoul:ip2region:1.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.lionsoul:ip2region:1.7.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:druid-spring-boot-starter:1.1.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:druid:1.1.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.2.4.RELEASE" level="project" />
|
||||
|
@ -58,7 +58,6 @@
|
|||
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:1.3.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis:mybatis:3.4.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:1.3.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis.generator:mybatis-generator-core:1.3.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.10.2" level="project" />
|
||||
|
|
|
@ -85,5 +85,23 @@
|
|||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**/*.xml</include>
|
||||
</includes>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**.*</include>
|
||||
<include>**/*.*</include><!-- i18n能读取到 -->
|
||||
<include>**/*/*.*</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -1,9 +1,23 @@
|
|||
package com.coderman.common.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* @Author zhangyukang
|
||||
* @Date 2020/12/16 21:40
|
||||
* @Version 1.0
|
||||
**/
|
||||
@Data
|
||||
@ApiModel(value = "用户登入表单")
|
||||
public class UserLoginDTO {
|
||||
@NotBlank(message = "用户名不能为空")
|
||||
@ApiModelProperty(value = "用户名")
|
||||
private String username;
|
||||
@NotBlank(message = "密码不能为空")
|
||||
@ApiModelProperty(value = "密码")
|
||||
private String password;
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ public interface BaseError {
|
|||
* 获取错误信息
|
||||
* @return
|
||||
*/
|
||||
String getErrorMessage();
|
||||
String getErrorMsg();
|
||||
|
||||
|
||||
/**
|
||||
|
@ -26,5 +26,5 @@ public interface BaseError {
|
|||
* @param message
|
||||
* @return
|
||||
*/
|
||||
BaseError setErrorMessage(String message);
|
||||
BaseError setErrorMsg(String message);
|
||||
}
|
||||
|
|
|
@ -14,6 +14,9 @@ import lombok.Getter;
|
|||
@Getter
|
||||
public enum BusinessCodeEnum implements BaseError {
|
||||
|
||||
//通用的异常以0000开头
|
||||
PARAMETER_ERROR(00001,"参数不合法"),
|
||||
|
||||
// 数据操作错误定义
|
||||
BODY_NOT_MATCH(400,"请求的数据格式不符!"),
|
||||
SIGNATURE_NOT_MATCH(401,"请求的数字签名不匹配!"),
|
||||
|
@ -50,7 +53,7 @@ public enum BusinessCodeEnum implements BaseError {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String getErrorMessage() {
|
||||
public String getErrorMsg() {
|
||||
return this.errorMsg;
|
||||
}
|
||||
|
||||
|
@ -59,4 +62,5 @@ public enum BusinessCodeEnum implements BaseError {
|
|||
this.errorMsg=errorMsg;
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -9,6 +9,37 @@ import lombok.Data;
|
|||
* @Version 1.0
|
||||
**/
|
||||
@Data
|
||||
public class BusinessException extends RuntimeException{
|
||||
public class BusinessException extends Exception implements BaseError{
|
||||
|
||||
//所有实现了BaseError的ErrorEnum.
|
||||
private BaseError baseError;
|
||||
|
||||
//直接构造错误消息的构造异常
|
||||
public BusinessException(BaseError baseError){
|
||||
super(baseError.getErrorMsg());
|
||||
this.baseError=baseError;
|
||||
}
|
||||
|
||||
//自定义错误消息的构造异常
|
||||
public BusinessException(BaseError baseError,String customErrorMessage){
|
||||
super();
|
||||
this.baseError=baseError;
|
||||
this.baseError.setErrorMsg(customErrorMessage);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getErrorCode() {
|
||||
return this.baseError.getErrorCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getErrorMsg() {
|
||||
return this.baseError.getErrorMsg();
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseError setErrorMsg(String message) {
|
||||
this.baseError.setErrorMsg(message);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,5 +5,35 @@ package com.coderman.common.error;
|
|||
* @Date 2020/12/16 13:00
|
||||
* @Version 1.0
|
||||
**/
|
||||
public enum SystemCodeEnum {
|
||||
public enum SystemCodeEnum implements BaseError {
|
||||
PARAMETER_ERROR(50000,"参数不合法"),
|
||||
TOKEN_ERROR(50001,"用户未认证")
|
||||
;
|
||||
|
||||
/** 错误码 */
|
||||
private int errorCode;
|
||||
|
||||
/** 错误描述 */
|
||||
private String errorMsg;
|
||||
|
||||
SystemCodeEnum(int errorCode, String errorMsg) {
|
||||
this.errorCode = errorCode;
|
||||
this.errorMsg = errorMsg;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getErrorCode() {
|
||||
return this.errorCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getErrorMsg() {
|
||||
return this.errorMsg;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseError setErrorMsg(String errorMsg) {
|
||||
this.errorMsg=errorMsg;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,5 +5,36 @@ package com.coderman.common.error;
|
|||
* @Date 2020/12/16 12:59
|
||||
* @Version 1.0
|
||||
**/
|
||||
public class SystemException {
|
||||
public class SystemException extends Exception implements BaseError{
|
||||
//所有实现了BaseError的ErrorEnum.
|
||||
private BaseError baseError;
|
||||
|
||||
//直接构造错误消息的构造异常
|
||||
public SystemException(BaseError baseError){
|
||||
super(baseError.getErrorMsg());
|
||||
this.baseError=baseError;
|
||||
}
|
||||
|
||||
//自定义错误消息的构造异常
|
||||
public SystemException(BaseError baseError,String customErrorMessage){
|
||||
super(customErrorMessage);
|
||||
this.baseError=baseError;
|
||||
this.baseError.setErrorMsg(customErrorMessage);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getErrorCode() {
|
||||
return this.baseError.getErrorCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getErrorMsg() {
|
||||
return this.baseError.getErrorMsg();
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseError setErrorMsg(String message) {
|
||||
this.baseError.setErrorMsg(message);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,62 +3,34 @@ package com.coderman.common.response;
|
|||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ResponseBean {
|
||||
public class ResponseBean<T> {
|
||||
|
||||
/** 200:操作成功 -1:操作失败**/
|
||||
|
||||
// http 状态码
|
||||
private int code;
|
||||
|
||||
// 返回信息
|
||||
private String msg;
|
||||
private boolean success;
|
||||
|
||||
// 返回的数据
|
||||
private Object data;
|
||||
private T data;
|
||||
|
||||
public ResponseBean(){}
|
||||
|
||||
public ResponseBean(int code, String msg, Object data) {
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public static ResponseBean error(String message) {
|
||||
ResponseBean responseBean = new ResponseBean();
|
||||
responseBean.setMsg(message);
|
||||
responseBean.setCode(-1);
|
||||
return responseBean;
|
||||
}
|
||||
|
||||
public static ResponseBean error(int code,String message) {
|
||||
ResponseBean responseBean = new ResponseBean();
|
||||
responseBean.setMsg(message);
|
||||
responseBean.setCode(code);
|
||||
return responseBean;
|
||||
}
|
||||
|
||||
public static ResponseBean success(Object data) {
|
||||
ResponseBean responseBean = new ResponseBean();
|
||||
public static <T> ResponseBean<T> success(T data) {
|
||||
ResponseBean<T> responseBean = new ResponseBean<>();
|
||||
responseBean.setSuccess(true);
|
||||
responseBean.setData(data);
|
||||
responseBean.setCode(200);
|
||||
responseBean.setMsg("成功");
|
||||
return responseBean;
|
||||
}
|
||||
|
||||
public static ResponseBean success(String message) {
|
||||
ResponseBean responseBean = new ResponseBean();
|
||||
responseBean.setData(null);
|
||||
responseBean.setCode(200);
|
||||
responseBean.setMsg(message);
|
||||
|
||||
public static <T> ResponseBean<T> error(T errorData) {
|
||||
ResponseBean<T> responseBean = new ResponseBean<>();
|
||||
responseBean.setSuccess(false);
|
||||
responseBean.setData(errorData);
|
||||
return responseBean;
|
||||
}
|
||||
|
||||
public static ResponseBean success() {
|
||||
ResponseBean responseBean = new ResponseBean();
|
||||
responseBean.setData(null);
|
||||
responseBean.setCode(200);
|
||||
responseBean.setMsg("Success");
|
||||
public static <T> ResponseBean<T> success() {
|
||||
ResponseBean<T> responseBean = new ResponseBean<>();
|
||||
responseBean.setSuccess(true);
|
||||
return responseBean;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package com.coderman.common.utils;
|
||||
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.lionsoul.ip2region.DataBlock;
|
||||
import org.lionsoul.ip2region.DbConfig;
|
||||
import org.lionsoul.ip2region.DbSearcher;
|
||||
|
@ -10,7 +9,6 @@ import org.slf4j.LoggerFactory;
|
|||
|
||||
import java.io.File;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author MrBird
|
||||
|
@ -21,44 +19,40 @@ public class AddressUtil {
|
|||
|
||||
public static String getCityInfo(String ip){
|
||||
|
||||
File file;
|
||||
try {
|
||||
//db
|
||||
String dbPath = AddressUtil.class.getResource("/ip2region/ip2region.db").getPath();
|
||||
file= new File(dbPath);
|
||||
if (!file.exists()) {
|
||||
String tmpDir = System.getProperties().getProperty("java.io.tmpdir");
|
||||
dbPath = tmpDir + "ip.db";
|
||||
file = new File(dbPath);
|
||||
FileUtils.copyInputStreamToFile(Objects.requireNonNull(AddressUtil.class.getClassLoader().getResourceAsStream("classpath:ip2region/ip2region.db")), file);
|
||||
}
|
||||
//查询算法
|
||||
int algorithm = DbSearcher.BTREE_ALGORITHM; //B-tree
|
||||
//DbSearcher.BINARY_ALGORITHM //Binary
|
||||
//DbSearcher.MEMORY_ALGORITYM //Memory
|
||||
try {
|
||||
DbConfig config = new DbConfig();
|
||||
DbSearcher searcher = new DbSearcher(config, dbPath);
|
||||
//db
|
||||
String dbPath = IPUtil.class.getResource("/ip2region/ip2region.db").getPath();
|
||||
|
||||
//define the method
|
||||
Method method;
|
||||
method = searcher.getClass().getMethod("btreeSearch", String.class);
|
||||
DataBlock dataBlock;
|
||||
if (!Util.isIpAddress(ip)) {
|
||||
System.out.println("Error: Invalid ip address");
|
||||
}
|
||||
dataBlock = (DataBlock) method.invoke(searcher, ip);
|
||||
return dataBlock.getRegion();
|
||||
} catch (Exception e) {
|
||||
log.info("获取IP失败");
|
||||
return "null";
|
||||
File file = new File(dbPath);
|
||||
if (!file.exists()) {
|
||||
System.out.println("Error: Invalid ip2region.db file");
|
||||
}
|
||||
|
||||
//查询算法
|
||||
int algorithm = DbSearcher.BTREE_ALGORITHM; //B-tree
|
||||
//DbSearcher.BINARY_ALGORITHM //Binary
|
||||
//DbSearcher.MEMORY_ALGORITYM //Memory
|
||||
try {
|
||||
DbConfig config = new DbConfig();
|
||||
DbSearcher searcher = new DbSearcher(config, dbPath);
|
||||
|
||||
//define the method
|
||||
Method method = null;
|
||||
method = searcher.getClass().getMethod("btreeSearch", String.class);
|
||||
|
||||
DataBlock dataBlock = null;
|
||||
if (!Util.isIpAddress(ip)) {
|
||||
System.out.println("Error: Invalid ip address");
|
||||
}
|
||||
}catch (Exception e) {
|
||||
|
||||
dataBlock = (DataBlock) method.invoke(searcher, ip);
|
||||
|
||||
return dataBlock.getRegion();
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
public static void main(String[] args) throws Exception{
|
||||
System.err.println(getCityInfo("127.0.0.1"));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -10,6 +10,8 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
|
@ -96,6 +98,7 @@ public class FdfsUtil {
|
|||
* 删除文件
|
||||
* @param fileUrl
|
||||
*/
|
||||
@Transactional(propagation = Propagation.REQUIRES_NEW)
|
||||
public void deleteFile(String fileUrl) throws FdfsException {
|
||||
if (StringUtils.isEmpty(fileUrl)) {
|
||||
return;
|
||||
|
@ -104,7 +107,7 @@ public class FdfsUtil {
|
|||
StorePath storePath = StorePath.praseFromUrl(fileUrl);
|
||||
storageClient.deleteFile(storePath.getGroup(), storePath.getPath());
|
||||
} catch (FdfsUnsupportStorePathException e) {
|
||||
logger.warn(e.getMessage());
|
||||
logger.warn("删除图片错误:"+e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -9,10 +9,6 @@ public class IPUtil {
|
|||
|
||||
private static final String UNKNOWN = "unknown";
|
||||
|
||||
protected IPUtil(){
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取 IP地址
|
||||
* 使用 Nginx等反向代理软件, 则不能通过 request.getRemoteAddr()获取 IP地址
|
||||
|
@ -30,6 +26,9 @@ public class IPUtil {
|
|||
if (ip == null || ip.length() == 0 || UNKNOWN.equalsIgnoreCase(ip)) {
|
||||
ip = request.getRemoteAddr();
|
||||
}
|
||||
if(ip.contains(",")) {
|
||||
ip=ip.split(",")[0];
|
||||
}
|
||||
return "0:0:0:0:0:0:0:1".equals(ip) ? "127.0.0.1" : ip;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package com.coderman.common.vo.system;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -11,22 +13,31 @@ import java.util.Set;
|
|||
* @Version 1.0
|
||||
**/
|
||||
@Data
|
||||
@ApiModel(value = "用户登入信息")
|
||||
public class UserInfoVO {
|
||||
|
||||
@ApiModelProperty(value = "用户名")
|
||||
private String username;
|
||||
|
||||
@ApiModelProperty(value = "昵称")
|
||||
private String nickname;
|
||||
|
||||
@ApiModelProperty(value = "头像")
|
||||
private String avatar;
|
||||
|
||||
@ApiModelProperty(value = "菜单")
|
||||
private Set<String> url;
|
||||
|
||||
@ApiModelProperty(value = "权限")
|
||||
private Set<String> perms;
|
||||
|
||||
@ApiModelProperty(value = "角色集合")
|
||||
private List<String> roles;
|
||||
|
||||
@ApiModelProperty(value = "所在部门")
|
||||
private String department;
|
||||
|
||||
@ApiModelProperty(value = "是否是超管")
|
||||
private Boolean isAdmin=false;
|
||||
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="Maven: org.lionsoul:ip2region:1.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.lionsoul:ip2region:1.7.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:druid-spring-boot-starter:1.1.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:druid:1.1.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
|
||||
|
@ -53,7 +53,6 @@
|
|||
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:1.3.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis:mybatis:3.4.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:1.3.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis.generator:mybatis-generator-core:1.3.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.10.2" level="project" />
|
||||
|
|
|
@ -23,12 +23,23 @@
|
|||
<artifactId>xinguan-common</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.coderman</groupId>
|
||||
<artifactId>goods</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**/*.xml</include>
|
||||
</includes>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**.*</include>
|
||||
<include>**/*.*</include><!-- i18n能读取到 -->
|
||||
<include>**/*/*.*</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
</build>
|
||||
</project>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.coderman.system.service;
|
||||
|
||||
|
||||
import com.coderman.common.error.SystemException;
|
||||
import com.coderman.common.model.system.Department;
|
||||
import com.coderman.common.vo.system.DeanVO;
|
||||
import com.coderman.common.vo.system.DepartmentVO;
|
||||
|
@ -40,20 +41,20 @@ public interface DepartmentService {
|
|||
* @param id
|
||||
* @return
|
||||
*/
|
||||
DepartmentVO edit(Long id);
|
||||
DepartmentVO edit(Long id) throws SystemException;
|
||||
|
||||
/**
|
||||
* 更新院部门
|
||||
* @param id
|
||||
* @param departmentVO
|
||||
*/
|
||||
void update(Long id, DepartmentVO departmentVO);
|
||||
void update(Long id, DepartmentVO departmentVO) throws SystemException;
|
||||
|
||||
/**
|
||||
* 删除院部门
|
||||
* @param id
|
||||
*/
|
||||
void delete(Long id);
|
||||
void delete(Long id) throws SystemException;
|
||||
|
||||
/**
|
||||
* 所有部门
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.coderman.system.service;
|
||||
|
||||
import com.coderman.common.error.SystemException;
|
||||
import com.coderman.common.model.system.Log;
|
||||
import com.coderman.common.vo.system.LogVO;
|
||||
import com.coderman.common.vo.system.PageVO;
|
||||
|
@ -24,7 +25,7 @@ public interface LogService {
|
|||
* 删除登入日志
|
||||
* @param id
|
||||
*/
|
||||
void delete(Long id);
|
||||
void delete(Long id) throws SystemException;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -40,5 +41,5 @@ public interface LogService {
|
|||
* 批量删除登入日志
|
||||
* @param list
|
||||
*/
|
||||
void batchDelete(List<Long> list);
|
||||
void batchDelete(List<Long> list) throws SystemException;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.coderman.system.service;
|
||||
|
||||
|
||||
import com.coderman.common.error.SystemException;
|
||||
import com.coderman.common.vo.system.LoginLogVO;
|
||||
import com.coderman.common.vo.system.PageVO;
|
||||
import com.coderman.common.vo.system.UserVO;
|
||||
|
@ -27,7 +28,7 @@ public interface LoginLogService {
|
|||
* 删除登入日志
|
||||
* @param id
|
||||
*/
|
||||
void delete(Long id);
|
||||
void delete(Long id) throws SystemException;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -43,7 +44,7 @@ public interface LoginLogService {
|
|||
* 批量删除登入日志
|
||||
* @param list
|
||||
*/
|
||||
void batchDelete(List<Long> list);
|
||||
void batchDelete(List<Long> list) throws SystemException;
|
||||
|
||||
/**
|
||||
* 用户登入报表
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.coderman.system.service;
|
||||
|
||||
|
||||
import com.coderman.common.error.SystemException;
|
||||
import com.coderman.common.model.system.Menu;
|
||||
import com.coderman.common.vo.system.MenuNodeVO;
|
||||
import com.coderman.common.vo.system.MenuVO;
|
||||
|
@ -29,20 +30,20 @@ public interface MenuService {
|
|||
* 删除节点
|
||||
* @param id
|
||||
*/
|
||||
void delete(Long id);
|
||||
void delete(Long id) throws SystemException;
|
||||
|
||||
/**
|
||||
* 编辑节点
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
MenuVO edit(Long id);
|
||||
MenuVO edit(Long id) throws SystemException;
|
||||
|
||||
/**
|
||||
* 更新节点
|
||||
* @param id
|
||||
*/
|
||||
void update(Long id, MenuVO menuVO);
|
||||
void update(Long id, MenuVO menuVO) throws SystemException;
|
||||
|
||||
/**
|
||||
* 所有展开菜单的ID
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.coderman.system.service;
|
||||
|
||||
|
||||
import com.coderman.common.error.SystemException;
|
||||
import com.coderman.common.model.system.Role;
|
||||
import com.coderman.common.vo.system.PageVO;
|
||||
import com.coderman.common.vo.system.RoleVO;
|
||||
|
@ -27,34 +28,34 @@ public interface RoleService {
|
|||
* 添加角色
|
||||
* @param roleVO
|
||||
*/
|
||||
void add(RoleVO roleVO);
|
||||
void add(RoleVO roleVO) throws SystemException;
|
||||
|
||||
/**
|
||||
* 删除角色
|
||||
* @param id
|
||||
*/
|
||||
void deleteById(Long id);
|
||||
void deleteById(Long id) throws SystemException;
|
||||
|
||||
/**
|
||||
* 编辑角色
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
RoleVO edit(Long id);
|
||||
RoleVO edit(Long id) throws SystemException;
|
||||
|
||||
/**
|
||||
* 更新角色
|
||||
* @param id
|
||||
* @param roleVO
|
||||
*/
|
||||
void update(Long id, RoleVO roleVO);
|
||||
void update(Long id, RoleVO roleVO) throws SystemException;
|
||||
|
||||
/**
|
||||
* 根据角色状态
|
||||
* @param id
|
||||
* @param status
|
||||
*/
|
||||
void updateStatus(Long id, Boolean status);
|
||||
void updateStatus(Long id, Boolean status) throws SystemException;
|
||||
|
||||
/**
|
||||
* 查询所有的角色
|
||||
|
@ -67,11 +68,11 @@ public interface RoleService {
|
|||
* @param id
|
||||
* @return
|
||||
*/
|
||||
List<Long> findMenuIdsByRoleId(Long id);
|
||||
List<Long> findMenuIdsByRoleId(Long id) throws SystemException;
|
||||
|
||||
/**
|
||||
* 角色授权
|
||||
* @param mids
|
||||
*/
|
||||
void authority(Long id,Long[] mids);
|
||||
void authority(Long id,Long[] mids) throws SystemException;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.coderman.system.service;
|
||||
|
||||
import com.coderman.common.error.SystemException;
|
||||
import com.coderman.common.model.system.ImageAttachment;
|
||||
import com.coderman.common.vo.system.ImageAttachmentVO;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
@ -13,7 +14,7 @@ import java.util.List;
|
|||
* @Version 1.0
|
||||
**/
|
||||
public interface UploadService {
|
||||
String uploadImage(MultipartFile file) throws IOException; //图片上传
|
||||
String uploadImage(MultipartFile file) throws IOException, SystemException; //图片上传
|
||||
List<ImageAttachment> findImageList(ImageAttachmentVO imageAttachmentVO); //图片列表
|
||||
void delete(Long id); //删除图片
|
||||
void delete(Long id) throws SystemException; //删除图片
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.coderman.system.service;
|
||||
|
||||
import com.coderman.common.error.SystemException;
|
||||
import com.coderman.common.model.system.Menu;
|
||||
import com.coderman.common.model.system.Role;
|
||||
import com.coderman.common.model.system.User;
|
||||
|
@ -28,7 +29,7 @@ public interface UserService {
|
|||
* @param id 用户id
|
||||
* @return
|
||||
*/
|
||||
List<Role> findRolesById(Long id);
|
||||
List<Role> findRolesById(Long id) throws SystemException;
|
||||
|
||||
/**
|
||||
* 根据用户角色查询用户的菜单
|
||||
|
@ -58,7 +59,7 @@ public interface UserService {
|
|||
*
|
||||
* @param id
|
||||
*/
|
||||
void deleteById(Long id);
|
||||
void deleteById(Long id) throws SystemException;
|
||||
|
||||
/**
|
||||
* 更新状态
|
||||
|
@ -66,13 +67,13 @@ public interface UserService {
|
|||
* @param id
|
||||
* @param status
|
||||
*/
|
||||
void updateStatus(Long id, Boolean status);
|
||||
void updateStatus(Long id, Boolean status) throws SystemException;
|
||||
|
||||
/**
|
||||
* 添加用户
|
||||
* @param userVO
|
||||
*/
|
||||
void add(UserVO userVO);
|
||||
void add(UserVO userVO) throws SystemException;
|
||||
|
||||
/**
|
||||
* 更新用户
|
||||
|
@ -80,7 +81,7 @@ public interface UserService {
|
|||
* @param id
|
||||
* @param userVO
|
||||
*/
|
||||
void update(Long id, UserEditVO userVO);
|
||||
void update(Long id, UserEditVO userVO) throws SystemException;
|
||||
|
||||
/**
|
||||
* 编辑用户
|
||||
|
@ -88,7 +89,7 @@ public interface UserService {
|
|||
* @param id
|
||||
* @return
|
||||
*/
|
||||
UserEditVO edit(Long id);
|
||||
UserEditVO edit(Long id) throws SystemException;
|
||||
|
||||
/**
|
||||
* 已拥有的角色ids
|
||||
|
@ -96,7 +97,7 @@ public interface UserService {
|
|||
* @param id 用户id
|
||||
* @return
|
||||
*/
|
||||
List<Long> roles(Long id);
|
||||
List<Long> roles(Long id) throws SystemException;
|
||||
|
||||
/**
|
||||
* 分配角色
|
||||
|
@ -104,7 +105,7 @@ public interface UserService {
|
|||
* @param id
|
||||
* @param rids
|
||||
*/
|
||||
void assignRoles(Long id, Long[] rids);
|
||||
void assignRoles(Long id, Long[] rids) throws SystemException;
|
||||
|
||||
/**
|
||||
* 所有用户
|
||||
|
@ -120,7 +121,7 @@ public interface UserService {
|
|||
* @param password
|
||||
* @return
|
||||
*/
|
||||
String login(String username, String password);
|
||||
String login(String username, String password) throws SystemException;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -128,6 +129,6 @@ public interface UserService {
|
|||
*
|
||||
* @return
|
||||
*/
|
||||
UserInfoVO info();
|
||||
UserInfoVO info() throws SystemException;
|
||||
|
||||
}
|
||||
|
|
|
@ -4,7 +4,8 @@ package com.coderman.system.service.impl;
|
|||
import com.coderman.common.enums.buisiness.BizUserTypeEnum;
|
||||
import com.coderman.common.enums.system.UserStatusEnum;
|
||||
import com.coderman.common.enums.system.UserTypeEnum;
|
||||
import com.coderman.common.exception.ServiceException;
|
||||
import com.coderman.common.error.SystemCodeEnum;
|
||||
import com.coderman.common.error.SystemException;
|
||||
import com.coderman.common.model.system.Department;
|
||||
import com.coderman.common.model.system.Role;
|
||||
import com.coderman.common.model.system.User;
|
||||
|
@ -141,10 +142,10 @@ public class DepartmentServiceImpl implements DepartmentService {
|
|||
* @return
|
||||
*/
|
||||
@Override
|
||||
public DepartmentVO edit(Long id) {
|
||||
public DepartmentVO edit(Long id) throws SystemException {
|
||||
Department department = departmentMapper.selectByPrimaryKey(id);
|
||||
if(department==null){
|
||||
throw new ServiceException("编辑的部门不存在");
|
||||
throw new SystemException(SystemCodeEnum.PARAMETER_ERROR,"编辑的部门不存在");
|
||||
}
|
||||
return DepartmentConverter.converterToDepartmentVO(department);
|
||||
}
|
||||
|
@ -155,10 +156,10 @@ public class DepartmentServiceImpl implements DepartmentService {
|
|||
* @param departmentVO
|
||||
*/
|
||||
@Override
|
||||
public void update(Long id, DepartmentVO departmentVO) {
|
||||
public void update(Long id, DepartmentVO departmentVO) throws SystemException {
|
||||
Department dbDepartment = departmentMapper.selectByPrimaryKey(id);
|
||||
if(dbDepartment==null){
|
||||
throw new ServiceException("要更新的部门不存在");
|
||||
throw new SystemException(SystemCodeEnum.PARAMETER_ERROR,"要更新的部门不存在");
|
||||
}
|
||||
Department department = new Department();
|
||||
BeanUtils.copyProperties(departmentVO,department);
|
||||
|
@ -172,10 +173,10 @@ public class DepartmentServiceImpl implements DepartmentService {
|
|||
* @param id
|
||||
*/
|
||||
@Override
|
||||
public void delete(Long id) {
|
||||
public void delete(Long id) throws SystemException {
|
||||
Department department = departmentMapper.selectByPrimaryKey(id);
|
||||
if(department==null){
|
||||
throw new ServiceException("要删除的部门不存在");
|
||||
throw new SystemException(SystemCodeEnum.PARAMETER_ERROR,"要删除的部门不存在");
|
||||
}
|
||||
departmentMapper.deleteByPrimaryKey(id);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.coderman.system.service.impl;
|
||||
|
||||
import com.coderman.common.exception.ServiceException;
|
||||
import com.coderman.common.error.SystemCodeEnum;
|
||||
import com.coderman.common.error.SystemException;
|
||||
import com.coderman.common.model.system.Log;
|
||||
import com.coderman.common.model.system.LoginLog;
|
||||
import com.coderman.common.vo.system.LogVO;
|
||||
|
@ -44,10 +45,10 @@ public class LogServiceImpl implements LogService {
|
|||
* @param id
|
||||
*/
|
||||
@Override
|
||||
public void delete(Long id) {
|
||||
public void delete(Long id) throws SystemException {
|
||||
Log log = logMapper.selectByPrimaryKey(id);
|
||||
if(log==null){
|
||||
throw new ServiceException("要删除的操作日志不存在");
|
||||
throw new SystemException(SystemCodeEnum.PARAMETER_ERROR,"要删除的操作日志不存在");
|
||||
}
|
||||
logMapper.deleteByPrimaryKey(id);
|
||||
}
|
||||
|
@ -86,11 +87,11 @@ public class LogServiceImpl implements LogService {
|
|||
* @param list
|
||||
*/
|
||||
@Override
|
||||
public void batchDelete(List<Long> list) {
|
||||
public void batchDelete(List<Long> list) throws SystemException {
|
||||
for (Long id : list) {
|
||||
Log log = logMapper.selectByPrimaryKey(id);
|
||||
if(log==null){
|
||||
throw new ServiceException("id="+id+",操作日志不存在");
|
||||
throw new SystemException(SystemCodeEnum.PARAMETER_ERROR,"id="+id+",操作日志不存在");
|
||||
}
|
||||
delete(id);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
package com.coderman.system.service.impl;
|
||||
|
||||
|
||||
import com.coderman.common.exception.ServiceException;
|
||||
import com.coderman.common.error.SystemCodeEnum;
|
||||
import com.coderman.common.error.SystemException;
|
||||
import com.coderman.common.model.system.LoginLog;
|
||||
import com.coderman.common.response.ActiveUser;
|
||||
import com.coderman.common.utils.AddressUtil;
|
||||
|
@ -81,11 +82,11 @@ public class LoginLogServiceImpl implements LoginLogService {
|
|||
* @param list
|
||||
*/
|
||||
@Override
|
||||
public void batchDelete(List<Long> list) {
|
||||
public void batchDelete(List<Long> list) throws SystemException {
|
||||
for (Long id : list) {
|
||||
LoginLog loginLog = loginLogMapper.selectByPrimaryKey(id);
|
||||
if(loginLog==null){
|
||||
throw new ServiceException("id="+id+"登入日志不存在");
|
||||
throw new SystemException(SystemCodeEnum.PARAMETER_ERROR,"id="+id+"登入日志不存在");
|
||||
}
|
||||
delete(id);
|
||||
}
|
||||
|
@ -138,10 +139,10 @@ public class LoginLogServiceImpl implements LoginLogService {
|
|||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public void delete(Long id) {
|
||||
public void delete(Long id) throws SystemException {
|
||||
LoginLog loginLog = loginLogMapper.selectByPrimaryKey(id);
|
||||
if(loginLog==null){
|
||||
throw new ServiceException("登入日志不存在");
|
||||
throw new SystemException(SystemCodeEnum.PARAMETER_ERROR,"登入日志不存在");
|
||||
}
|
||||
loginLogMapper.deleteByPrimaryKey(id);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.coderman.system.service.impl;
|
||||
|
||||
import com.coderman.common.exception.ServiceException;
|
||||
import com.coderman.common.error.SystemCodeEnum;
|
||||
import com.coderman.common.error.SystemException;
|
||||
import com.coderman.common.model.system.Menu;
|
||||
import com.coderman.common.utils.MenuTreeBuilder;
|
||||
import com.coderman.common.vo.system.MenuNodeVO;
|
||||
|
@ -31,12 +32,6 @@ public class MenuServiceImpl implements MenuService {
|
|||
private MenuMapper menuMapper;
|
||||
|
||||
|
||||
@Autowired
|
||||
private RoleMenuMapper roleMenuMapper;
|
||||
|
||||
@Autowired
|
||||
private RoleMapper roleMapper;
|
||||
|
||||
/**
|
||||
* 加载菜单树(按钮和菜单)
|
||||
*
|
||||
|
@ -70,10 +65,10 @@ public class MenuServiceImpl implements MenuService {
|
|||
* @param id
|
||||
*/
|
||||
@Override
|
||||
public void delete(Long id) {
|
||||
public void delete(Long id) throws SystemException {
|
||||
Menu menu = menuMapper.selectByPrimaryKey(id);
|
||||
if(menu==null){
|
||||
throw new ServiceException("要删除的菜单不存在");
|
||||
throw new SystemException(SystemCodeEnum.PARAMETER_ERROR,"要删除的菜单不存在");
|
||||
}
|
||||
menuMapper.deleteByPrimaryKey(id);
|
||||
}
|
||||
|
@ -84,10 +79,10 @@ public class MenuServiceImpl implements MenuService {
|
|||
* @return
|
||||
*/
|
||||
@Override
|
||||
public MenuVO edit(Long id) {
|
||||
public MenuVO edit(Long id) throws SystemException {
|
||||
Menu menu = menuMapper.selectByPrimaryKey(id);
|
||||
if(menu==null){
|
||||
throw new ServiceException("该编辑的菜单不存在");
|
||||
throw new SystemException(SystemCodeEnum.PARAMETER_ERROR,"该编辑的菜单不存在");
|
||||
}
|
||||
return MenuConverter.converterToMenuVO(menu);
|
||||
}
|
||||
|
@ -98,10 +93,10 @@ public class MenuServiceImpl implements MenuService {
|
|||
* @param menuVO
|
||||
*/
|
||||
@Override
|
||||
public void update(Long id, MenuVO menuVO) {
|
||||
public void update(Long id, MenuVO menuVO) throws SystemException {
|
||||
Menu dbMenu = menuMapper.selectByPrimaryKey(id);
|
||||
if(dbMenu==null){
|
||||
throw new ServiceException("要更新的菜单不存在");
|
||||
throw new SystemException(SystemCodeEnum.PARAMETER_ERROR,"要更新的菜单不存在");
|
||||
}
|
||||
Menu menu = new Menu();
|
||||
BeanUtils.copyProperties(menuVO,menu);
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
package com.coderman.system.service.impl;
|
||||
|
||||
import com.coderman.common.enums.system.RoleStatusEnum;
|
||||
import com.coderman.common.exception.ServiceException;
|
||||
import com.coderman.common.error.SystemCodeEnum;
|
||||
import com.coderman.common.error.SystemException;
|
||||
import com.coderman.common.model.system.Menu;
|
||||
import com.coderman.common.model.system.Role;
|
||||
import com.coderman.common.model.system.RoleMenu;
|
||||
|
@ -70,13 +71,13 @@ public class RoleServiceImpl implements RoleService {
|
|||
* @param roleVO
|
||||
*/
|
||||
@Override
|
||||
public void add(RoleVO roleVO) {
|
||||
public void add(RoleVO roleVO) throws SystemException {
|
||||
@NotBlank(message = "角色名必填") String roleName = roleVO.getRoleName();
|
||||
Example o = new Example(Role.class);
|
||||
o.createCriteria().andEqualTo("roleName",roleName);
|
||||
int i = roleMapper.selectCountByExample(o);
|
||||
if(i!=0){
|
||||
throw new ServiceException("该角色名已被占用");
|
||||
throw new SystemException(SystemCodeEnum.PARAMETER_ERROR,"该角色名已被占用");
|
||||
}
|
||||
Role role = new Role();
|
||||
BeanUtils.copyProperties(roleVO,role);
|
||||
|
@ -92,10 +93,10 @@ public class RoleServiceImpl implements RoleService {
|
|||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public void deleteById(Long id) {
|
||||
public void deleteById(Long id) throws SystemException {
|
||||
Role role = roleMapper.selectByPrimaryKey(id);
|
||||
if(role==null){
|
||||
throw new ServiceException("要删除的角色不存在");
|
||||
throw new SystemException(SystemCodeEnum.PARAMETER_ERROR,"要删除的角色不存在");
|
||||
}
|
||||
roleMapper.deleteByPrimaryKey(id);
|
||||
//删除对应的[角色-菜单]记录
|
||||
|
@ -110,10 +111,10 @@ public class RoleServiceImpl implements RoleService {
|
|||
* @return
|
||||
*/
|
||||
@Override
|
||||
public RoleVO edit(Long id) {
|
||||
public RoleVO edit(Long id) throws SystemException {
|
||||
Role role = roleMapper.selectByPrimaryKey(id);
|
||||
if(role==null){
|
||||
throw new ServiceException("编辑的角色不存在");
|
||||
throw new SystemException(SystemCodeEnum.PARAMETER_ERROR,"编辑的角色不存在");
|
||||
}
|
||||
RoleVO roleVO = new RoleVO();
|
||||
BeanUtils.copyProperties(role,roleVO);
|
||||
|
@ -126,11 +127,11 @@ public class RoleServiceImpl implements RoleService {
|
|||
* @param roleVO
|
||||
*/
|
||||
@Override
|
||||
public void update(Long id, RoleVO roleVO) {
|
||||
public void update(Long id, RoleVO roleVO) throws SystemException {
|
||||
@NotBlank(message = "角色名必填") String roleName = roleVO.getRoleName();
|
||||
Role dbRole = roleMapper.selectByPrimaryKey(id);
|
||||
if(dbRole==null){
|
||||
throw new ServiceException("要更新的角色不存在");
|
||||
throw new SystemException(SystemCodeEnum.PARAMETER_ERROR,"要更新的角色不存在");
|
||||
}
|
||||
Example o = new Example(Role.class);
|
||||
o.createCriteria().andEqualTo("roleName",roleName);
|
||||
|
@ -138,7 +139,7 @@ public class RoleServiceImpl implements RoleService {
|
|||
if(!CollectionUtils.isEmpty(roles)){
|
||||
Role role = roles.get(0);
|
||||
if(!role.getId().equals(id)){
|
||||
throw new ServiceException("该角色名已被占用");
|
||||
throw new SystemException(SystemCodeEnum.PARAMETER_ERROR,"该角色名已被占用");
|
||||
}
|
||||
}
|
||||
Role role = new Role();
|
||||
|
@ -153,10 +154,10 @@ public class RoleServiceImpl implements RoleService {
|
|||
* @param status
|
||||
*/
|
||||
@Override
|
||||
public void updateStatus(Long id, Boolean status) {
|
||||
public void updateStatus(Long id, Boolean status) throws SystemException {
|
||||
Role role = roleMapper.selectByPrimaryKey(id);
|
||||
if(role==null){
|
||||
throw new ServiceException("角色不存在");
|
||||
throw new SystemException(SystemCodeEnum.PARAMETER_ERROR,"角色不存在");
|
||||
}
|
||||
Role t = new Role();
|
||||
t.setId(id);
|
||||
|
@ -176,10 +177,10 @@ public class RoleServiceImpl implements RoleService {
|
|||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<Long> findMenuIdsByRoleId(Long id) {
|
||||
public List<Long> findMenuIdsByRoleId(Long id) throws SystemException {
|
||||
Role role = roleMapper.selectByPrimaryKey(id);
|
||||
if(role==null){
|
||||
throw new ServiceException("该角色已不存在");
|
||||
throw new SystemException(SystemCodeEnum.PARAMETER_ERROR,"该角色已不存在");
|
||||
}
|
||||
List<Long> ids=new ArrayList<>();
|
||||
Example o = new Example(RoleMenu.class);
|
||||
|
@ -200,10 +201,10 @@ public class RoleServiceImpl implements RoleService {
|
|||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public void authority(Long id,Long[] mids) {
|
||||
public void authority(Long id,Long[] mids) throws SystemException {
|
||||
Role role = roleMapper.selectByPrimaryKey(id);
|
||||
if(role==null){
|
||||
throw new ServiceException("该角色不存在");
|
||||
throw new SystemException(SystemCodeEnum.PARAMETER_ERROR,"该角色不存在");
|
||||
}
|
||||
//先删除原来的权限
|
||||
Example o = new Example(RoleMenu.class);
|
||||
|
@ -214,7 +215,7 @@ public class RoleServiceImpl implements RoleService {
|
|||
for (Long mid : mids) {
|
||||
Menu menu = menuMapper.selectByPrimaryKey(mid);
|
||||
if(menu==null){
|
||||
throw new ServiceException("menuId="+mid+",菜单权限不存在");
|
||||
throw new SystemException(SystemCodeEnum.PARAMETER_ERROR,"menuId="+mid+",菜单权限不存在");
|
||||
}else {
|
||||
RoleMenu roleMenu = new RoleMenu();
|
||||
roleMenu.setRoleId(id);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.coderman.system.service.impl;
|
||||
|
||||
import com.coderman.common.exception.ServiceException;
|
||||
import com.coderman.common.error.SystemCodeEnum;
|
||||
import com.coderman.common.error.SystemException;
|
||||
import com.coderman.common.model.system.ImageAttachment;
|
||||
import com.coderman.common.utils.FdfsUtil;
|
||||
import com.coderman.common.vo.system.ImageAttachmentVO;
|
||||
|
@ -8,6 +9,7 @@ import com.coderman.system.mapper.ImageAttachmentMapper;
|
|||
import com.coderman.system.service.UploadService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
|
@ -36,9 +38,9 @@ public class UploadServiceImpl implements UploadService {
|
|||
private FdfsUtil fdfsUtil;
|
||||
|
||||
@Override
|
||||
public String uploadImage(MultipartFile file) throws IOException {
|
||||
public String uploadImage(MultipartFile file) throws IOException, SystemException {
|
||||
if (file.isEmpty()) {
|
||||
throw new ServiceException("上传的文件不能为空");
|
||||
throw new SystemException(SystemCodeEnum.PARAMETER_ERROR,"上传的文件不能为空");
|
||||
}
|
||||
InputStream inputStream = file.getInputStream();
|
||||
//文件的原名称
|
||||
|
@ -74,21 +76,21 @@ public class UploadServiceImpl implements UploadService {
|
|||
criteria.andLike("path", "%" + imageAttachmentVO.getPath() + "%");
|
||||
}
|
||||
//拼装图片真实路径
|
||||
List<ImageAttachment> attachments = attachmentMapper.selectByExample(o);
|
||||
// for (ImageAttachment attachment : attachments) {
|
||||
// for (ImageAttachment attachment : attachments) {
|
||||
// attachment.setPath(config.getResHost()+attachment.getPath());
|
||||
// }
|
||||
return attachments;
|
||||
return attachmentMapper.selectByExample(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(Long id) {
|
||||
@Transactional
|
||||
public void delete(Long id) throws SystemException {
|
||||
ImageAttachment image = attachmentMapper.selectByPrimaryKey(id);
|
||||
if(image==null){
|
||||
throw new ServiceException("图片不存在");
|
||||
throw new SystemException(SystemCodeEnum.PARAMETER_ERROR,"图片不存在");
|
||||
}else {
|
||||
attachmentMapper.deleteByPrimaryKey(id);
|
||||
fdfsUtil.deleteFile(image.getPath());
|
||||
// fdfsUtil.deleteFile(image.getPath());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,8 +2,8 @@ package com.coderman.system.service.impl;
|
|||
|
||||
import com.coderman.common.enums.system.UserStatusEnum;
|
||||
import com.coderman.common.enums.system.UserTypeEnum;
|
||||
import com.coderman.common.exception.ErrorCodeEnum;
|
||||
import com.coderman.common.exception.ServiceException;
|
||||
import com.coderman.common.error.SystemCodeEnum;
|
||||
import com.coderman.common.error.SystemException;
|
||||
import com.coderman.common.model.system.*;
|
||||
import com.coderman.common.response.ActiveUser;
|
||||
import com.coderman.common.utils.JWTUtils;
|
||||
|
@ -82,10 +82,10 @@ public class UserServiceImpl implements UserService {
|
|||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<Role> findRolesById(Long id) {
|
||||
public List<Role> findRolesById(Long id) throws SystemException {
|
||||
User dbUser = userMapper.selectByPrimaryKey(id);
|
||||
if(dbUser==null){
|
||||
throw new ServiceException("该用户不存在");
|
||||
throw new SystemException(SystemCodeEnum.PARAMETER_ERROR,"该用户不存在");
|
||||
}
|
||||
List<Role> roles=new ArrayList<>();
|
||||
UserRole t = new UserRole();
|
||||
|
@ -211,16 +211,16 @@ public class UserServiceImpl implements UserService {
|
|||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public void deleteById(Long id) {
|
||||
public void deleteById(Long id) throws SystemException {
|
||||
User user = userMapper.selectByPrimaryKey(id);
|
||||
ActiveUser activeUser = (ActiveUser) SecurityUtils.getSubject().getPrincipal();
|
||||
|
||||
if(user==null){
|
||||
throw new ServiceException("要删除的用户不存在");
|
||||
throw new SystemException(SystemCodeEnum.PARAMETER_ERROR,"要删除的用户不存在");
|
||||
}
|
||||
|
||||
if(user.getId().equals(activeUser.getUser().getId())){
|
||||
throw new ServiceException("不能删除当前登入用户");
|
||||
throw new SystemException(SystemCodeEnum.PARAMETER_ERROR,"不能删除当前登入用户");
|
||||
}
|
||||
|
||||
userMapper.deleteByPrimaryKey(id);
|
||||
|
@ -236,14 +236,14 @@ public class UserServiceImpl implements UserService {
|
|||
* @param status
|
||||
*/
|
||||
@Override
|
||||
public void updateStatus(Long id, Boolean status) {
|
||||
public void updateStatus(Long id, Boolean status) throws SystemException {
|
||||
User dbUser = userMapper.selectByPrimaryKey(id);
|
||||
if(dbUser==null){
|
||||
throw new ServiceException("要更新状态的用户不存在");
|
||||
throw new SystemException(SystemCodeEnum.PARAMETER_ERROR,"要更新状态的用户不存在");
|
||||
}
|
||||
ActiveUser activeUser= (ActiveUser) SecurityUtils.getSubject().getPrincipal();
|
||||
if(dbUser.getId().equals(activeUser.getUser().getId())){
|
||||
throw new ServiceException(ErrorCodeEnum.DoNotAllowToDisableTheCurrentUser);
|
||||
throw new SystemException(SystemCodeEnum.PARAMETER_ERROR,"无法改变当前用户状态");
|
||||
}else {
|
||||
User t = new User();
|
||||
t.setId(id);
|
||||
|
@ -259,18 +259,18 @@ public class UserServiceImpl implements UserService {
|
|||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public void add(UserVO userVO) {
|
||||
public void add(UserVO userVO) throws SystemException {
|
||||
@NotBlank(message = "用户名不能为空") String username = userVO.getUsername();
|
||||
@NotNull(message = "部门id不能为空") Long departmentId = userVO.getDepartmentId();
|
||||
Example o = new Example(User.class);
|
||||
o.createCriteria().andEqualTo("username",username);
|
||||
int i = userMapper.selectCountByExample(o);
|
||||
if(i!=0){
|
||||
throw new ServiceException("该用户名已被占用");
|
||||
throw new SystemException(SystemCodeEnum.PARAMETER_ERROR,"该用户名已被占用");
|
||||
}
|
||||
Department department = departmentMapper.selectByPrimaryKey(departmentId);
|
||||
if(department==null){
|
||||
throw new ServiceException("该部门不存在");
|
||||
throw new SystemException(SystemCodeEnum.PARAMETER_ERROR,"该部门不存在");
|
||||
}
|
||||
User user = new User();
|
||||
BeanUtils.copyProperties(userVO,user);
|
||||
|
@ -292,23 +292,23 @@ public class UserServiceImpl implements UserService {
|
|||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public void update(Long id, UserEditVO userVO) {
|
||||
public void update(Long id, UserEditVO userVO) throws SystemException {
|
||||
User dbUser = userMapper.selectByPrimaryKey(id);
|
||||
@NotBlank(message = "用户名不能为空") String username = userVO.getUsername();
|
||||
@NotNull(message = "部门不能为空") Long departmentId = userVO.getDepartmentId();
|
||||
if(dbUser==null){
|
||||
throw new ServiceException("要删除的用户不存在");
|
||||
throw new SystemException(SystemCodeEnum.PARAMETER_ERROR,"要删除的用户不存在");
|
||||
}
|
||||
Department department = departmentMapper.selectByPrimaryKey(departmentId);
|
||||
if(department==null){
|
||||
throw new ServiceException("该部门不存在");
|
||||
throw new SystemException(SystemCodeEnum.PARAMETER_ERROR,"该部门不存在");
|
||||
}
|
||||
Example o = new Example(User.class);
|
||||
o.createCriteria().andEqualTo("username",username);
|
||||
List<User> users = userMapper.selectByExample(o);
|
||||
if(!CollectionUtils.isEmpty(users)){
|
||||
if(!users.get(0).getId().equals(id)){
|
||||
throw new ServiceException("该用户名已被占用");
|
||||
throw new SystemException(SystemCodeEnum.PARAMETER_ERROR,"该用户名已被占用");
|
||||
}
|
||||
}
|
||||
User user = new User();
|
||||
|
@ -325,10 +325,10 @@ public class UserServiceImpl implements UserService {
|
|||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public UserEditVO edit(Long id) {
|
||||
public UserEditVO edit(Long id) throws SystemException {
|
||||
User user = userMapper.selectByPrimaryKey(id);
|
||||
if(user==null){
|
||||
throw new ServiceException("要编辑的用户不存在");
|
||||
throw new SystemException(SystemCodeEnum.PARAMETER_ERROR,"要编辑的用户不存在");
|
||||
}
|
||||
UserEditVO userEditVO = new UserEditVO();
|
||||
BeanUtils.copyProperties(user,userEditVO);
|
||||
|
@ -346,10 +346,10 @@ public class UserServiceImpl implements UserService {
|
|||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public List<Long> roles(Long id) {
|
||||
public List<Long> roles(Long id) throws SystemException {
|
||||
User user = userMapper.selectByPrimaryKey(id);
|
||||
if(user==null){
|
||||
throw new ServiceException("该用户不存在");
|
||||
throw new SystemException(SystemCodeEnum.PARAMETER_ERROR,"该用户不存在");
|
||||
}
|
||||
Example o = new Example(UserRole.class);
|
||||
o.createCriteria().andEqualTo("userId",user.getId());
|
||||
|
@ -373,11 +373,11 @@ public class UserServiceImpl implements UserService {
|
|||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void assignRoles(Long id, Long[] rids) {
|
||||
public void assignRoles(Long id, Long[] rids) throws SystemException {
|
||||
//删除之前用户的所有角色
|
||||
User user = userMapper.selectByPrimaryKey(id);
|
||||
if(user==null){
|
||||
throw new ServiceException("用户不存在");
|
||||
throw new SystemException(SystemCodeEnum.PARAMETER_ERROR,"用户不存在");
|
||||
}
|
||||
//删除之前分配的
|
||||
Example o = new Example(UserRole.class);
|
||||
|
@ -388,11 +388,11 @@ public class UserServiceImpl implements UserService {
|
|||
for (Long rid : rids) {
|
||||
Role role = roleMapper.selectByPrimaryKey(rid);
|
||||
if(role==null){
|
||||
throw new ServiceException("roleId="+rid+",该角色不存在");
|
||||
throw new SystemException(SystemCodeEnum.PARAMETER_ERROR,"roleId="+rid+",该角色不存在");
|
||||
}
|
||||
//判断角色状态
|
||||
if(role.getStatus()==0){
|
||||
throw new ServiceException("roleName="+role.getRoleName()+",该角色已禁用");
|
||||
throw new SystemException(SystemCodeEnum.PARAMETER_ERROR,"roleName="+role.getRoleName()+",该角色已禁用");
|
||||
}
|
||||
UserRole userRole = new UserRole();
|
||||
userRole.setUserId(id);
|
||||
|
@ -414,7 +414,7 @@ public class UserServiceImpl implements UserService {
|
|||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String login(String username, String password) {
|
||||
public String login(String username, String password) throws SystemException {
|
||||
String token;
|
||||
User user = findUserByName(username);
|
||||
if (user != null) {
|
||||
|
@ -427,10 +427,10 @@ public class UserServiceImpl implements UserService {
|
|||
try {
|
||||
SecurityUtils.getSubject().login(jwtToken);
|
||||
} catch (AuthenticationException e) {
|
||||
throw new ServiceException(e.getMessage());
|
||||
throw new SystemException(SystemCodeEnum.PARAMETER_ERROR,e.getMessage());
|
||||
}
|
||||
} else {
|
||||
throw new ServiceException(ErrorCodeEnum.USER_ACCOUNT_NOT_FOUND);
|
||||
throw new SystemException(SystemCodeEnum.PARAMETER_ERROR,"用户不存在");
|
||||
}
|
||||
return token;
|
||||
}
|
||||
|
@ -441,7 +441,7 @@ public class UserServiceImpl implements UserService {
|
|||
* @return
|
||||
*/
|
||||
@Override
|
||||
public UserInfoVO info() {
|
||||
public UserInfoVO info() throws SystemException {
|
||||
ActiveUser activeUser = (ActiveUser) SecurityUtils.getSubject().getPrincipal();
|
||||
UserInfoVO userInfoVO = new UserInfoVO();
|
||||
userInfoVO.setAvatar(activeUser.getUser().getAvatar());
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package com.coderman.system.shiro;
|
||||
|
||||
import com.coderman.common.error.SystemCodeEnum;
|
||||
import com.coderman.common.error.SystemException;
|
||||
import com.coderman.common.response.ResponseBean;
|
||||
import com.google.gson.Gson;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
@ -18,6 +20,7 @@ import javax.servlet.http.HttpServletRequest;
|
|||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.HashMap;
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
|
@ -93,7 +96,11 @@ public class JWTFilter extends BasicHttpAuthenticationFilter {
|
|||
httpServletResponse.setCharacterEncoding("UTF-8");
|
||||
httpServletResponse.setContentType("application/json; charset=utf-8");
|
||||
try (PrintWriter out = httpServletResponse.getWriter()) {
|
||||
String data = new Gson().toJson(new ResponseBean(4001, msg, null));
|
||||
HashMap<String, Object> errorData = new HashMap<>();
|
||||
errorData.put("errorCode", SystemCodeEnum.TOKEN_ERROR.getErrorCode());
|
||||
errorData.put("errorMsg",SystemCodeEnum.TOKEN_ERROR.getErrorMsg());
|
||||
ResponseBean<HashMap<String, Object>> result = ResponseBean.error(errorData);
|
||||
String data = new Gson().toJson(result);
|
||||
out.append(data);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
|
|
|
@ -54,13 +54,14 @@ public class ShiroConfig {
|
|||
// 所有请求通过我们自己的JWT Filter
|
||||
filterRuleMap.put("/**", "jwt");
|
||||
// 访问401和404页面不通过我们的Filter
|
||||
filterRuleMap.put("/user/login", "anon");
|
||||
filterRuleMap.put("/system/user/login", "anon");
|
||||
filterRuleMap.put("/user/imgCode", "anon");
|
||||
//开放API文档接口
|
||||
filterRuleMap.put("/swagger-ui.html", "anon");
|
||||
filterRuleMap.put("/webjars/**","anon");
|
||||
filterRuleMap.put("/swagger-resources/**","anon");
|
||||
filterRuleMap.put("/v2/**","anon");
|
||||
filterRuleMap.put("/static/**","anon");
|
||||
//sql监控
|
||||
filterRuleMap.put("/druid/**","anon");
|
||||
factoryBean.setFilterChainDefinitionMap(filterRuleMap);
|
||||
|
|
|
@ -6,6 +6,7 @@ import com.coderman.common.model.system.User;
|
|||
import com.coderman.common.response.ActiveUser;
|
||||
import com.coderman.common.utils.JWTUtils;
|
||||
import com.coderman.system.service.UserService;
|
||||
import lombok.SneakyThrows;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.apache.shiro.authc.*;
|
||||
import org.apache.shiro.authz.AuthorizationInfo;
|
||||
|
@ -71,6 +72,7 @@ public class UserRealm extends AuthorizingRealm {
|
|||
/**
|
||||
* 默认使用此方法进行用户名正确与否验证,错误抛出异常即可。
|
||||
*/
|
||||
@SneakyThrows
|
||||
@Override
|
||||
protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken auth) throws AuthenticationException {
|
||||
String token = (String) auth.getCredentials();
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.8.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-web:1.3.2" level="project" />
|
||||
<orderEntry type="module" module-name="xinguan-common" />
|
||||
<orderEntry type="library" name="Maven: org.lionsoul:ip2region:1.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.lionsoul:ip2region:1.7.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:druid-spring-boot-starter:1.1.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:druid:1.1.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.2.4.RELEASE" level="project" />
|
||||
|
@ -58,7 +58,6 @@
|
|||
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:1.3.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis:mybatis:3.4.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:1.3.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis.generator:mybatis-generator-core:1.3.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.10.2" level="project" />
|
||||
|
@ -129,6 +128,5 @@
|
|||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.55" level="project" />
|
||||
<orderEntry type="module" module-name="xinguan-api" />
|
||||
</component>
|
||||
</module>
|
|
@ -7,6 +7,7 @@
|
|||
<groupId>com.coderman</groupId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
<packaging>jar</packaging>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>xinguan-web</artifactId>
|
||||
|
@ -22,10 +23,15 @@
|
|||
<artifactId>xinguan-business</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
package com.coderman.configurer;
|
||||
package com.coderman.config;
|
||||
|
||||
import com.coderman.error.BusinessException;
|
||||
import com.coderman.respone.ApiResponse;
|
||||
import com.coderman.common.error.BusinessException;
|
||||
import com.coderman.common.error.SystemException;
|
||||
import com.coderman.common.response.ResponseBean;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import io.swagger.annotations.ApiResponse;
|
||||
import org.apache.shiro.authz.UnauthorizedException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
@ -29,24 +32,34 @@ public class MyMebMvcConfigurer implements WebMvcConfigurer {
|
|||
@Override
|
||||
public void configureHandlerExceptionResolvers(List<HandlerExceptionResolver> resolvers) {
|
||||
resolvers.add((httpServletRequest, httpServletResponse, o, e) -> {
|
||||
ApiResponse<Object> result;
|
||||
ResponseBean result;
|
||||
HashMap<String, Object> errorData = new HashMap<>();
|
||||
logger.info("请求错误,url:{}", httpServletRequest.getRequestURL());
|
||||
if (e instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException) e;
|
||||
logger.info("业务异常-错误码:{},错误信息:{}", businessException.getErrorCode(), businessException.getErrorMessage());
|
||||
logger.info("业务模块-错误码:{},错误信息:{}", businessException.getErrorCode(), businessException.getErrorMsg());
|
||||
errorData.put("errorCode", businessException.getErrorCode());
|
||||
errorData.put("errorMessage", businessException.getErrorMessage());
|
||||
errorData.put("errorMsg", businessException.getErrorMsg());
|
||||
}else if(e instanceof SystemException){
|
||||
SystemException systemException = (SystemException) e;
|
||||
logger.info("系统模块-错误码:{},错误信息:{}", systemException.getErrorCode(), systemException.getErrorMsg());
|
||||
errorData.put("errorCode", systemException.getErrorCode());
|
||||
errorData.put("errorMsg", systemException.getErrorMsg());
|
||||
} else if(e instanceof UnauthorizedException){
|
||||
UnauthorizedException unauthorizedException = (UnauthorizedException) e;
|
||||
logger.info("系统模块-错误码:{},错误信息:{}", HttpStatus.UNAUTHORIZED.value(), unauthorizedException.getMessage());
|
||||
errorData.put("errorCode", HttpStatus.UNAUTHORIZED.value());
|
||||
errorData.put("errorMsg", "(+﹏+)没有对应的权限");
|
||||
}else if(e instanceof NoHandlerFoundException){
|
||||
logger.error("接口不存在-错误码:{},错误信息:{}", HttpStatus.NOT_FOUND.value(),e.getMessage());
|
||||
errorData.put("errorCode", HttpStatus.NOT_FOUND.value());
|
||||
errorData.put("errorMessage", "API接口:["+httpServletRequest.getServletPath()+"]不存在");
|
||||
} else {
|
||||
errorData.put("errorMsg", "API接口:["+httpServletRequest.getServletPath()+"]不存在");
|
||||
} else {
|
||||
logger.error("系统异常-错误码:{},错误信息:{}", HttpStatus.INTERNAL_SERVER_ERROR.value(),e.getMessage(),e);
|
||||
errorData.put("errorCode", HttpStatus.INTERNAL_SERVER_ERROR.value());
|
||||
errorData.put("errorMessage", "服务器异常,请联系管理员");
|
||||
errorData.put("errorMsg", "服务器异常,请联系管理员");
|
||||
}
|
||||
result = ApiResponse.fail(errorData);
|
||||
result = ResponseBean.error(errorData);
|
||||
responseResult(httpServletResponse, result);
|
||||
return new ModelAndView();
|
||||
});
|
||||
|
@ -59,7 +72,7 @@ public class MyMebMvcConfigurer implements WebMvcConfigurer {
|
|||
* @param response
|
||||
* @param result
|
||||
*/
|
||||
private void responseResult(HttpServletResponse response, ApiResponse<Object> result) {
|
||||
private void responseResult(HttpServletResponse response, ResponseBean result) {
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
response.setHeader("Content-type", "application/json;charset=UTF-8");
|
||||
response.setStatus(HttpStatus.OK.value());
|
||||
|
|
|
@ -8,6 +8,7 @@ import org.apache.tomcat.util.descriptor.web.SecurityConstraint;
|
|||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
//mvn package -DskipTests
|
||||
//@Configuration
|
||||
|
|
|
@ -35,20 +35,15 @@ public class SwaggerConfig {
|
|||
.apis(RequestHandlerSelectors.basePackage("com.coderman"))
|
||||
.paths(PathSelectors.any())
|
||||
.build().apiInfo(new ApiInfoBuilder()
|
||||
.title("在线课程视频学习网站API文档")
|
||||
.description("这是小章同学的毕业设计,在线课程视频学习网站API文档,时间:2021年7月。")
|
||||
.version("1.0")
|
||||
.license("The Apache License")
|
||||
.build())
|
||||
.securitySchemes(securitySchemes())
|
||||
.securityContexts(securityContexts())
|
||||
;
|
||||
.securityContexts(securityContexts());
|
||||
}
|
||||
|
||||
|
||||
private List<ApiKey> securitySchemes() {
|
||||
ArrayList<ApiKey> apiKeyList = Lists.newArrayList();
|
||||
apiKeyList.add(new ApiKey("JSON WEB TOKEN(秘钥)", "jwtToken", "header"));
|
||||
apiKeyList.add(new ApiKey("JSON WEB TOKEN(秘钥)", "Authorization", "header"));
|
||||
return apiKeyList;
|
||||
}
|
||||
|
||||
|
|
|
@ -21,9 +21,9 @@ import java.util.List;
|
|||
* @Date 2020/3/16 20:18
|
||||
* @Version 1.0
|
||||
**/
|
||||
@Api(tags = "物资去向接口")
|
||||
@Api(tags = "业务模块-物资去向相关接口")
|
||||
@RestController
|
||||
@RequestMapping("/consumer")
|
||||
@RequestMapping("/business/consumer")
|
||||
public class ConsumerController {
|
||||
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.coderman.controller.business;
|
|||
|
||||
import com.coderman.business.service.HealthService;
|
||||
import com.coderman.common.annotation.ControllerEndpoint;
|
||||
import com.coderman.common.error.BusinessException;
|
||||
import com.coderman.common.model.business.Health;
|
||||
import com.coderman.common.response.ActiveUser;
|
||||
import com.coderman.common.response.ResponseBean;
|
||||
|
@ -20,9 +21,9 @@ import org.springframework.web.bind.annotation.*;
|
|||
* @Date 2020/5/7 10:14
|
||||
* @Version 1.0
|
||||
**/
|
||||
@Api(tags = "健康上报接口")
|
||||
@Api(tags = "业务模块-健康上报相关接口")
|
||||
@RestController
|
||||
@RequestMapping("/health")
|
||||
@RequestMapping("/business/health")
|
||||
public class HealthController {
|
||||
|
||||
@Autowired
|
||||
|
@ -37,7 +38,7 @@ public class HealthController {
|
|||
@ApiOperation(value = "健康上报",notes = "用户健康上报")
|
||||
@RequiresPermissions({"health:report"})
|
||||
@PostMapping("/report")
|
||||
public ResponseBean report(@Validated @RequestBody HealthVO healthVO){
|
||||
public ResponseBean report(@Validated @RequestBody HealthVO healthVO) throws BusinessException {
|
||||
ActiveUser activeUser = (ActiveUser) SecurityUtils.getSubject().getPrincipal();
|
||||
healthVO.setUserId(activeUser.getUser().getId());
|
||||
healthService.report(healthVO);
|
||||
|
|
|
@ -3,6 +3,8 @@ package com.coderman.controller.business;
|
|||
import com.coderman.business.service.InStockService;
|
||||
import com.coderman.business.service.SupplierService;
|
||||
import com.coderman.common.annotation.ControllerEndpoint;
|
||||
import com.coderman.common.error.BusinessCodeEnum;
|
||||
import com.coderman.common.error.BusinessException;
|
||||
import com.coderman.common.model.business.Supplier;
|
||||
import com.coderman.common.response.ResponseBean;
|
||||
import com.coderman.common.vo.business.InStockDetailVO;
|
||||
|
@ -22,9 +24,9 @@ import org.springframework.web.bind.annotation.*;
|
|||
* @Date 2020/3/19 09:53
|
||||
* @Version 1.0
|
||||
**/
|
||||
@Api(tags = "物资入库接口")
|
||||
@Api(tags = "业务模块-物资入库相关接口")
|
||||
@RestController
|
||||
@RequestMapping("/inStock")
|
||||
@RequestMapping("/business/inStock")
|
||||
public class InStockController {
|
||||
|
||||
@Autowired
|
||||
|
@ -61,28 +63,28 @@ public class InStockController {
|
|||
@ApiOperation(value = "物资入库")
|
||||
@PostMapping("/addIntoStock")
|
||||
@RequiresPermissions({"inStock:in"})
|
||||
public ResponseBean addIntoStock(@RequestBody @Validated InStockVO inStockVO) {
|
||||
public ResponseBean addIntoStock(@RequestBody @Validated InStockVO inStockVO) throws BusinessException {
|
||||
if(inStockVO.getSupplierId()==null){
|
||||
//说明现在添加物资来源
|
||||
SupplierVO supplierVO = new SupplierVO();
|
||||
BeanUtils.copyProperties(inStockVO,supplierVO);
|
||||
if("".equals(supplierVO.getName())||supplierVO.getName()==null){
|
||||
return ResponseBean.error("物资提供方名不能为空");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"物资提供方名不能为空");
|
||||
}
|
||||
if("".equals(supplierVO.getEmail())||supplierVO.getEmail()==null){
|
||||
return ResponseBean.error("邮箱不能为空");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"邮箱不能为空");
|
||||
}
|
||||
if("".equals(supplierVO.getContact())||supplierVO.getContact()==null){
|
||||
return ResponseBean.error("联系人不能为空");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"联系人不能为空");
|
||||
}
|
||||
if("".equals(supplierVO.getAddress())||supplierVO.getAddress()==null){
|
||||
return ResponseBean.error("地址不能为空");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"地址不能为空");
|
||||
}
|
||||
if("".equals(supplierVO.getPhone())||supplierVO.getPhone()==null){
|
||||
return ResponseBean.error("联系方式不能为空");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"联系方式不能为空");
|
||||
}
|
||||
if(supplierVO.getSort()==null){
|
||||
return ResponseBean.error("排序不能为空");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"排序不能为空");
|
||||
}
|
||||
Supplier supplier = supplierService.add(supplierVO);
|
||||
inStockVO.setSupplierId(supplier.getId());
|
||||
|
@ -99,7 +101,7 @@ public class InStockController {
|
|||
@ApiOperation(value = "入库审核")
|
||||
@PutMapping("/publish/{id}")
|
||||
@RequiresPermissions({"inStock:publish"})
|
||||
public ResponseBean publish(@PathVariable Long id) {
|
||||
public ResponseBean publish(@PathVariable Long id) throws BusinessException {
|
||||
inStockService.publish(id);
|
||||
return ResponseBean.success();
|
||||
}
|
||||
|
@ -115,7 +117,7 @@ public class InStockController {
|
|||
@GetMapping("/detail/{id}")
|
||||
public ResponseBean detail(@PathVariable Long id,
|
||||
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
||||
@RequestParam(value = "pageSize",defaultValue = "3") Integer pageSize) {
|
||||
@RequestParam(value = "pageSize",defaultValue = "3") Integer pageSize) throws BusinessException {
|
||||
InStockDetailVO detail = inStockService.detail(id,pageNum,pageSize);
|
||||
return ResponseBean.success(detail);
|
||||
}
|
||||
|
@ -128,7 +130,7 @@ public class InStockController {
|
|||
@RequiresPermissions({"inStock:delete"})
|
||||
@ApiOperation(value = "删除物资入库单")
|
||||
@GetMapping("/delete/{id}")
|
||||
public ResponseBean delete(@PathVariable Long id) {
|
||||
public ResponseBean delete(@PathVariable Long id) throws BusinessException {
|
||||
inStockService.delete(id);
|
||||
return ResponseBean.success();
|
||||
}
|
||||
|
@ -142,7 +144,7 @@ public class InStockController {
|
|||
@ApiOperation(value = "移入回收站", notes = "移入回收站")
|
||||
@RequiresPermissions({"inStock:remove"})
|
||||
@PutMapping("/remove/{id}")
|
||||
public ResponseBean remove(@PathVariable Long id) {
|
||||
public ResponseBean remove(@PathVariable Long id) throws BusinessException {
|
||||
inStockService.remove(id);
|
||||
return ResponseBean.success();
|
||||
}
|
||||
|
@ -156,7 +158,7 @@ public class InStockController {
|
|||
@ApiOperation(value = "恢复数据", notes = "从回收站中恢复入库单")
|
||||
@RequiresPermissions({"inStock:back"})
|
||||
@PutMapping("/back/{id}")
|
||||
public ResponseBean back(@PathVariable Long id) {
|
||||
public ResponseBean back(@PathVariable Long id) throws BusinessException {
|
||||
inStockService.back(id);
|
||||
return ResponseBean.success();
|
||||
}
|
||||
|
|
|
@ -3,6 +3,8 @@ package com.coderman.controller.business;
|
|||
import com.coderman.business.service.ConsumerService;
|
||||
import com.coderman.business.service.OutStockService;
|
||||
import com.coderman.common.annotation.ControllerEndpoint;
|
||||
import com.coderman.common.error.BusinessCodeEnum;
|
||||
import com.coderman.common.error.BusinessException;
|
||||
import com.coderman.common.model.business.Consumer;
|
||||
import com.coderman.common.response.ResponseBean;
|
||||
import com.coderman.common.vo.business.ConsumerVO;
|
||||
|
@ -23,9 +25,9 @@ import org.springframework.web.bind.annotation.*;
|
|||
* @Date 2020/5/10 14:23
|
||||
* @Version 1.0
|
||||
**/
|
||||
@Api(tags = "物资出库接口")
|
||||
@Api(tags = "业务模块-物资出库相关接口")
|
||||
@RestController
|
||||
@RequestMapping("/outStock")
|
||||
@RequestMapping("/business/outStock")
|
||||
public class OutStockController {
|
||||
|
||||
@Autowired
|
||||
|
@ -43,25 +45,25 @@ public class OutStockController {
|
|||
@ApiOperation("提交发放单")
|
||||
@PostMapping("/addOutStock")
|
||||
@RequiresPermissions({"outStock:out"})
|
||||
public ResponseBean addOutStock(@RequestBody @Validated OutStockVO outStockVO){
|
||||
public ResponseBean addOutStock(@RequestBody @Validated OutStockVO outStockVO) throws BusinessException {
|
||||
if(outStockVO.getConsumerId()==null){
|
||||
//说明现在添加物资来源
|
||||
ConsumerVO consumerVO = new ConsumerVO();
|
||||
BeanUtils.copyProperties(outStockVO,consumerVO);
|
||||
if("".equals(consumerVO.getName())||consumerVO.getName()==null){
|
||||
return ResponseBean.error("物资去向名不能为空");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"物资去向名不能为空");
|
||||
}
|
||||
if("".equals(consumerVO.getContact())||consumerVO.getContact()==null){
|
||||
return ResponseBean.error("联系人不能为空");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"联系人不能为空");
|
||||
}
|
||||
if("".equals(consumerVO.getAddress())||consumerVO.getAddress()==null){
|
||||
return ResponseBean.error("地址不能为空");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"地址不能为空");
|
||||
}
|
||||
if("".equals(consumerVO.getPhone())||consumerVO.getPhone()==null){
|
||||
return ResponseBean.error("联系方式不能为空");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"联系方式不能为空");
|
||||
}
|
||||
if(consumerVO.getSort()==null){
|
||||
return ResponseBean.error("排序不能为空");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"排序不能为空");
|
||||
}
|
||||
Consumer consumer = consumerService.add(consumerVO);
|
||||
outStockVO.setConsumerId(consumer.getId());
|
||||
|
@ -98,7 +100,7 @@ public class OutStockController {
|
|||
@ApiOperation(value = "移入回收站", notes = "移入回收站")
|
||||
@RequiresPermissions({"outStock:remove"})
|
||||
@PutMapping("/remove/{id}")
|
||||
public ResponseBean remove(@PathVariable Long id) {
|
||||
public ResponseBean remove(@PathVariable Long id) throws BusinessException {
|
||||
outStockService.remove(id);
|
||||
return ResponseBean.success();
|
||||
}
|
||||
|
@ -113,7 +115,7 @@ public class OutStockController {
|
|||
@GetMapping("/detail/{id}")
|
||||
public ResponseBean detail(@PathVariable Long id,
|
||||
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
||||
@RequestParam(value = "pageSize",defaultValue = "3") Integer pageSize) {
|
||||
@RequestParam(value = "pageSize",defaultValue = "3") Integer pageSize) throws BusinessException {
|
||||
OutStockDetailVO detail = outStockService.detail(id,pageNum,pageSize);
|
||||
return ResponseBean.success(detail);
|
||||
}
|
||||
|
@ -128,7 +130,7 @@ public class OutStockController {
|
|||
@RequiresPermissions({"outStock:delete"})
|
||||
@ApiOperation(value = "删除物资发放单")
|
||||
@GetMapping("/delete/{id}")
|
||||
public ResponseBean delete(@PathVariable Long id) {
|
||||
public ResponseBean delete(@PathVariable Long id) throws BusinessException {
|
||||
outStockService.delete(id);
|
||||
return ResponseBean.success();
|
||||
}
|
||||
|
@ -143,7 +145,7 @@ public class OutStockController {
|
|||
@ApiOperation(value = "入库审核")
|
||||
@PutMapping("/publish/{id}")
|
||||
@RequiresPermissions({"outStock:publish"})
|
||||
public ResponseBean publish(@PathVariable Long id) {
|
||||
public ResponseBean publish(@PathVariable Long id) throws BusinessException {
|
||||
outStockService.publish(id);
|
||||
return ResponseBean.success();
|
||||
}
|
||||
|
@ -159,7 +161,7 @@ public class OutStockController {
|
|||
@ApiOperation(value = "恢复数据", notes = "从回收站中恢复入库单")
|
||||
@RequiresPermissions({"outStock:back"})
|
||||
@PutMapping("/back/{id}")
|
||||
public ResponseBean back(@PathVariable Long id) {
|
||||
public ResponseBean back(@PathVariable Long id) throws BusinessException {
|
||||
outStockService.back(id);
|
||||
return ResponseBean.success();
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.coderman.controller.business;
|
|||
|
||||
import com.coderman.business.service.ProductCategoryService;
|
||||
import com.coderman.common.annotation.ControllerEndpoint;
|
||||
import com.coderman.common.error.BusinessException;
|
||||
import com.coderman.common.response.ResponseBean;
|
||||
import com.coderman.common.vo.business.ProductCategoryTreeNodeVO;
|
||||
import com.coderman.common.vo.business.ProductCategoryVO;
|
||||
|
@ -23,9 +24,9 @@ import java.util.List;
|
|||
* @Date 2020/3/16 17:16
|
||||
* @Version 1.0
|
||||
**/
|
||||
@Api(tags = "物资类别接口")
|
||||
@Api(tags = "业务模块-物资类别相关接口")
|
||||
@RestController
|
||||
@RequestMapping("/productCategory")
|
||||
@RequestMapping("/business/productCategory")
|
||||
public class ProductCategoryController {
|
||||
|
||||
@Autowired
|
||||
|
@ -137,7 +138,7 @@ public class ProductCategoryController {
|
|||
@ApiOperation(value = "删除分类")
|
||||
@RequiresPermissions({"productCategory:delete"})
|
||||
@DeleteMapping("/delete/{id}")
|
||||
public ResponseBean delete(@PathVariable Long id) {
|
||||
public ResponseBean delete(@PathVariable Long id) throws BusinessException {
|
||||
productCategoryService.delete(id);
|
||||
return ResponseBean.success();
|
||||
}
|
||||
|
|
|
@ -2,6 +2,8 @@ package com.coderman.controller.business;
|
|||
|
||||
import com.coderman.business.service.ProductService;
|
||||
import com.coderman.common.annotation.ControllerEndpoint;
|
||||
import com.coderman.common.error.BusinessCodeEnum;
|
||||
import com.coderman.common.error.BusinessException;
|
||||
import com.coderman.common.response.ResponseBean;
|
||||
import com.coderman.common.vo.business.ProductStockVO;
|
||||
import com.coderman.common.vo.business.ProductVO;
|
||||
|
@ -20,9 +22,9 @@ import java.util.List;
|
|||
* @Date 2020/3/17 09:19
|
||||
* @Version 1.0
|
||||
**/
|
||||
@Api(tags = "物资资料接口")
|
||||
@Api(tags = "业务模块-物资资料相关接口")
|
||||
@RestController
|
||||
@RequestMapping("/product")
|
||||
@RequestMapping("/business/product")
|
||||
public class ProductController {
|
||||
|
||||
|
||||
|
@ -129,9 +131,9 @@ public class ProductController {
|
|||
@ApiOperation(value = "添加物资")
|
||||
@RequiresPermissions({"product:add"})
|
||||
@PostMapping("/add")
|
||||
public ResponseBean add(@RequestBody @Validated ProductVO productVO) {
|
||||
public ResponseBean add(@RequestBody @Validated ProductVO productVO) throws BusinessException {
|
||||
if (productVO.getCategoryKeys().length != 3) {
|
||||
return ResponseBean.error("物资需要3级分类");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"物资需要3级分类");
|
||||
}
|
||||
productService.add(productVO);
|
||||
return ResponseBean.success();
|
||||
|
@ -159,9 +161,9 @@ public class ProductController {
|
|||
@ApiOperation(value = "更新物资", notes = "更新物资信息")
|
||||
@RequiresPermissions({"product:update"})
|
||||
@PutMapping("/update/{id}")
|
||||
public ResponseBean update(@PathVariable Long id, @RequestBody ProductVO productVO) {
|
||||
public ResponseBean update(@PathVariable Long id, @RequestBody ProductVO productVO) throws BusinessException {
|
||||
if (productVO.getCategoryKeys().length != 3) {
|
||||
return ResponseBean.error("物资需要3级分类");
|
||||
throw new BusinessException(BusinessCodeEnum.PARAMETER_ERROR,"物资需要3级分类");
|
||||
}
|
||||
productService.update(id, productVO);
|
||||
return ResponseBean.success();
|
||||
|
@ -176,7 +178,7 @@ public class ProductController {
|
|||
@ApiOperation(value = "删除物资", notes = "删除物资信息")
|
||||
@RequiresPermissions({"product:delete"})
|
||||
@DeleteMapping("/delete/{id}")
|
||||
public ResponseBean delete(@PathVariable Long id) {
|
||||
public ResponseBean delete(@PathVariable Long id) throws BusinessException {
|
||||
productService.delete(id);
|
||||
return ResponseBean.success();
|
||||
}
|
||||
|
@ -192,7 +194,7 @@ public class ProductController {
|
|||
@ApiOperation(value = "移入回收站", notes = "移入回收站")
|
||||
@RequiresPermissions({"product:remove"})
|
||||
@PutMapping("/remove/{id}")
|
||||
public ResponseBean remove(@PathVariable Long id) {
|
||||
public ResponseBean remove(@PathVariable Long id) throws BusinessException {
|
||||
productService.remove(id);
|
||||
return ResponseBean.success();
|
||||
}
|
||||
|
@ -205,7 +207,7 @@ public class ProductController {
|
|||
@ApiOperation(value = "物资添加审核", notes = "物资添加审核")
|
||||
@RequiresPermissions({"product:publish"})
|
||||
@PutMapping("/publish/{id}")
|
||||
public ResponseBean publish(@PathVariable Long id) {
|
||||
public ResponseBean publish(@PathVariable Long id) throws BusinessException {
|
||||
productService.publish(id);
|
||||
return ResponseBean.success();
|
||||
}
|
||||
|
@ -218,7 +220,7 @@ public class ProductController {
|
|||
@ApiOperation(value = "恢复物资", notes = "从回收站中恢复物资")
|
||||
@RequiresPermissions({"product:back"})
|
||||
@PutMapping("/back/{id}")
|
||||
public ResponseBean back(@PathVariable Long id) {
|
||||
public ResponseBean back(@PathVariable Long id) throws BusinessException {
|
||||
productService.back(id);
|
||||
return ResponseBean.success();
|
||||
}
|
||||
|
|
|
@ -21,9 +21,9 @@ import java.util.List;
|
|||
* @Date 2020/3/16 20:18
|
||||
* @Version 1.0
|
||||
**/
|
||||
@Api(tags = "物资来源接口")
|
||||
@Api(tags = "业务模块-物资来源相关接口")
|
||||
@RestController
|
||||
@RequestMapping("/supplier")
|
||||
@RequestMapping("/business/supplier")
|
||||
public class SupplierController {
|
||||
|
||||
|
||||
|
@ -56,7 +56,7 @@ public class SupplierController {
|
|||
@PostMapping("/add")
|
||||
public ResponseBean add(@RequestBody @Validated SupplierVO supplierVO) {
|
||||
supplierService.add(supplierVO);
|
||||
return ResponseBean.success("添加来源成功");
|
||||
return ResponseBean.success();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -68,7 +68,7 @@ public class SupplierController {
|
|||
@ApiOperation(value = "编辑来源", notes = "编辑来源信息")
|
||||
@RequiresPermissions({"supplier:edit"})
|
||||
@GetMapping("/edit/{id}")
|
||||
public ResponseBean edit(@PathVariable Long id) {
|
||||
public ResponseBean<SupplierVO> edit(@PathVariable Long id) {
|
||||
SupplierVO supplierVO = supplierService.edit(id);
|
||||
return ResponseBean.success(supplierVO);
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ public class SupplierController {
|
|||
@PutMapping("/update/{id}")
|
||||
public ResponseBean update(@PathVariable Long id, @RequestBody @Validated SupplierVO supplierVO) {
|
||||
supplierService.update(id, supplierVO);
|
||||
return ResponseBean.success("更新来源成功");
|
||||
return ResponseBean.success();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -99,7 +99,7 @@ public class SupplierController {
|
|||
@DeleteMapping("/delete/{id}")
|
||||
public ResponseBean delete(@PathVariable Long id) {
|
||||
supplierService.delete(id);
|
||||
return ResponseBean.success("删除来源成功");
|
||||
return ResponseBean.success();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -109,7 +109,7 @@ public class SupplierController {
|
|||
*/
|
||||
@ApiOperation(value = "所有来源", notes = "所有来源列表")
|
||||
@GetMapping("/findAll")
|
||||
public ResponseBean findAll() {
|
||||
public ResponseBean<List<SupplierVO>> findAll() {
|
||||
List<SupplierVO> supplierVOS = supplierService.findAll();
|
||||
return ResponseBean.success(supplierVOS);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.coderman.controller.system;
|
||||
|
||||
import com.coderman.common.annotation.ControllerEndpoint;
|
||||
import com.coderman.common.error.SystemException;
|
||||
import com.coderman.common.model.system.Department;
|
||||
import com.coderman.common.response.ResponseBean;
|
||||
import com.coderman.common.vo.system.DeanVO;
|
||||
|
@ -25,9 +26,9 @@ import java.util.List;
|
|||
* @Date 2020/3/15 14:11
|
||||
* @Version 1.0
|
||||
**/
|
||||
@Api(tags = "系统部门接口")
|
||||
@Api(tags = "系统模块-部门相关接口")
|
||||
@RestController
|
||||
@RequestMapping("/department")
|
||||
@RequestMapping("/system/department")
|
||||
public class DepartmentController {
|
||||
|
||||
|
||||
|
@ -41,7 +42,7 @@ public class DepartmentController {
|
|||
*/
|
||||
@ApiOperation(value = "部门列表", notes = "部门列表,根据部门名模糊查询")
|
||||
@GetMapping("/findDepartmentList")
|
||||
public ResponseBean findDepartmentList(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
||||
public ResponseBean<PageVO<DepartmentVO>> findDepartmentList(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
||||
@RequestParam(value = "pageSize") Integer pageSize,
|
||||
DepartmentVO departmentVO) {
|
||||
PageVO<DepartmentVO> departmentsList = departmentService.findDepartmentList(pageNum, pageSize, departmentVO);
|
||||
|
@ -55,7 +56,7 @@ public class DepartmentController {
|
|||
*/
|
||||
@ApiOperation(value = "所有部门")
|
||||
@GetMapping("/findAll")
|
||||
public ResponseBean findAll() {
|
||||
public ResponseBean<List<DepartmentVO>> findAll() {
|
||||
List<DepartmentVO> departmentVOS = departmentService.findAllVO();
|
||||
return ResponseBean.success(departmentVOS);
|
||||
}
|
||||
|
@ -67,7 +68,7 @@ public class DepartmentController {
|
|||
*/
|
||||
@ApiOperation(value = "部门主任", notes = "查找部门主任,排除掉已经禁用的用户")
|
||||
@GetMapping("/findDeanList")
|
||||
public ResponseBean findDeanList() {
|
||||
public ResponseBean<List<DeanVO>> findDeanList() {
|
||||
List<DeanVO> managerList = departmentService.findDeanList();
|
||||
return ResponseBean.success(managerList);
|
||||
}
|
||||
|
@ -95,7 +96,7 @@ public class DepartmentController {
|
|||
@ApiOperation(value = "编辑部门")
|
||||
@RequiresPermissions({"department:edit"})
|
||||
@GetMapping("/edit/{id}")
|
||||
public ResponseBean edit(@PathVariable Long id) {
|
||||
public ResponseBean edit(@PathVariable Long id) throws SystemException {
|
||||
DepartmentVO departmentVO = departmentService.edit(id);
|
||||
return ResponseBean.success(departmentVO);
|
||||
}
|
||||
|
@ -109,7 +110,7 @@ public class DepartmentController {
|
|||
@ApiOperation(value = "更新部门")
|
||||
@RequiresPermissions({"department:update"})
|
||||
@PutMapping("/update/{id}")
|
||||
public ResponseBean update(@PathVariable Long id, @RequestBody @Validated DepartmentVO departmentVO) {
|
||||
public ResponseBean update(@PathVariable Long id, @RequestBody @Validated DepartmentVO departmentVO) throws SystemException {
|
||||
departmentService.update(id, departmentVO);
|
||||
return ResponseBean.success();
|
||||
}
|
||||
|
@ -124,7 +125,7 @@ public class DepartmentController {
|
|||
@ApiOperation(value = "删除部门")
|
||||
@RequiresPermissions({"department:delete"})
|
||||
@DeleteMapping("/delete/{id}")
|
||||
public ResponseBean delete(@PathVariable Long id) {
|
||||
public ResponseBean delete(@PathVariable Long id) throws SystemException {
|
||||
departmentService.delete(id);
|
||||
return ResponseBean.success();
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.coderman.controller.system;
|
||||
|
||||
import com.coderman.common.error.SystemException;
|
||||
import com.coderman.common.response.ResponseBean;
|
||||
import com.coderman.common.vo.system.LogVO;
|
||||
import com.coderman.common.vo.system.PageVO;
|
||||
|
@ -20,9 +21,9 @@ import java.util.List;
|
|||
* @Date 2020/3/22 21:03
|
||||
* @Version 1.0
|
||||
**/
|
||||
@Api(tags = "系统日志接口")
|
||||
@Api(tags = "系统模块-操作日志相关接口")
|
||||
@RestController
|
||||
@RequestMapping("/log")
|
||||
@RequestMapping("/system/log")
|
||||
public class LogController {
|
||||
|
||||
|
||||
|
@ -36,7 +37,7 @@ public class LogController {
|
|||
*/
|
||||
@ApiOperation(value = "日志列表", notes = "系统日志列表,模糊查询")
|
||||
@GetMapping("/findLogList")
|
||||
public ResponseBean findLogList(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
||||
public ResponseBean<PageVO<LogVO>> findLogList(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
||||
@RequestParam(value = "pageSize") Integer pageSize,
|
||||
LogVO logVO) {
|
||||
PageVO<LogVO> logList = logService.findLogList(pageNum, pageSize, logVO);
|
||||
|
@ -52,7 +53,7 @@ public class LogController {
|
|||
@ApiOperation(value = "删除日志")
|
||||
@RequiresPermissions({"log:delete"})
|
||||
@DeleteMapping("/delete/{id}")
|
||||
public ResponseBean delete(@PathVariable Long id) {
|
||||
public ResponseBean delete(@PathVariable Long id) throws SystemException {
|
||||
logService.delete(id);
|
||||
return ResponseBean.success("删除系统日志成功");
|
||||
}
|
||||
|
@ -66,7 +67,7 @@ public class LogController {
|
|||
@ApiOperation(value = "批量删除")
|
||||
@RequiresPermissions({"log:batchDelete"})
|
||||
@DeleteMapping("/batchDelete/{ids}")
|
||||
public ResponseBean batchDelete(@PathVariable String ids) {
|
||||
public ResponseBean batchDelete(@PathVariable String ids) throws SystemException {
|
||||
String[] idList = ids.split(",");
|
||||
List<Long> list = new ArrayList<>();
|
||||
if (idList.length > 0) {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.coderman.controller.system;
|
||||
|
||||
import com.coderman.common.annotation.ControllerEndpoint;
|
||||
import com.coderman.common.error.SystemException;
|
||||
import com.coderman.common.response.ResponseBean;
|
||||
import com.coderman.common.vo.system.LoginLogVO;
|
||||
import com.coderman.common.vo.system.PageVO;
|
||||
|
@ -24,9 +25,9 @@ import java.util.Map;
|
|||
* @Date 2020/3/22 21:03
|
||||
* @Version 1.0
|
||||
**/
|
||||
@Api(tags = "登入日志接口")
|
||||
@Api(tags = "系统模块-登入日志相关接口")
|
||||
@RestController
|
||||
@RequestMapping("/loginLog")
|
||||
@RequestMapping("/system/loginLog")
|
||||
public class LoginLogController {
|
||||
|
||||
|
||||
|
@ -57,7 +58,7 @@ public class LoginLogController {
|
|||
@ApiOperation(value = "删除日志")
|
||||
@RequiresPermissions({"loginLog:delete"})
|
||||
@DeleteMapping("/delete/{id}")
|
||||
public ResponseBean delete(@PathVariable Long id) {
|
||||
public ResponseBean delete(@PathVariable Long id) throws SystemException {
|
||||
loginLogService.delete(id);
|
||||
return ResponseBean.success();
|
||||
}
|
||||
|
@ -72,7 +73,7 @@ public class LoginLogController {
|
|||
@ApiOperation(value = "批量删除")
|
||||
@RequiresPermissions({"loginLog:batchDelete"})
|
||||
@DeleteMapping("/batchDelete/{ids}")
|
||||
public ResponseBean batchDelete(@PathVariable String ids) {
|
||||
public ResponseBean batchDelete(@PathVariable String ids) throws SystemException {
|
||||
String[] idList = ids.split(",");
|
||||
List<Long> list = new ArrayList<>();
|
||||
if (idList.length > 0) {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.coderman.controller.system;
|
||||
|
||||
import com.coderman.common.annotation.ControllerEndpoint;
|
||||
import com.coderman.common.error.SystemException;
|
||||
import com.coderman.common.model.system.Menu;
|
||||
import com.coderman.common.response.ResponseBean;
|
||||
import com.coderman.common.vo.system.MenuNodeVO;
|
||||
|
@ -25,8 +26,8 @@ import java.util.Map;
|
|||
* @Date 2020/3/10 11:51
|
||||
* @Version 1.0
|
||||
**/
|
||||
@Api(tags = "菜单权限接口")
|
||||
@RequestMapping("/menu")
|
||||
@Api(tags = "系统模块-菜单权限相关接口")
|
||||
@RequestMapping("/system/menu")
|
||||
@RestController
|
||||
public class MenuController {
|
||||
|
||||
|
@ -40,7 +41,7 @@ public class MenuController {
|
|||
*/
|
||||
@ApiOperation(value = "加载菜单树", notes = "获取所有菜单树,以及展开项")
|
||||
@GetMapping("/tree")
|
||||
public ResponseBean tree() {
|
||||
public ResponseBean<Map<String, Object>> tree() {
|
||||
List<MenuNodeVO> menuTree = menuService.findMenuTree();
|
||||
List<Long> ids = menuService.findOpenIds();
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
|
@ -58,7 +59,7 @@ public class MenuController {
|
|||
@ApiOperation(value = "新增菜单")
|
||||
@RequiresPermissions({"menu:add"})
|
||||
@PostMapping("/add")
|
||||
public ResponseBean add(@RequestBody @Validated MenuVO menuVO) {
|
||||
public ResponseBean<Map<String, Object>> add(@RequestBody @Validated MenuVO menuVO) {
|
||||
Menu node = menuService.add(menuVO);
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("id", node.getId());
|
||||
|
@ -78,7 +79,7 @@ public class MenuController {
|
|||
@ApiOperation(value = "删除菜单", notes = "根据id删除菜单节点")
|
||||
@RequiresPermissions({"menu:delete"})
|
||||
@DeleteMapping("/delete/{id}")
|
||||
public ResponseBean delete(@PathVariable Long id) {
|
||||
public ResponseBean delete(@PathVariable Long id) throws SystemException {
|
||||
menuService.delete(id);
|
||||
return ResponseBean.success();
|
||||
}
|
||||
|
@ -92,7 +93,7 @@ public class MenuController {
|
|||
@ApiOperation(value = "菜单详情", notes = "根据id编辑菜单,获取菜单详情")
|
||||
@RequiresPermissions({"menu:edit"})
|
||||
@GetMapping("/edit/{id}")
|
||||
public ResponseBean edit(@PathVariable Long id) {
|
||||
public ResponseBean<MenuVO> edit(@PathVariable Long id) throws SystemException {
|
||||
MenuVO menuVO = menuService.edit(id);
|
||||
return ResponseBean.success(menuVO);
|
||||
}
|
||||
|
@ -108,7 +109,7 @@ public class MenuController {
|
|||
@ApiOperation(value = "更新菜单", notes = "根据id更新菜单节点")
|
||||
@RequiresPermissions({"menu:update"})
|
||||
@PutMapping("/update/{id}")
|
||||
public ResponseBean update(@PathVariable Long id, @RequestBody @Validated MenuVO menuVO) {
|
||||
public ResponseBean update(@PathVariable Long id, @RequestBody @Validated MenuVO menuVO) throws SystemException {
|
||||
menuService.update(id, menuVO);
|
||||
return ResponseBean.success();
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.coderman.controller.system;
|
||||
|
||||
import com.coderman.common.annotation.ControllerEndpoint;
|
||||
import com.coderman.common.error.SystemException;
|
||||
import com.coderman.common.model.system.Role;
|
||||
import com.coderman.common.response.ResponseBean;
|
||||
import com.coderman.common.vo.system.MenuNodeVO;
|
||||
|
@ -26,9 +27,9 @@ import java.util.Map;
|
|||
* @Date 2020/3/9 16:21
|
||||
* @Version 1.0
|
||||
**/
|
||||
@Api(tags = "系统角色接口")
|
||||
@Api(tags = "系统模块-角色相关接口")
|
||||
@RestController
|
||||
@RequestMapping("/role")
|
||||
@RequestMapping("/system/role")
|
||||
public class RoleController {
|
||||
|
||||
|
||||
|
@ -50,7 +51,7 @@ public class RoleController {
|
|||
@ApiOperation(value = "角色授权")
|
||||
@RequiresPermissions({"role:authority"})
|
||||
@PostMapping("/authority/{id}")
|
||||
public ResponseBean authority(@PathVariable Long id, @RequestBody Long[] mids) {
|
||||
public ResponseBean authority(@PathVariable Long id, @RequestBody Long[] mids) throws SystemException {
|
||||
roleService.authority(id, mids);
|
||||
return ResponseBean.success();
|
||||
}
|
||||
|
@ -63,7 +64,7 @@ public class RoleController {
|
|||
*/
|
||||
@ApiOperation(value = "角色菜单")
|
||||
@GetMapping("/findRoleMenu/{id}")
|
||||
public ResponseBean findRoleMenu(@PathVariable Long id) {
|
||||
public ResponseBean<Map<String, Object>> findRoleMenu(@PathVariable Long id) throws SystemException {
|
||||
List<MenuNodeVO> tree = menuService.findMenuTree();
|
||||
//角色拥有的菜单id
|
||||
List<Long> mids = roleService.findMenuIdsByRoleId(id);
|
||||
|
@ -82,7 +83,7 @@ public class RoleController {
|
|||
*/
|
||||
@ApiOperation(value = "角色列表")
|
||||
@GetMapping("/findRoleList")
|
||||
public ResponseBean findRoleList(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
||||
public ResponseBean<PageVO<RoleVO>> findRoleList(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
||||
@RequestParam(value = "pageSize", defaultValue = "7") Integer pageSize,
|
||||
RoleVO roleVO) {
|
||||
PageVO<RoleVO> roleList = roleService.findRoleList(pageNum, pageSize, roleVO);
|
||||
|
@ -99,7 +100,7 @@ public class RoleController {
|
|||
@ApiOperation(value = "添加角色")
|
||||
@RequiresPermissions({"role:add"})
|
||||
@PostMapping("/add")
|
||||
public ResponseBean add(@RequestBody @Validated RoleVO roleVO) {
|
||||
public ResponseBean add(@RequestBody @Validated RoleVO roleVO) throws SystemException {
|
||||
roleService.add(roleVO);
|
||||
return ResponseBean.success();
|
||||
}
|
||||
|
@ -114,7 +115,7 @@ public class RoleController {
|
|||
@ApiOperation(value = "删除角色", notes = "根据id删除角色信息")
|
||||
@RequiresPermissions({"role:delete"})
|
||||
@DeleteMapping("/delete/{id}")
|
||||
public ResponseBean delete(@PathVariable Long id) {
|
||||
public ResponseBean delete(@PathVariable Long id) throws SystemException {
|
||||
roleService.deleteById(id);
|
||||
return ResponseBean.success();
|
||||
}
|
||||
|
@ -129,7 +130,7 @@ public class RoleController {
|
|||
@ApiOperation(value = "编辑用户", notes = "根据id更新角色信息")
|
||||
@GetMapping("/edit/{id}")
|
||||
@RequiresPermissions({"role:edit"})
|
||||
public ResponseBean edit(@PathVariable Long id) {
|
||||
public ResponseBean<RoleVO> edit(@PathVariable Long id) throws SystemException {
|
||||
RoleVO roleVO = roleService.edit(id);
|
||||
return ResponseBean.success(roleVO);
|
||||
}
|
||||
|
@ -145,7 +146,7 @@ public class RoleController {
|
|||
@ApiOperation(value = "更新角色", notes = "根据id更新角色信息")
|
||||
@RequiresPermissions({"role:update"})
|
||||
@PutMapping("/update/{id}")
|
||||
public ResponseBean update(@PathVariable Long id, @RequestBody @Validated RoleVO roleVO) {
|
||||
public ResponseBean update(@PathVariable Long id, @RequestBody @Validated RoleVO roleVO) throws SystemException {
|
||||
roleService.update(id, roleVO);
|
||||
return ResponseBean.success();
|
||||
}
|
||||
|
@ -161,7 +162,7 @@ public class RoleController {
|
|||
@ApiOperation(value = "更新状态", notes = "禁用和更新两种状态")
|
||||
@RequiresPermissions({"role:status"})
|
||||
@PutMapping("/updateStatus/{id}/{status}")
|
||||
public ResponseBean updateStatus(@PathVariable Long id, @PathVariable Boolean status) {
|
||||
public ResponseBean updateStatus(@PathVariable Long id, @PathVariable Boolean status) throws SystemException {
|
||||
roleService.updateStatus(id, status);
|
||||
return ResponseBean.success();
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.coderman.controller.system;
|
||||
|
||||
|
||||
import com.coderman.common.error.SystemException;
|
||||
import com.coderman.common.model.system.ImageAttachment;
|
||||
import com.coderman.common.response.ResponseBean;
|
||||
import com.coderman.common.vo.system.ImageAttachmentVO;
|
||||
|
@ -25,9 +26,9 @@ import java.util.List;
|
|||
* @Version 1.0
|
||||
**/
|
||||
@Slf4j
|
||||
@Api(tags = "文件上传接口")
|
||||
@Api(tags = "系统模块-文件上传相关接口")
|
||||
@RestController
|
||||
@RequestMapping("/upload")
|
||||
@RequestMapping("/system/upload")
|
||||
public class UploadController {
|
||||
|
||||
|
||||
|
@ -43,7 +44,7 @@ public class UploadController {
|
|||
@ApiOperation(value = "上传文件")
|
||||
@RequiresPermissions({"upload:image"})
|
||||
@PostMapping("/image")
|
||||
public ResponseBean uploadImage(MultipartFile file) throws IOException {
|
||||
public ResponseBean<String> uploadImage(MultipartFile file) throws IOException, SystemException {
|
||||
String realPath=uploadService.uploadImage(file);
|
||||
return ResponseBean.success(realPath);
|
||||
}
|
||||
|
@ -56,7 +57,7 @@ public class UploadController {
|
|||
*/
|
||||
@ApiOperation(value = "附件列表", notes = "模糊查询附件列表")
|
||||
@GetMapping("/findImageList")
|
||||
public ResponseBean findImageList(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
||||
public ResponseBean<PageInfo<ImageAttachment>> findImageList(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
||||
@RequestParam(value = "pageSize", defaultValue = "8") Integer pageSize,
|
||||
ImageAttachmentVO imageAttachmentVO) {
|
||||
PageHelper.startPage(pageNum,pageSize);
|
||||
|
@ -73,7 +74,7 @@ public class UploadController {
|
|||
@ApiOperation(value = "删除图片", notes = "删除数据库记录,删除图片服务器上的图片")
|
||||
@RequiresPermissions("attachment:delete")
|
||||
@DeleteMapping("/delete/{id}")
|
||||
public ResponseBean delete(@PathVariable Long id){
|
||||
public ResponseBean delete(@PathVariable Long id) throws SystemException {
|
||||
uploadService.delete(id);
|
||||
return ResponseBean.success();
|
||||
}
|
||||
|
|
|
@ -2,6 +2,8 @@ package com.coderman.controller.system;
|
|||
|
||||
|
||||
import com.coderman.common.annotation.ControllerEndpoint;
|
||||
import com.coderman.common.dto.UserLoginDTO;
|
||||
import com.coderman.common.error.SystemException;
|
||||
import com.coderman.common.model.system.Role;
|
||||
import com.coderman.common.model.system.User;
|
||||
import com.coderman.common.response.ResponseBean;
|
||||
|
@ -32,9 +34,9 @@ import java.util.Map;
|
|||
**/
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/user")
|
||||
@RequestMapping("/system/user")
|
||||
@Validated
|
||||
@Api(value = "系统用户模块", tags = "系统用户接口")
|
||||
@Api(tags = "系统模块-用户相关接口")
|
||||
public class UserController {
|
||||
|
||||
@Autowired
|
||||
|
@ -50,18 +52,14 @@ public class UserController {
|
|||
/**
|
||||
* 用户登入
|
||||
*
|
||||
* @param username: 用户名
|
||||
* @param password: 密码
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "用户登入", notes = "接收参数用户名和密码,登入成功后,返回JWTToken")
|
||||
@PostMapping("/login")
|
||||
public ResponseBean login(@NotBlank(message = "账号必填") String username,
|
||||
@NotBlank(message = "密码必填") String password,
|
||||
HttpServletRequest request) {
|
||||
String token=userService.login(username,password);
|
||||
public ResponseBean<String> login(@RequestBody UserLoginDTO userLoginDTO, HttpServletRequest request) throws SystemException {
|
||||
String token=userService.login(userLoginDTO.getUsername(),userLoginDTO.getPassword());
|
||||
loginLogService.add(request);
|
||||
return ResponseBean.success((Object) token);
|
||||
return ResponseBean.success(token);
|
||||
}
|
||||
|
||||
|
||||
|
@ -73,7 +71,7 @@ public class UserController {
|
|||
*/
|
||||
@ApiOperation(value = "用户列表", notes = "模糊查询用户列表")
|
||||
@GetMapping("/findUserList")
|
||||
public ResponseBean findUserList(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
||||
public ResponseBean<PageVO<UserVO>> findUserList(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
||||
@RequestParam(value = "pageSize", defaultValue = "7") Integer pageSize,
|
||||
UserVO userVO) {
|
||||
PageVO<UserVO> userList = userService.findUserList(pageNum, pageSize, userVO);
|
||||
|
@ -87,7 +85,7 @@ public class UserController {
|
|||
*/
|
||||
@ApiOperation(value = "用户信息", notes = "用户登入信息")
|
||||
@GetMapping("/info")
|
||||
public ResponseBean info() {
|
||||
public ResponseBean<UserInfoVO> info() throws SystemException {
|
||||
UserInfoVO userInfoVO=userService.info();
|
||||
return ResponseBean.success(userInfoVO);
|
||||
}
|
||||
|
@ -99,7 +97,7 @@ public class UserController {
|
|||
*/
|
||||
@ApiOperation(value = "加载菜单", notes = "用户登入后,根据角色加载菜单树")
|
||||
@GetMapping("/findMenu")
|
||||
public ResponseBean findMenu() {
|
||||
public ResponseBean<List<MenuNodeVO>> findMenu() {
|
||||
List<MenuNodeVO> menuTreeVOS = userService.findMenu();
|
||||
return ResponseBean.success(menuTreeVOS);
|
||||
}
|
||||
|
@ -115,7 +113,7 @@ public class UserController {
|
|||
@ApiOperation(value = "分配角色", notes = "角色分配给用户")
|
||||
@RequiresPermissions({"user:assign"})
|
||||
@PostMapping("/{id}/assignRoles")
|
||||
public ResponseBean assignRoles(@PathVariable Long id, @RequestBody Long[] rids) {
|
||||
public ResponseBean assignRoles(@PathVariable Long id, @RequestBody Long[] rids) throws SystemException {
|
||||
userService.assignRoles(id, rids);
|
||||
return ResponseBean.success();
|
||||
}
|
||||
|
@ -130,7 +128,7 @@ public class UserController {
|
|||
@RequiresPermissions({"user:delete"})
|
||||
@ApiOperation(value = "删除用户", notes = "删除用户信息,根据用户ID")
|
||||
@DeleteMapping("/delete/{id}")
|
||||
public ResponseBean delete(@PathVariable Long id) {
|
||||
public ResponseBean delete(@PathVariable Long id) throws SystemException {
|
||||
userService.deleteById(id);
|
||||
return ResponseBean.success();
|
||||
}
|
||||
|
@ -146,7 +144,7 @@ public class UserController {
|
|||
@ApiOperation(value = "用户状态", notes = "禁用和启用这两种状态")
|
||||
@RequiresPermissions({"user:status"})
|
||||
@PutMapping("/updateStatus/{id}/{status}")
|
||||
public ResponseBean updateStatus(@PathVariable Long id, @PathVariable Boolean status) {
|
||||
public ResponseBean updateStatus(@PathVariable Long id, @PathVariable Boolean status) throws SystemException {
|
||||
userService.updateStatus(id, status);
|
||||
return ResponseBean.success();
|
||||
}
|
||||
|
@ -162,7 +160,7 @@ public class UserController {
|
|||
@ApiOperation(value = "更新用户", notes = "更新用户信息")
|
||||
@RequiresPermissions({"user:update"})
|
||||
@PutMapping("/update/{id}")
|
||||
public ResponseBean update(@PathVariable Long id, @RequestBody @Validated UserEditVO userEditVO) {
|
||||
public ResponseBean update(@PathVariable Long id, @RequestBody @Validated UserEditVO userEditVO) throws SystemException {
|
||||
userService.update(id, userEditVO);
|
||||
return ResponseBean.success();
|
||||
}
|
||||
|
@ -175,7 +173,7 @@ public class UserController {
|
|||
@ApiOperation(value = "编辑用户", notes = "获取用户的详情,编辑用户信息")
|
||||
@RequiresPermissions({"user:edit"})
|
||||
@GetMapping("/edit/{id}")
|
||||
public ResponseBean edit(@PathVariable Long id) {
|
||||
public ResponseBean<UserEditVO> edit(@PathVariable Long id) throws SystemException {
|
||||
UserEditVO userVO = userService.edit(id);
|
||||
return ResponseBean.success(userVO);
|
||||
}
|
||||
|
@ -189,7 +187,7 @@ public class UserController {
|
|||
@ApiOperation(value = "添加用户", notes = "添加用户信息")
|
||||
@RequiresPermissions({"user:add"})
|
||||
@PostMapping("/add")
|
||||
public ResponseBean add(@RequestBody @Validated UserVO userVO) {
|
||||
public ResponseBean add(@RequestBody @Validated UserVO userVO) throws SystemException {
|
||||
userService.add(userVO);
|
||||
return ResponseBean.success();
|
||||
}
|
||||
|
@ -201,7 +199,7 @@ public class UserController {
|
|||
*/
|
||||
@ApiOperation(value = "已有角色", notes = "根据用户id,获取用户已经拥有的角色")
|
||||
@GetMapping("/{id}/roles")
|
||||
public ResponseBean roles(@PathVariable Long id) {
|
||||
public ResponseBean<Map<String, Object>> roles(@PathVariable Long id) throws SystemException {
|
||||
List<Long> values = userService.roles(id);
|
||||
List<Role> list = roleService.findAll();
|
||||
//转成前端需要的角色Item
|
||||
|
|
|
@ -32,12 +32,23 @@
|
|||
<orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.8.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-web:1.3.2" level="project" />
|
||||
<orderEntry type="module" module-name="xinguan-common" />
|
||||
<orderEntry type="library" name="Maven: org.lionsoul:ip2region:1.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.lionsoul:ip2region:1.7.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:druid-spring-boot-starter:1.1.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:druid:1.1.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: mysql:mysql-connector-java:8.0.19" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.12.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.12.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.2.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.2.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.68" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:1.3.2" level="project" />
|
||||
|
@ -48,7 +59,20 @@
|
|||
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:1.3.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis:mybatis:3.4.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:1.3.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis.generator:mybatis-generator-core:1.3.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-validation:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: jakarta.validation:jakarta.validation-api:2.0.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-web:5.2.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.2.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.2.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.wuwenze:ExcelKit:2.0.72" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:3.17" level="project" />
|
||||
|
@ -67,6 +91,7 @@
|
|||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.20" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.20" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-core:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.10.6" level="project" />
|
||||
|
@ -91,45 +116,19 @@
|
|||
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.8.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-io:commons-io:2.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.7.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mockito:mockito-all:1.9.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.coobird:thumbnailator:0.4.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.auth0:java-jwt:3.2.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.55" level="project" />
|
||||
<orderEntry type="module" module-name="xinguan-api" />
|
||||
<orderEntry type="module" module-name="xinguan-business" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.12.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.12.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.2.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.2.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-validation:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: jakarta.validation:jakarta.validation-api:2.0.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.18.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.4.1.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-web:5.2.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.2.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.2.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.2.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mockito:mockito-all:1.9.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.2.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.2.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.coobird:thumbnailator:0.4.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.auth0:java-jwt:3.2.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.55" level="project" />
|
||||
<orderEntry type="module" module-name="xinguan-business" />
|
||||
</component>
|
||||
</module>
|
Loading…
Reference in a new issue