|
|
@@ -1,6 +1,7 @@
|
|
|
package com.usoftchina.saas.commons.controller;
|
|
|
|
|
|
import com.usoftchina.saas.commons.dto.DocBaseDTO;
|
|
|
+import com.usoftchina.saas.commons.po.Operation;
|
|
|
import com.usoftchina.saas.commons.service.MessageLogService;
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
@@ -103,10 +104,11 @@ public class MessageLogController {
|
|
|
* @Date: 2018/10/25
|
|
|
*/
|
|
|
@RequestMapping("/customizeLog")
|
|
|
- public DeferredResult<String> customizeLog(@RequestBody DocBaseDTO baseDTO, @RequestParam("content") String content) {
|
|
|
+ public DeferredResult<String> customizeLog(@RequestBody DocBaseDTO baseDTO, @RequestParam Operation operation) {
|
|
|
// Create the deferredResult and initiate a callback object, task, with it
|
|
|
DeferredResult<String> deferredResult = new DeferredResult<>();
|
|
|
- CompletableFuture.supplyAsync(() -> messageLogService.customizeLog(baseDTO, content))
|
|
|
+ System.out.println(operation.getTitle() + " : " + operation.getResult());
|
|
|
+ CompletableFuture.supplyAsync(() -> messageLogService.customizeLog(baseDTO, operation))
|
|
|
.whenCompleteAsync((result, throwable) -> deferredResult.setResult(result));
|
|
|
return deferredResult;
|
|
|
}
|