Explorar o código

Merge remote-tracking branch 'origin/On-Premises/v1.0.0' into On-Premises/v1.0.0

tangxiangan hai 10 meses
pai
achega
ead4ab57ff

+ 2 - 2
pdf-tech-core/src/main/java/cn/kdan/pdf/tech/core/controller/VppKeyFileController.java

@@ -22,8 +22,8 @@ public class VppKeyFileController {
     private final VppKeyFileService vppKeyFileService;
 
     @PostMapping("/parseKeyFile")
-    public ResultMap<Void> parseKeyFile(MultipartFile keyFile, boolean updateOrInit) {
-        vppKeyFileService.parseKeyFile(keyFile, updateOrInit);
+    public ResultMap<Void> parseKeyFile(MultipartFile keyFile) {
+        vppKeyFileService.parseKeyFile(keyFile);
         return new ResultMap<>(CommonConstant.SUCCESS, CommonConstant.RESULT_SUCCESS);
     }
 

+ 1 - 2
pdf-tech-core/src/main/java/cn/kdan/pdf/tech/core/service/VppKeyFileService.java

@@ -11,9 +11,8 @@ public interface VppKeyFileService {
      * 上传密钥文件
      *
      * @param keyFile 密钥文件
-     * @param updateOrInit 是否更新或初始化 更新:true, 初始化:false
      */
-    void parseKeyFile(MultipartFile keyFile, boolean updateOrInit);
+    void parseKeyFile(MultipartFile keyFile);
 
     /**
      * 判断是更新还是初始化

+ 3 - 1
pdf-tech-core/src/main/java/cn/kdan/pdf/tech/core/service/impl/VppKeyFileServiceImpl.java

@@ -30,7 +30,9 @@ public class VppKeyFileServiceImpl implements VppKeyFileService {
 
     @Transactional
     @Override
-    public void parseKeyFile(MultipartFile keyFile, boolean updateOrInit) {
+    public void parseKeyFile(MultipartFile keyFile) {
+        boolean updateOrInit = updateOrInit();
+
         KeyFileParseUtils.FileContent fileContent;
         try (InputStream inputStream = keyFile.getInputStream()) {
             fileContent = KeyFileParseUtils.parseKeyFile(inputStream, updateOrInit);