Bladeren bron

生成对账单接口

24282 1 jaar geleden
bovenliggende
commit
0f0bd977b5

+ 15 - 0
sd-wln/src/main/java/com/sd/wln/controller/OrderHandleController.java

@@ -2,6 +2,7 @@ package com.sd.wln.controller;
 
 import com.sd.wln.entity.ResynchronizationDto;
 import com.sd.wln.service.OrderHandleService;
+import com.sd.wln.service.WlnStatementOfAccount;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -15,10 +16,24 @@ public class OrderHandleController {
     @Autowired
     private OrderHandleService orderHandleService;
 
+    @Autowired
+    private WlnStatementOfAccount wlnStatementOfAccount;
+
+    /**
+     * 重新同步订单
+     */
     @PostMapping("/resynchronization")
     public void resynchronization(@RequestBody ResynchronizationDto dto) {
         orderHandleService.resynchronization(dto);
     }
 
+    /**
+     * 生成对账单
+     */
+    @PostMapping("/createStatementOfAccount")
+    public void createStatementOfAccount() {
+        wlnStatementOfAccount.createStatementOfAccount();
+    }
+
 
 }

+ 1 - 1
sd-wln/src/main/java/com/sd/wln/service/impl/WlnStatementOfAccountImpl.java

@@ -42,7 +42,7 @@ public class WlnStatementOfAccountImpl implements WlnStatementOfAccount {
 
     @Transactional(rollbackFor = Exception.class)
     @Override
-    public void createStatementOfAccount() {
+    public synchronized void createStatementOfAccount() {
 
         List<StatementOfAccount> saveStatementOfAccountList = new ArrayList<>();
         List<OrderInfo> editOrderInfoList = new ArrayList<>();