Compare commits

...

2 Commits

9 changed files with 41 additions and 31 deletions

View File

@@ -102,14 +102,14 @@ tasks.jacocoTestReport {
} }
jacoco { jacoco {
toolVersion = "0.8.12" toolVersion = "0.8.13"
reportsDirectory.set(layout.buildDirectory.dir("reports/jacoco")) reportsDirectory.set(layout.buildDirectory.dir("reports/jacoco"))
} }
pmd { pmd {
sourceSets = listOf(java.sourceSets.findByName("main")) sourceSets = listOf(java.sourceSets.findByName("main"))
isConsoleOutput = true isConsoleOutput = true
toolVersion = "7.9.0" toolVersion = "7.15.0"
rulesMinimumPriority.set(5) rulesMinimumPriority.set(5)
ruleSetFiles = files("pmd-rules.xml") ruleSetFiles = files("pmd-rules.xml")
} }
@@ -125,7 +125,7 @@ spotless {
} }
java { java {
googleJavaFormat("1.25.2").reflowLongStrings() googleJavaFormat("1.28.0").reflowLongStrings()
formatAnnotations() formatAnnotations()
} }

View File

@@ -48,11 +48,11 @@ public class LoggingAspect {
return processWithLogging(joinPoint, aopLog); return processWithLogging(joinPoint, aopLog);
} }
// @Around("execution(* com.zl.mjga.service..*(..))") // @Around("execution(* com.zl.mjga.service..*(..))")
// public Object logService(ProceedingJoinPoint joinPoint) throws Throwable { // public Object logService(ProceedingJoinPoint joinPoint) throws Throwable {
// AopLog aopLog = new AopLog(); // AopLog aopLog = new AopLog();
// return processWithLogging(joinPoint, aopLog); // return processWithLogging(joinPoint, aopLog);
// } // }
private Object processWithLogging(ProceedingJoinPoint joinPoint, AopLog aopLog) throws Throwable { private Object processWithLogging(ProceedingJoinPoint joinPoint, AopLog aopLog) throws Throwable {
if (shouldSkipLogging(joinPoint) || !isUserAuthenticated()) { if (shouldSkipLogging(joinPoint) || !isUserAuthenticated()) {

View File

@@ -1,8 +1,6 @@
package com.zl.mjga.dto.aoplog; package com.zl.mjga.dto.aoplog;
import java.time.LocalDateTime;
import java.time.OffsetDateTime; import java.time.OffsetDateTime;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;

View File

@@ -47,10 +47,12 @@ public class AopLogRepository extends AopLogDao {
.where(buildConditions(queryDto)); .where(buildConditions(queryDto));
} }
public SelectConditionStep<Record> selectByWithoutReturnValue(AopLogQueryDto queryDto) { public SelectConditionStep<Record> selectByWithoutReturnValue(AopLogQueryDto queryDto) {
return ctx() return ctx()
.select(AOP_LOG.asterisk().except(AOP_LOG.RETURN_VALUE, AOP_LOG.METHOD_ARGS), USER.USERNAME, DSL.count().over().as("total_count")) .select(
AOP_LOG.asterisk().except(AOP_LOG.RETURN_VALUE, AOP_LOG.METHOD_ARGS),
USER.USERNAME,
DSL.count().over().as("total_count"))
.from(AOP_LOG) .from(AOP_LOG)
.leftJoin(USER) .leftJoin(USER)
.on(AOP_LOG.USER_ID.eq(USER.ID)) .on(AOP_LOG.USER_ID.eq(USER.ID))

View File

@@ -53,7 +53,7 @@ public class SignE2ETest {
.uri("/auth/sign-up") .uri("/auth/sign-up")
.contentType(MediaType.APPLICATION_JSON) .contentType(MediaType.APPLICATION_JSON)
.bodyValue( .bodyValue(
""" """
{ {
"username": "test_5fab32c22a3e", "username": "test_5fab32c22a3e",
"password": "test_eab28b939ba1" "password": "test_eab28b939ba1"
@@ -75,7 +75,7 @@ public class SignE2ETest {
.uri("/auth/sign-in") .uri("/auth/sign-in")
.contentType(MediaType.APPLICATION_JSON) .contentType(MediaType.APPLICATION_JSON)
.bodyValue( .bodyValue(
""" """
{ {
"username": "test_5fab32c22a3e", "username": "test_5fab32c22a3e",
"password": "test_eab28b939ba1" "password": "test_eab28b939ba1"

View File

@@ -21,7 +21,7 @@
"marked": "^15.0.12", "marked": "^15.0.12",
"openapi-fetch": "^0.13.5", "openapi-fetch": "^0.13.5",
"pinia": "^3.0.1", "pinia": "^3.0.1",
"tailwindcss": "^4.0.14", "tailwindcss": "^4.1.11",
"vue": "^3.5.13", "vue": "^3.5.13",
"vue-router": "^4.5.0", "vue-router": "^4.5.0",
"zod": "^3.24.2" "zod": "^3.24.2"
@@ -1832,6 +1832,12 @@
"tailwindcss": "4.1.6" "tailwindcss": "4.1.6"
} }
}, },
"node_modules/@tailwindcss/node/node_modules/tailwindcss": {
"version": "4.1.6",
"resolved": "http://mirrors.tencent.com/npm/tailwindcss/-/tailwindcss-4.1.6.tgz",
"integrity": "sha512-j0cGLTreM6u4OWzBeLBpycK0WIh8w7kSwcUsQZoGLHZ7xDTdM69lN64AgoIEEwFi0tnhs4wSykUa5YWxAzgFYg==",
"license": "MIT"
},
"node_modules/@tailwindcss/oxide": { "node_modules/@tailwindcss/oxide": {
"version": "4.1.6", "version": "4.1.6",
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.1.6.tgz", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.1.6.tgz",
@@ -2079,6 +2085,12 @@
"vite": "^5.2.0 || ^6" "vite": "^5.2.0 || ^6"
} }
}, },
"node_modules/@tailwindcss/vite/node_modules/tailwindcss": {
"version": "4.1.6",
"resolved": "http://mirrors.tencent.com/npm/tailwindcss/-/tailwindcss-4.1.6.tgz",
"integrity": "sha512-j0cGLTreM6u4OWzBeLBpycK0WIh8w7kSwcUsQZoGLHZ7xDTdM69lN64AgoIEEwFi0tnhs4wSykUa5YWxAzgFYg==",
"license": "MIT"
},
"node_modules/@testing-library/dom": { "node_modules/@testing-library/dom": {
"version": "10.4.0", "version": "10.4.0",
"resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.0.tgz", "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.0.tgz",
@@ -3655,7 +3667,7 @@
}, },
"node_modules/flowbite": { "node_modules/flowbite": {
"version": "3.1.2", "version": "3.1.2",
"resolved": "https://registry.npmjs.org/flowbite/-/flowbite-3.1.2.tgz", "resolved": "http://mirrors.tencent.com/npm/flowbite/-/flowbite-3.1.2.tgz",
"integrity": "sha512-MkwSgbbybCYgMC+go6Da5idEKUFfMqc/AmSjm/2ZbdmvoKf5frLPq/eIhXc9P+rC8t9boZtUXzHDgt5whZ6A/Q==", "integrity": "sha512-MkwSgbbybCYgMC+go6Da5idEKUFfMqc/AmSjm/2ZbdmvoKf5frLPq/eIhXc9P+rC8t9boZtUXzHDgt5whZ6A/Q==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@@ -5705,9 +5717,9 @@
} }
}, },
"node_modules/tailwindcss": { "node_modules/tailwindcss": {
"version": "4.1.6", "version": "4.1.11",
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.6.tgz", "resolved": "http://mirrors.tencent.com/npm/tailwindcss/-/tailwindcss-4.1.11.tgz",
"integrity": "sha512-j0cGLTreM6u4OWzBeLBpycK0WIh8w7kSwcUsQZoGLHZ7xDTdM69lN64AgoIEEwFi0tnhs4wSykUa5YWxAzgFYg==", "integrity": "sha512-2E9TBm6MDD/xKYe+dvJZAmg3yxIEDNRc0jwlNyDg/4Fil2QcSLjFKGVff0lAf1jjeaArlG/M75Ey/EYr/OJtBA==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/tapable": { "node_modules/tapable": {

View File

@@ -31,7 +31,7 @@
"marked": "^15.0.12", "marked": "^15.0.12",
"openapi-fetch": "^0.13.5", "openapi-fetch": "^0.13.5",
"pinia": "^3.0.1", "pinia": "^3.0.1",
"tailwindcss": "^4.0.14", "tailwindcss": "^4.1.11",
"vue": "^3.5.13", "vue": "^3.5.13",
"vue-router": "^4.5.0", "vue-router": "^4.5.0",
"zod": "^3.24.2" "zod": "^3.24.2"
@@ -59,6 +59,8 @@
"vue-tsc": "^2.2.8" "vue-tsc": "^2.2.8"
}, },
"msw": { "msw": {
"workerDirectory": ["public"] "workerDirectory": [
"public"
]
} }
} }

View File

@@ -445,10 +445,7 @@ onMounted(async () => {
if ($userDeleteModalElement) { if ($userDeleteModalElement) {
userDeleteModal.value = new Modal( userDeleteModal.value = new Modal(
$userDeleteModalElement, $userDeleteModalElement,
{}, {}
{
id: "user-delete-modal",
},
); );
} }
const $departmentDeleteModalElement: HTMLElement | null = const $departmentDeleteModalElement: HTMLElement | null =

View File

@@ -26,7 +26,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { Modal, initFlowbite } from "flowbite"; import { initFlowbite } from "flowbite";
import { computed, onMounted } from "vue"; import { computed, onMounted } from "vue";
export type ModalSize = export type ModalSize =
@@ -72,7 +72,6 @@ const maxWidthClass = computed(() => {
return sizes[props.size || "md"]; return sizes[props.size || "md"];
}); });
// 确保Flowbite初始化这对于PopupModal的正常工作至关重要
onMounted(() => { onMounted(() => {
initFlowbite(); initFlowbite();
}); });