diff --git a/smart-admin-api-java17-springboot3/sa-admin/src/main/java/net/lab1024/sa/admin/interceptor/AdminInterceptor.java b/smart-admin-api-java17-springboot3/sa-admin/src/main/java/net/lab1024/sa/admin/interceptor/AdminInterceptor.java index 7e754860..5523531b 100644 --- a/smart-admin-api-java17-springboot3/sa-admin/src/main/java/net/lab1024/sa/admin/interceptor/AdminInterceptor.java +++ b/smart-admin-api-java17-springboot3/sa-admin/src/main/java/net/lab1024/sa/admin/interceptor/AdminInterceptor.java @@ -67,7 +67,7 @@ public class AdminInterceptor implements HandlerInterceptor { Method method = ((HandlerMethod) handler).getMethod(); NoNeedLogin noNeedLogin = ((HandlerMethod) handler).getMethodAnnotation(NoNeedLogin.class); if (noNeedLogin != null) { - checkActiveTimeout(requestEmployee); + updateActiveTimeout(requestEmployee); SmartRequestUtil.setRequestUser(requestEmployee); return true; } @@ -77,8 +77,8 @@ public class AdminInterceptor implements HandlerInterceptor { return false; } - // 检测token 活跃频率 - checkActiveTimeout(requestEmployee); + // 更新活跃 + updateActiveTimeout(requestEmployee); // --------------- 第三步: 校验 权限 --------------- @@ -123,15 +123,12 @@ public class AdminInterceptor implements HandlerInterceptor { /** - * 检测:token 最低活跃频率(单位:秒),如果 token 超过此时间没有访问系统就会被冻结 + * 更新活跃时间 */ - private void checkActiveTimeout(RequestEmployee requestEmployee) { - // 用户不在线,也不用检测 + private void updateActiveTimeout(RequestEmployee requestEmployee) { if (requestEmployee == null) { return; } - - StpUtil.checkActiveTimeout(); StpUtil.updateLastActiveToNow(); } diff --git a/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/config/FileConfig.java b/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/config/FileConfig.java index 98eb03fe..97dce114 100644 --- a/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/config/FileConfig.java +++ b/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/config/FileConfig.java @@ -81,7 +81,7 @@ public class FileConfig implements WebMvcConfigurer { StaticCredentialsProvider.create( AwsBasicCredentials.create(accessKey, secretKey))) .serviceConfiguration(S3Configuration.builder() - .pathStyleAccessEnabled(false) + .pathStyleAccessEnabled(true) .chunkedEncodingEnabled(false) .build()) .build(); diff --git a/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/file/service/FileStorageCloudServiceImpl.java b/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/file/service/FileStorageCloudServiceImpl.java index 8de329a5..45664ec8 100644 --- a/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/file/service/FileStorageCloudServiceImpl.java +++ b/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/file/service/FileStorageCloudServiceImpl.java @@ -101,7 +101,18 @@ public class FileStorageCloudServiceImpl implements IFileStorageService { userMetadata.put(USER_METADATA_FILE_FORMAT, fileType); userMetadata.put(USER_METADATA_FILE_SIZE, String.valueOf(file.getSize())); - PutObjectRequest putObjectRequest = PutObjectRequest.builder().bucket(cloudConfig.getBucketName()).key(fileKey).metadata(userMetadata).contentLength(file.getSize()).contentType(this.getContentType(fileType)).contentEncoding(StandardCharsets.UTF_8.name()).contentDisposition("attachment;filename=" + urlEncoderFilename).build(); + // 根据文件路径获取并设置访问权限 + ObjectCannedACL acl = this.getACL(path); + PutObjectRequest putObjectRequest = PutObjectRequest.builder() + .bucket(cloudConfig.getBucketName()) + .key(fileKey) + .metadata(userMetadata) + .contentLength(file.getSize()) + .contentType(this.getContentType(fileType)) + .contentEncoding(StandardCharsets.UTF_8.name()) + .contentDisposition("attachment;filename=" + urlEncoderFilename) + .acl(acl) + .build(); InputStream inputStream = null; try { inputStream = file.getInputStream(); @@ -112,10 +123,6 @@ public class FileStorageCloudServiceImpl implements IFileStorageService { } finally { IOUtils.closeQuietly(inputStream); } - // 根据文件路径获取并设置访问权限 - ObjectCannedACL acl = this.getACL(path); - PutObjectAclRequest aclRequest = PutObjectAclRequest.builder().bucket(cloudConfig.getBucketName()).key(fileKey).acl(this.getACL(path)).build(); - s3Client.putObjectAcl(aclRequest); // 返回上传结果 FileUploadVO uploadVO = new FileUploadVO(); uploadVO.setFileName(originalFileName); diff --git a/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/operatelog/core/OperateLogAspect.java b/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/operatelog/core/OperateLogAspect.java index 19349e77..038a0f55 100644 --- a/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/operatelog/core/OperateLogAspect.java +++ b/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/operatelog/core/OperateLogAspect.java @@ -11,6 +11,7 @@ import jakarta.servlet.http.HttpServletResponse; import lombok.extern.slf4j.Slf4j; import net.lab1024.sa.base.common.constant.StringConst; import net.lab1024.sa.base.common.domain.RequestUser; +import net.lab1024.sa.base.common.domain.ResponseDTO; import net.lab1024.sa.base.common.util.SmartIpUtil; import net.lab1024.sa.base.common.util.SmartRequestUtil; import net.lab1024.sa.base.module.support.operatelog.OperateLogDao; @@ -46,7 +47,7 @@ import java.util.concurrent.ThreadPoolExecutor; * @Date 2021-12-08 20:48:52 * @Wechat zhuoda1024 * @Email lab1024@163.com - * @Copyright 1024创新实验室 + * @Copyright 1024创新实验室 */ @Slf4j @Aspect @@ -71,14 +72,14 @@ public abstract class OperateLogAspect { public void logPointCut() { } - @AfterReturning(pointcut = "logPointCut()") - public void doAfterReturning(JoinPoint joinPoint) { - handleLog(joinPoint, null); + @AfterReturning(pointcut = "logPointCut()", returning = "responseDTO") + public void doAfterReturning(JoinPoint joinPoint, Object responseDTO) { + handleLog(joinPoint, null, responseDTO); } @AfterThrowing(value = "logPointCut()", throwing = "e") public void doAfterThrowing(JoinPoint joinPoint, Exception e) { - handleLog(joinPoint, e); + handleLog(joinPoint, e, null); } /** @@ -109,16 +110,15 @@ public abstract class OperateLogAspect { taskExecutor.setWaitForTasksToCompleteOnShutdown(true); } - protected void handleLog(final JoinPoint joinPoint, final Exception e) { + protected void handleLog(final JoinPoint joinPoint, final Exception e, Object responseDTO) { try { OperateLog operateLog = this.getAnnotationLog(joinPoint); if (operateLog == null) { return; } - this.submitLog(joinPoint, e); + this.submitLog(joinPoint, e, responseDTO); } catch (Exception exp) { log.error("保存操作日志异常:{}", exp.getMessage()); - exp.printStackTrace(); } } @@ -173,11 +173,8 @@ public abstract class OperateLogAspect { /** * 提交存储操作日志 * - * @param joinPoint - * @param e - * @throws Exception */ - private void submitLog(final JoinPoint joinPoint, final Throwable e) throws Exception { + private void submitLog(final JoinPoint joinPoint, final Throwable e, Object responseDTO) { HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); //设置用户信息 RequestUser user = SmartRequestUtil.getRequestUser(); @@ -191,7 +188,7 @@ public abstract class OperateLogAspect { String methodName = joinPoint.getSignature().getName(); String operateMethod = className + "." + methodName; String failReason = null; - Boolean successFlag = true; + boolean successFlag = true; if (e != null) { successFlag = false; failReason = getExceptionString(e); @@ -210,15 +207,32 @@ public abstract class OperateLogAspect { .userAgent(user.getUserAgent()) .failReason(failReason) .successFlag(successFlag).build(); + Operation apiOperation = this.getApiOperation(joinPoint); if (apiOperation != null) { operateLogEntity.setContent(apiOperation.summary()); } + Tag api = this.getApi(joinPoint); if (api != null) { String name = api.name(); operateLogEntity.setModule(StrUtil.join(",", name)); } + + // 处理返回值 ResponseDTO + if(responseDTO instanceof ResponseDTO) { + ResponseDTO response = (ResponseDTO) responseDTO; + ResponseDTO logResponseDTO = new ResponseDTO( + response.getCode(), + response.getLevel(), + response.getOk(), + response.getMsg(), + null + ); + logResponseDTO.setDataType(response.getDataType()); + operateLogEntity.setResponse(JSON.toJSONString(logResponseDTO)); + } + taskExecutor.execute(() -> { this.saveLog(operateLogEntity); }); diff --git a/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/operatelog/domain/OperateLogEntity.java b/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/operatelog/domain/OperateLogEntity.java index 4f83b1dd..013d24d3 100644 --- a/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/operatelog/domain/OperateLogEntity.java +++ b/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/operatelog/domain/OperateLogEntity.java @@ -71,6 +71,11 @@ public class OperateLogEntity { */ private String param; + /** + * 返回值 + */ + private String response; + /** * 客户ip */ diff --git a/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/operatelog/domain/OperateLogVO.java b/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/operatelog/domain/OperateLogVO.java index 9cf3529f..a6570980 100644 --- a/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/operatelog/domain/OperateLogVO.java +++ b/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/operatelog/domain/OperateLogVO.java @@ -47,6 +47,9 @@ public class OperateLogVO { @Schema(description = "请求参数") private String param; + @Schema(description = "返回值") + private String response; + @Schema(description = "客户ip") private String ip; diff --git a/smart-admin-api-java17-springboot3/sa-base/src/main/resources/code-generator-template/js/form.vue.vm b/smart-admin-api-java17-springboot3/sa-base/src/main/resources/code-generator-template/js/form.vue.vm index 6291a44b..501bc432 100644 --- a/smart-admin-api-java17-springboot3/sa-base/src/main/resources/code-generator-template/js/form.vue.vm +++ b/smart-admin-api-java17-springboot3/sa-base/src/main/resources/code-generator-template/js/form.vue.vm @@ -48,7 +48,7 @@ #end #if($field.frontComponent == "DictSelect") - + #end #if($field.frontComponent == "Date") @@ -106,7 +106,7 @@ #end #if($field.frontComponent == "DictSelect") - + #end #if($field.frontComponent == "Date") diff --git a/smart-admin-api-java17-springboot3/sa-base/src/main/resources/code-generator-template/js/list.vue.vm b/smart-admin-api-java17-springboot3/sa-base/src/main/resources/code-generator-template/js/list.vue.vm index e90d74d2..aecbbcbd 100644 --- a/smart-admin-api-java17-springboot3/sa-base/src/main/resources/code-generator-template/js/list.vue.vm +++ b/smart-admin-api-java17-springboot3/sa-base/src/main/resources/code-generator-template/js/list.vue.vm @@ -22,7 +22,7 @@ #end #if($field.queryTypeEnum == "Dict") - + #end #if($field.queryTypeEnum == "Enum") diff --git a/smart-admin-api-java17-springboot3/sa-base/src/main/resources/code-generator-template/ts/form.vue.vm b/smart-admin-api-java17-springboot3/sa-base/src/main/resources/code-generator-template/ts/form.vue.vm index 6e21ce79..8438c913 100644 --- a/smart-admin-api-java17-springboot3/sa-base/src/main/resources/code-generator-template/ts/form.vue.vm +++ b/smart-admin-api-java17-springboot3/sa-base/src/main/resources/code-generator-template/ts/form.vue.vm @@ -48,7 +48,7 @@ #end #if($field.frontComponent == "DictSelect") - + #end #if($field.frontComponent == "Date") @@ -106,7 +106,7 @@ #end #if($field.frontComponent == "DictSelect") - + #end #if($field.frontComponent == "Date") diff --git a/smart-admin-api-java17-springboot3/sa-base/src/main/resources/code-generator-template/ts/list.vue.vm b/smart-admin-api-java17-springboot3/sa-base/src/main/resources/code-generator-template/ts/list.vue.vm index 11747b09..1d55a2bf 100644 --- a/smart-admin-api-java17-springboot3/sa-base/src/main/resources/code-generator-template/ts/list.vue.vm +++ b/smart-admin-api-java17-springboot3/sa-base/src/main/resources/code-generator-template/ts/list.vue.vm @@ -22,7 +22,7 @@ #end #if($field.queryTypeEnum == "Dict") - + #end #if($field.queryTypeEnum == "Enum") diff --git a/smart-admin-api-java17-springboot3/sa-base/src/main/resources/mapper/support/OperateLogMapper.xml b/smart-admin-api-java17-springboot3/sa-base/src/main/resources/mapper/support/OperateLogMapper.xml index d00adff0..ac987a64 100644 --- a/smart-admin-api-java17-springboot3/sa-base/src/main/resources/mapper/support/OperateLogMapper.xml +++ b/smart-admin-api-java17-springboot3/sa-base/src/main/resources/mapper/support/OperateLogMapper.xml @@ -26,7 +26,7 @@ AND (INSTR(module,#{query.keywords}) OR INSTR(content,#{query.keywords})) - AND (INSTR(url,#{query.requestKeywords}) OR INSTR(method,#{query.requestKeywords}) OR INSTR(param,#{query.requestKeywords})) + AND (INSTR(url,#{query.requestKeywords}) OR INSTR(method,#{query.requestKeywords}) OR INSTR(param,#{query.requestKeywords}) OR INSTR(response,#{query.requestKeywords})) AND success_flag = #{query.successFlag} diff --git a/smart-admin-api-java8-springboot2/sa-admin/src/main/java/net/lab1024/sa/admin/interceptor/AdminInterceptor.java b/smart-admin-api-java8-springboot2/sa-admin/src/main/java/net/lab1024/sa/admin/interceptor/AdminInterceptor.java index fd323906..17c11b54 100644 --- a/smart-admin-api-java8-springboot2/sa-admin/src/main/java/net/lab1024/sa/admin/interceptor/AdminInterceptor.java +++ b/smart-admin-api-java8-springboot2/sa-admin/src/main/java/net/lab1024/sa/admin/interceptor/AdminInterceptor.java @@ -67,7 +67,7 @@ public class AdminInterceptor implements HandlerInterceptor { Method method = ((HandlerMethod) handler).getMethod(); NoNeedLogin noNeedLogin = ((HandlerMethod) handler).getMethodAnnotation(NoNeedLogin.class); if (noNeedLogin != null) { - checkActiveTimeout(requestEmployee); + updateActiveTimeout(requestEmployee); SmartRequestUtil.setRequestUser(requestEmployee); return true; } @@ -77,8 +77,8 @@ public class AdminInterceptor implements HandlerInterceptor { return false; } - // 检测token 活跃频率 - checkActiveTimeout(requestEmployee); + // 更新活跃 + updateActiveTimeout(requestEmployee); // --------------- 第三步: 校验 权限 --------------- @@ -123,15 +123,12 @@ public class AdminInterceptor implements HandlerInterceptor { /** - * 检测:token 最低活跃频率(单位:秒),如果 token 超过此时间没有访问系统就会被冻结 + * 更新活跃时间 */ - private void checkActiveTimeout(RequestEmployee requestEmployee) { - // 用户不在线,也不用检测 + private void updateActiveTimeout(RequestEmployee requestEmployee) { if (requestEmployee == null) { return; } - - StpUtil.checkActiveTimeout(); StpUtil.updateLastActiveToNow(); } diff --git a/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/config/FileConfig.java b/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/config/FileConfig.java index 98eb03fe..97dce114 100644 --- a/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/config/FileConfig.java +++ b/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/config/FileConfig.java @@ -81,7 +81,7 @@ public class FileConfig implements WebMvcConfigurer { StaticCredentialsProvider.create( AwsBasicCredentials.create(accessKey, secretKey))) .serviceConfiguration(S3Configuration.builder() - .pathStyleAccessEnabled(false) + .pathStyleAccessEnabled(true) .chunkedEncodingEnabled(false) .build()) .build(); diff --git a/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/file/service/FileStorageCloudServiceImpl.java b/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/file/service/FileStorageCloudServiceImpl.java index 0493a4db..99849a95 100644 --- a/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/file/service/FileStorageCloudServiceImpl.java +++ b/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/file/service/FileStorageCloudServiceImpl.java @@ -106,7 +106,18 @@ public class FileStorageCloudServiceImpl implements IFileStorageService { userMetadata.put(USER_METADATA_FILE_FORMAT, fileType); userMetadata.put(USER_METADATA_FILE_SIZE, String.valueOf(file.getSize())); - PutObjectRequest putObjectRequest = PutObjectRequest.builder().bucket(cloudConfig.getBucketName()).key(fileKey).metadata(userMetadata).contentLength(file.getSize()).contentType(this.getContentType(fileType)).contentEncoding(StandardCharsets.UTF_8.name()).contentDisposition("attachment;filename=" + urlEncoderFilename).build(); + // 根据文件路径获取并设置访问权限 + ObjectCannedACL acl = this.getACL(path); + PutObjectRequest putObjectRequest = PutObjectRequest.builder() + .bucket(cloudConfig.getBucketName()) + .key(fileKey) + .metadata(userMetadata) + .contentLength(file.getSize()) + .contentType(this.getContentType(fileType)) + .contentEncoding(StandardCharsets.UTF_8.name()) + .contentDisposition("attachment;filename=" + urlEncoderFilename) + .acl(acl) + .build(); InputStream inputStream = null; try { inputStream = file.getInputStream(); @@ -117,10 +128,6 @@ public class FileStorageCloudServiceImpl implements IFileStorageService { } finally { IOUtils.closeQuietly(inputStream); } - // 根据文件路径获取并设置访问权限 - ObjectCannedACL acl = this.getACL(path); - PutObjectAclRequest aclRequest = PutObjectAclRequest.builder().bucket(cloudConfig.getBucketName()).key(fileKey).acl(this.getACL(path)).build(); - s3Client.putObjectAcl(aclRequest); // 返回上传结果 FileUploadVO uploadVO = new FileUploadVO(); uploadVO.setFileName(originalFileName); diff --git a/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/operatelog/core/OperateLogAspect.java b/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/operatelog/core/OperateLogAspect.java index 4618fcf7..dd723bac 100644 --- a/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/operatelog/core/OperateLogAspect.java +++ b/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/operatelog/core/OperateLogAspect.java @@ -3,11 +3,12 @@ package net.lab1024.sa.base.module.support.operatelog.core; import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import lombok.extern.slf4j.Slf4j; import net.lab1024.sa.base.common.constant.StringConst; import net.lab1024.sa.base.common.domain.RequestUser; +import net.lab1024.sa.base.common.domain.ResponseDTO; import net.lab1024.sa.base.common.util.SmartIpUtil; import net.lab1024.sa.base.common.util.SmartRequestUtil; import net.lab1024.sa.base.module.support.operatelog.OperateLogDao; @@ -20,7 +21,6 @@ import org.aspectj.lang.annotation.AfterThrowing; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Pointcut; import org.aspectj.lang.reflect.MethodSignature; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.context.properties.bind.BindResult; import org.springframework.context.ApplicationContext; import org.springframework.core.annotation.AnnotationUtils; @@ -36,7 +36,6 @@ import javax.servlet.http.HttpServletResponse; import java.io.PrintWriter; import java.io.StringWriter; import java.lang.reflect.Method; -import java.net.BindException; import java.util.ArrayList; import java.util.List; import java.util.concurrent.ThreadPoolExecutor; @@ -48,7 +47,7 @@ import java.util.concurrent.ThreadPoolExecutor; * @Date 2021-12-08 20:48:52 * @Wechat zhuoda1024 * @Email lab1024@163.com - * @Copyright 1024创新实验室 + * @Copyright 1024创新实验室 */ @Slf4j @Aspect @@ -73,14 +72,14 @@ public abstract class OperateLogAspect { public void logPointCut() { } - @AfterReturning(pointcut = "logPointCut()") - public void doAfterReturning(JoinPoint joinPoint) { - handleLog(joinPoint, null); + @AfterReturning(pointcut = "logPointCut()", returning = "responseDTO") + public void doAfterReturning(JoinPoint joinPoint, Object responseDTO) { + handleLog(joinPoint, null, responseDTO); } @AfterThrowing(value = "logPointCut()", throwing = "e") public void doAfterThrowing(JoinPoint joinPoint, Exception e) { - handleLog(joinPoint, e); + handleLog(joinPoint, e, null); } /** @@ -111,16 +110,15 @@ public abstract class OperateLogAspect { taskExecutor.setWaitForTasksToCompleteOnShutdown(true); } - protected void handleLog(final JoinPoint joinPoint, final Exception e) { + protected void handleLog(final JoinPoint joinPoint, final Exception e, Object responseDTO) { try { OperateLog operateLog = this.getAnnotationLog(joinPoint); if (operateLog == null) { return; } - this.submitLog(joinPoint, e); + this.submitLog(joinPoint, e, responseDTO); } catch (Exception exp) { log.error("保存操作日志异常:{}", exp.getMessage()); - exp.printStackTrace(); } } @@ -175,11 +173,8 @@ public abstract class OperateLogAspect { /** * 提交存储操作日志 * - * @param joinPoint - * @param e - * @throws Exception */ - private void submitLog(final JoinPoint joinPoint, final Throwable e) throws Exception { + private void submitLog(final JoinPoint joinPoint, final Throwable e, Object responseDTO) { HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); //设置用户信息 RequestUser user = SmartRequestUtil.getRequestUser(); @@ -193,7 +188,7 @@ public abstract class OperateLogAspect { String methodName = joinPoint.getSignature().getName(); String operateMethod = className + "." + methodName; String failReason = null; - Boolean successFlag = true; + boolean successFlag = true; if (e != null) { successFlag = false; failReason = getExceptionString(e); @@ -212,15 +207,32 @@ public abstract class OperateLogAspect { .userAgent(user.getUserAgent()) .failReason(failReason) .successFlag(successFlag).build(); + Operation apiOperation = this.getApiOperation(joinPoint); if (apiOperation != null) { operateLogEntity.setContent(apiOperation.summary()); } + Tag api = this.getApi(joinPoint); if (api != null) { String name = api.name(); operateLogEntity.setModule(StrUtil.join(",", name)); } + + // 处理返回值 ResponseDTO + if(responseDTO instanceof ResponseDTO) { + ResponseDTO response = (ResponseDTO) responseDTO; + ResponseDTO logResponseDTO = new ResponseDTO( + response.getCode(), + response.getLevel(), + response.getOk(), + response.getMsg(), + null + ); + logResponseDTO.setDataType(response.getDataType()); + operateLogEntity.setResponse(JSON.toJSONString(logResponseDTO)); + } + taskExecutor.execute(() -> { this.saveLog(operateLogEntity); }); diff --git a/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/operatelog/domain/OperateLogEntity.java b/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/operatelog/domain/OperateLogEntity.java index 4f83b1dd..013d24d3 100644 --- a/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/operatelog/domain/OperateLogEntity.java +++ b/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/operatelog/domain/OperateLogEntity.java @@ -71,6 +71,11 @@ public class OperateLogEntity { */ private String param; + /** + * 返回值 + */ + private String response; + /** * 客户ip */ diff --git a/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/operatelog/domain/OperateLogVO.java b/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/operatelog/domain/OperateLogVO.java index 9cf3529f..a6570980 100644 --- a/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/operatelog/domain/OperateLogVO.java +++ b/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/operatelog/domain/OperateLogVO.java @@ -47,6 +47,9 @@ public class OperateLogVO { @Schema(description = "请求参数") private String param; + @Schema(description = "返回值") + private String response; + @Schema(description = "客户ip") private String ip; diff --git a/smart-admin-api-java8-springboot2/sa-base/src/main/resources/code-generator-template/js/form.vue.vm b/smart-admin-api-java8-springboot2/sa-base/src/main/resources/code-generator-template/js/form.vue.vm index 6291a44b..501bc432 100644 --- a/smart-admin-api-java8-springboot2/sa-base/src/main/resources/code-generator-template/js/form.vue.vm +++ b/smart-admin-api-java8-springboot2/sa-base/src/main/resources/code-generator-template/js/form.vue.vm @@ -48,7 +48,7 @@ #end #if($field.frontComponent == "DictSelect") - + #end #if($field.frontComponent == "Date") @@ -106,7 +106,7 @@ #end #if($field.frontComponent == "DictSelect") - + #end #if($field.frontComponent == "Date") diff --git a/smart-admin-api-java8-springboot2/sa-base/src/main/resources/code-generator-template/js/list.vue.vm b/smart-admin-api-java8-springboot2/sa-base/src/main/resources/code-generator-template/js/list.vue.vm index e90d74d2..aecbbcbd 100644 --- a/smart-admin-api-java8-springboot2/sa-base/src/main/resources/code-generator-template/js/list.vue.vm +++ b/smart-admin-api-java8-springboot2/sa-base/src/main/resources/code-generator-template/js/list.vue.vm @@ -22,7 +22,7 @@ #end #if($field.queryTypeEnum == "Dict") - + #end #if($field.queryTypeEnum == "Enum") diff --git a/smart-admin-api-java8-springboot2/sa-base/src/main/resources/code-generator-template/ts/form.vue.vm b/smart-admin-api-java8-springboot2/sa-base/src/main/resources/code-generator-template/ts/form.vue.vm index 6e21ce79..8438c913 100644 --- a/smart-admin-api-java8-springboot2/sa-base/src/main/resources/code-generator-template/ts/form.vue.vm +++ b/smart-admin-api-java8-springboot2/sa-base/src/main/resources/code-generator-template/ts/form.vue.vm @@ -48,7 +48,7 @@ #end #if($field.frontComponent == "DictSelect") - + #end #if($field.frontComponent == "Date") @@ -106,7 +106,7 @@ #end #if($field.frontComponent == "DictSelect") - + #end #if($field.frontComponent == "Date") diff --git a/smart-admin-api-java8-springboot2/sa-base/src/main/resources/code-generator-template/ts/list.vue.vm b/smart-admin-api-java8-springboot2/sa-base/src/main/resources/code-generator-template/ts/list.vue.vm index 11747b09..1d55a2bf 100644 --- a/smart-admin-api-java8-springboot2/sa-base/src/main/resources/code-generator-template/ts/list.vue.vm +++ b/smart-admin-api-java8-springboot2/sa-base/src/main/resources/code-generator-template/ts/list.vue.vm @@ -22,7 +22,7 @@ #end #if($field.queryTypeEnum == "Dict") - + #end #if($field.queryTypeEnum == "Enum") diff --git a/smart-admin-api-java8-springboot2/sa-base/src/main/resources/mapper/support/OperateLogMapper.xml b/smart-admin-api-java8-springboot2/sa-base/src/main/resources/mapper/support/OperateLogMapper.xml index d00adff0..ac987a64 100644 --- a/smart-admin-api-java8-springboot2/sa-base/src/main/resources/mapper/support/OperateLogMapper.xml +++ b/smart-admin-api-java8-springboot2/sa-base/src/main/resources/mapper/support/OperateLogMapper.xml @@ -26,7 +26,7 @@ AND (INSTR(module,#{query.keywords}) OR INSTR(content,#{query.keywords})) - AND (INSTR(url,#{query.requestKeywords}) OR INSTR(method,#{query.requestKeywords}) OR INSTR(param,#{query.requestKeywords})) + AND (INSTR(url,#{query.requestKeywords}) OR INSTR(method,#{query.requestKeywords}) OR INSTR(param,#{query.requestKeywords}) OR INSTR(response,#{query.requestKeywords})) AND success_flag = #{query.successFlag} diff --git a/smart-admin-web-javascript/package.json b/smart-admin-web-javascript/package.json index 706d9298..a4a1a217 100644 --- a/smart-admin-web-javascript/package.json +++ b/smart-admin-web-javascript/package.json @@ -43,7 +43,7 @@ "vue": "3.4.27", "vue-i18n": "9.13.1", "vue-router": "4.3.2", - "vue3-json-viewer": "2.2.2" + "vue3-json-viewer": "2.3.1" }, "devDependencies": { "@vitejs/plugin-vue": "5.0.4", diff --git a/smart-admin-web-javascript/src/components/support/data-tracer/index.vue b/smart-admin-web-javascript/src/components/support/data-tracer/index.vue index d8072275..8a8ae907 100644 --- a/smart-admin-web-javascript/src/components/support/data-tracer/index.vue +++ b/smart-admin-web-javascript/src/components/support/data-tracer/index.vue @@ -51,7 +51,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="ajaxQuery" - @showSizeChange="ajaxQuery" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-javascript/src/components/system/employee-table-select-modal/index.vue b/smart-admin-web-javascript/src/components/system/employee-table-select-modal/index.vue index b68dfc32..83ddb407 100644 --- a/smart-admin-web-javascript/src/components/system/employee-table-select-modal/index.vue +++ b/smart-admin-web-javascript/src/components/system/employee-table-select-modal/index.vue @@ -71,7 +71,6 @@ v-model:pageSize="params.pageSize" :total="total" @change="queryEmployee" - @showSizeChange="queryEmployee" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-javascript/src/config/app-config.js b/smart-admin-web-javascript/src/config/app-config.js index d9dad8a1..aae5e201 100644 --- a/smart-admin-web-javascript/src/config/app-config.js +++ b/smart-admin-web-javascript/src/config/app-config.js @@ -27,7 +27,7 @@ export const appDefaultConfig = { // 圆角 borderRadius: 6, // 菜单展开模式 - flatPattern: false, + menuSingleExpandFlag: true, // 标签页 pageTagFlag: true, // 标签页样式: default、 antd、chrome diff --git a/smart-admin-web-javascript/src/i18n/lang/en-US/index.js b/smart-admin-web-javascript/src/i18n/lang/en-US/index.js index bbe64914..7027441a 100644 --- a/smart-admin-web-javascript/src/i18n/lang/en-US/index.js +++ b/smart-admin-web-javascript/src/i18n/lang/en-US/index.js @@ -21,11 +21,11 @@ export default { 'setting.menu.layout': 'Menu Layout', 'setting.menu.width': 'Menu Width', 'setting.menu.theme': 'Menu Theme', + 'setting.menu.expand': 'Menu Expand', 'setting.page.width': 'Page Width', 'setting.border.radius': 'Border Radius', 'setting.compact': 'Page Compact', 'setting.bread': 'Show Bread', - 'setting.flatPattern': 'Flat Pattern', 'setting.pagetag': 'Show PageTag', 'setting.pagetag.style': 'PageTag Style', 'setting.footer': 'Show Footer', diff --git a/smart-admin-web-javascript/src/i18n/lang/zh-CN/index.js b/smart-admin-web-javascript/src/i18n/lang/zh-CN/index.js index 29e5b74d..05040526 100644 --- a/smart-admin-web-javascript/src/i18n/lang/zh-CN/index.js +++ b/smart-admin-web-javascript/src/i18n/lang/zh-CN/index.js @@ -21,11 +21,11 @@ export default { 'setting.menu.layout': '菜单布局', 'setting.menu.width': '菜单宽度', 'setting.menu.theme': '菜单主题', + 'setting.menu.expand': '菜单展开', 'setting.compact': '页面紧凑', 'setting.border.radius': '页面圆角', 'setting.page.width': '页面宽度', 'setting.bread': '面包屑', - 'setting.flatPattern': '菜单展开模式', 'setting.pagetag': '标签页', 'setting.pagetag.style': '标签页样式', 'setting.footer': '页脚', diff --git a/smart-admin-web-javascript/src/layout/components/header-user-space/header-setting.vue b/smart-admin-web-javascript/src/layout/components/header-user-space/header-setting.vue index eaf1b9e5..ba0c0d29 100644 --- a/smart-admin-web-javascript/src/layout/components/header-user-space/header-setting.vue +++ b/smart-admin-web-javascript/src/layout/components/header-user-space/header-setting.vue @@ -83,8 +83,8 @@ Chrome - - + + @@ -213,8 +213,8 @@ borderRadius: appConfigStore.borderRadius, // 标签页 pageTagFlag: appConfigStore.pageTagFlag, - // 标签页 - flatPattern: appConfigStore.flatPattern, + // 菜单展开方式 + menuSingleExpandFlag: appConfigStore.menuSingleExpandFlag, // 标签页 样式 pageTagStyle: appConfigStore.pageTagStyle, // 面包屑 @@ -303,9 +303,9 @@ }); } - function changeFlatPattern(e) { + function changeMenuExpandFlag(e) { appConfigStore.$patch({ - flatPattern: e, + menuSingleExpandFlag: e, }); } diff --git a/smart-admin-web-javascript/src/layout/components/side-menu/recursion-menu.vue b/smart-admin-web-javascript/src/layout/components/side-menu/recursion-menu.vue index af9c1ad1..6977a257 100644 --- a/smart-admin-web-javascript/src/layout/components/side-menu/recursion-menu.vue +++ b/smart-admin-web-javascript/src/layout/components/side-menu/recursion-menu.vue @@ -36,7 +36,7 @@ import { useUserStore } from '/@/store/modules/system/user'; const theme = computed(() => useAppConfigStore().$state.sideMenuTheme); - const flatPattern = computed(() => useAppConfigStore().$state.flatPattern); + const menuSingleExpandFlag = computed(() => useAppConfigStore().$state.menuSingleExpandFlag); const props = defineProps({ collapsed: { @@ -46,8 +46,7 @@ }); const menuTree = computed(() => useUserStore().getMenuTree || []); - const rootSubmenuKeys = computed(()=>menuTree.value.map(item=>item.menuId)); - + const rootSubmenuKeys = computed(() => menuTree.value.map((item) => item.menuId)); //展开的菜单 let currentRoute = useRoute(); @@ -76,9 +75,15 @@ let parentList = menuParentIdListMap.get(currentRoute.name) || []; // 如果是折叠菜单的话,则不需要设置openkey - if (!props.collapsed) { + if (props.collapsed) { + return; + } + + let needOpenKeys = _.map(parentList, 'name').map(Number); + if (menuSingleExpandFlag.value) { + openKeys.value = [...needOpenKeys]; + } else { // 使用lodash的union函数,进行 去重合并两个数组 - let needOpenKeys = _.map(parentList, 'name').map(Number); openKeys.value = _.union(openKeys.value, needOpenKeys); } } @@ -92,17 +97,18 @@ immediate: true, } ); - function onOpenChange(openKeysParams){ - if(flatPattern.value){ - return; + + function onOpenChange(openKeysParams) { + if (!menuSingleExpandFlag.value) { + return; + } + const latestOpenKey = openKeysParams.find((key) => openKeys.value.indexOf(key) === -1); + if (rootSubmenuKeys.value.indexOf(latestOpenKey) === -1) { + openKeys.value = openKeysParams; + } else { + openKeys.value = latestOpenKey ? [latestOpenKey] : []; + } } - const latestOpenKey = openKeysParams.find(key => openKeys.value.indexOf(key) === -1); - if (rootSubmenuKeys.value.indexOf(latestOpenKey) === -1) { - openKeys.value = openKeysParams; - } else { - openKeys.value = latestOpenKey ? [latestOpenKey] : []; - } -}; defineExpose({ updateOpenKeysAndSelectKeys, }); diff --git a/smart-admin-web-javascript/src/views/business/erp/goods/goods-list.vue b/smart-admin-web-javascript/src/views/business/erp/goods/goods-list.vue index c4be7333..f5d2e69e 100644 --- a/smart-admin-web-javascript/src/views/business/erp/goods/goods-list.vue +++ b/smart-admin-web-javascript/src/views/business/erp/goods/goods-list.vue @@ -149,7 +149,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="queryData" - @showSizeChange="queryData" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-javascript/src/views/business/oa/enterprise/components/enterprise-bank-list.vue b/smart-admin-web-javascript/src/views/business/oa/enterprise/components/enterprise-bank-list.vue index 283bd81e..f98b9171 100644 --- a/smart-admin-web-javascript/src/views/business/oa/enterprise/components/enterprise-bank-list.vue +++ b/smart-admin-web-javascript/src/views/business/oa/enterprise/components/enterprise-bank-list.vue @@ -78,7 +78,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="ajaxQuery" - @showSizeChange="ajaxQuery" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-javascript/src/views/business/oa/enterprise/components/enterprise-employee-list.vue b/smart-admin-web-javascript/src/views/business/oa/enterprise/components/enterprise-employee-list.vue index d238a363..a1605da7 100644 --- a/smart-admin-web-javascript/src/views/business/oa/enterprise/components/enterprise-employee-list.vue +++ b/smart-admin-web-javascript/src/views/business/oa/enterprise/components/enterprise-employee-list.vue @@ -63,7 +63,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="queryEmployee" - @showSizeChange="queryEmployee" :show-total="showTableTotal" /> diff --git a/smart-admin-web-javascript/src/views/business/oa/enterprise/components/enterprise-invoice-list.vue b/smart-admin-web-javascript/src/views/business/oa/enterprise/components/enterprise-invoice-list.vue index b2e60293..42e07555 100644 --- a/smart-admin-web-javascript/src/views/business/oa/enterprise/components/enterprise-invoice-list.vue +++ b/smart-admin-web-javascript/src/views/business/oa/enterprise/components/enterprise-invoice-list.vue @@ -75,7 +75,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="ajaxQuery" - @showSizeChange="ajaxQuery" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-javascript/src/views/business/oa/enterprise/enterprise-list.vue b/smart-admin-web-javascript/src/views/business/oa/enterprise/enterprise-list.vue index c945ca4b..98aec1a0 100644 --- a/smart-admin-web-javascript/src/views/business/oa/enterprise/enterprise-list.vue +++ b/smart-admin-web-javascript/src/views/business/oa/enterprise/enterprise-list.vue @@ -102,7 +102,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="ajaxQuery" - @showSizeChange="ajaxQuery" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-javascript/src/views/business/oa/notice/components/notice-view-record-list.vue b/smart-admin-web-javascript/src/views/business/oa/notice/components/notice-view-record-list.vue index de4eb520..9b33bc8e 100644 --- a/smart-admin-web-javascript/src/views/business/oa/notice/components/notice-view-record-list.vue +++ b/smart-admin-web-javascript/src/views/business/oa/notice/components/notice-view-record-list.vue @@ -53,7 +53,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="queryViewRecord" - @showSizeChange="queryViewRecord" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-javascript/src/views/business/oa/notice/notice-employee-list.vue b/smart-admin-web-javascript/src/views/business/oa/notice/notice-employee-list.vue index 2749e2e9..5702a3db 100644 --- a/smart-admin-web-javascript/src/views/business/oa/notice/notice-employee-list.vue +++ b/smart-admin-web-javascript/src/views/business/oa/notice/notice-employee-list.vue @@ -72,7 +72,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="queryNoticeList" - @showSizeChange="queryNoticeList" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-javascript/src/views/business/oa/notice/notice-list.vue b/smart-admin-web-javascript/src/views/business/oa/notice/notice-list.vue index 0c70b682..b11036fc 100644 --- a/smart-admin-web-javascript/src/views/business/oa/notice/notice-list.vue +++ b/smart-admin-web-javascript/src/views/business/oa/notice/notice-list.vue @@ -122,7 +122,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="queryNoticeList" - @showSizeChange="queryNoticeList" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-javascript/src/views/support/change-log/change-log-list.vue b/smart-admin-web-javascript/src/views/support/change-log/change-log-list.vue index 0c5c8e61..536999f6 100644 --- a/smart-admin-web-javascript/src/views/support/change-log/change-log-list.vue +++ b/smart-admin-web-javascript/src/views/support/change-log/change-log-list.vue @@ -107,7 +107,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="queryData" - @showSizeChange="queryData" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-javascript/src/views/support/code-generator/code-generator-list.vue b/smart-admin-web-javascript/src/views/support/code-generator/code-generator-list.vue index 8e77b5b8..2f0c6dbe 100644 --- a/smart-admin-web-javascript/src/views/support/code-generator/code-generator-list.vue +++ b/smart-admin-web-javascript/src/views/support/code-generator/code-generator-list.vue @@ -74,7 +74,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="ajaxQuery" - @showSizeChange="ajaxQuery" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-javascript/src/views/support/config/config-list.vue b/smart-admin-web-javascript/src/views/support/config/config-list.vue index 9ae44622..eb81f6a7 100644 --- a/smart-admin-web-javascript/src/views/support/config/config-list.vue +++ b/smart-admin-web-javascript/src/views/support/config/config-list.vue @@ -66,7 +66,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="ajaxQuery" - @showSizeChange="ajaxQuery" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-javascript/src/views/support/dict/index.vue b/smart-admin-web-javascript/src/views/support/dict/index.vue index a215547a..ebab7457 100644 --- a/smart-admin-web-javascript/src/views/support/dict/index.vue +++ b/smart-admin-web-javascript/src/views/support/dict/index.vue @@ -98,7 +98,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="ajaxQuery" - @showSizeChange="ajaxQuery" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-javascript/src/views/support/feedback/feedback-list.vue b/smart-admin-web-javascript/src/views/support/feedback/feedback-list.vue index 5884cffb..fe6fcfb5 100644 --- a/smart-admin-web-javascript/src/views/support/feedback/feedback-list.vue +++ b/smart-admin-web-javascript/src/views/support/feedback/feedback-list.vue @@ -64,7 +64,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="queryList" - @showSizeChange="queryList" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-javascript/src/views/support/file/file-list.vue b/smart-admin-web-javascript/src/views/support/file/file-list.vue index 1a5fe4fb..ce8cdbf9 100644 --- a/smart-admin-web-javascript/src/views/support/file/file-list.vue +++ b/smart-admin-web-javascript/src/views/support/file/file-list.vue @@ -103,7 +103,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="queryData" - @showSizeChange="queryData" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-javascript/src/views/support/heart-beat/heart-beat-list.vue b/smart-admin-web-javascript/src/views/support/heart-beat/heart-beat-list.vue index f789afca..4c7ffcbf 100644 --- a/smart-admin-web-javascript/src/views/support/heart-beat/heart-beat-list.vue +++ b/smart-admin-web-javascript/src/views/support/heart-beat/heart-beat-list.vue @@ -79,7 +79,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="ajaxQuery" - @showSizeChange="ajaxQuery" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-javascript/src/views/support/help-doc/management/components/help-doc-list.vue b/smart-admin-web-javascript/src/views/support/help-doc/management/components/help-doc-list.vue index 2d3168ed..b83dd675 100644 --- a/smart-admin-web-javascript/src/views/support/help-doc/management/components/help-doc-list.vue +++ b/smart-admin-web-javascript/src/views/support/help-doc/management/components/help-doc-list.vue @@ -88,7 +88,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="queryHelpDocList" - @showSizeChange="queryHelpDocList" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-javascript/src/views/support/help-doc/user-view/components/help-doc-view-record-list.vue b/smart-admin-web-javascript/src/views/support/help-doc/user-view/components/help-doc-view-record-list.vue index 63a90da1..faac882c 100644 --- a/smart-admin-web-javascript/src/views/support/help-doc/user-view/components/help-doc-view-record-list.vue +++ b/smart-admin-web-javascript/src/views/support/help-doc/user-view/components/help-doc-view-record-list.vue @@ -49,7 +49,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="queryViewRecord" - @showSizeChange="queryViewRecord" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-javascript/src/views/support/job/components/deleted-job-list.vue b/smart-admin-web-javascript/src/views/support/job/components/deleted-job-list.vue index 6cac4561..a2a20344 100644 --- a/smart-admin-web-javascript/src/views/support/job/components/deleted-job-list.vue +++ b/smart-admin-web-javascript/src/views/support/job/components/deleted-job-list.vue @@ -117,7 +117,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="queryJobList" - @showSizeChange="queryJobList" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-javascript/src/views/support/job/components/job-log-list-modal.vue b/smart-admin-web-javascript/src/views/support/job/components/job-log-list-modal.vue index 07abf0fa..5c42c1a5 100644 --- a/smart-admin-web-javascript/src/views/support/job/components/job-log-list-modal.vue +++ b/smart-admin-web-javascript/src/views/support/job/components/job-log-list-modal.vue @@ -71,7 +71,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="queryLogList" - @showSizeChange="queryLogList" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-javascript/src/views/support/job/job-list.vue b/smart-admin-web-javascript/src/views/support/job/job-list.vue index 66ce2df8..54df6a54 100644 --- a/smart-admin-web-javascript/src/views/support/job/job-list.vue +++ b/smart-admin-web-javascript/src/views/support/job/job-list.vue @@ -136,7 +136,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="queryJobList" - @showSizeChange="queryJobList" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-javascript/src/views/support/login-fail/login-fail-list.vue b/smart-admin-web-javascript/src/views/support/login-fail/login-fail-list.vue index 405ea458..70e308f0 100644 --- a/smart-admin-web-javascript/src/views/support/login-fail/login-fail-list.vue +++ b/smart-admin-web-javascript/src/views/support/login-fail/login-fail-list.vue @@ -102,7 +102,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="onSearch" - @showSizeChange="onSearch" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-javascript/src/views/support/login-log/login-log-list.vue b/smart-admin-web-javascript/src/views/support/login-log/login-log-list.vue index fd938c85..d21b436d 100644 --- a/smart-admin-web-javascript/src/views/support/login-log/login-log-list.vue +++ b/smart-admin-web-javascript/src/views/support/login-log/login-log-list.vue @@ -89,7 +89,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="ajaxQuery" - @showSizeChange="ajaxQuery" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-javascript/src/views/support/message/components/message-receiver-modal.vue b/smart-admin-web-javascript/src/views/support/message/components/message-receiver-modal.vue index 1190878e..c89e8f9d 100644 --- a/smart-admin-web-javascript/src/views/support/message/components/message-receiver-modal.vue +++ b/smart-admin-web-javascript/src/views/support/message/components/message-receiver-modal.vue @@ -47,7 +47,6 @@ v-model:pageSize="queryParam.pageSize" :total="total" @change="queryList" - @showSizeChange="queryList" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-javascript/src/views/support/message/message-list.vue b/smart-admin-web-javascript/src/views/support/message/message-list.vue index 048a005e..321189c8 100644 --- a/smart-admin-web-javascript/src/views/support/message/message-list.vue +++ b/smart-admin-web-javascript/src/views/support/message/message-list.vue @@ -78,7 +78,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="queryData" - @showSizeChange="queryData" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-javascript/src/views/support/operate-log/operate-log-detail-modal.vue b/smart-admin-web-javascript/src/views/support/operate-log/operate-log-detail-modal.vue index 7ceeb6e0..ad9ff5cb 100644 --- a/smart-admin-web-javascript/src/views/support/operate-log/operate-log-detail-modal.vue +++ b/smart-admin-web-javascript/src/views/support/operate-log/operate-log-detail-modal.vue @@ -12,6 +12,10 @@ + + 用户id:{{ detail.operateUserId }} + 用户名称: {{ detail.operateUserName }} + 请求url: {{ detail.url }} 请求日期: {{ detail.createTime }} @@ -21,8 +25,7 @@ IP地区: {{ detail.ipRegion }} - 用户id:{{ detail.operateUserId }} - 用户名称: {{ detail.operateUserName }} + 客户端: {{ detail.os }} / {{ detail.browser }} {{ detail.device ? '/' + detail.device : detail.device }} @@ -32,21 +35,26 @@ - - - 请求明细: - 方法: {{ detail.method }} - 说明: {{ detail.module }} - {{ detail.content }} + + 方法: {{ detail.method }} + + + 说明: {{ detail.module }} - {{ detail.content }} + 请求参数: - + + + + 返回结果: + 请求失败原因: - + {{ detail.failReason }} - + @@ -57,6 +65,7 @@ import { operateLogApi } from '/@/api/support/operate-log-api'; import { smartSentry } from '/@/lib/smart-sentry'; import { SmartLoading } from '/@/components/framework/smart-loading'; + import uaparser from 'ua-parser-js'; defineExpose({ show, @@ -87,11 +96,16 @@ param: '', url: '', }); + async function getDetail(operateLogId) { try { SmartLoading.show(); let res = await operateLogApi.detail(operateLogId); detail = Object.assign(detail, res.data); + let ua = uaparser(res.data.userAgent); + detail.browser = ua.browser.name; + detail.os = ua.os.name; + detail.device = ua.device.vendor ? ua.device.vendor + ua.device.model : ''; } catch (e) { smartSentry.captureError(e); } finally { @@ -107,10 +121,11 @@ font-size: 20px; font-weight: bold; } + .info-box { - border-bottom: 1px solid #f0f0f0; padding: 10px 8px; } + .detail-info { .ant-col { line-height: 1.46; @@ -118,6 +133,7 @@ padding-right: 5px; } } + .detail-right-title { text-align: right; color: grey; diff --git a/smart-admin-web-javascript/src/views/support/operate-log/operate-log-list.vue b/smart-admin-web-javascript/src/views/support/operate-log/operate-log-list.vue index c34d4f77..8afe7350 100644 --- a/smart-admin-web-javascript/src/views/support/operate-log/operate-log-list.vue +++ b/smart-admin-web-javascript/src/views/support/operate-log/operate-log-list.vue @@ -14,7 +14,7 @@ - + @@ -24,7 +24,7 @@ - + 全部 成功 @@ -51,18 +51,23 @@ - + + + {{ text ? text.msg : '-' }} + {{ text ? text.msg : '-' }} + + - {{ text ? '成功' : '失败' }} + {{ text ? '成功' : '报错' }} - {{ record.browser }} / {{ record.os }} / {{ record.device }} + {{ record.os }} / {{ record.browser }} {{ record.device ? '/' + record.device : record.device }} @@ -88,7 +93,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="ajaxQuery" - @showSizeChange="ajaxQuery" :show-total="(total) => `共${total}条`" /> @@ -135,14 +139,15 @@ ellipsis: true, }, { - title: 'IP', - dataIndex: 'ip', + title: '返回结果', + dataIndex: 'response', ellipsis: true, }, { title: 'IP地区', dataIndex: 'ipRegion', ellipsis: true, + width: 150, }, { title: '客户端', @@ -150,20 +155,15 @@ ellipsis: true, }, { - title: '请求方法', - dataIndex: 'method', - ellipsis: true, - }, - { - title: '请求结果', - dataIndex: 'successFlag', - width: 80, - }, - { - title: '时间', + title: '操作时间', dataIndex: 'createTime', width: 150, }, + { + title: '状态', + dataIndex: 'successFlag', + width: 60, + }, { title: '操作', dataIndex: 'action', @@ -212,6 +212,10 @@ let responseModel = await operateLogApi.queryList(queryForm); for (const e of responseModel.data.list) { + if(e.response){ + e.response = JSON.parse(e.response); + } + if (!e.userAgent) { continue; } diff --git a/smart-admin-web-javascript/src/views/support/serial-number/serial-number-record-list.vue b/smart-admin-web-javascript/src/views/support/serial-number/serial-number-record-list.vue index 0788d48c..93361ede 100644 --- a/smart-admin-web-javascript/src/views/support/serial-number/serial-number-record-list.vue +++ b/smart-admin-web-javascript/src/views/support/serial-number/serial-number-record-list.vue @@ -32,7 +32,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="ajaxQuery" - @showSizeChange="ajaxQuery" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-javascript/src/views/system/account/components/login-log/index.vue b/smart-admin-web-javascript/src/views/system/account/components/login-log/index.vue index 205ef946..a01f3df7 100644 --- a/smart-admin-web-javascript/src/views/system/account/components/login-log/index.vue +++ b/smart-admin-web-javascript/src/views/system/account/components/login-log/index.vue @@ -63,7 +63,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="ajaxQuery" - @showSizeChange="ajaxQuery" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-javascript/src/views/system/account/components/message/index.vue b/smart-admin-web-javascript/src/views/system/account/components/message/index.vue index 06f9fb1f..c9de5f53 100644 --- a/smart-admin-web-javascript/src/views/system/account/components/message/index.vue +++ b/smart-admin-web-javascript/src/views/system/account/components/message/index.vue @@ -75,7 +75,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="ajaxQuery" - @showSizeChange="ajaxQuery" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-javascript/src/views/system/account/components/operate-log/index.vue b/smart-admin-web-javascript/src/views/system/account/components/operate-log/index.vue index 2745bee0..81c1b101 100644 --- a/smart-admin-web-javascript/src/views/system/account/components/operate-log/index.vue +++ b/smart-admin-web-javascript/src/views/system/account/components/operate-log/index.vue @@ -68,7 +68,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="ajaxQuery" - @showSizeChange="ajaxQuery" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-javascript/src/views/system/employee/components/employee-list/index.vue b/smart-admin-web-javascript/src/views/system/employee/components/employee-list/index.vue index b9e3e65b..dcc33dfe 100644 --- a/smart-admin-web-javascript/src/views/system/employee/components/employee-list/index.vue +++ b/smart-admin-web-javascript/src/views/system/employee/components/employee-list/index.vue @@ -94,7 +94,6 @@ v-model:pageSize="params.pageSize" :total="total" @change="queryEmployee" - @showSizeChange="queryEmployee" :show-total="showTableTotal" /> diff --git a/smart-admin-web-javascript/src/views/system/home/ad-modal.vue b/smart-admin-web-javascript/src/views/system/home/ad-modal.vue index 9708e76a..774e26d9 100644 --- a/smart-admin-web-javascript/src/views/system/home/ad-modal.vue +++ b/smart-admin-web-javascript/src/views/system/home/ad-modal.vue @@ -8,23 +8,24 @@ * @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012 --> - - 助力卓大抖音1000个粉丝,开播写代码🎉🎉 - 和1024创新实验室一起,热爱代码,热爱生活,永远年轻,永远前行🎉🎉 + + 重磅更新:国产数据库支持🎉🎉 + 支持:达梦、人大金仓、华为高斯GaussDB 等🎉🎉 - 打开【抖音APP】-点击【左上角侧边栏】-【点击扫一扫】-【进行关注】 + 添加“卓大”微信,备注对应数据库,如 达梦 - 知道了 + 知道了 + 去看看国产数据库,了解一下 @@ -36,6 +37,9 @@ defineExpose({ }); const visible = ref(true); + function goto(){ + + } function show() { visible.value = true; } @@ -64,8 +68,7 @@ defineExpose({ display: flex; margin-top: 20px; align-items: center; - font-size: 13px; - color: red; + font-size: 15px; text-align: center; overflow-x: hidden; > img { diff --git a/smart-admin-web-javascript/src/views/system/home/home-header.vue b/smart-admin-web-javascript/src/views/system/home/home-header.vue index 3d40c10c..3b65b920 100644 --- a/smart-admin-web-javascript/src/views/system/home/home-header.vue +++ b/smart-admin-web-javascript/src/views/system/home/home-header.vue @@ -108,7 +108,7 @@ let lunarMonth = lunar.getMonthInChinese(); let lunarDay = lunar.getDayInChinese(); //节气 - let jieqi = lunar.getPrevJieQi().getName(); + let jieqi = lunar.getJieQi(); let next = lunar.getNextJieQi(); let nextJieqi = next.getName() + ' ' + next.getSolar().toYmd(); diff --git a/smart-admin-web-javascript/src/views/system/position/position-list.vue b/smart-admin-web-javascript/src/views/system/position/position-list.vue index 31d16322..09e6168e 100644 --- a/smart-admin-web-javascript/src/views/system/position/position-list.vue +++ b/smart-admin-web-javascript/src/views/system/position/position-list.vue @@ -86,7 +86,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="queryData" - @showSizeChange="queryData" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-javascript/src/views/system/role/components/role-employee-list/index.vue b/smart-admin-web-javascript/src/views/system/role/components/role-employee-list/index.vue index 6a7b93d3..c516448e 100644 --- a/smart-admin-web-javascript/src/views/system/role/components/role-employee-list/index.vue +++ b/smart-admin-web-javascript/src/views/system/role/components/role-employee-list/index.vue @@ -68,7 +68,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="queryRoleEmployee" - @showSizeChange="queryRoleEmployee" :show-total="showTableTotal" /> diff --git a/smart-admin-web-typescript/package.json b/smart-admin-web-typescript/package.json index b4f7492e..26085d18 100644 --- a/smart-admin-web-typescript/package.json +++ b/smart-admin-web-typescript/package.json @@ -44,7 +44,7 @@ "vue": "3.4.27", "vue-i18n": "9.13.1", "vue-router": "4.3.2", - "vue3-json-viewer": "2.2.2" + "vue3-json-viewer": "2.3.1" }, "devDependencies": { "@vitejs/plugin-vue": "5.1.4", diff --git a/smart-admin-web-typescript/src/components/support/data-tracer/index.vue b/smart-admin-web-typescript/src/components/support/data-tracer/index.vue index 97f2425f..71b20176 100644 --- a/smart-admin-web-typescript/src/components/support/data-tracer/index.vue +++ b/smart-admin-web-typescript/src/components/support/data-tracer/index.vue @@ -51,7 +51,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="ajaxQuery" - @showSizeChange="ajaxQuery" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-typescript/src/components/system/employee-table-select-modal/index.vue b/smart-admin-web-typescript/src/components/system/employee-table-select-modal/index.vue index 6a7329fa..f593b0c3 100644 --- a/smart-admin-web-typescript/src/components/system/employee-table-select-modal/index.vue +++ b/smart-admin-web-typescript/src/components/system/employee-table-select-modal/index.vue @@ -71,7 +71,6 @@ v-model:pageSize="params.pageSize" :total="total" @change="queryEmployee" - @showSizeChange="queryEmployee" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-typescript/src/config/app-config.ts b/smart-admin-web-typescript/src/config/app-config.ts index d9dad8a1..aae5e201 100644 --- a/smart-admin-web-typescript/src/config/app-config.ts +++ b/smart-admin-web-typescript/src/config/app-config.ts @@ -27,7 +27,7 @@ export const appDefaultConfig = { // 圆角 borderRadius: 6, // 菜单展开模式 - flatPattern: false, + menuSingleExpandFlag: true, // 标签页 pageTagFlag: true, // 标签页样式: default、 antd、chrome diff --git a/smart-admin-web-typescript/src/i18n/lang/en-US/index.ts b/smart-admin-web-typescript/src/i18n/lang/en-US/index.ts index bbe64914..7027441a 100644 --- a/smart-admin-web-typescript/src/i18n/lang/en-US/index.ts +++ b/smart-admin-web-typescript/src/i18n/lang/en-US/index.ts @@ -21,11 +21,11 @@ export default { 'setting.menu.layout': 'Menu Layout', 'setting.menu.width': 'Menu Width', 'setting.menu.theme': 'Menu Theme', + 'setting.menu.expand': 'Menu Expand', 'setting.page.width': 'Page Width', 'setting.border.radius': 'Border Radius', 'setting.compact': 'Page Compact', 'setting.bread': 'Show Bread', - 'setting.flatPattern': 'Flat Pattern', 'setting.pagetag': 'Show PageTag', 'setting.pagetag.style': 'PageTag Style', 'setting.footer': 'Show Footer', diff --git a/smart-admin-web-typescript/src/i18n/lang/zh-CN/index.ts b/smart-admin-web-typescript/src/i18n/lang/zh-CN/index.ts index 29e5b74d..05040526 100644 --- a/smart-admin-web-typescript/src/i18n/lang/zh-CN/index.ts +++ b/smart-admin-web-typescript/src/i18n/lang/zh-CN/index.ts @@ -21,11 +21,11 @@ export default { 'setting.menu.layout': '菜单布局', 'setting.menu.width': '菜单宽度', 'setting.menu.theme': '菜单主题', + 'setting.menu.expand': '菜单展开', 'setting.compact': '页面紧凑', 'setting.border.radius': '页面圆角', 'setting.page.width': '页面宽度', 'setting.bread': '面包屑', - 'setting.flatPattern': '菜单展开模式', 'setting.pagetag': '标签页', 'setting.pagetag.style': '标签页样式', 'setting.footer': '页脚', diff --git a/smart-admin-web-typescript/src/layout/components/header-user-space/header-setting.vue b/smart-admin-web-typescript/src/layout/components/header-user-space/header-setting.vue index 5a4652da..f6c86920 100644 --- a/smart-admin-web-typescript/src/layout/components/header-user-space/header-setting.vue +++ b/smart-admin-web-typescript/src/layout/components/header-user-space/header-setting.vue @@ -83,8 +83,8 @@ Chrome - - + + @@ -213,8 +213,8 @@ borderRadius: appConfigStore.borderRadius, // 标签页 pageTagFlag: appConfigStore.pageTagFlag, - // 标签页 - flatPattern: appConfigStore.flatPattern, + // 菜单展开方式 + menuSingleExpandFlag: appConfigStore.menuSingleExpandFlag, // 标签页 样式 pageTagStyle: appConfigStore.pageTagStyle, // 面包屑 @@ -303,9 +303,9 @@ }); } - function changeFlatPattern(e) { + function changeMenuExpandFlag(e) { appConfigStore.$patch({ - flatPattern: e, + menuSingleExpandFlag: e, }); } diff --git a/smart-admin-web-typescript/src/layout/components/side-menu/recursion-menu.vue b/smart-admin-web-typescript/src/layout/components/side-menu/recursion-menu.vue index 50bf600b..47d110ed 100644 --- a/smart-admin-web-typescript/src/layout/components/side-menu/recursion-menu.vue +++ b/smart-admin-web-typescript/src/layout/components/side-menu/recursion-menu.vue @@ -36,7 +36,7 @@ import { useUserStore } from '/@/store/modules/system/user'; const theme = computed(() => useAppConfigStore().$state.sideMenuTheme); - const flatPattern = computed(() => useAppConfigStore().$state.flatPattern); + const menuSingleExpandFlag = computed(() => useAppConfigStore().$state.menuSingleExpandFlag); const props = defineProps({ collapsed: { @@ -46,8 +46,7 @@ }); const menuTree = computed(() => useUserStore().getMenuTree || []); - const rootSubmenuKeys = computed(()=>menuTree.value.map(item=>item.menuId)); - + const rootSubmenuKeys = computed(() => menuTree.value.map((item) => item.menuId)); //展开的菜单 let currentRoute = useRoute(); @@ -76,9 +75,15 @@ let parentList = menuParentIdListMap.get(currentRoute.name) || []; // 如果是折叠菜单的话,则不需要设置openkey - if (!props.collapsed) { + if (props.collapsed) { + return; + } + + let needOpenKeys = _.map(parentList, 'name').map(Number); + if (menuSingleExpandFlag.value) { + openKeys.value = [...needOpenKeys]; + } else { // 使用lodash的union函数,进行 去重合并两个数组 - let needOpenKeys = _.map(parentList, 'name').map(Number); openKeys.value = _.union(openKeys.value, needOpenKeys); } } @@ -92,17 +97,18 @@ immediate: true, } ); - function onOpenChange(openKeysParams){ - if(flatPattern.value){ - return; + + function onOpenChange(openKeysParams) { + if (!menuSingleExpandFlag.value) { + return; + } + const latestOpenKey = openKeysParams.find((key) => openKeys.value.indexOf(key) === -1); + if (rootSubmenuKeys.value.indexOf(latestOpenKey) === -1) { + openKeys.value = openKeysParams; + } else { + openKeys.value = latestOpenKey ? [latestOpenKey] : []; + } } - const latestOpenKey = openKeysParams.find(key => openKeys.value.indexOf(key) === -1); - if (rootSubmenuKeys.value.indexOf(latestOpenKey) === -1) { - openKeys.value = openKeysParams; - } else { - openKeys.value = latestOpenKey ? [latestOpenKey] : []; - } -}; defineExpose({ updateOpenKeysAndSelectKeys, }); diff --git a/smart-admin-web-typescript/src/views/business/erp/goods/goods-list.vue b/smart-admin-web-typescript/src/views/business/erp/goods/goods-list.vue index 7e31dc18..9d700917 100644 --- a/smart-admin-web-typescript/src/views/business/erp/goods/goods-list.vue +++ b/smart-admin-web-typescript/src/views/business/erp/goods/goods-list.vue @@ -149,7 +149,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="queryData" - @showSizeChange="queryData" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-typescript/src/views/business/oa/enterprise/components/enterprise-bank-list.vue b/smart-admin-web-typescript/src/views/business/oa/enterprise/components/enterprise-bank-list.vue index 8427a1a2..b1bfd20b 100644 --- a/smart-admin-web-typescript/src/views/business/oa/enterprise/components/enterprise-bank-list.vue +++ b/smart-admin-web-typescript/src/views/business/oa/enterprise/components/enterprise-bank-list.vue @@ -78,7 +78,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="ajaxQuery" - @showSizeChange="ajaxQuery" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-typescript/src/views/business/oa/enterprise/components/enterprise-employee-list.vue b/smart-admin-web-typescript/src/views/business/oa/enterprise/components/enterprise-employee-list.vue index 49608519..d0187efa 100644 --- a/smart-admin-web-typescript/src/views/business/oa/enterprise/components/enterprise-employee-list.vue +++ b/smart-admin-web-typescript/src/views/business/oa/enterprise/components/enterprise-employee-list.vue @@ -63,7 +63,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="queryEmployee" - @showSizeChange="queryEmployee" :show-total="showTableTotal" /> diff --git a/smart-admin-web-typescript/src/views/business/oa/enterprise/components/enterprise-invoice-list.vue b/smart-admin-web-typescript/src/views/business/oa/enterprise/components/enterprise-invoice-list.vue index 9b11c068..3ec4b639 100644 --- a/smart-admin-web-typescript/src/views/business/oa/enterprise/components/enterprise-invoice-list.vue +++ b/smart-admin-web-typescript/src/views/business/oa/enterprise/components/enterprise-invoice-list.vue @@ -75,7 +75,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="ajaxQuery" - @showSizeChange="ajaxQuery" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-typescript/src/views/business/oa/enterprise/enterprise-list.vue b/smart-admin-web-typescript/src/views/business/oa/enterprise/enterprise-list.vue index c68d0613..b559bc70 100644 --- a/smart-admin-web-typescript/src/views/business/oa/enterprise/enterprise-list.vue +++ b/smart-admin-web-typescript/src/views/business/oa/enterprise/enterprise-list.vue @@ -102,7 +102,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="ajaxQuery" - @showSizeChange="ajaxQuery" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-typescript/src/views/business/oa/notice/components/notice-view-record-list.vue b/smart-admin-web-typescript/src/views/business/oa/notice/components/notice-view-record-list.vue index fbcd17df..d861839e 100644 --- a/smart-admin-web-typescript/src/views/business/oa/notice/components/notice-view-record-list.vue +++ b/smart-admin-web-typescript/src/views/business/oa/notice/components/notice-view-record-list.vue @@ -53,7 +53,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="queryViewRecord" - @showSizeChange="queryViewRecord" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-typescript/src/views/business/oa/notice/notice-employee-list.vue b/smart-admin-web-typescript/src/views/business/oa/notice/notice-employee-list.vue index 3ff0ba4b..6a807835 100644 --- a/smart-admin-web-typescript/src/views/business/oa/notice/notice-employee-list.vue +++ b/smart-admin-web-typescript/src/views/business/oa/notice/notice-employee-list.vue @@ -72,7 +72,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="queryNoticeList" - @showSizeChange="queryNoticeList" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-typescript/src/views/business/oa/notice/notice-list.vue b/smart-admin-web-typescript/src/views/business/oa/notice/notice-list.vue index aed1b1c0..c4dc51d5 100644 --- a/smart-admin-web-typescript/src/views/business/oa/notice/notice-list.vue +++ b/smart-admin-web-typescript/src/views/business/oa/notice/notice-list.vue @@ -122,7 +122,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="queryNoticeList" - @showSizeChange="queryNoticeList" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-typescript/src/views/support/change-log/change-log-list.vue b/smart-admin-web-typescript/src/views/support/change-log/change-log-list.vue index 3491dc8e..85a035ba 100644 --- a/smart-admin-web-typescript/src/views/support/change-log/change-log-list.vue +++ b/smart-admin-web-typescript/src/views/support/change-log/change-log-list.vue @@ -107,7 +107,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="queryData" - @showSizeChange="queryData" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-typescript/src/views/support/code-generator/code-generator-list.vue b/smart-admin-web-typescript/src/views/support/code-generator/code-generator-list.vue index dcca4dbb..b9977f6c 100644 --- a/smart-admin-web-typescript/src/views/support/code-generator/code-generator-list.vue +++ b/smart-admin-web-typescript/src/views/support/code-generator/code-generator-list.vue @@ -74,7 +74,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="ajaxQuery" - @showSizeChange="ajaxQuery" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-typescript/src/views/support/config/config-list.vue b/smart-admin-web-typescript/src/views/support/config/config-list.vue index 277b5d8e..513a75b4 100644 --- a/smart-admin-web-typescript/src/views/support/config/config-list.vue +++ b/smart-admin-web-typescript/src/views/support/config/config-list.vue @@ -66,7 +66,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="ajaxQuery" - @showSizeChange="ajaxQuery" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-typescript/src/views/support/dict/index.vue b/smart-admin-web-typescript/src/views/support/dict/index.vue index 65d95f02..5662a82b 100644 --- a/smart-admin-web-typescript/src/views/support/dict/index.vue +++ b/smart-admin-web-typescript/src/views/support/dict/index.vue @@ -98,7 +98,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="ajaxQuery" - @showSizeChange="ajaxQuery" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-typescript/src/views/support/feedback/feedback-list.vue b/smart-admin-web-typescript/src/views/support/feedback/feedback-list.vue index a685ec34..27294888 100644 --- a/smart-admin-web-typescript/src/views/support/feedback/feedback-list.vue +++ b/smart-admin-web-typescript/src/views/support/feedback/feedback-list.vue @@ -64,7 +64,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="queryList" - @showSizeChange="queryList" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-typescript/src/views/support/file/file-list.vue b/smart-admin-web-typescript/src/views/support/file/file-list.vue index 8acebe71..5e7ff88a 100644 --- a/smart-admin-web-typescript/src/views/support/file/file-list.vue +++ b/smart-admin-web-typescript/src/views/support/file/file-list.vue @@ -103,7 +103,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="queryData" - @showSizeChange="queryData" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-typescript/src/views/support/heart-beat/heart-beat-list.vue b/smart-admin-web-typescript/src/views/support/heart-beat/heart-beat-list.vue index 272defbb..f6874123 100644 --- a/smart-admin-web-typescript/src/views/support/heart-beat/heart-beat-list.vue +++ b/smart-admin-web-typescript/src/views/support/heart-beat/heart-beat-list.vue @@ -79,7 +79,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="ajaxQuery" - @showSizeChange="ajaxQuery" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-typescript/src/views/support/help-doc/management/components/help-doc-list.vue b/smart-admin-web-typescript/src/views/support/help-doc/management/components/help-doc-list.vue index 47cf4f9e..f80925cc 100644 --- a/smart-admin-web-typescript/src/views/support/help-doc/management/components/help-doc-list.vue +++ b/smart-admin-web-typescript/src/views/support/help-doc/management/components/help-doc-list.vue @@ -88,7 +88,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="queryHelpDocList" - @showSizeChange="queryHelpDocList" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-typescript/src/views/support/help-doc/user-view/components/help-doc-view-record-list.vue b/smart-admin-web-typescript/src/views/support/help-doc/user-view/components/help-doc-view-record-list.vue index 52514de3..0d9bd45e 100644 --- a/smart-admin-web-typescript/src/views/support/help-doc/user-view/components/help-doc-view-record-list.vue +++ b/smart-admin-web-typescript/src/views/support/help-doc/user-view/components/help-doc-view-record-list.vue @@ -49,7 +49,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="queryViewRecord" - @showSizeChange="queryViewRecord" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-typescript/src/views/support/job/components/deleted-job-list.vue b/smart-admin-web-typescript/src/views/support/job/components/deleted-job-list.vue index 9a210075..078a951e 100644 --- a/smart-admin-web-typescript/src/views/support/job/components/deleted-job-list.vue +++ b/smart-admin-web-typescript/src/views/support/job/components/deleted-job-list.vue @@ -117,7 +117,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="queryJobList" - @showSizeChange="queryJobList" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-typescript/src/views/support/job/components/job-log-list-modal.vue b/smart-admin-web-typescript/src/views/support/job/components/job-log-list-modal.vue index 3dee07a2..87318173 100644 --- a/smart-admin-web-typescript/src/views/support/job/components/job-log-list-modal.vue +++ b/smart-admin-web-typescript/src/views/support/job/components/job-log-list-modal.vue @@ -71,7 +71,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="queryLogList" - @showSizeChange="queryLogList" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-typescript/src/views/support/job/job-list.vue b/smart-admin-web-typescript/src/views/support/job/job-list.vue index f314ffd4..694fda78 100644 --- a/smart-admin-web-typescript/src/views/support/job/job-list.vue +++ b/smart-admin-web-typescript/src/views/support/job/job-list.vue @@ -136,7 +136,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="queryJobList" - @showSizeChange="queryJobList" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-typescript/src/views/support/login-fail/login-fail-list.vue b/smart-admin-web-typescript/src/views/support/login-fail/login-fail-list.vue index 79b8ec07..a8476923 100644 --- a/smart-admin-web-typescript/src/views/support/login-fail/login-fail-list.vue +++ b/smart-admin-web-typescript/src/views/support/login-fail/login-fail-list.vue @@ -102,7 +102,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="onSearch" - @showSizeChange="onSearch" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-typescript/src/views/support/login-log/login-log-list.vue b/smart-admin-web-typescript/src/views/support/login-log/login-log-list.vue index d149889e..306daa3c 100644 --- a/smart-admin-web-typescript/src/views/support/login-log/login-log-list.vue +++ b/smart-admin-web-typescript/src/views/support/login-log/login-log-list.vue @@ -89,7 +89,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="ajaxQuery" - @showSizeChange="ajaxQuery" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-typescript/src/views/support/message/components/message-receiver-modal.vue b/smart-admin-web-typescript/src/views/support/message/components/message-receiver-modal.vue index 31d4de7c..f18fe088 100644 --- a/smart-admin-web-typescript/src/views/support/message/components/message-receiver-modal.vue +++ b/smart-admin-web-typescript/src/views/support/message/components/message-receiver-modal.vue @@ -47,7 +47,6 @@ v-model:pageSize="queryParam.pageSize" :total="total" @change="queryList" - @showSizeChange="queryList" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-typescript/src/views/support/message/message-list.vue b/smart-admin-web-typescript/src/views/support/message/message-list.vue index 0ea15627..faa88c64 100644 --- a/smart-admin-web-typescript/src/views/support/message/message-list.vue +++ b/smart-admin-web-typescript/src/views/support/message/message-list.vue @@ -78,7 +78,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="queryData" - @showSizeChange="queryData" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-typescript/src/views/support/operate-log/operate-log-detail-modal.vue b/smart-admin-web-typescript/src/views/support/operate-log/operate-log-detail-modal.vue index 40a8e6c2..99a56c40 100644 --- a/smart-admin-web-typescript/src/views/support/operate-log/operate-log-detail-modal.vue +++ b/smart-admin-web-typescript/src/views/support/operate-log/operate-log-detail-modal.vue @@ -12,6 +12,10 @@ + + 用户id:{{ detail.operateUserId }} + 用户名称: {{ detail.operateUserName }} + 请求url: {{ detail.url }} 请求日期: {{ detail.createTime }} @@ -21,8 +25,7 @@ IP地区: {{ detail.ipRegion }} - 用户id:{{ detail.operateUserId }} - 用户名称: {{ detail.operateUserName }} + 客户端: {{ detail.os }} / {{ detail.browser }} {{ detail.device ? '/' + detail.device : detail.device }} @@ -32,21 +35,26 @@ - - - 请求明细: - 方法: {{ detail.method }} - 说明: {{ detail.module }} - {{ detail.content }} + + 方法: {{ detail.method }} + + + 说明: {{ detail.module }} - {{ detail.content }} + 请求参数: - + + + + 返回结果: + 请求失败原因: - + {{ detail.failReason }} - + @@ -57,6 +65,7 @@ import { operateLogApi } from '/@/api/support/operate-log-api'; import { smartSentry } from '/@/lib/smart-sentry'; import { SmartLoading } from '/@/components/framework/smart-loading'; + import uaparser from 'ua-parser-js'; defineExpose({ show, @@ -87,11 +96,16 @@ param: '', url: '', }); + async function getDetail(operateLogId) { try { SmartLoading.show(); let res = await operateLogApi.detail(operateLogId); detail = Object.assign(detail, res.data); + let ua = uaparser(res.data.userAgent); + detail.browser = ua.browser.name; + detail.os = ua.os.name; + detail.device = ua.device.vendor ? ua.device.vendor + ua.device.model : ''; } catch (e) { smartSentry.captureError(e); } finally { @@ -107,10 +121,11 @@ font-size: 20px; font-weight: bold; } + .info-box { - border-bottom: 1px solid #f0f0f0; padding: 10px 8px; } + .detail-info { .ant-col { line-height: 1.46; @@ -118,6 +133,7 @@ padding-right: 5px; } } + .detail-right-title { text-align: right; color: grey; diff --git a/smart-admin-web-typescript/src/views/support/operate-log/operate-log-list.vue b/smart-admin-web-typescript/src/views/support/operate-log/operate-log-list.vue index 47e9af89..177c8354 100644 --- a/smart-admin-web-typescript/src/views/support/operate-log/operate-log-list.vue +++ b/smart-admin-web-typescript/src/views/support/operate-log/operate-log-list.vue @@ -14,7 +14,7 @@ - + @@ -24,7 +24,7 @@ - + 全部 成功 @@ -51,18 +51,23 @@ - + + + {{ text ? text.msg : '-' }} + {{ text ? text.msg : '-' }} + + - {{ text ? '成功' : '失败' }} + {{ text ? '成功' : '报错' }} - {{ record.browser }} / {{ record.os }} / {{ record.device }} + {{ record.os }} / {{ record.browser }} {{ record.device ? '/' + record.device : record.device }} @@ -88,7 +93,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="ajaxQuery" - @showSizeChange="ajaxQuery" :show-total="(total) => `共${total}条`" /> @@ -135,14 +139,15 @@ ellipsis: true, }, { - title: 'IP', - dataIndex: 'ip', + title: '返回结果', + dataIndex: 'response', ellipsis: true, }, { title: 'IP地区', dataIndex: 'ipRegion', ellipsis: true, + width: 150, }, { title: '客户端', @@ -150,20 +155,15 @@ ellipsis: true, }, { - title: '请求方法', - dataIndex: 'method', - ellipsis: true, - }, - { - title: '请求结果', - dataIndex: 'successFlag', - width: 80, - }, - { - title: '时间', + title: '操作时间', dataIndex: 'createTime', width: 150, }, + { + title: '状态', + dataIndex: 'successFlag', + width: 60, + }, { title: '操作', dataIndex: 'action', @@ -212,6 +212,10 @@ let responseModel = await operateLogApi.queryList(queryForm); for (const e of responseModel.data.list) { + if(e.response){ + e.response = JSON.parse(e.response); + } + if (!e.userAgent) { continue; } diff --git a/smart-admin-web-typescript/src/views/support/serial-number/serial-number-record-list.vue b/smart-admin-web-typescript/src/views/support/serial-number/serial-number-record-list.vue index 51388d89..86acc691 100644 --- a/smart-admin-web-typescript/src/views/support/serial-number/serial-number-record-list.vue +++ b/smart-admin-web-typescript/src/views/support/serial-number/serial-number-record-list.vue @@ -32,7 +32,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="ajaxQuery" - @showSizeChange="ajaxQuery" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-typescript/src/views/system/account/components/login-log/index.vue b/smart-admin-web-typescript/src/views/system/account/components/login-log/index.vue index 921b0038..14478c4b 100644 --- a/smart-admin-web-typescript/src/views/system/account/components/login-log/index.vue +++ b/smart-admin-web-typescript/src/views/system/account/components/login-log/index.vue @@ -63,7 +63,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="ajaxQuery" - @showSizeChange="ajaxQuery" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-typescript/src/views/system/account/components/message/index.vue b/smart-admin-web-typescript/src/views/system/account/components/message/index.vue index c49e5d81..376d3e8a 100644 --- a/smart-admin-web-typescript/src/views/system/account/components/message/index.vue +++ b/smart-admin-web-typescript/src/views/system/account/components/message/index.vue @@ -75,7 +75,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="ajaxQuery" - @showSizeChange="ajaxQuery" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-typescript/src/views/system/account/components/operate-log/index.vue b/smart-admin-web-typescript/src/views/system/account/components/operate-log/index.vue index ce5d991f..b81b2f38 100644 --- a/smart-admin-web-typescript/src/views/system/account/components/operate-log/index.vue +++ b/smart-admin-web-typescript/src/views/system/account/components/operate-log/index.vue @@ -68,7 +68,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="ajaxQuery" - @showSizeChange="ajaxQuery" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-typescript/src/views/system/employee/components/employee-list/index.vue b/smart-admin-web-typescript/src/views/system/employee/components/employee-list/index.vue index 355449e1..08654f88 100644 --- a/smart-admin-web-typescript/src/views/system/employee/components/employee-list/index.vue +++ b/smart-admin-web-typescript/src/views/system/employee/components/employee-list/index.vue @@ -94,7 +94,6 @@ v-model:pageSize="params.pageSize" :total="total" @change="queryEmployee" - @showSizeChange="queryEmployee" :show-total="showTableTotal" /> diff --git a/smart-admin-web-typescript/src/views/system/home/home-header.vue b/smart-admin-web-typescript/src/views/system/home/home-header.vue index 31ffd7d4..2a466d81 100644 --- a/smart-admin-web-typescript/src/views/system/home/home-header.vue +++ b/smart-admin-web-typescript/src/views/system/home/home-header.vue @@ -108,7 +108,7 @@ let lunarMonth = lunar.getMonthInChinese(); let lunarDay = lunar.getDayInChinese(); //节气 - let jieqi = lunar.getPrevJieQi().getName(); + let jieqi = lunar.getJieQi(); let next = lunar.getNextJieQi(); let nextJieqi = next.getName() + ' ' + next.getSolar().toYmd(); diff --git a/smart-admin-web-typescript/src/views/system/position/position-list.vue b/smart-admin-web-typescript/src/views/system/position/position-list.vue index 935a95af..16b41530 100644 --- a/smart-admin-web-typescript/src/views/system/position/position-list.vue +++ b/smart-admin-web-typescript/src/views/system/position/position-list.vue @@ -86,7 +86,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="queryData" - @showSizeChange="queryData" :show-total="(total) => `共${total}条`" /> diff --git a/smart-admin-web-typescript/src/views/system/role/components/role-employee-list/index.vue b/smart-admin-web-typescript/src/views/system/role/components/role-employee-list/index.vue index 39b0442c..7ac4455c 100644 --- a/smart-admin-web-typescript/src/views/system/role/components/role-employee-list/index.vue +++ b/smart-admin-web-typescript/src/views/system/role/components/role-employee-list/index.vue @@ -68,7 +68,6 @@ v-model:pageSize="queryForm.pageSize" :total="total" @change="queryRoleEmployee" - @showSizeChange="queryRoleEmployee" :show-total="showTableTotal" /> diff --git a/sql/smart_admin_v3.sql b/sql/smart_admin_v3.sql index 1bcd4f39..5838fda9 100644 --- a/sql/smart_admin_v3.sql +++ b/sql/smart_admin_v3.sql @@ -777,8 +777,7 @@ CREATE TABLE `t_notice_view_record` ( `last_user_agent` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '最后一次用户设备等标识', `create_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP, `update_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0), - PRIMARY KEY (`notice_id`, `employee_id`) USING BTREE, - UNIQUE INDEX `uk_notice_employee`(`notice_id`, `employee_id`) USING BTREE COMMENT '资讯员工' + PRIMARY KEY (`notice_id`, `employee_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '通知查看记录' ROW_FORMAT = Dynamic; -- ---------------------------- @@ -925,6 +924,7 @@ CREATE TABLE `t_operate_log` ( `url` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '请求路径', `method` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '请求方法', `param` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '请求参数', + `response` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '请求参数', `ip` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '请求ip', `ip_region` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '请求ip地区', `user_agent` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '请求user-agent', @@ -983,9 +983,9 @@ INSERT INTO `t_position`(`position_id`, `position_name`, `position_level`, `sort -- ---------------------------- DROP TABLE IF EXISTS `t_reload_item`; CREATE TABLE `t_reload_item` ( - `tag` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '项名称', + `tag` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '项名称', `args` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数 可选', - `identification` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '运行标识', + `identification` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '运行标识', `update_time` datetime(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0), `create_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`tag`) USING BTREE @@ -1015,14 +1015,14 @@ CREATE TABLE `t_reload_result` ( DROP TABLE IF EXISTS `t_role`; CREATE TABLE `t_role` ( `role_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '主键', - `role_name` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '角色名称', - `role_code` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色编码', - `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色描述', + `role_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色名称', + `role_code` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '角色编码', + `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '角色描述', `update_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '创建时间', `create_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', PRIMARY KEY (`role_id`) USING BTREE, UNIQUE INDEX `role_code_uni`(`role_code`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 59 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色表' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB AUTO_INCREMENT = 59 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of t_role diff --git a/sql/sql-update-log/v3.26.0.sql b/sql/sql-update-log/v3.26.0.sql new file mode 100644 index 00000000..163fdde6 --- /dev/null +++ b/sql/sql-update-log/v3.26.0.sql @@ -0,0 +1,4 @@ +-- ---------------------------- +-- Table structure for t_operate_log +-- ---------------------------- +ALTER TABLE `t_operate_log` ADD COLUMN `response` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '返回结果' AFTER `param` ;