Sfoglia il codice sorgente

云端录制,未完成

zouxuan 3 anni fa
parent
commit
929d3726e6

+ 2 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupPaymentCalenderServiceImpl.java

@@ -247,10 +247,10 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
             throw new BizException("创建缴费失败:已存在缴费项目");
         }
         // 所有缴费项目已完成排课才能创建下一个缴费项目
-        /*String orignBatchNo = musicGroupPaymentStudentCourseDetailDao.getUnUseBatchNoWithStudentAndCourseTypeAndCourseMinutes(musicGroupId, null, null, null);
+        String orignBatchNo = musicGroupPaymentStudentCourseDetailDao.getUnUseBatchNoWithStudentAndCourseTypeAndCourseMinutes(musicGroupId, null, null, null);
         if (StringUtils.isNoneBlank(orignBatchNo)) {
             throw new BizException("当前乐团存在未排课的缴费项目,请先完成排课再操作");
-        }*/
+        }
 
         // 不是进行中,只能创建一次缴费
         if (musicGroup.getStatus() != MusicGroupStatusEnum.PROGRESS) {

+ 5 - 3
mec-common/audit-log/src/main/java/com/yonge/log/interceptor/AuditLogInterceptor.java

@@ -26,6 +26,7 @@ import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 import java.util.Map;
+import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.Executor;
 import java.util.concurrent.ThreadPoolExecutor;
 
@@ -82,11 +83,12 @@ public class AuditLogInterceptor extends HandlerInterceptorAdapter {
 
     @Override
     public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) {
-        syncSaveLog(request, handler);
+        CompletableFuture.runAsync(() -> {
+            syncSaveLog(request, handler);
+        });
     }
 
-    @Async("syncSaveLog")
-    public void syncSaveLog(HttpServletRequest request, Object handler) {
+    public synchronized void syncSaveLog(HttpServletRequest request, Object handler) {
         try {
             String servletPath = request.getServletPath();
             HandlerMethod handlerMethod = (HandlerMethod) handler;