Browse Source

insert方法更换

wangpenghui 10 months ago
parent
commit
1c0873c130

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

@@ -1,11 +1,13 @@
 package cn.kdan.pdf.tech.core.controller;
 
 import cn.kdan.pdf.tech.core.service.VppKeyFileService;
+import constant.CommonConstant;
 import lombok.RequiredArgsConstructor;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.multipart.MultipartFile;
+import pojo.ResultMap;
 
 /**
  * @author ComPDFKit-WPH 2024/1/2
@@ -20,8 +22,9 @@ public class VppKeyFileController {
     private final VppKeyFileService vppKeyFileService;
 
     @PostMapping("/parseKeyFile")
-    public void parseKeyFile(MultipartFile keyFile, boolean updateOrInit) {
+    public ResultMap<Void> parseKeyFile(MultipartFile keyFile, boolean updateOrInit) {
         vppKeyFileService.parseKeyFile(keyFile, updateOrInit);
+        return new ResultMap<>(CommonConstant.SUCCESS, CommonConstant.RESULT_SUCCESS);
     }
 
 }

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

@@ -20,6 +20,6 @@ public class OrderServiceImpl implements OrderService {
 
     @Override
     public void insert(Orders order) {
-        orderMapper.insert(order);
+        orderMapper.insertSelective(order);
     }
 }

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

@@ -108,7 +108,7 @@ public class SubscriptionServiceImpl implements SubscriptionService {
 
     @Override
     public void insert(Subscriptions subscription) {
-        vppSubscriptionMapper.insert(subscription);
+        vppSubscriptionMapper.insertSelective(subscription);
     }
 
     @Override