Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dm_project
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
姚本章
dm_project
Commits
ff9c5002
Commit
ff9c5002
authored
Mar 05, 2021
by
zhangc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit 删除gateway服务
parent
9e276215
Changes
197
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
197 changed files
with
31 additions
and
26800 deletions
+31
-26800
.classpath
jz-dm-apigateway/.classpath
+0
-38
.gitignore
jz-dm-apigateway/.gitignore
+0
-1
.project
jz-dm-apigateway/.project
+0
-23
org.eclipse.core.resources.prefs
jz-dm-apigateway/.settings/org.eclipse.core.resources.prefs
+0
-6
org.eclipse.jdt.core.prefs
jz-dm-apigateway/.settings/org.eclipse.jdt.core.prefs
+0
-8
org.eclipse.m2e.core.prefs
jz-dm-apigateway/.settings/org.eclipse.m2e.core.prefs
+0
-4
pom.xml
jz-dm-apigateway/pom.xml
+0
-225
ApiGatewayApplication.java
...ateway/src/main/java/com/jz/dm/ApiGatewayApplication.java
+0
-29
BaseObject.java
...teway/src/main/java/com/jz/dm/common/base/BaseObject.java
+0
-77
Constants.java
...ay/src/main/java/com/jz/dm/common/constant/Constants.java
+0
-76
LoggingConstants.java
...main/java/com/jz/dm/common/constant/LoggingConstants.java
+0
-54
TagConstants.java
...src/main/java/com/jz/dm/common/constant/TagConstants.java
+0
-39
Format.java
...igateway/src/main/java/com/jz/dm/common/enums/Format.java
+0
-11
GatewayResultCode.java
...c/main/java/com/jz/dm/common/enums/GatewayResultCode.java
+0
-162
GeneralStatusTypeEnum.java
...in/java/com/jz/dm/common/enums/GeneralStatusTypeEnum.java
+0
-60
ResultFlowCode.java
.../src/main/java/com/jz/dm/common/enums/ResultFlowCode.java
+0
-59
SignType.java
...ateway/src/main/java/com/jz/dm/common/enums/SignType.java
+0
-10
ApiInfoOutTypeEnum.java
...m/jz/dm/common/enums/apiInterface/ApiInfoOutTypeEnum.java
+0
-16
ApiStatusEnum.java
...va/com/jz/dm/common/enums/apiInterface/ApiStatusEnum.java
+0
-57
AuthModeEnum.java
...c/main/java/com/jz/dm/common/enums/auth/AuthModeEnum.java
+0
-46
AuthReqTypeEnum.java
...ain/java/com/jz/dm/common/enums/auth/AuthReqTypeEnum.java
+0
-34
AuthTypeEnum.java
...c/main/java/com/jz/dm/common/enums/auth/AuthTypeEnum.java
+0
-41
DirectionTypeEnum.java
...a/com/jz/dm/common/enums/direction/DirectionTypeEnum.java
+0
-26
OrgStatusEnum.java
...c/main/java/com/jz/dm/common/enums/org/OrgStatusEnum.java
+0
-36
OrgTypeEnum.java
...src/main/java/com/jz/dm/common/enums/org/OrgTypeEnum.java
+0
-35
ProducerStatusTypeEnum.java
...om/jz/dm/common/enums/produce/ProducerStatusTypeEnum.java
+0
-37
GatewayException.java
...ain/java/com/jz/dm/common/exception/GatewayException.java
+0
-76
LimitFlowException.java
...n/java/com/jz/dm/common/exception/LimitFlowException.java
+0
-63
OpenApiException.java
...ain/java/com/jz/dm/common/exception/OpenApiException.java
+0
-131
SignatureException.java
...n/java/com/jz/dm/common/exception/SignatureException.java
+0
-51
ArrayUtil.java
...ateway/src/main/java/com/jz/dm/common/util/ArrayUtil.java
+0
-5550
ClassUtil.java
...ateway/src/main/java/com/jz/dm/common/util/ClassUtil.java
+0
-1245
DateUtil.java
...gateway/src/main/java/com/jz/dm/common/util/DateUtil.java
+0
-90
JsonUtil.java
...gateway/src/main/java/com/jz/dm/common/util/JsonUtil.java
+0
-116
LogUtil.java
...igateway/src/main/java/com/jz/dm/common/util/LogUtil.java
+0
-160
MapUtil.java
...igateway/src/main/java/com/jz/dm/common/util/MapUtil.java
+0
-180
ObjectUtil.java
...teway/src/main/java/com/jz/dm/common/util/ObjectUtil.java
+0
-346
OpenApiRequest.java
...y/src/main/java/com/jz/dm/common/util/OpenApiRequest.java
+0
-193
OpenApiResponse.java
.../src/main/java/com/jz/dm/common/util/OpenApiResponse.java
+0
-109
OpenApiResultCode.java
...rc/main/java/com/jz/dm/common/util/OpenApiResultCode.java
+0
-125
RandomUtil.java
...teway/src/main/java/com/jz/dm/common/util/RandomUtil.java
+0
-309
RedisSerializableUtil.java
...ain/java/com/jz/dm/common/util/RedisSerializableUtil.java
+0
-54
ResultCode.java
...teway/src/main/java/com/jz/dm/common/util/ResultCode.java
+0
-22
StringUtil.java
...teway/src/main/java/com/jz/dm/common/util/StringUtil.java
+0
-4304
HttpDownload.java
.../main/java/com/jz/dm/common/util/stream/HttpDownload.java
+0
-300
GatewayConfiguration.java
.../src/main/java/com/jz/dm/config/GatewayConfiguration.java
+0
-115
GatewayUrlBlockHandler.java
...rc/main/java/com/jz/dm/config/GatewayUrlBlockHandler.java
+0
-47
MybatisPlusConfig.java
...way/src/main/java/com/jz/dm/config/MybatisPlusConfig.java
+0
-39
RedisConfig.java
...pigateway/src/main/java/com/jz/dm/config/RedisConfig.java
+0
-52
ReentrantRedisLock.java
...ay/src/main/java/com/jz/dm/config/ReentrantRedisLock.java
+0
-49
SentinelConfig.java
...ateway/src/main/java/com/jz/dm/config/SentinelConfig.java
+0
-72
SwaggerConfiguration.java
.../src/main/java/com/jz/dm/config/SwaggerConfiguration.java
+0
-47
WebAppConfigurer.java
...eway/src/main/java/com/jz/dm/config/WebAppConfigurer.java
+0
-40
ApiDirectionController.java
...ain/java/com/jz/dm/controller/ApiDirectionController.java
+0
-51
ApiInterfaceController.java
...ain/java/com/jz/dm/controller/ApiInterfaceController.java
+0
-87
ApiLogController.java
.../src/main/java/com/jz/dm/controller/ApiLogController.java
+0
-60
AuthController.java
...ay/src/main/java/com/jz/dm/controller/AuthController.java
+0
-102
GatewayController.java
...src/main/java/com/jz/dm/controller/GatewayController.java
+0
-80
OrganizationManageController.java
...va/com/jz/dm/controller/OrganizationManageController.java
+0
-56
ProducerController.java
...rc/main/java/com/jz/dm/controller/ProducerController.java
+0
-190
AbstractFilter.java
...ateway/src/main/java/com/jz/dm/filter/AbstractFilter.java
+0
-35
AuthFilter.java
...apigateway/src/main/java/com/jz/dm/filter/AuthFilter.java
+0
-259
CheckArgsFilter.java
...teway/src/main/java/com/jz/dm/filter/CheckArgsFilter.java
+0
-57
CheckPostSizeFilter.java
...y/src/main/java/com/jz/dm/filter/CheckPostSizeFilter.java
+0
-53
CheckTimestampFilter.java
.../src/main/java/com/jz/dm/filter/CheckTimestampFilter.java
+0
-51
Filter.java
jz-dm-apigateway/src/main/java/com/jz/dm/filter/Filter.java
+0
-29
FilterChain.java
...pigateway/src/main/java/com/jz/dm/filter/FilterChain.java
+0
-20
FilterChainFactory.java
...ay/src/main/java/com/jz/dm/filter/FilterChainFactory.java
+0
-26
FilterChainImpl.java
...teway/src/main/java/com/jz/dm/filter/FilterChainImpl.java
+0
-75
FilterFactory.java
...gateway/src/main/java/com/jz/dm/filter/FilterFactory.java
+0
-30
InvokeRouteFilter.java
...way/src/main/java/com/jz/dm/filter/InvokeRouteFilter.java
+0
-74
VerifySignFilter.java
...eway/src/main/java/com/jz/dm/filter/VerifySignFilter.java
+0
-93
DefaultOpenApiDispatcher.java
...main/java/com/jz/dm/gateway/DefaultOpenApiDispatcher.java
+0
-94
GatewayService.java
...teway/src/main/java/com/jz/dm/gateway/GatewayService.java
+0
-18
OpenApiDispatcher.java
...ay/src/main/java/com/jz/dm/gateway/OpenApiDispatcher.java
+0
-21
OpenApiService.java
...teway/src/main/java/com/jz/dm/gateway/OpenApiService.java
+0
-36
GatewayServiceImpl.java
.../main/java/com/jz/dm/gateway/impl/GatewayServiceImpl.java
+0
-31
MybatisPlusGenerate.java
...src/main/java/com/jz/dm/generate/MybatisPlusGenerate.java
+0
-127
ApiAuthMapper.java
...gateway/src/main/java/com/jz/dm/mapper/ApiAuthMapper.java
+0
-40
ApiDirectionMapper.java
...ay/src/main/java/com/jz/dm/mapper/ApiDirectionMapper.java
+0
-13
ApiFunctionMapper.java
...way/src/main/java/com/jz/dm/mapper/ApiFunctionMapper.java
+0
-26
ApiInterfaceCustomMapper.java
.../main/java/com/jz/dm/mapper/ApiInterfaceCustomMapper.java
+0
-16
ApiInterfaceFileMapper.java
...rc/main/java/com/jz/dm/mapper/ApiInterfaceFileMapper.java
+0
-44
ApiInterfaceMapper.java
...ay/src/main/java/com/jz/dm/mapper/ApiInterfaceMapper.java
+0
-79
ApiOpenApiEsFieldsMapper.java
.../main/java/com/jz/dm/mapper/ApiOpenApiEsFieldsMapper.java
+0
-20
ApiOpenApiEsTagconfigMapper.java
...in/java/com/jz/dm/mapper/ApiOpenApiEsTagconfigMapper.java
+0
-11
ApiOrgMapper.java
...igateway/src/main/java/com/jz/dm/mapper/ApiOrgMapper.java
+0
-14
ApiReqLogMapper.java
...teway/src/main/java/com/jz/dm/mapper/ApiReqLogMapper.java
+0
-43
ApiAuth.java
...ateway/src/main/java/com/jz/dm/models/domian/ApiAuth.java
+0
-123
ApiDirection.java
...y/src/main/java/com/jz/dm/models/domian/ApiDirection.java
+0
-102
ApiFunction.java
...ay/src/main/java/com/jz/dm/models/domian/ApiFunction.java
+0
-51
ApiInterface.java
...y/src/main/java/com/jz/dm/models/domian/ApiInterface.java
+0
-190
ApiInterfaceCustom.java
...main/java/com/jz/dm/models/domian/ApiInterfaceCustom.java
+0
-108
ApiInterfaceFile.java
...c/main/java/com/jz/dm/models/domian/ApiInterfaceFile.java
+0
-64
ApiOpenApiEsFields.java
...main/java/com/jz/dm/models/domian/ApiOpenApiEsFields.java
+0
-54
ApiOpenApiEsTagconfig.java
...n/java/com/jz/dm/models/domian/ApiOpenApiEsTagconfig.java
+0
-97
ApiOrg.java
...gateway/src/main/java/com/jz/dm/models/domian/ApiOrg.java
+0
-96
ApiReqLog.java
...eway/src/main/java/com/jz/dm/models/domian/ApiReqLog.java
+0
-191
ApiCallDataDto.java
...ay/src/main/java/com/jz/dm/models/dto/ApiCallDataDto.java
+0
-27
ApiFunctionDto.java
...ay/src/main/java/com/jz/dm/models/dto/ApiFunctionDto.java
+0
-27
ApiInterfaceFileDto.java
...c/main/java/com/jz/dm/models/dto/ApiInterfaceFileDto.java
+0
-31
ApiServiceApplyDto.java
...rc/main/java/com/jz/dm/models/dto/ApiServiceApplyDto.java
+0
-56
AuthInfoDto.java
...teway/src/main/java/com/jz/dm/models/dto/AuthInfoDto.java
+0
-62
DataBankNumberErrorDto.java
...ain/java/com/jz/dm/models/dto/DataBankNumberErrorDto.java
+0
-36
DataFileDto.java
...teway/src/main/java/com/jz/dm/models/dto/DataFileDto.java
+0
-36
DataTableSelectTO.java
...c/main/java/com/jz/dm/models/enity/DataTableSelectTO.java
+0
-49
DispatchContext.java
...src/main/java/com/jz/dm/models/enity/DispatchContext.java
+0
-85
GatewayRequest.java
.../src/main/java/com/jz/dm/models/enity/GatewayRequest.java
+0
-139
GatewayResponse.java
...src/main/java/com/jz/dm/models/enity/GatewayResponse.java
+0
-123
RequestContext.java
.../src/main/java/com/jz/dm/models/enity/RequestContext.java
+0
-134
DataBankNumberErrorReq.java
...ain/java/com/jz/dm/models/req/DataBankNumberErrorReq.java
+0
-21
LogInfoDetailReq.java
.../src/main/java/com/jz/dm/models/req/LogInfoDetailReq.java
+0
-26
LogInfoListReq.java
...ay/src/main/java/com/jz/dm/models/req/LogInfoListReq.java
+0
-34
ApiInterfaceDetailReq.java
.../java/com/jz/dm/models/req/api/ApiInterfaceDetailReq.java
+0
-29
ApiInterfaceInfoListReq.java
...ava/com/jz/dm/models/req/api/ApiInterfaceInfoListReq.java
+0
-42
AuthDetailInfoReq.java
...ain/java/com/jz/dm/models/req/auth/AuthDetailInfoReq.java
+0
-26
AuthDmpUserApiReq.java
...ain/java/com/jz/dm/models/req/auth/AuthDmpUserApiReq.java
+0
-58
AuthInfoUpdateReq.java
...ain/java/com/jz/dm/models/req/auth/AuthInfoUpdateReq.java
+0
-26
AuthListInfoReq.java
.../main/java/com/jz/dm/models/req/auth/AuthListInfoReq.java
+0
-30
AuthRenewUpdateReq.java
...in/java/com/jz/dm/models/req/auth/AuthRenewUpdateReq.java
+0
-34
AuthUserApiReq.java
...c/main/java/com/jz/dm/models/req/auth/AuthUserApiReq.java
+0
-58
SaltResetReq.java
...src/main/java/com/jz/dm/models/req/auth/SaltResetReq.java
+0
-29
ServiceAuthReq.java
...c/main/java/com/jz/dm/models/req/auth/ServiceAuthReq.java
+0
-31
CreateFolderReq.java
...ain/java/com/jz/dm/models/req/folder/CreateFolderReq.java
+0
-45
OrganizationManageAddReq.java
...dels/req/organizationManage/OrganizationManageAddReq.java
+0
-67
OrganizationManageDetailQueryReq.java
.../organizationManage/OrganizationManageDetailQueryReq.java
+0
-25
OrganizationManageListQueryReq.java
...eq/organizationManage/OrganizationManageListQueryReq.java
+0
-34
OrganizationManageUpdateReq.java
...s/req/organizationManage/OrganizationManageUpdateReq.java
+0
-53
ApiInterfaceReq.java
...n/java/com/jz/dm/models/req/producer/ApiInterfaceReq.java
+0
-117
MakeBigDataApiReq.java
...java/com/jz/dm/models/req/producer/MakeBigDataApiReq.java
+0
-81
MakeDataBankApiReq.java
...ava/com/jz/dm/models/req/producer/MakeDataBankApiReq.java
+0
-114
MakeRealCustomApiReq.java
...a/com/jz/dm/models/req/producer/MakeRealCustomApiReq.java
+0
-20
ServiceIssueReq.java
...n/java/com/jz/dm/models/req/producer/ServiceIssueReq.java
+0
-31
SourceConfigReq.java
...n/java/com/jz/dm/models/req/producer/SourceConfigReq.java
+0
-28
AuthUserResponse.java
...src/main/java/com/jz/dm/models/resp/AuthUserResponse.java
+0
-27
SendDataReq.java
...eway/src/main/java/com/jz/dm/models/resp/SendDataReq.java
+0
-38
ApiDirectionService.java
.../src/main/java/com/jz/dm/service/ApiDirectionService.java
+0
-32
ApiInterfaceService.java
.../src/main/java/com/jz/dm/service/ApiInterfaceService.java
+0
-123
ApiLogService.java
...ateway/src/main/java/com/jz/dm/service/ApiLogService.java
+0
-63
AuthService.java
...igateway/src/main/java/com/jz/dm/service/AuthService.java
+0
-102
OrganizationManageService.java
...ain/java/com/jz/dm/service/OrganizationManageService.java
+0
-61
ProducerService.java
...eway/src/main/java/com/jz/dm/service/ProducerService.java
+0
-140
ApiDirectionServiceImpl.java
.../java/com/jz/dm/service/impl/ApiDirectionServiceImpl.java
+0
-61
ApiInterfaceServiceImpl.java
.../java/com/jz/dm/service/impl/ApiInterfaceServiceImpl.java
+0
-388
ApiLogServiceImpl.java
...c/main/java/com/jz/dm/service/impl/ApiLogServiceImpl.java
+0
-207
AuthServiceImpl.java
...src/main/java/com/jz/dm/service/impl/AuthServiceImpl.java
+0
-414
OrganizationManageImpl.java
...n/java/com/jz/dm/service/impl/OrganizationManageImpl.java
+0
-233
ProducerServiceImpl.java
...main/java/com/jz/dm/service/impl/ProducerServiceImpl.java
+0
-969
ApiParamVerify.java
...c/main/java/com/jz/dm/service/request/ApiParamVerify.java
+0
-57
ApiQueryService.java
.../main/java/com/jz/dm/service/request/ApiQueryService.java
+0
-472
ApiQueryTestService.java
...n/java/com/jz/dm/service/request/ApiQueryTestService.java
+0
-446
DataBagService.java
...c/main/java/com/jz/dm/service/request/DataBagService.java
+0
-22
DataSelectService.java
...ain/java/com/jz/dm/service/request/DataSelectService.java
+0
-21
ThirdSelectService.java
...in/java/com/jz/dm/service/request/ThirdSelectService.java
+0
-22
DataBagHandle.java
...in/java/com/jz/dm/service/request/impl/DataBagHandle.java
+0
-54
DataTableSelectHandle.java
...com/jz/dm/service/request/impl/DataTableSelectHandle.java
+0
-209
ThirdSelectHandle.java
...ava/com/jz/dm/service/request/impl/ThirdSelectHandle.java
+0
-171
AccessLimit.java
...y/src/main/java/com/jz/dm/web/annotation/AccessLimit.java
+0
-23
ApiLogAspect.java
.../src/main/java/com/jz/dm/web/annotation/ApiLogAspect.java
+0
-19
ParamName.java
...way/src/main/java/com/jz/dm/web/annotation/ParamName.java
+0
-19
SystemLogAspect.java
...y/src/main/java/com/jz/dm/web/aspect/SystemLogAspect.java
+0
-267
ParamNameAnnotationBinder.java
.../java/com/jz/dm/web/binder/ParamNameAnnotationBinder.java
+0
-35
ParamNameAnnotationResolver.java
...ava/com/jz/dm/web/binder/ParamNameAnnotationResolver.java
+0
-69
AccessLimitInterceptor.java
...ava/com/jz/dm/web/interceptor/AccessLimitInterceptor.java
+0
-85
application-prod.yml
jz-dm-apigateway/src/main/resources/application-prod.yml
+0
-109
application-test.yml
jz-dm-apigateway/src/main/resources/application-test.yml
+0
-122
application.yml
jz-dm-apigateway/src/main/resources/application.yml
+0
-74
banner.txt
jz-dm-apigateway/src/main/resources/banner.txt
+0
-22
banner002.txt
jz-dm-apigateway/src/main/resources/banner002.txt
+0
-6
logback-dev.xml
jz-dm-apigateway/src/main/resources/logback-dev.xml
+0
-131
logback-pro.xml
jz-dm-apigateway/src/main/resources/logback-pro.xml
+0
-132
ApiAuthMapper.xml
jz-dm-apigateway/src/main/resources/mapper/ApiAuthMapper.xml
+0
-80
ApiDirectionlMapper.xml
...gateway/src/main/resources/mapper/ApiDirectionlMapper.xml
+0
-6
ApiFunctionMapper.xml
...pigateway/src/main/resources/mapper/ApiFunctionMapper.xml
+0
-26
ApiInterfaceCustomMapper.xml
...ay/src/main/resources/mapper/ApiInterfaceCustomMapper.xml
+0
-7
ApiInterfaceFileMapper.xml
...eway/src/main/resources/mapper/ApiInterfaceFileMapper.xml
+0
-51
ApiInterfaceMapper.xml
...igateway/src/main/resources/mapper/ApiInterfaceMapper.xml
+0
-102
ApiOpenApiEsFieldsMapper.xml
...ay/src/main/resources/mapper/ApiOpenApiEsFieldsMapper.xml
+0
-23
ApiOpenApiEsTagconfigMapper.xml
...src/main/resources/mapper/ApiOpenApiEsTagconfigMapper.xml
+0
-11
ApiOrgMapper.xml
jz-dm-apigateway/src/main/resources/mapper/ApiOrgMapper.xml
+0
-11
ApiReqLogMapper.xml
...-apigateway/src/main/resources/mapper/ApiReqLogMapper.xml
+0
-62
Property.java
...-apigateway/src/test/java/com/jz/dm/gateway/Property.java
+0
-34
SpringTestCase.java
...teway/src/test/java/com/jz/dm/gateway/SpringTestCase.java
+0
-15
TestApplicationContextInitializer.java
.../com/jz/dm/gateway/TestApplicationContextInitializer.java
+0
-50
ApiReqTest.java
...teway/src/test/java/com/jz/dm/gateway/api/ApiReqTest.java
+0
-115
TestAuth.java
...ateway/src/test/java/com/jz/dm/gateway/auth/TestAuth.java
+0
-22
TestOrganizationManage.java
...st/java/com/jz/dm/gateway/org/TestOrganizationManage.java
+0
-80
TestAmountCall.java
...rc/test/java/com/jz/dm/gateway/orther/TestAmountCall.java
+0
-71
TestHttpReq.java
...y/src/test/java/com/jz/dm/gateway/orther/TestHttpReq.java
+0
-45
TestMakeApi.java
...y/src/test/java/com/jz/dm/gateway/orther/TestMakeApi.java
+0
-47
TestRedisUserSave.java
...test/java/com/jz/dm/gateway/orther/TestRedisUserSave.java
+0
-69
TestStr.java
...teway/src/test/java/com/jz/dm/gateway/orther/TestStr.java
+0
-102
TestStreamReq.java
...src/test/java/com/jz/dm/gateway/orther/TestStreamReq.java
+0
-26
jz-dm-common.iml
jz-dm-common/jz-dm-common.iml
+0
-69
pom.xml
jz-dm-common/pom.xml
+1
-0
jz-dm-manage.iml
jz-dm-manage/jz-dm-manage.iml
+1
-107
pom.xml
pom.xml
+29
-28
No files found.
jz-dm-apigateway/.classpath
deleted
100644 → 0
View file @
9e276215
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry
kind=
"src"
output=
"target/classes"
path=
"src/main/java"
>
<attributes>
<attribute
name=
"optional"
value=
"true"
/>
<attribute
name=
"maven.pomderived"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
excluding=
"**"
kind=
"src"
output=
"target/classes"
path=
"src/main/resources"
>
<attributes>
<attribute
name=
"maven.pomderived"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
kind=
"src"
output=
"target/test-classes"
path=
"src/test/java"
>
<attributes>
<attribute
name=
"optional"
value=
"true"
/>
<attribute
name=
"maven.pomderived"
value=
"true"
/>
<attribute
name=
"test"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
excluding=
"**"
kind=
"src"
output=
"target/test-classes"
path=
"src/test/resources"
>
<attributes>
<attribute
name=
"maven.pomderived"
value=
"true"
/>
<attribute
name=
"test"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
kind=
"con"
path=
"org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"
>
<attributes>
<attribute
name=
"maven.pomderived"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
kind=
"con"
path=
"org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"
>
<attributes>
<attribute
name=
"maven.pomderived"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
kind=
"output"
path=
"target/classes"
/>
</classpath>
jz-dm-apigateway/.gitignore
deleted
100644 → 0
View file @
9e276215
/target/
jz-dm-apigateway/.project
deleted
100644 → 0
View file @
9e276215
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>
jz-dm-apigateway
</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>
org.eclipse.jdt.core.javabuilder
</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>
org.eclipse.m2e.core.maven2Builder
</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>
org.eclipse.jdt.core.javanature
</nature>
<nature>
org.eclipse.m2e.core.maven2Nature
</nature>
</natures>
</projectDescription>
jz-dm-apigateway/.settings/org.eclipse.core.resources.prefs
deleted
100644 → 0
View file @
9e276215
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/main/resources=UTF-8
encoding//src/test/java=UTF-8
encoding//src/test/resources=UTF-8
encoding/<project>=UTF-8
jz-dm-apigateway/.settings/org.eclipse.jdt.core.prefs
deleted
100644 → 0
View file @
9e276215
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8
jz-dm-apigateway/.settings/org.eclipse.m2e.core.prefs
deleted
100644 → 0
View file @
9e276215
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
jz-dm-apigateway/pom.xml
deleted
100644 → 0
View file @
9e276215
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<parent>
<artifactId>
jz-dm-parent
</artifactId>
<groupId>
com.jz.dm
</groupId>
<version>
0.0.1-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
jz-dm-apigateway
</artifactId>
<dependencies>
<!-- spring-boot -->
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<scope>
test
</scope>
</dependency>
<!--mybatis-plus自动的维护了mybatis以及mybatis-spring的依赖,
在springboot中这三者不能同时的出现,避免版本的冲突,表示:跳进过这个坑-->
<dependency>
<groupId>
com.baomidou
</groupId>
<artifactId>
mybatis-plus-boot-starter
</artifactId>
</dependency>
<dependency>
<groupId>
com.alibaba
</groupId>
<artifactId>
druid-spring-boot-starter
</artifactId>
<version>
1.1.20
</version>
</dependency>
<!-- 提供mysql驱动 -->
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
</dependency>
<!--lang3工具类-->
<dependency>
<groupId>
org.apache.commons
</groupId>
<artifactId>
commons-lang3
</artifactId>
</dependency>
<!--fastJson包-->
<dependency>
<groupId>
com.alibaba
</groupId>
<artifactId>
fastjson
</artifactId>
</dependency>
<dependency>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
<version>
1.18.16
</version>
<scope>
compile
</scope>
</dependency>
<!-- swagger2接口文档 -->
<dependency>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-swagger2
</artifactId>
</dependency>
<dependency>
<groupId>
com.github.xiaoymin
</groupId>
<artifactId>
swagger-bootstrap-ui
</artifactId>
</dependency>
<dependency>
<groupId>
com.jz.common
</groupId>
<artifactId>
jz-dm-common
</artifactId>
<version>
1.0.0-SNAPSHOT
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
io.projectreactor
</groupId>
<artifactId>
reactor-core
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-aop
</artifactId>
</dependency>
<!-- validation校验-->
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-validation
</artifactId>
</dependency>
<!--Sentinel 限流框架依赖-->
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-alibaba-sentinel
</artifactId>
<!-- <version>0.9.0.RELEASE</version>-->
</dependency>
<!-- 客户端需要引入 Transport 模块来与 Sentinel 控制台进行通信 -->
<dependency>
<groupId>
com.alibaba.csp
</groupId>
<artifactId>
sentinel-transport-simple-http
</artifactId>
</dependency>
<dependency>
<groupId>
com.alibaba.csp
</groupId>
<artifactId>
sentinel-parameter-flow-control
</artifactId>
</dependency>
<!-- 开启注解 -->
<dependency>
<groupId>
com.alibaba.csp
</groupId>
<artifactId>
sentinel-annotation-aspectj
</artifactId>
</dependency>
<dependency>
<groupId>
com.alibaba.csp
</groupId>
<artifactId>
sentinel-core
</artifactId>
</dependency>
<dependency>
<groupId>
com.alibaba.csp
</groupId>
<artifactId>
sentinel-spring-webmvc-adapter
</artifactId>
<version>
1.8.0
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
net.sf.json-lib
</groupId>
<artifactId>
json-lib
</artifactId>
<version>
2.2.3
</version>
<classifier>
jdk15
</classifier>
<!-- jdk版本 -->
</dependency>
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
</dependency>
<dependency>
<groupId>
org.apache.httpcomponents
</groupId>
<artifactId>
httpclient
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.session
</groupId>
<artifactId>
spring-session-data-redis
</artifactId>
</dependency>
<!-- 代码自动生成依赖 begin -->
<dependency>
<groupId>
com.baomidou
</groupId>
<artifactId>
mybatis-plus-generator
</artifactId>
<version>
3.4.1
</version>
</dependency>
<!-- velocity -->
<dependency>
<groupId>
org.apache.velocity
</groupId>
<artifactId>
velocity-engine-core
</artifactId>
<version>
2.0
</version>
</dependency>
<!-- 代码自动生成依赖 end-->
</dependencies>
<build>
<finalName>
${project.artifactId}
</finalName>
<resources>
<resource>
<directory>
src/main/resources
</directory>
<filtering>
true
</filtering>
<excludes>
<exclude>
static/**
</exclude>
<exclude>
xls/**
</exclude>
<exclude>
conf/**
</exclude>
<exclude>
emails/**
</exclude>
</excludes>
</resource>
<resource>
<directory>
src/main/resources
</directory>
<filtering>
false
</filtering>
<includes>
<include>
static/**
</include>
<include>
xls/**
</include>
<include>
conf/**
</include>
<include>
emails/**
</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<dependencies>
<dependency>
<groupId>
org.springframework
</groupId>
<artifactId>
springloaded
</artifactId>
<version>
1.2.8.RELEASE
</version>
</dependency>
</dependencies>
<executions>
<execution>
<goals>
<goal>
repackage
</goal>
</goals>
</execution>
</executions>
<configuration>
<includeSystemScope>
true
</includeSystemScope>
</configuration>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-resources-plugin
</artifactId>
<configuration>
<encoding>
UTF-8
</encoding>
<!-- 过滤后缀为pem、pfx的证书文件 -->
<nonFilteredFileExtensions>
<nonFilteredFileExtension>
p12
</nonFilteredFileExtension>
<nonFilteredFileExtension>
pem
</nonFilteredFileExtension>
<nonFilteredFileExtension>
pfx
</nonFilteredFileExtension>
</nonFilteredFileExtensions>
</configuration>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
jz-dm-apigateway/src/main/java/com/jz/dm/ApiGatewayApplication.java
deleted
100644 → 0
View file @
9e276215
package
com
.
jz
.
dm
;
import
com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
/**
* @author ZC
* @PACKAGE_NAME: com.jz.dm
* @PROJECT_NAME: jz-dm-parent
* @NAME: ApiGatewayApplication
* @DATE: 2020-12-2/16:03
* @DAY_NAME_SHORT: 周三
* @Description:
**/
@SpringBootApplication
(
exclude
=
DruidDataSourceAutoConfigure
.
class
)
@ComponentScan
(
basePackages
=
{
"com.jz"
})
@MapperScan
(
"com.jz.dm.mapper"
)
@EnableTransactionManagement
public
class
ApiGatewayApplication
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
ApiGatewayApplication
.
class
,
args
);
}
}
jz-dm-apigateway/src/main/java/com/jz/dm/common/base/BaseObject.java
deleted
100644 → 0
View file @
9e276215
package
com
.
jz
.
dm
.
common
.
base
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* @author ZC
* @PACKAGE_NAME: com.jz.dm.models.enity
* @PROJECT_NAME: jz-dm-parent
* @NAME: BaseObject
* @DATE: 2020-12-22/14:03
* @DAY_NAME_SHORT: 周二
* @Description: 日期处理公共类
**/
@Data
public
class
BaseObject
implements
Serializable
{
/**
* 主健ID
*/
@ApiModelProperty
(
"主健ID"
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Long
id
;
/**
* 创建日期
*/
@ApiModelProperty
(
"创建日期"
)
@TableField
(
"create_date"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
createDate
;
/**
* 创建人
*/
@ApiModelProperty
(
"创建人"
)
@TableField
(
"create_user"
)
private
String
createUser
;
/**
* 更新人
*/
@ApiModelProperty
(
"更新人"
)
@TableField
(
"update_user"
)
private
String
updateUser
;
/**
* 更新日期
*/
@ApiModelProperty
(
"更新日期"
)
@TableField
(
"update_date"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
updateDate
;
/**
* 是否删除
*/
@TableField
(
"is_deleted"
)
private
Integer
isDeleted
;
/**
* 备注
*/
@TableField
(
"remark"
)
private
String
remark
;
}
jz-dm-apigateway/src/main/java/com/jz/dm/common/constant/Constants.java
deleted
100644 → 0
View file @
9e276215
package
com
.
jz
.
dm
.
common
.
constant
;
/**
* 常量
*
*/
public
class
Constants
{
public
static
final
String
SIGN_TYPE_RSA
=
"RSA"
;
/**
* sha256WithRsa 算法请求类型
*/
public
static
final
String
SIGN_TYPE_RSA2
=
"RSA2"
;
public
static
final
String
ENCRYPT_TYPE_AES
=
"AES"
;
public
static
final
String
APP_KEY
=
"app_key"
;
public
static
final
String
FORMAT
=
"format"
;
public
static
final
String
METHOD
=
"method"
;
public
static
final
String
TIMESTAMP
=
"timestamp"
;
public
static
final
String
VERSION
=
"version"
;
public
static
final
String
SIGN_TYPE
=
"sign_type"
;
public
static
final
String
SIGN
=
"sign"
;
public
static
final
String
CHARSET
=
"charset"
;
public
static
final
String
ENCRYPT_TYPE
=
"encrypt_type"
;
public
static
final
String
PARAMS
=
"params"
;
public
static
final
String
RESPONSE
=
"response"
;
public
static
final
String
SUCCESS
=
"SUCCESS"
;
/** 默认时间格式 **/
public
static
final
String
DATE_TIME_FORMAT
=
"yyyy-MM-dd HH:mm:ss"
;
/** Date默认时区 **/
public
static
final
String
DATE_TIMEZONE
=
"GMT+8"
;
/** UTF-8字符集 **/
public
static
final
String
CHARSET_UTF8
=
"UTF-8"
;
/** GBK字符集 **/
public
static
final
String
CHARSET_GBK
=
"GBK"
;
/** JSON 应格式 */
public
static
final
String
FORMAT_JSON
=
"JSON"
;
/** 生成内部授权码格式 */
public
static
final
String
AUTH_INT
=
"INT"
;
/** 生成外部授权码格式 */
public
static
final
String
AUTH_OUT
=
"OUT"
;
/** XML 应格式 */
public
static
final
String
FORMAT_XML
=
"XML"
;
/** 默认版本 */
public
static
final
String
DEFAULT_VERSION
=
"1.0.0"
;
public
static
final
int
FILTER_ORDER_0
=
0
;
public
static
final
int
FILTER_ORDER_1
=
1
;
public
static
final
int
FILTER_ORDER_2
=
2
;
public
static
final
int
FILTER_ORDER_3
=
3
;
public
static
final
int
FILTER_ORDER_4
=
4
;
public
static
final
int
FILTER_ORDER_5
=
5
;
public
static
final
int
FILTER_ORDER_6
=
6
;
}
jz-dm-apigateway/src/main/java/com/jz/dm/common/constant/LoggingConstants.java
deleted
100644 → 0
View file @
9e276215
package
com
.
jz
.
dm
.
common
.
constant
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
/**
* 日志常量
*
*/
public
class
LoggingConstants
{
/** 业务摘要日志 */
public
static
final
Logger
DIGEST_LOGGER
=
LoggerFactory
.
getLogger
(
"GATEWAY-DIGEST"
);
/** 报警日志,内容关键字用##号包括,便于报警信息归类 */
public
static
final
Logger
ALERT_LOGGER
=
LoggerFactory
.
getLogger
(
"GATEWAY-ALERT"
);
/** 网关路由分发 */
public
static
final
Logger
DISPATCHER_LOGGER
=
LoggerFactory
.
getLogger
(
"GATEWAY-DISPATCHER"
);
public
static
final
Logger
REGISTRY_LOGGER
=
LoggerFactory
.
getLogger
(
"GATEWAY-REGISTRY"
);
/** 分隔符*/
public
static
final
String
SEP
=
","
;
/** 点分割符*/
public
static
final
String
DOT_SEP
=
"."
;
/** 默认值*/
public
static
final
String
DEFAULT_STR
=
"-"
;
/** 冒号 */
public
static
final
String
COLON
=
":"
;
/** 金额币种分隔 */
public
static
final
String
AMOUNT_CURRENCY_SPLIT
=
"^"
;
/** 左中括号 */
public
static
final
String
LBRACKET
=
"["
;
/** 右中括号 */
public
static
final
String
RBRACKET
=
"]"
;
/** "@" 符号*/
public
static
final
String
MONKEYS_AT
=
"@"
;
/** "&" 符号*/
public
static
final
String
AND_SPILT
=
"&"
;
/** "=" 符号*/
public
static
final
String
AND_EQUAL
=
"="
;
}
jz-dm-apigateway/src/main/java/com/jz/dm/common/constant/TagConstants.java
deleted
100644 → 0
View file @
9e276215
package
com
.
jz
.
dm
.
common
.
constant
;
/**
* @author ZC
* @PACKAGE_NAME: com.jz.dm.common.constant
* @PROJECT_NAME: jz-dm-parent
* @NAME: TagConstants
* @DATE: 2020-12-28/18:40
* @DAY_NAME_SHORT: 周一
* @Description:
**/
public
class
TagConstants
{
//远程shell脚本存放路径
public
static
final
String
remoteShellFilePath
=
"/opt/shell"
;
//远程sql脚本存放路径
public
static
final
String
remoteSqlFilePath
=
"/opt/sql"
;
//kafka handler 相关
public
static
final
String
OPEN_API_HANDLER_LIST_INFO_NAMESPACE
=
"jz:openapi:handler:list"
;
public
static
final
String
OPEN_API_HANDLER_INFO_NAMESPACE
=
"jz:openapi:handler:"
;
public
static
final
String
OPEN_API_SCHEMA_INFO_NAMESPACE
=
"jz:openapi:schema:"
;
public
static
final
String
OPEN_API_SERVERS_INFO_NAMESPACE
=
"jz:openapi:kafka:servers:"
;
// es handler 相关
public
static
final
String
OPEN_API_ESTAG_INFO_NAMESPACE
=
"jz:openapi:handler:estag:"
;
public
static
final
String
OPEN_API_ESTAG_JDBC_INFO_NAMESPACE
=
"jz:openapi:handler:estag:jdbc:"
;
//redis限流相关
public
static
final
String
OPEN_API_REDIS_LIMIT_KEY
=
"jz:openapi:redis:limit:"
;
//API缓存Key
public
static
final
String
OPEN_API_CACHE_KEY
=
"jz:openapi:cache:"
;
}
jz-dm-apigateway/src/main/java/com/jz/dm/common/enums/Format.java
deleted
100644 → 0
View file @
9e276215
package
com
.
jz
.
dm
.
common
.
enums
;
/**
* 数据格式
*
* @author zc
*/
public
enum
Format
{
JSON
,
XML
;
}
jz-dm-apigateway/src/main/java/com/jz/dm/common/enums/GatewayResultCode.java
deleted
100644 → 0
View file @
9e276215
package
com
.
jz
.
dm
.
common
.
enums
;
import
com.jz.dm.common.util.ResultCode
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* 网关结果码
*
*/
public
enum
GatewayResultCode
implements
ResultCode
{
/** 处理成功 */
SUCCESS
(
"SUCCESS"
,
"处理成功"
),
/** 处理成功 */
FAIL
(
"FAIL"
,
"处理失败"
),
/** 未知异常 */
UNKNOWN_EXCEPTION
(
"UNKNOWN_EXCEPTION"
,
"未知异常"
),
/** 无效接口 */
ILLEGAL_INTERFACE
(
"ILLEGAL_INTERFACE"
,
"无效接口"
),
/** 无效参数 */
ILLEGAL_ARGUMENT
(
"ILLEGAL_ARGUMENT"
,
"无效参数"
),
/** 参数列表为空 */
REQUEST_PARAM_EMPTY
(
"REQUEST_PARAM_EMPTY"
,
"请求参数为空"
),
/** 无效请求 */
ILLEGAL_REQUEST
(
"ILLEGAL_REQUEST"
,
"无效请求"
),
/** 无效请求 */
ILLEGAL_TIMETEMP
(
"ILLEGAL_TIMETEMP"
,
"无效时间戳"
),
/** 无效授权 */
ILLEGAL_AUTHORIZATION
(
"ILLEGAL_AUTHORIZATION"
,
"无效授权"
),
/** 请求次数受限 */
REQUEST_LIMIT_EXCEPTION
(
"REQUEST_LIMIT_EXCEPTION"
,
"请求次数受限"
),
/** 请求超过限制 */
RATE_LIMIT_EXCEEDED
(
"RATE_LIMIT_EXCEEDED"
,
"请求超过限制"
),
/** 提交数据过大 */
POST_DATA_TOO_LARGE
(
"POST_DATA_TOO_LARGE"
,
"提交数据过大"
),
/** 签名错误 */
SIGN_ERROR
(
"SIGN_EMPTY"
,
"签名错误"
),
/** 请求未授权 */
REQUEST_NOT_AUTH
(
"REQUEST_NOT_AUTH"
,
"请求未授权"
),
/** 组织不存在 */
ORG_NOT_EXIST
(
"ORG_NOT_EXIST"
,
"组织不存在"
),
/** API状态异常 */
API_STATUS_EXCEPTION
(
"API_STATUS_EXCEPTION"
,
"API状态异常"
),
/** API类型错误 */
API_TYPE_ERROR
(
"API_TYPE_ERROR"
,
"API类型错误"
),
/** 文件地址不存在 */
DATA_BIG_ADDR_UNEXIST
(
"DATA_BIG_ADDR_UNEXIST"
,
"文件地址不存在!"
),
/** 组织状态异常 */
ORG_STATE_EXCEPTION
(
"ORG_STATE_EXCEPTION"
,
"组织状态异常"
),
/** 请求信息不存在 */
REQUEST_INFO_UNEXIST
(
"REQUEST_INFO_UNEXIST"
,
"请求信息不存在"
),
/** 远程请求异常 */
DISTANCE_REQUEST_EXCEPTION
(
"DISTANCE_REQUEST_EXCEPTION"
,
"远程请求异常"
),
/** 单次调用金额不足 */
CALL_AMOUNT_NOT_ENOUGH
(
"CALL_AMOUNT_NOT_ENOUGH"
,
"单次调用金额不足"
),
/** 认证API已过有效期 */
AUTH_EXCEED_TIME
(
"AUTH_EXCEED_TIME"
,
"认证API已过有效期"
),
/** 输出类型错误 */
OUTPUT_TYPE_EXCEPTION
(
"OUTPUT_TYPE_EXCEPTION"
,
"输出类型错误!"
);
/**
* 初始化保存到map里方便根据code获取
*/
private
static
Map
<
String
,
GatewayResultCode
>
RESULT_CODES
=
new
HashMap
<
String
,
GatewayResultCode
>();
static
{
for
(
GatewayResultCode
gatewayResultCode
:
GatewayResultCode
.
values
())
{
RESULT_CODES
.
put
(
gatewayResultCode
.
code
,
gatewayResultCode
);
}
}
/** 结果码 */
private
String
code
;
/** 结果码信息 */
private
String
msg
;
/**
* 构造函数
*
* @param code 结果码
* @param msg 结果码信息
*/
private
GatewayResultCode
(
String
code
,
String
msg
)
{
this
.
code
=
code
;
this
.
msg
=
msg
;
}
/**
* 通过枚举<code>code</code>获得枚举
*
* @param code 结果码
* @return 枚举
*/
public
static
GatewayResultCode
getGatewayResultCode
(
String
code
)
{
return
RESULT_CODES
.
get
(
code
);
}
/**
* Getter method for property <tt>code</tt>.
*
* @return property value of code
*/
@Override
public
String
getCode
()
{
return
code
;
}
/**
* Setter method for property <tt>code</tt>.
*
* @param code value to be assigned to property code
*/
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
/**
* Getter method for property <tt>msg</tt>.
*
* @return property value of msg
*/
@Override
public
String
getMsg
()
{
return
msg
;
}
/**
* Setter method for property <tt>msg</tt>.
*
* @param msg value to be assigned to property msg
*/
public
void
setMsg
(
String
msg
)
{
this
.
msg
=
msg
;
}
}
jz-dm-apigateway/src/main/java/com/jz/dm/common/enums/GeneralStatusTypeEnum.java
deleted
100644 → 0
View file @
9e276215
package
com
.
jz
.
dm
.
common
.
enums
;
/**
* @author ZC
* @PACKAGE_NAME: com.jz.dm.common.enums
* @PROJECT_NAME: jz-dm-parent
* @NAME: GeneralStatusTypeEnum
* @DATE: 2020-12-30/20:08
* @DAY_NAME_SHORT: 周三
* @Description: 通用状态枚举
**/
public
enum
GeneralStatusTypeEnum
{
/**
* 启用
*/
ENABLE
(
"启用"
),
/**
* 停用
*/
UNABLE
(
"停用"
),
/**
* 有效'
*/
VALID
(
"有效"
),
/**
* 无效
*/
UN_VALID
(
"无效"
),
/**
* 成功'
*/
SUCCEED
(
"成功"
),
/**
* 失败'
*/
FAIL
(
"失败"
);
private
String
text
;
GeneralStatusTypeEnum
(
String
text
)
{
this
.
text
=
text
;
}
public
String
getText
()
{
return
text
;
}
public
static
GeneralStatusTypeEnum
fromGeneralStatus
(
String
typeName
)
{
for
(
GeneralStatusTypeEnum
type
:
GeneralStatusTypeEnum
.
values
())
{
if
(
type
.
name
().
equals
(
typeName
))
{
return
type
;
}
}
return
null
;
}
}
jz-dm-apigateway/src/main/java/com/jz/dm/common/enums/ResultFlowCode.java
deleted
100644 → 0
View file @
9e276215
package
com
.
jz
.
dm
.
common
.
enums
;
import
com.alibaba.fastjson.JSON
;
import
com.jz.common.constant.ResultMsg
;
/**
* @author ZC
* @PACKAGE_NAME: com.jz.dm.common.enums
* @PROJECT_NAME: jz-dm-parent
* @NAME: ResultFlowCode
* @DATE: 2021-2-25/14:40
* @DAY_NAME_SHORT: 周四
* @Description:
**/
public
enum
ResultFlowCode
{
/** 限流异常 */
FLOW_EXCEPTION
(
410
,
ResultMsg
.
LIMIT_FLOW_EXCEPTION
),
/** 降级异常 */
DEGRADE_EXCEPTION
(
411
,
ResultMsg
.
LIMIT_DEGRADE_EXCEPTION
),
/** 热点异常 */
PARAM_EXCEPTION
(
412
,
ResultMsg
.
LIMIT_PARAM_EXCEPTION
),
/** 系统规则异常 */
SYSTEM_EXCEPTION
(
413
,
ResultMsg
.
LIMIT_SYSTEM_EXCEPTION
),
/** 认证异常 */
AUTHORITY_EXCEPTION
(
414
,
ResultMsg
.
LIMIT_AUTHORITY_EXCEPTION
);
private
int
code
;
/**
* 提示信息
*/
private
ResultMsg
msg
;
private
ResultFlowCode
(
int
code
,
ResultMsg
msg
)
{
this
.
code
=
code
;
this
.
msg
=
msg
;
}
@Override
public
String
toString
()
{
return
JSON
.
toJSONString
(
this
);
}
public
int
getCode
()
{
return
code
;
}
public
ResultMsg
getMsg
()
{
return
this
.
msg
;
}
public
void
setMsg
(
ResultMsg
msg
)
{
this
.
msg
=
msg
;
}
}
jz-dm-apigateway/src/main/java/com/jz/dm/common/enums/SignType.java
deleted
100644 → 0
View file @
9e276215
package
com
.
jz
.
dm
.
common
.
enums
;
/**
* 签名类型
*
*/
public
enum
SignType
{
RSA
,
RSA2
,
MD5
}
jz-dm-apigateway/src/main/java/com/jz/dm/common/enums/apiInterface/ApiInfoOutTypeEnum.java
deleted
100644 → 0
View file @
9e276215
package
com
.
jz
.
dm
.
common
.
enums
.
apiInterface
;
/**
* @author ZC
* @PACKAGE_NAME: com.jz.dm.common.enums.apiInterface
* @PROJECT_NAME: jz-dm-parent
* @NAME: ApiInfoOutTypeEnum
* @DATE: 2021-1-6/11:14
* @DAY_NAME_SHORT: 周三
* @Description: 输出类型
**/
public
enum
ApiInfoOutTypeEnum
{
JSON
,
XML
,
FLOW
;
}
jz-dm-apigateway/src/main/java/com/jz/dm/common/enums/apiInterface/ApiStatusEnum.java
deleted
100644 → 0
View file @
9e276215
package
com
.
jz
.
dm
.
common
.
enums
.
apiInterface
;
/**
* @author ZC
* @PACKAGE_NAME: com.jz.dm.common.constant
* @PROJECT_NAME: jz-dm-parent
* @NAME: ApiStatusEnum
* @DATE: 2020-12-29/14:28
* @DAY_NAME_SHORT: 周二
* @Description:
**/
public
enum
ApiStatusEnum
{
/**
* 草稿
*/
DRAFT
(
"草稿"
),
/**
* 发布'
*/
ISSUE
(
"发布"
),
/**
* 授权
*/
AUTHORIZATION
(
"授权"
),
/**
* 冻结
*//*
FREEZE("冻结"),*/
/**
* 下架(下架时可以调用/不可以购买)
*/
SOLDOUT
(
"下架"
),
/**
* 失效'
*/
EXPIRY
(
"失效"
);
private
String
text
;
ApiStatusEnum
(
String
text
)
{
this
.
text
=
text
;
}
public
String
getText
()
{
return
text
;
}
public
static
ApiStatusEnum
fromApiStatusName
(
String
typeName
)
{
for
(
ApiStatusEnum
type
:
ApiStatusEnum
.
values
())
{
if
(
type
.
name
().
equals
(
typeName
))
{
return
type
;
}
}
return
null
;
}
}
jz-dm-apigateway/src/main/java/com/jz/dm/common/enums/auth/AuthModeEnum.java
deleted
100644 → 0
View file @
9e276215
package
com
.
jz
.
dm
.
common
.
enums
.
auth
;
/**
* @author ZC
* @PACKAGE_NAME: com.jz.dm.common.enums.auth
* @PROJECT_NAME: jz-dm-parent
* @NAME: AuthModeEnum
* @DATE: 2020-12-26/23:53
* @DAY_NAME_SHORT: 周六
* @Description: 认证方式枚举
**/
public
enum
AuthModeEnum
{
/**
* 按次调用
*/
POWER_CALL_MODE
(
"按次调用"
),
/**
* 按时间调用'
*/
RECORD_TIME_MODE
(
"按时间调用"
),
/**
* 永久有效'
*/
PERMANENT_TIME_MODE
(
"永久有效"
);
private
String
text
;
AuthModeEnum
(
String
text
)
{
this
.
text
=
text
;
}
public
String
getText
()
{
return
text
;
}
public
static
AuthModeEnum
fromTypeModeName
(
String
typeName
)
{
for
(
AuthModeEnum
type
:
AuthModeEnum
.
values
())
{
if
(
type
.
name
().
equals
(
typeName
))
{
return
type
;
}
}
return
null
;
}
}
jz-dm-apigateway/src/main/java/com/jz/dm/common/enums/auth/AuthReqTypeEnum.java
deleted
100644 → 0
View file @
9e276215
package
com
.
jz
.
dm
.
common
.
enums
.
auth
;
/**
* @author ZC
* @PACKAGE_NAME: com.jz.dm.common.enums.auth
* @PROJECT_NAME: jz-dm-parent
* @NAME: AuthReqTypeEnum
* @DATE: 2021-1-8/18:44
* @DAY_NAME_SHORT: 周五
* @Description:
**/
public
enum
AuthReqTypeEnum
{
DAY
(
"天"
),
MONTH
(
"月"
),
YEAR
(
"年"
);
private
String
text
;
AuthReqTypeEnum
(
String
text
)
{
this
.
text
=
text
;
}
public
String
getText
()
{
return
text
;
}
public
static
AuthReqTypeEnum
fromAuthReqTypeEnum
(
String
typeName
)
{
for
(
AuthReqTypeEnum
type
:
AuthReqTypeEnum
.
values
())
{
if
(
type
.
name
().
equals
(
typeName
))
{
return
type
;
}
}
return
null
;
}
}
jz-dm-apigateway/src/main/java/com/jz/dm/common/enums/auth/AuthTypeEnum.java
deleted
100644 → 0
View file @
9e276215
package
com
.
jz
.
dm
.
common
.
enums
.
auth
;
/**
* @author ZC
* @PACKAGE_NAME: com.jz.dm.common.enums.auth
* @PROJECT_NAME: jz-dm-parent
* @NAME: AuthTypeEnum
* @DATE: 2020-12-26/23:47
* @DAY_NAME_SHORT: 周六
* @Description: 授权认证枚举类
**/
public
enum
AuthTypeEnum
{
/**
* 数据银行
*/
DATA_BANK_AUTH
(
"数据银行授权"
),
/**
* dmp授权'
*/
DMP_AUTH
(
"DMP授权"
);
private
String
text
;
AuthTypeEnum
(
String
text
)
{
this
.
text
=
text
;
}
public
String
getText
()
{
return
text
;
}
public
static
AuthTypeEnum
fromAuthTypeName
(
String
typeName
)
{
for
(
AuthTypeEnum
type
:
AuthTypeEnum
.
values
())
{
if
(
type
.
name
().
equals
(
typeName
))
{
return
type
;
}
}
return
null
;
}
}
jz-dm-apigateway/src/main/java/com/jz/dm/common/enums/direction/DirectionTypeEnum.java
deleted
100644 → 0
View file @
9e276215
package
com
.
jz
.
dm
.
common
.
enums
.
direction
;
/**
* @author ZC
* @PACKAGE_NAME: com.jz.dm.common.enums
* @PROJECT_NAME: jz-dm-parent
* @NAME: DirectionTypeEnum
* @DATE: 2020-12-31/18:39
* @DAY_NAME_SHORT: 周四
* @Description:
**/
public
enum
DirectionTypeEnum
{
/**
* API类型
*/
API_TYPE
;
public
static
DirectionTypeEnum
fromTypeDirectionName
(
String
typeName
)
{
for
(
DirectionTypeEnum
type
:
DirectionTypeEnum
.
values
())
{
if
(
type
.
name
().
equals
(
typeName
))
{
return
type
;
}
}
return
null
;
}
}
jz-dm-apigateway/src/main/java/com/jz/dm/common/enums/org/OrgStatusEnum.java
deleted
100644 → 0
View file @
9e276215
package
com
.
jz
.
dm
.
common
.
enums
.
org
;
/**
* @author ZC
* @PACKAGE_NAME: com.jz.dm.common.enums.org
* @PROJECT_NAME: jz-dm-parent
* @NAME: OrgStatusEnum
* @DATE: 2021-1-1/11:17
* @DAY_NAME_SHORT: 周五
* @Description:
**/
public
enum
OrgStatusEnum
{
NORMAL
(
"正常"
),
FREEZE
(
"冻结"
),
CANCEL
(
"注销"
);
private
String
text
;
OrgStatusEnum
(
String
text
)
{
this
.
text
=
text
;
}
public
String
getText
()
{
return
text
;
}
public
static
OrgStatusEnum
fromOrgStatusTypeName
(
String
typeName
)
{
for
(
OrgStatusEnum
type
:
OrgStatusEnum
.
values
())
{
if
(
type
.
name
().
equals
(
typeName
))
{
return
type
;
}
}
return
null
;
}
}
jz-dm-apigateway/src/main/java/com/jz/dm/common/enums/org/OrgTypeEnum.java
deleted
100644 → 0
View file @
9e276215
package
com
.
jz
.
dm
.
common
.
enums
.
org
;
/**
* @author ZC
* @PACKAGE_NAME: com.jz.dm.common.enums.org
* @PROJECT_NAME: jz-dm-parent
* @NAME: OrgTypeEnum
* @DATE: 2021-1-14/16:17
* @DAY_NAME_SHORT: 周四
* @Description:
**/
public
enum
OrgTypeEnum
{
INT
(
"内部组织"
),
OUT
(
"外部组织"
);
private
String
text
;
OrgTypeEnum
(
String
text
)
{
this
.
text
=
text
;
}
public
String
getText
()
{
return
text
;
}
public
static
OrgTypeEnum
fromOrgTypeEnumName
(
String
typeName
)
{
for
(
OrgTypeEnum
type
:
OrgTypeEnum
.
values
())
{
if
(
type
.
name
().
equals
(
typeName
))
{
return
type
;
}
}
return
null
;
}
}
jz-dm-apigateway/src/main/java/com/jz/dm/common/enums/produce/ProducerStatusTypeEnum.java
deleted
100644 → 0
View file @
9e276215
package
com
.
jz
.
dm
.
common
.
enums
.
produce
;
/**
* @author ZC
* @PACKAGE_NAME: com.jz.dm.common.enums.produce
* @PROJECT_NAME: jz-dm-parent
* @NAME: ProducerStatusTypeEnum
* @DATE: 2021-1-1/18:04
* @DAY_NAME_SHORT: 周五
* @Description:
**/
public
enum
ProducerStatusTypeEnum
{
DRAFT
(
"草稿"
),
ISSUE
(
"发布"
),
OUTMODED
(
"过时"
),
FREEZE
(
"冻结"
),
EXPIRY
(
"失效"
);
private
String
text
;
ProducerStatusTypeEnum
(
String
text
)
{
this
.
text
=
text
;
}
public
String
getText
()
{
return
text
;
}
public
static
ProducerStatusTypeEnum
fromTypeName
(
String
typeName
)
{
for
(
ProducerStatusTypeEnum
type
:
ProducerStatusTypeEnum
.
values
())
{
if
(
type
.
name
().
equals
(
typeName
))
{
return
type
;
}
}
return
null
;
}
}
jz-dm-apigateway/src/main/java/com/jz/dm/common/exception/GatewayException.java
deleted
100644 → 0
View file @
9e276215
package
com
.
jz
.
dm
.
common
.
exception
;
import
com.jz.dm.common.util.ResultCode
;
/**
* 网关异常
*
*/
public
class
GatewayException
extends
OpenApiException
{
/** 序列号 */
private
static
final
long
serialVersionUID
=
3391018902219700916L
;
/**
* 构造函数
*
* @param resultCode
*/
public
GatewayException
(
ResultCode
resultCode
)
{
super
(
resultCode
);
}
/**
* 构造函数
*
* @param resultCode
* @param cause
*/
public
GatewayException
(
ResultCode
resultCode
,
Throwable
cause
)
{
super
(
resultCode
,
cause
);
}
/**
* 构造函数
*
* @param resultCode
* @param detailMessage
*/
public
GatewayException
(
ResultCode
resultCode
,
String
detailMessage
)
{
super
(
resultCode
,
detailMessage
);
}
/**
* 构造函数
*
* @param code
* @param msg
*/
public
GatewayException
(
String
code
,
String
msg
)
{
this
(
code
,
msg
,
(
Throwable
)
null
);
}
/**
* 构造函数
*
* @param code
* @param msg
* @param cause
*/
public
GatewayException
(
String
code
,
String
msg
,
Throwable
cause
)
{
super
(
code
,
msg
,
cause
);
}
/**
* 构造函数
*
* @param code
* @param msg
* @param detailMessage
*/
public
GatewayException
(
String
code
,
String
msg
,
String
detailMessage
)
{
super
(
code
,
msg
,
detailMessage
);
}
}
\ No newline at end of file
jz-dm-apigateway/src/main/java/com/jz/dm/common/exception/LimitFlowException.java
deleted
100644 → 0
View file @
9e276215
package
com
.
jz
.
dm
.
common
.
exception
;
import
com.jz.common.constant.ResultMsg
;
import
com.jz.dm.common.enums.ResultFlowCode
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* @author ZC
* @PACKAGE_NAME: com.jz.dm.common.exception
* @PROJECT_NAME: jz-dm-parent
* @NAME: LimitFlowException
* @DATE: 2021-2-25/14:27
* @DAY_NAME_SHORT: 周四
* @Description: 限流异常处理器
**/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
public
class
LimitFlowException
extends
RuntimeException
{
private
static
final
long
serialVersionUID
=
-
3963657380514719229L
;
/**
* 错误代码
*/
protected
ResultFlowCode
code
;
/**
* 错误信息
*/
protected
String
message
;
private
Throwable
cause
;
public
static
LimitFlowException
of
(
ResultMsg
errorMsg
)
{
return
LimitFlowException
.
of
(
ResultFlowCode
.
FLOW_EXCEPTION
,
errorMsg
.
getMsg
());
}
public
static
LimitFlowException
of_error
(
String
errorMsg
)
{
return
LimitFlowException
.
of
(
ResultFlowCode
.
FLOW_EXCEPTION
,
errorMsg
);
}
public
static
LimitFlowException
of
(
ResultFlowCode
code
)
{
LimitFlowException
ufaceException
=
new
LimitFlowException
();
ufaceException
.
setCode
(
code
);
ufaceException
.
setMessage
(
code
.
getMsg
().
getMsg
());
return
ufaceException
;
}
public
static
LimitFlowException
of
(
ResultFlowCode
code
,
String
message
)
{
LimitFlowException
ufaceException
=
new
LimitFlowException
();
ufaceException
.
setCode
(
code
);
ufaceException
.
setMessage
(
message
);
return
ufaceException
;
}
public
static
LimitFlowException
of
(
ResultFlowCode
code
,
Throwable
cause
)
{
LimitFlowException
ufaceException
=
new
LimitFlowException
();
ufaceException
.
setCode
(
code
);
ufaceException
.
setCause
(
cause
);
ufaceException
.
setMessage
(
"todo need get from db/properties"
);
return
ufaceException
;
}
}
jz-dm-apigateway/src/main/java/com/jz/dm/common/exception/OpenApiException.java
deleted
100644 → 0
View file @
9e276215
package
com
.
jz
.
dm
.
common
.
exception
;
import
com.jz.dm.common.util.ResultCode
;
/**
* openapi异常
*
*/
public
class
OpenApiException
extends
RuntimeException
{
private
static
final
long
serialVersionUID
=
-
3963657380514719229L
;
/**
* 结果码
*/
private
ResultCode
resultCode
;
/**
* 构造函数
*
* @param resultCode
*/
public
OpenApiException
(
ResultCode
resultCode
)
{
this
.
resultCode
=
new
ResultCodeImpl
(
resultCode
);
}
/**
* 构造函数
*
* @param resultCode
* @param cause
*/
public
OpenApiException
(
ResultCode
resultCode
,
Throwable
cause
)
{
super
(
cause
);
this
.
resultCode
=
new
ResultCodeImpl
(
resultCode
);
}
/**
* 构造函数
*
* @param resultCode
* @param detailMessage
*/
public
OpenApiException
(
ResultCode
resultCode
,
String
detailMessage
)
{
super
(
detailMessage
);
this
.
resultCode
=
new
ResultCodeImpl
(
resultCode
);
}
/**
* 构造函数
*
* @param resultCode
* @param detailMessage
* @param cause
*/
public
OpenApiException
(
ResultCode
resultCode
,
String
detailMessage
,
Throwable
cause
)
{
super
(
detailMessage
,
cause
);
this
.
resultCode
=
new
ResultCodeImpl
(
resultCode
);
}
/**
* 构造函数
*
* @param code
* @param msg
*/
public
OpenApiException
(
String
code
,
String
msg
)
{
this
(
new
ResultCodeImpl
(
code
,
msg
));
}
/**
* 构造函数
*
* @param code
* @param msg
* @param cause
*/
public
OpenApiException
(
String
code
,
String
msg
,
Throwable
cause
)
{
this
(
new
ResultCodeImpl
(
code
,
msg
),
cause
);
}
/**
* 构造函数
*
* @param code
* @param msg
* @param detailMessage
*/
public
OpenApiException
(
String
code
,
String
msg
,
String
detailMessage
)
{
this
(
new
ResultCodeImpl
(
code
,
msg
),
detailMessage
);
}
/**
* Getter method for property <tt>resultCode</tt>.
*
* @return property value of resultCode
*/
public
ResultCode
getResultCode
()
{
return
resultCode
;
}
public
static
class
ResultCodeImpl
implements
ResultCode
{
private
String
code
;
private
String
msg
;
public
ResultCodeImpl
(
ResultCode
resultCode
)
{
this
.
code
=
resultCode
.
getCode
();
this
.
msg
=
resultCode
.
getMsg
();
}
public
ResultCodeImpl
(
String
code
,
String
msg
)
{
this
.
code
=
code
;
this
.
msg
=
msg
;
}
@Override
public
String
getCode
()
{
return
code
;
}
@Override
public
String
getMsg
()
{
return
msg
;
}
}
}
jz-dm-apigateway/src/main/java/com/jz/dm/common/exception/SignatureException.java
deleted
100644 → 0
View file @
9e276215
package
com
.
jz
.
dm
.
common
.
exception
;
import
com.jz.dm.common.util.ResultCode
;
/**
* 签名异常
*
*/
public
class
SignatureException
extends
OpenApiException
{
private
static
final
long
serialVersionUID
=
6551962245794846748L
;
/**
* 构造函数
*
* @param resultCode
*/
public
SignatureException
(
ResultCode
resultCode
)
{
super
(
resultCode
);
}
/**
* 构造函数
* @param resultCode
* @param detailMessage
*/
public
SignatureException
(
ResultCode
resultCode
,
String
detailMessage
)
{
super
(
resultCode
,
detailMessage
);
}
/**
* 构造函数
* @param resultCode
* @param cause
*/
public
SignatureException
(
ResultCode
resultCode
,
Throwable
cause
)
{
super
(
resultCode
,
cause
);
}
/**
* 构造函数
* @param resultCode
* @param detailMessage
* @param cause
*/
public
SignatureException
(
ResultCode
resultCode
,
String
detailMessage
,
Throwable
cause
)
{
super
(
resultCode
,
detailMessage
,
cause
);
}
}
jz-dm-apigateway/src/main/java/com/jz/dm/common/util/ArrayUtil.java
deleted
100644 → 0
View file @
9e276215
This diff is collapsed.
Click to expand it.
jz-dm-apigateway/src/main/java/com/jz/dm/common/util/ClassUtil.java
deleted
100644 → 0
View file @
9e276215
This diff is collapsed.
Click to expand it.
jz-dm-apigateway/src/main/java/com/jz/dm/common/util/DateUtil.java
deleted
100644 → 0
View file @
9e276215
package
com
.
jz
.
dm
.
common
.
util
;
import
java.text.SimpleDateFormat
;
import
java.util.Calendar
;
import
java.util.Date
;
/**
* @author ZC
* @PACKAGE_NAME: com.jz.dm.common.util
* @PROJECT_NAME: jz-dm-parent
* @NAME: DateUtil
* @DATE: 2021-1-2/21:55
* @DAY_NAME_SHORT: 周六
* @Description: 时间工具类处理时间
**/
public
class
DateUtil
{
/**
* 计算当前距离23:59:59剩余时间
* @return
*/
public
static
long
calculateNowResidueTime
(){
Calendar
cal
=
Calendar
.
getInstance
();
cal
.
add
(
Calendar
.
DAY_OF_YEAR
,
1
);
cal
.
set
(
Calendar
.
HOUR_OF_DAY
,
0
);
cal
.
set
(
Calendar
.
SECOND
,
0
);
cal
.
set
(
Calendar
.
MINUTE
,
0
);
cal
.
set
(
Calendar
.
MILLISECOND
,
0
);
return
(
cal
.
getTimeInMillis
()
-
System
.
currentTimeMillis
())
/
1000
;
}
/**
* 计算当前距离下月一号剩余时间
* @return
*/
public
static
long
calculateNowMonthTime
(){
Calendar
c
=
Calendar
.
getInstance
();
//获取一个Calendar对象
c
.
setTime
(
new
Date
()
);
c
.
add
(
Calendar
.
MONTH
,
1
);
c
.
set
(
Calendar
.
DAY_OF_MONTH
,
0
);
c
.
set
(
Calendar
.
HOUR_OF_DAY
,
23
);
c
.
set
(
Calendar
.
MINUTE
,
59
);
c
.
set
(
Calendar
.
SECOND
,
59
);
return
(
c
.
getTimeInMillis
()
-
System
.
currentTimeMillis
())
/
1000
;
}
/**
* 获取指定年份的时间
* @param year
* @return
*/
public
static
Date
getAssignYearDate
(
Integer
year
){
Calendar
cal
=
Calendar
.
getInstance
();
/* int year =cal.get(Calendar.YEAR)+1;
int month=cal.get(Calendar.MONTH)+1;
cal.add(Calendar.MONTH, 0);*/
//Date date = cal.getTime(); //结果
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
cal
.
set
(
Calendar
.
YEAR
,
cal
.
get
(
Calendar
.
YEAR
)+
year
);
Date
date
=
cal
.
getTime
();
System
.
out
.
println
(
sdf
.
format
(
date
));
return
date
;
}
public
static
void
main
(
String
[]
args
)
{
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
//System.out.println(calculateNowResidueTime());
Calendar
c
=
Calendar
.
getInstance
();
//获取一个Calendar对象
c
.
setTime
(
new
Date
()
);
c
.
add
(
Calendar
.
MONTH
,
1
);
c
.
set
(
Calendar
.
DAY_OF_MONTH
,
0
);
c
.
set
(
Calendar
.
HOUR_OF_DAY
,
23
);
c
.
set
(
Calendar
.
MINUTE
,
59
);
c
.
set
(
Calendar
.
SECOND
,
59
);
Date
time
=
c
.
getTime
();
String
format
=
dateFormat
.
format
(
time
);
System
.
out
.
println
(
format
);
Calendar
cal
=
Calendar
.
getInstance
();
//获取一个Calendar对象
cal
.
setTime
(
new
Date
()
);
cal
.
add
(
Calendar
.
MONTH
,
0
);
//获取当前时间的下一个月
cal
.
set
(
Calendar
.
DAY_OF_MONTH
,
cal
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
));
//获取下一个月的最后一天
Date
preMonth
=
cal
.
getTime
();
//得到下个月的最后一天
String
format1
=
dateFormat
.
format
(
preMonth
);
System
.
out
.
println
(
format1
);
System
.
out
.
println
(
calculateNowMonthTime
()/
60
/
60
/
24
);
}
}
jz-dm-apigateway/src/main/java/com/jz/dm/common/util/JsonUtil.java
deleted
100644 → 0
View file @
9e276215
package
com
.
jz
.
dm
.
common
.
util
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.PropertyNamingStrategy
;
import
com.alibaba.fastjson.parser.ParserConfig
;
import
com.alibaba.fastjson.serializer.NameFilter
;
import
org.apache.commons.lang3.StringUtils
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* Json工具类
*/
public
class
JsonUtil
{
private
static
final
ParserConfig
PARSER_CONFIG
=
new
ParserConfig
();
static
{
PARSER_CONFIG
.
propertyNamingStrategy
=
PropertyNamingStrategy
.
CamelCase
;
}
private
static
final
Map
<
PropertyNamingStrategy
,
NameFilter
>
NAME_FILTERS
=
new
HashMap
<
PropertyNamingStrategy
,
NameFilter
>();
static
{
NAME_FILTERS
.
put
(
PropertyNamingStrategy
.
SnakeCase
,
new
SnakeNameFilter
());
NAME_FILTERS
.
put
(
PropertyNamingStrategy
.
CamelCase
,
new
CamelNameFilter
());
NAME_FILTERS
.
put
(
PropertyNamingStrategy
.
PascalCase
,
new
PascalNameFilter
());
NAME_FILTERS
.
put
(
PropertyNamingStrategy
.
KebabCase
,
new
KebabNameFilter
());
}
public
static
class
SnakeNameFilter
implements
NameFilter
{
/**
* @see NameFilter#process(Object, String, Object)
*/
@Override
public
String
process
(
Object
object
,
String
name
,
Object
value
)
{
return
PropertyNamingStrategy
.
SnakeCase
.
translate
(
name
);
}
}
public
static
class
CamelNameFilter
implements
NameFilter
{
/**
* @see NameFilter#process(Object, String, Object)
*/
@Override
public
String
process
(
Object
object
,
String
name
,
Object
value
)
{
return
PropertyNamingStrategy
.
CamelCase
.
translate
(
name
);
}
}
public
static
class
PascalNameFilter
implements
NameFilter
{
/**
* @see NameFilter#process(Object, String, Object)
*/
@Override
public
String
process
(
Object
object
,
String
name
,
Object
value
)
{
return
PropertyNamingStrategy
.
PascalCase
.
translate
(
name
);
}
}
public
static
class
KebabNameFilter
implements
NameFilter
{
/**
* @see NameFilter#process(Object, String, Object)
*/
@Override
public
String
process
(
Object
object
,
String
name
,
Object
value
)
{
return
PropertyNamingStrategy
.
KebabCase
.
translate
(
name
);
}
}
/**
* object serialize to string
*
* @param object
* @param strategy
* @return
*/
public
static
String
toJSONString
(
Object
object
,
PropertyNamingStrategy
strategy
)
{
if
(
object
==
null
)
{
return
null
;
}
if
(
strategy
==
null
)
{
return
JSON
.
toJSONString
(
object
);
}
NameFilter
nameFilter
=
NAME_FILTERS
.
get
(
strategy
);
if
(
nameFilter
==
null
)
{
return
JSON
.
toJSONString
(
object
);
}
else
{
return
JSON
.
toJSONString
(
object
,
nameFilter
);
}
}
/**
* String转换为JSONObject对象
*
* @param data
* @return
*/
public
static
JSONObject
stringToJsonObject
(
String
data
)
{
if
(
StringUtils
.
isNotEmpty
(
data
))
{
return
JSONObject
.
parseObject
(
data
);
}
return
null
;
}
}
jz-dm-apigateway/src/main/java/com/jz/dm/common/util/LogUtil.java
deleted
100644 → 0
View file @
9e276215
package
com
.
jz
.
dm
.
common
.
util
;
import
org.slf4j.Logger
;
/**
* 日志打印工具
*
*/
public
class
LogUtil
{
/** 摘要日志的内容分隔符 */
public
static
final
String
SEP
=
","
;
/** 修饰符 */
private
static
final
char
RIGHT_TAG
=
']'
;
/** 修饰符 */
private
static
final
char
LEFT_TAG
=
'['
;
/**
* 日志信息
*
*/
public
interface
LogInfo
{
/**
* 获取日志信息
*
* @return 日志信息
*/
String
getLogInfo
();
}
/**
* 打印info日志。
*
* @param logger 日志对象
* @param objs 任意个要输出到日志的参数
*/
public
static
void
info
(
Logger
logger
,
Object
...
objs
)
{
if
(
logger
.
isInfoEnabled
())
{
logger
.
info
(
getLogString
(
objs
));
}
}
/**
* 打印info级别日志
*
* @param logger 日志对象
* @param logInfo 日志信息
*/
public
static
void
info
(
Logger
logger
,
LogInfo
logInfo
)
{
if
(
logger
.
isInfoEnabled
())
{
logger
.
info
(
logInfo
.
getLogInfo
());
}
}
/**
* 打印info级别日志
*
* @param logger 日志对象
* @param e 异常信息
* @param objs 任意个要输出到日志的参数
*/
public
static
void
info
(
Logger
logger
,
Throwable
e
,
Object
...
objs
)
{
if
(
logger
.
isInfoEnabled
())
{
logger
.
info
(
getLogString
(
objs
),
e
);
}
}
/**
* 打印warn级别日志
*
* @param logger 日志对象
* @param objs 任意个要输出到日志的参数
*/
public
static
void
warn
(
Logger
logger
,
Object
...
objs
)
{
logger
.
warn
(
getLogString
(
objs
));
}
/**
* 打印warn级别日志
*
* @param logger 日志对象
* @param e 异常信息
* @param objs 任意个要输出到日志的参数
*/
public
static
void
warn
(
Logger
logger
,
Throwable
e
,
Object
...
objs
)
{
logger
.
warn
(
getLogString
(
objs
),
e
);
}
/**
* 打印error级别日志
*
* @param logger 日志对象
* @param e 异常信息
* @param objs 任意个要输出到日志的参数
*/
public
static
void
error
(
Logger
logger
,
Throwable
e
,
Object
...
objs
)
{
logger
.
error
(
getLogString
(
objs
),
e
);
}
/**
* 打印error级别日志
*
* @param logger 日志对象
* @param objs 任意个要输出到日志的参数
*/
public
static
void
error
(
Logger
logger
,
Object
...
objs
)
{
logger
.
error
(
getLogString
(
objs
));
}
/**
* 打印debug日志。
*
* @param logger 日志对象
* @param objs 任意个要输出到日志的参数
*/
public
static
void
debug
(
Logger
logger
,
Object
...
objs
)
{
if
(
logger
.
isDebugEnabled
())
{
logger
.
debug
(
getLogString
(
objs
));
}
}
/**
* 打印debug日志。
*
* @param logger 日志对象
* @param e 异常信息
* @param objs 任意个要输出到日志的参数
*/
public
static
void
debug
(
Logger
logger
,
Throwable
e
,
Object
...
objs
)
{
if
(
logger
.
isDebugEnabled
())
{
logger
.
debug
(
getLogString
(
objs
),
e
);
}
}
/**
* 生成输出到日志的字符串
*
* @param objs 任意个要输出到日志的参数
* @return 日志字符串
*/
public
static
String
getLogString
(
Object
...
objs
)
{
StringBuilder
log
=
new
StringBuilder
();
log
.
append
(
LEFT_TAG
).
append
(
getThreadId
()).
append
(
RIGHT_TAG
);
for
(
Object
o
:
objs
)
{
log
.
append
(
o
).
append
(
SEP
);
}
return
log
.
toString
();
}
/**
* 获取线程id。
*
* @return 线程id
*/
public
static
String
getThreadId
()
{
return
String
.
valueOf
(
Thread
.
currentThread
().
getId
());
}
}
jz-dm-apigateway/src/main/java/com/jz/dm/common/util/MapUtil.java
deleted
100644 → 0
View file @
9e276215
package
com
.
jz
.
dm
.
common
.
util
;
import
com.alibaba.fastjson.JSON
;
import
org.apache.commons.lang3.StringUtils
;
import
java.io.UnsupportedEncodingException
;
import
java.lang.reflect.Field
;
import
java.net.URLEncoder
;
import
java.util.*
;
/**
* @author ZC
* @PACKAGE_NAME: com.jz.dm.common.util
* @PROJECT_NAME: jz-dm-parent
* @NAME: MapUtil
* @DATE: 2021-1-2/14:02
* @DAY_NAME_SHORT: 周六
* @Description:
**/
public
class
MapUtil
{
/**
* 获取签名参数
*
* @param apiKey
* @param method
* @param signType
* @return
*/
//public static String getSignValue(String apiKey, String method, String signType) {
// StringBuilder builder = new StringBuilder();
// builder.append("apiKey=").append(apiKey).append(LoggingConstants.AND_SPILT)
// .append("method=").append(method).append(LoggingConstants.AND_SPILT)
// .append("signType=").append(signType);
// return builder.toString();
//}
/**
* 将对象转成TreeMap,属性名为key,属性值为value
*
* @param object 对象
* @return
* @throws IllegalAccessException
*/
public
static
TreeMap
<
String
,
String
>
objToMap
(
Object
object
)
throws
IllegalAccessException
{
Class
clazz
=
object
.
getClass
();
TreeMap
<
String
,
String
>
treeMap
=
new
TreeMap
<
String
,
String
>();
while
(
null
!=
clazz
.
getSuperclass
())
{
Field
[]
declaredFields1
=
clazz
.
getDeclaredFields
();
for
(
Field
field
:
declaredFields1
)
{
String
name
=
field
.
getName
();
// 获取原来的访问控制权限
boolean
accessFlag
=
field
.
isAccessible
();
// 修改访问控制权限
field
.
setAccessible
(
true
);
Object
value
=
field
.
get
(
object
);
// 恢复访问控制权限
field
.
setAccessible
(
accessFlag
);
if
(
null
!=
value
&&
StringUtils
.
isNotBlank
(
value
.
toString
()))
{
//如果是List,将List转换为json字符串
if
(
value
instanceof
List
)
{
value
=
JSON
.
toJSONString
(
value
);
}
treeMap
.
put
(
name
,
String
.
valueOf
(
value
));
}
}
clazz
=
clazz
.
getSuperclass
();
}
return
treeMap
;
}
/**
* 按照指定的分割符将list转换为String
*
* @param list
* @param separator
* @return
*/
public
static
String
listToString
(
List
list
,
String
separator
)
{
StringBuilder
sb
=
new
StringBuilder
();
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
if
(
i
==
list
.
size
()
-
1
)
{
sb
.
append
(
list
.
get
(
i
));
}
else
{
sb
.
append
(
list
.
get
(
i
));
sb
.
append
(
separator
);
}
}
return
sb
.
toString
();
}
/**
* * 把数组元素按照按照字典倒序排序,并按照“参数=参数值”的模式用“&”字符拼接成字符串
* @param params 需要排序并参与字符拼接的参数组
* @return 拼接后字符串
*/
public
static
String
stringInvertSort
(
Map
<
String
,
String
>
params
)
{
List
<
String
>
keys
=
new
ArrayList
<
String
>(
params
.
keySet
());
Collections
.
reverse
(
keys
);
String
prestr
=
""
;
for
(
int
i
=
0
;
i
<
keys
.
size
();
i
++)
{
String
key
=
keys
.
get
(
i
);
String
value
=
params
.
get
(
key
);
try
{
value
=
URLEncoder
.
encode
(
value
,
"UTF-8"
);
}
catch
(
UnsupportedEncodingException
e
)
{
e
.
printStackTrace
();
}
if
(
i
==
keys
.
size
()
-
1
)
{
//拼接时,不包括最后一个&字符
prestr
=
prestr
+
key
+
"="
+
value
;
}
else
{
prestr
=
prestr
+
key
+
"="
+
value
+
"&"
;
}
}
return
prestr
;
}
/**
* * 把数组所有元素字典排序,并按照“参数=参数值”的模式用“&”字符拼接成字符串
* * @param params 需要排序并参与字符拼接的参数组
* * @return 拼接后字符串
*/
public
static
String
stringNormalSort
(
Map
<
String
,
String
>
params
)
{
List
<
String
>
keys
=
new
ArrayList
<
String
>(
params
.
keySet
());
Collections
.
sort
(
keys
);
String
prestr
=
""
;
for
(
int
i
=
0
;
i
<
keys
.
size
();
i
++)
{
String
key
=
keys
.
get
(
i
);
String
value
=
params
.
get
(
key
);
try
{
value
=
URLEncoder
.
encode
(
value
,
"UTF-8"
);
}
catch
(
UnsupportedEncodingException
e
)
{
e
.
printStackTrace
();
}
if
(
i
==
keys
.
size
()
-
1
)
{
//拼接时,不包括最后一个&字符
prestr
=
prestr
+
key
+
"="
+
value
;
}
else
{
prestr
=
prestr
+
key
+
"="
+
value
+
"&"
;
}
}
return
prestr
;
}
class
SpellComparatorUtils
implements
Comparator
{
@Override
public
int
compare
(
Object
o1
,
Object
o2
)
{
try
{
// 取得比较对象的汉字编码,并将其转换成字符串
String
s1
=
new
String
(
o1
.
toString
().
getBytes
(
"GB2312"
),
"ISO-8859-1"
);
String
s2
=
new
String
(
o2
.
toString
().
getBytes
(
"GB2312"
),
"ISO-8859-1"
);
// 运用String类的 compareTo()方法对两对象进行比较
return
s1
.
compareTo
(
s2
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
0
;
}
}
public
static
void
main
(
String
[]
args
)
{
//Map<String, String> map = new HashMap();
//map.put("name", "hello");
//map.put("value", "world");
//System.out.println(createLinkStringByGet(map));
StringJoiner
joiner
=
new
StringJoiner
(
","
,
"["
,
"]"
);
joiner
.
add
(
"123"
);
joiner
.
add
(
"456"
);
joiner
.
add
(
"789"
);
System
.
out
.
println
(
joiner
);
}
}
jz-dm-apigateway/src/main/java/com/jz/dm/common/util/ObjectUtil.java
deleted
100644 → 0
View file @
9e276215
This diff is collapsed.
Click to expand it.
jz-dm-apigateway/src/main/java/com/jz/dm/common/util/OpenApiRequest.java
deleted
100644 → 0
View file @
9e276215
package
com
.
jz
.
dm
.
common
.
util
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.jz.dm.common.exception.OpenApiException
;
import
java.math.BigDecimal
;
import
java.math.BigInteger
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* openapi请求
*
*/
public
class
OpenApiRequest
{
private
String
apiKey
;
//apiKey
private
String
openApiParams
;
private
JSONObject
parameters
;
private
Object
parameterObject
;
private
Map
<
String
,
Object
>
extAttributes
=
new
HashMap
<
String
,
Object
>();
public
OpenApiRequest
(
String
openApiParams
)
{
setOpenApiParams
(
openApiParams
);
}
private
void
setOpenApiParams
(
String
openApiParams
)
{
this
.
openApiParams
=
openApiParams
;
try
{
parameters
=
JSON
.
parseObject
(
openApiParams
,
JSONObject
.
class
);
}
catch
(
Exception
ex
)
{
throw
new
OpenApiException
(
OpenApiResultCode
.
ILLEGAL_ARGUMENT
,
"parse openapi params error, openApiParams="
+
openApiParams
,
ex
);
}
}
public
String
getApiKey
()
{
return
apiKey
;
}
public
void
setApiKey
(
String
apiKey
)
{
this
.
apiKey
=
apiKey
;
}
@SuppressWarnings
(
"unchecked"
)
public
<
T
>
T
getObject
(
Class
<?>
clazz
)
{
if
(
parameterObject
!=
null
)
{
return
(
T
)
parameterObject
;
}
try
{
this
.
parameterObject
=
JSON
.
parseObject
(
openApiParams
,
clazz
);
}
catch
(
Exception
ex
)
{
throw
new
OpenApiException
(
OpenApiResultCode
.
ILLEGAL_ARGUMENT
,
ex
);
}
return
(
T
)
parameterObject
;
}
public
String
getOpenApiParams
()
{
return
this
.
openApiParams
;
}
@SuppressWarnings
(
"unchecked"
)
@Deprecated
public
<
T
>
T
getParameter
(
String
key
)
{
return
(
T
)
parameters
.
get
(
key
);
}
public
<
T
>
T
getObject
(
String
key
,
Class
<
T
>
clazz
)
{
return
parameters
.
getObject
(
key
,
clazz
);
}
public
byte
[]
getBytes
(
String
key
)
{
return
parameters
.
getBytes
(
key
);
}
public
Boolean
getBoolean
(
String
key
)
{
return
parameters
.
getBoolean
(
key
);
}
public
boolean
getBooleanValue
(
String
key
)
{
return
parameters
.
getBooleanValue
(
key
);
}
public
Byte
getByte
(
String
key
)
{
return
parameters
.
getByte
(
key
);
}
public
byte
getByteValue
(
String
key
)
{
return
parameters
.
getByteValue
(
key
);
}
public
Short
getShort
(
String
key
)
{
return
parameters
.
getShortValue
(
key
);
}
public
short
getShortValue
(
String
key
)
{
return
parameters
.
getShortValue
(
key
);
}
public
Integer
getInteger
(
String
key
)
{
return
parameters
.
getInteger
(
key
);
}
public
int
getIntValue
(
String
key
)
{
return
parameters
.
getIntValue
(
key
);
}
public
Long
getLong
(
String
key
)
{
return
parameters
.
getLong
(
key
);
}
public
long
getLongValue
(
String
key
)
{
return
parameters
.
getLongValue
(
key
);
}
public
Float
getFloat
(
String
key
)
{
return
parameters
.
getFloat
(
key
);
}
public
float
getFloatValue
(
String
key
)
{
return
parameters
.
getFloatValue
(
key
);
}
public
Double
getDouble
(
String
key
)
{
return
parameters
.
getDouble
(
key
);
}
public
double
getDoubleValue
(
String
key
)
{
return
parameters
.
getDoubleValue
(
key
);
}
public
BigDecimal
getBigDecimal
(
String
key
)
{
return
parameters
.
getBigDecimal
(
key
);
}
public
BigInteger
getBigInteger
(
String
key
)
{
return
parameters
.
getBigInteger
(
key
);
}
public
String
getString
(
String
key
)
{
return
parameters
.
getString
(
key
);
}
public
Date
getDate
(
String
key
)
{
return
parameters
.
getDate
(
key
);
}
/**
* Get Extend Attribute
*
* @param attributeName
* @return
*/
@SuppressWarnings
(
"unchecked"
)
public
<
T
>
T
getExtAttribute
(
String
attributeName
)
{
return
(
T
)
extAttributes
.
get
(
attributeName
);
}
/**
* Set Extend Attribute
*
* @param attributeName
* @param attributeValue
*/
public
void
setExtAttribute
(
String
attributeName
,
String
attributeValue
)
{
this
.
extAttributes
.
put
(
attributeName
,
attributeValue
);
}
/**
* Getter method for property <tt>extAttributes</tt>.
*
* @return property value of extAttributes
*/
public
Map
<
String
,
Object
>
getExtAttributes
()
{
return
extAttributes
;
}
/**
* Setter method for property <tt>extAttributes</tt>.
*
* @param extAttributes value to be assigned to property extAttributes
*/
public
void
setExtAttributes
(
Map
<
String
,
Object
>
extAttributes
)
{
this
.
extAttributes
=
extAttributes
;
}
}
jz-dm-apigateway/src/main/java/com/jz/dm/common/util/OpenApiResponse.java
deleted
100644 → 0
View file @
9e276215
package
com
.
jz
.
dm
.
common
.
util
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* openapi响应
*
*/
public
class
OpenApiResponse
{
/**
* 结果码
*/
private
static
final
String
ATTRIBUTE_NAME_CODE
=
"code"
;
/**
* 结果消息
*/
private
static
final
String
ATTRIBUTE_NAME_MSG
=
"msg"
;
/**
* 属性
*/
private
final
Map
<
String
,
Object
>
attributes
=
new
HashMap
<
String
,
Object
>();
/**
* 获取结果码
*
* @return
*/
public
String
getCode
()
{
return
(
String
)
attributes
.
get
(
ATTRIBUTE_NAME_CODE
);
}
/**
* 设置结果码
*
* @param code
*/
public
void
setCode
(
String
code
)
{
attributes
.
put
(
ATTRIBUTE_NAME_CODE
,
code
);
}
/**