| | |
| | | import io.swagger.annotations.Api; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.NoTransactionException; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | @Transactional |
| | | @PostMapping("/asyncPacs") |
| | | public AjaxResult asyncPacs(@RequestBody String json) { |
| | | try { |
| | | log.info("合并检测同步参数 ->{}",json); |
| | | // try { |
| | | // Thread.sleep(2000); |
| | |
| | | } |
| | | return AjaxResult.success(); |
| | | } |
| | | } catch (NoTransactionException e) { |
| | | log.error(String.valueOf(e)); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return AjaxResult.error("同步失败请重试"); |
| | | } |
| | | |
| | | } |
| | | |