Skip to content

Commit 526557e

Browse files
author
zhuoda
committed
v3.0.1
1 parent de91535 commit 526557e

File tree

21 files changed

+85
-22528
lines changed

21 files changed

+85
-22528
lines changed

smart-admin-api/sa-admin/src/main/java/net/lab1024/sa/admin/interceptor/AdminInterceptor.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ public boolean preHandle(HttpServletRequest request, HttpServletResponse respons
109109
return true;
110110
}
111111

112+
// 如果是超级管理员的话,不需要校验权限
113+
if(requestEmployee.getAdministratorFlag()){
114+
return true;
115+
}
116+
112117
SaStrategy.instance.checkMethodAnnotation.accept(method);
113118

114119
} catch (SaTokenException e) {

smart-admin-api/sa-base/src/main/java/net/lab1024/sa/base/common/domain/ResponseDTO.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public class ResponseDTO<T> {
2424

2525
public static final int OK_CODE = 0;
2626

27-
public static final String OK_MSG = "success";
27+
public static final String OK_MSG = "操作成功";
2828

2929
@Schema(description = "返回码")
3030
private Integer code;

smart-admin-api/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/controller/CodeGeneratorController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public void download(@PathVariable String tableName, HttpServletResponse respons
8787
ResponseDTO<byte[]> download = codeGeneratorService.download(tableName);
8888

8989
if (download.getOk()) {
90-
SmartResponseUtil.setDownloadFileHeader(response, tableName + "-code.zip", (long) download.getData().length);
90+
SmartResponseUtil.setDownloadFileHeader(response, tableName + "_code.zip", (long) download.getData().length);
9191
response.getOutputStream().write(download.getData());
9292
} else {
9393
SmartResponseUtil.write(response, download);

smart-admin-api/sa-base/src/main/java/net/lab1024/sa/base/module/support/repeatsubmit/RepeatSubmitAspect.java

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,22 +55,15 @@ public Object around(ProceedingJoinPoint point) throws Throwable {
5555
if (StringUtils.isEmpty(ticket)) {
5656
return point.proceed();
5757
}
58-
Long timeStamp = this.repeatSubmitTicket.getTicketTimestamp(ticket);
59-
if (timeStamp != null) {
58+
Long lastRequestTime = this.repeatSubmitTicket.getTicketTimestamp(ticket);
59+
if (lastRequestTime != null) {
6060
Method method = ((MethodSignature) point.getSignature()).getMethod();
6161
RepeatSubmit annotation = method.getAnnotation(RepeatSubmit.class);
62-
63-
// 说明注解去掉了
64-
if (annotation != null) {
65-
return point.proceed();
66-
}
67-
6862
int interval = Math.min(annotation.value(), RepeatSubmit.MAX_INTERVAL);
69-
if (System.currentTimeMillis() < timeStamp + interval) {
63+
if (System.currentTimeMillis() < lastRequestTime + interval) {
7064
// 提交频繁
7165
return ResponseDTO.error(UserErrorCode.REPEAT_SUBMIT);
7266
}
73-
7467
}
7568
Object obj = null;
7669
try {
@@ -80,8 +73,6 @@ public Object around(ProceedingJoinPoint point) throws Throwable {
8073
} catch (Throwable throwable) {
8174
log.error("", throwable);
8275
throw throwable;
83-
} finally {
84-
this.repeatSubmitTicket.removeTicket(ticket);
8576
}
8677
return obj;
8778
}

smart-admin-api/sa-base/src/main/resources/code-generator-template/java/service/Service.java.vm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import net.lab1024.sa.base.common.domain.ResponseDTO;
99
import net.lab1024.sa.base.common.domain.PageResult;
1010
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
1111
import org.apache.commons.collections4.CollectionUtils;
12+
import org.springframework.stereotype.Service;
1213

1314
import javax.annotation.Resource;
1415

smart-admin-api/sa-base/src/main/resources/dev/sa-base.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ server:
6262
basedir: ${project.log-directory}/tomcat-logs
6363
accesslog:
6464
enabled: true
65+
max-days: 7
6566
pattern: "%t %{X-Forwarded-For}i %a %r %s (%D ms) %I (%B byte)"
6667

67-
6868
# 文件上传 配置
6969
file:
7070
storage:
@@ -81,7 +81,6 @@ file:
8181
url-prefix: https://${file.storage.cloud.bucket-name}.${file.storage.cloud.endpoint}/
8282
private-url-expire-seconds: 3600
8383

84-
8584
# open api配置
8685
springdoc:
8786
swagger-ui:
@@ -93,7 +92,7 @@ springdoc:
9392
knife4j:
9493
enable: true
9594
basic:
96-
enable: true
95+
enable: false
9796
username: api # Basic认证用户名
9897
password: 1024 # Basic认证密码
9998

smart-admin-api/sa-base/src/main/resources/pre/sa-base.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ server:
6262
basedir: ${project.log-directory}/tomcat-logs
6363
accesslog:
6464
enabled: true
65+
max-days: 7
6566
pattern: "%t %{X-Forwarded-For}i %a %r %s (%D ms) %I (%B byte)"
6667

6768

smart-admin-api/sa-base/src/main/resources/prod/sa-base.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ server:
6262
basedir: ${project.log-directory}/tomcat-logs
6363
accesslog:
6464
enabled: true
65+
max-days: 30
6566
pattern: "%t %{X-Forwarded-For}i %a %r %s (%D ms) %I (%B byte)"
6667

6768

smart-admin-api/sa-base/src/main/resources/test/sa-base.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ server:
6262
basedir: ${project.log-directory}/tomcat-logs
6363
accesslog:
6464
enabled: true
65+
max-days: 7
6566
pattern: "%t %{X-Forwarded-For}i %a %r %s (%D ms) %I (%B byte)"
6667

6768

smart-admin-web/javascript-ant-design-vue3/src/views/support/change-log/change-log-modal.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@
66
* @Copyright 1024创新实验室
77
-->
88
<template>
9-
<a-modal title="更新日志" width="700px" :open="visibleFlag" @close="onClose" >
10-
9+
<a-modal title="更新日志" width="700px" :open="visibleFlag" @cancel="onClose">
1110
<div>
1211
<pre>{{ content }}</pre>
13-
<div v-if="link">链接:<a :href="link" target="_blank">{{ link }}</a></div>
12+
<div v-if="link">
13+
链接:<a :href="link" target="_blank">{{ link }}</a>
14+
</div>
1415
</div>
1516

1617
<template #footer>
1718
<a-space>
1819
<a-button type="primary" @click="onClose">关闭</a-button>
1920
</a-space>
2021
</template>
21-
2222
</a-modal>
2323
</template>
2424
<script setup>

0 commit comments

Comments
 (0)