Skip to content

Commit

Permalink
Merge branch 'release/2.6.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
conifercone committed Jan 25, 2025
2 parents e3544a9 + f31020f commit 5f8a569
Show file tree
Hide file tree
Showing 124 changed files with 2,655 additions and 997 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="start_all_services" type="CompoundRunConfigurationType">
<configuration default="false" name="Start All Services" type="CompoundRunConfigurationType">
<toRun name="MuMuAuthenticationApplication-dev" type="SpringBootApplicationConfigurationType"/>
<toRun name="MuMuFileApplication-dev" type="SpringBootApplicationConfigurationType"/>
<toRun name="MuMuLogApplication-dev" type="SpringBootApplicationConfigurationType"/>
Expand Down
53 changes: 52 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,56 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### ⚠️ Removed

## [2.6.0] - 2025-01-25

### ⭐ Added

- Added response encoding.
- Added bean creation conditions for `RateLimitingCustomGenerateProvider`.
- Added method annotations.
- Added `status` attribute to `ResponseCode`.
- Added Swagger converter.
- Added functionality to download all permission data containing permission paths.
- Added a general JSON data download method.
- Added an API to delete a specific account address.
- Added an API to modify account addresses.
- Added APIs to set the default account address and query nearby accounts.
- Added a location property to account addresses.

### 🕸️ Changed

- Added description information matching conditions for archived role and permission queries.
- Added description information matching conditions for role queries.
- For security reasons, default interface permissions are set to deny access to anyone.
- Optimized permission configuration properties.
- Upgraded Gradle to 8.12.1.
- Upgraded Flyway to 11.2.0.
- Upgraded gRPC to 1.69.1.
- Upgraded `com.aliyun:alimt20181012` to 1.4.0.
- Upgraded MinIO to 8.5.17.
- Changed `code` attribute type to a primitive data type.
- Optimized utility class implementations.
- Optimized file download utility class.
- Upgraded OpenCSV to 5.10.
- Upgraded `springdoc-openapi-starter-webmvc-ui` to 2.8.3.
- Upgraded Protobuf to 4.29.3.
- Adjusted the timing for saving role permissions.
- Added description information matching conditions for permission queries.
- Optimized thread variable definitions.
- Optimized archived attribute type.
- Adjusted time formatting.
- Improved multilingual identifier settings logic.
- Added caching to system settings.
- Upgraded `resilience4j-retry` to 2.3.0.

### 🐞 Fixed

- Fixed an issue with Chinese garbled text in the signature filter.

### ⚠️ Removed

- Removed the rule engine.

## [2.5.0] - 2024-12-31

### ⭐ Added
Expand Down Expand Up @@ -529,7 +579,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Distributed lock based on zookeeper.

[//]: # (@formatter:off)
[unreleased]: https://github.com/conifercone/mumu/compare/v2.5.0...develop
[unreleased]: https://github.com/conifercone/mumu/compare/v2.6.0...develop
[2.6.0]: https://github.com/conifercone/mumu/compare/v2.5.0...v2.6.0
[2.5.0]: https://github.com/conifercone/mumu/compare/v2.4.0...v2.5.0
[2.4.0]: https://github.com/conifercone/mumu/compare/v2.3.0...v2.4.0
[2.3.0]: https://github.com/conifercone/mumu/compare/v2.2.0...v2.3.0
Expand Down
168 changes: 158 additions & 10 deletions apis/Account.http
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ Accept: */*
"street": "历城区",
"city": "济南市",
"state": "山东省",
"postalCode": "250101",
"postalCode": "250000",
"country": "中国"
},
{
"street": "历下区",
"city": "济南市",
"state": "山东省",
"postalCode": "250101",
"postalCode": "250000",
"country": "中国"
}
],
Expand Down Expand Up @@ -71,11 +71,41 @@ X-Signature: {{signature}}
X-Timestamp: {{timestamp}}
Connection: keep-alive
Accept: */*
Authorization: Bearer {{$auth.token("admin")}}
Authorization: Bearer {{$auth.token("test")}}

{
"id": 1,
"bio": "不想把这个世界交给无趣的人"
"id": 2,
"bio": "测试用户",
"nickName": "测试用户"
}

> {%
client.test("Request executed successfully", function () {
client.assert(response.status === 200, "Response status is not 200");
});
%}

### 根据ID修改账户地址
< {%
import {generateHeaders} from "./utils"

const headers = generateHeaders(request.environment.get("authentication-service-url"))
request.variables.set("signature", headers.signature)
request.variables.set("timestamp", headers.timestamp)
request.variables.set("requestId", headers.requestId)
%}
PUT {{authentication-service-url}}/account/modifyAddressByAddressId
Content-Type: application/json
X-Request-ID: {{requestId}}
X-Signature: {{signature}}
X-Timestamp: {{timestamp}}
Connection: keep-alive
Accept: */*
Authorization: Bearer {{$auth.token("test")}}

{
"id": "677b7392c78b097ac069201a",
"street": "历城区港沟街道"
}

> {%
Expand All @@ -93,7 +123,7 @@ Authorization: Bearer {{$auth.token("admin")}}
request.variables.set("timestamp", headers.timestamp)
request.variables.set("requestId", headers.requestId)
%}
GET {{authentication-service-url}}/account/findAllSlice?current=1&pageSize=10&username=admin
GET {{authentication-service-url}}/account/findAllSlice?current=1&pageSize=10
Content-Type: application/json
X-Request-ID: {{requestId}}
X-Signature: {{signature}}
Expand Down Expand Up @@ -131,15 +161,86 @@ Authorization: Bearer {{$auth.token("admin")}}
"state": "山东省",
"city": "济南市",
"street": "历城区",
"postalCode": "250101"
"postalCode": "250000",
"location": {
"x": 117.18689,
"y": 36.65065
}
}

### 账户设置默认地址
< {%
import {generateHeaders} from "./utils"

const headers = generateHeaders(request.environment.get("authentication-service-url"))
request.variables.set("signature", headers.signature)
request.variables.set("timestamp", headers.timestamp)
request.variables.set("requestId", headers.requestId)
%}
PUT {{authentication-service-url}}/account/setDefaultAddress/677b4c5dd14df91de0e7d721
Content-Type: application/json
X-Request-ID: {{requestId}}
X-Signature: {{signature}}
X-Timestamp: {{timestamp}}
Connection: keep-alive
Accept: */*
Authorization: Bearer {{$auth.token("admin")}}

> {%
client.test("Request executed successfully", function () {
client.assert(response.status === 200, "Response status is not 200");
});
%}

### 删除指定账户地址
< {%
import {generateHeaders} from "./utils"

const headers = generateHeaders(request.environment.get("authentication-service-url"))
request.variables.set("signature", headers.signature)
request.variables.set("timestamp", headers.timestamp)
request.variables.set("requestId", headers.requestId)
%}
DELETE {{authentication-service-url}}/account/address/677b4c5dd14df91de0e7d721
Content-Type: application/json
X-Request-ID: {{requestId}}
X-Signature: {{signature}}
X-Timestamp: {{timestamp}}
Connection: keep-alive
Accept: */*
Authorization: Bearer {{$auth.token("admin")}}

> {%
client.test("Request executed successfully", function () {
client.assert(response.status === 200, "Response status is not 200");
});
%}

### 查询当前账户指定范围内的附近的账户
< {%
import {generateHeaders} from "./utils"

const headers = generateHeaders(request.environment.get("authentication-service-url"))
request.variables.set("signature", headers.signature)
request.variables.set("timestamp", headers.timestamp)
request.variables.set("requestId", headers.requestId)
%}
GET {{authentication-service-url}}/account/nearby/1000
Content-Type: application/json
X-Request-ID: {{requestId}}
X-Signature: {{signature}}
X-Timestamp: {{timestamp}}
Connection: keep-alive
Accept: */*
Authorization: Bearer {{$auth.token("admin")}}

> {%
client.test("Request executed successfully", function () {
client.assert(response.status === 200, "Response status is not 200");
});
%}


### 更新账户角色
< {%
import {generateHeaders} from "./utils"
Expand Down Expand Up @@ -215,8 +316,7 @@ Authorization: Bearer {{$auth.token("admin")}}

{
"profile": "default",
"name": "默认系统设置",
"enabled": true
"name": "默认系统设置"
}

> {%
Expand Down Expand Up @@ -244,7 +344,7 @@ Accept: */*
Authorization: Bearer {{$auth.token("admin")}}

{
"id": "601146283917317",
"id": "677c866780f0b5754fd51eac",
"name": "默认系统设置"
}

Expand Down Expand Up @@ -575,3 +675,51 @@ Authorization: Bearer {{$auth.token("admin")}}
client.assert(response.status === 200, "Response status is not 200");
});
%}

### 当前账户设置默认系统设置
< {%
import {generateHeaders} from "./utils"

const headers = generateHeaders(request.environment.get("authentication-service-url"))
request.variables.set("signature", headers.signature)
request.variables.set("timestamp", headers.timestamp)
request.variables.set("requestId", headers.requestId)
%}
PUT {{authentication-service-url}}/account/setDefaultSystemSettings/677c866780f0b5754fd51eac
Content-Type: application/json
X-Request-ID: {{requestId}}
X-Signature: {{signature}}
X-Timestamp: {{timestamp}}
Connection: keep-alive
Accept: */*
Authorization: Bearer {{$auth.token("admin")}}

> {%
client.test("Request executed successfully", function () {
client.assert(response.status === 200, "Response status is not 200");
});
%}

### 删除指定账户系统设置
< {%
import {generateHeaders} from "./utils"

const headers = generateHeaders(request.environment.get("authentication-service-url"))
request.variables.set("signature", headers.signature)
request.variables.set("timestamp", headers.timestamp)
request.variables.set("requestId", headers.requestId)
%}
DELETE {{authentication-service-url}}/account/systemSettings/677c866780f0b5754fd51eac
Content-Type: application/json
X-Request-ID: {{requestId}}
X-Signature: {{signature}}
X-Timestamp: {{timestamp}}
Connection: keep-alive
Accept: */*
Authorization: Bearer {{$auth.token("admin")}}

> {%
client.test("Request executed successfully", function () {
client.assert(response.status === 200, "Response status is not 200");
});
%}
26 changes: 25 additions & 1 deletion apis/Permission.http
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ Authorization: Bearer {{$auth.token("admin")}}
});
%}

### 下载所有权限数据
### 下载所有权限数据(不包含权限关系数据)
< {%
import {generateHeaders} from "./utils"

Expand All @@ -252,6 +252,30 @@ Authorization: Bearer {{$auth.token("admin")}}
});
%}

### 下载所有权限数据(包含权限关系数据)
< {%
import {generateHeaders} from "./utils"

const headers = generateHeaders(request.environment.get("authentication-service-url"))
request.variables.set("signature", headers.signature)
request.variables.set("timestamp", headers.timestamp)
request.variables.set("requestId", headers.requestId)
%}
GET {{authentication-service-url}}/permission/downloadAllIncludePath
Content-Type: application/json
X-Request-ID: {{requestId}}
X-Signature: {{signature}}
X-Timestamp: {{timestamp}}
Connection: keep-alive
Accept: */*
Authorization: Bearer {{$auth.token("admin")}}

> {%
client.test("Request executed successfully", function () {
client.assert(response.status === 200, "Response status is not 200");
});
%}

### 查询权限(不查询总数)
< {%
import {generateHeaders} from "./utils"
Expand Down
1 change: 1 addition & 0 deletions apis/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export function generateHeaders(serviceUrl) {
JSON.parse(requestBody));
const dataToSign = timestampString + requestIdString + requestPath
+ compactJsonString;
console.log(dataToSign);
const signatureString = crypto.hmac.sha256()
.withTextSecret(request.environment.get("secret"))
.updateWithText(dataToSign)
Expand Down
3 changes: 1 addition & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ subprojects {
from(rootProject.file("LICENSE"))
}
manifest {
@Suppress("SpellCheckingInspection")
attributes(
"Implementation-Title" to archiveBaseName.get(),
"Implementation-Version" to archiveVersion.get(),
Expand All @@ -208,7 +207,7 @@ subprojects {
"Build-OS" to System.getProperty("os.name"),
"Build-Jdk" to System.getProperty("java.version"),
"Build-Timestamp" to OffsetDateTime.now(ZoneOffset.UTC)
.format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ssXXX"))
.format(DateTimeFormatter.ISO_OFFSET_DATE_TIME)
)
}
}
Expand Down
Loading

0 comments on commit 5f8a569

Please sign in to comment.