diff --git a/chsm-web-manage/pom.xml b/chsm-web-manage/pom.xml
index 9839df1..04984ec 100644
--- a/chsm-web-manage/pom.xml
+++ b/chsm-web-manage/pom.xml
@@ -92,7 +92,7 @@
net.java.dev.jna
jna
- 4.5.2
+ 5.5.0
io.swagger
diff --git a/chsm-web-manage/src/main/java/com/sunyard/chsm/dto/KeyTemplateDTO.java b/chsm-web-manage/src/main/java/com/sunyard/chsm/dto/KeyTemplateDTO.java
index 02152b3..4a013d6 100644
--- a/chsm-web-manage/src/main/java/com/sunyard/chsm/dto/KeyTemplateDTO.java
+++ b/chsm-web-manage/src/main/java/com/sunyard/chsm/dto/KeyTemplateDTO.java
@@ -21,7 +21,7 @@ public abstract class KeyTemplateDTO {
public static class Query extends PageQuery {
/**
* 密钥类型
- * @see com.sunyard.ssp.web.enums.KeyCategory#getCode()
+ * @see com.sunyard.chsm.enums.KeyCategory#getCode()
*/
private String keyType;
}
@@ -63,24 +63,23 @@ public abstract class KeyTemplateDTO {
private String name;
/**
* 密钥类型
- * @see com.sunyard.ssp.web.enums.KeyCategory#getCode()
+ * @see com.sunyard.chsm.enums.KeyCategory#getCode()
*/
@NotBlank(message = "密钥类型不能为空")
private String keyType;
/**
* 密钥算法
- * @see com.sunyard.ssp.web.enums.KeyAlg#getCode()
+ * @see com.sunyard.chsm.enums.KeyAlg#getCode()
*/
@NotBlank(message = "密钥算法不能为空")
private String keyAlg;
/**
* 密钥长度
*/
- @NotNull(message = "密钥长度不能为空")
private Integer keyLength;
/**
* 密钥用途
- * @see com.sunyard.ssp.web.enums.KeyUsage#getCode()
+ * @see com.sunyard.chsm.enums.KeyUsage#getCode()
*/
@NotEmpty(message = "密钥用途不能为空")
private List keyUsages;
diff --git a/chsm-web-manage/src/main/java/com/sunyard/config/MyBatisConfig.java b/chsm-web-manage/src/main/java/com/sunyard/config/MyBatisConfig.java
index ee71d4f..962b3fd 100644
--- a/chsm-web-manage/src/main/java/com/sunyard/config/MyBatisConfig.java
+++ b/chsm-web-manage/src/main/java/com/sunyard/config/MyBatisConfig.java
@@ -1,12 +1,18 @@
package com.sunyard.config;
+import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
+import org.apache.ibatis.mapping.DatabaseIdProvider;
+import org.apache.ibatis.mapping.VendorDatabaseIdProvider;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
+import javax.sql.DataSource;
+import java.util.Properties;
+
/**
* @author liulu
* @since 2024/10/28
@@ -27,4 +33,24 @@ public class MyBatisConfig {
return interceptor;
}
+ @Bean
+ public DatabaseIdProvider databaseIdProvider() {
+ VendorDatabaseIdProvider databaseIdProvider = new VendorDatabaseIdProvider(){
+ @Override
+ public String getDatabaseId(DataSource dataSource) {
+ String databaseId = super.getDatabaseId(dataSource);
+ if (StrUtil.isBlank(databaseId)){
+ throw new NullPointerException("多数据库标识为空,请检查数据库连接情况");
+ }
+ return databaseId;
+ }
+ };
+ Properties properties = new Properties();
+ properties.put("Oracle","oracle");
+ properties.put("MySQL","mysql");
+ properties.put("DM","dm");
+ databaseIdProvider.setProperties(properties);
+ return databaseIdProvider;
+ }
+
}
diff --git a/chsm-web-manage/src/main/java/com/sunyard/ssp/modules/common/CaptchaController.java b/chsm-web-manage/src/main/java/com/sunyard/ssp/modules/common/CaptchaController.java
new file mode 100644
index 0000000..c031f6e
--- /dev/null
+++ b/chsm-web-manage/src/main/java/com/sunyard/ssp/modules/common/CaptchaController.java
@@ -0,0 +1,60 @@
+package com.sunyard.ssp.modules.common;
+
+import com.sunyard.ssp.common.Result;
+import com.sunyard.ssp.common.vo.Captcha;
+import com.sunyard.ssp.utils.CreateVerifyCode;
+import com.sunyard.ssp.utils.ResultUtil;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.StringRedisTemplate;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.UUID;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * @author Exrickx
+ */
+@Api(description = "验证码接口")
+@RequestMapping("/common/captcha")
+@RestController
+@Transactional
+@Slf4j
+public class CaptchaController {
+
+ @Autowired
+ private StringRedisTemplate redisTemplate;
+
+ @RequestMapping(value = "/init",method = RequestMethod.GET)
+ @ApiOperation(value = "初始化验证码")
+ public Result