From 93414e8ee25852aca467213402585d0e65c08a4a Mon Sep 17 00:00:00 2001
From: wenminjie <1036699586@qq.com>
Date: 星期二, 04 八月 2026 16:15:20 +0800
Subject: [PATCH] 二期后端

---
 talent-card-server/src/main/java/com/talentcard/server/service/ServiceAppointmentApplicationService.java |   20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/talent-card-server/src/main/java/com/talentcard/server/service/ServiceAppointmentApplicationService.java b/talent-card-server/src/main/java/com/talentcard/server/service/ServiceAppointmentApplicationService.java
index 82a1972..4db741c 100644
--- a/talent-card-server/src/main/java/com/talentcard/server/service/ServiceAppointmentApplicationService.java
+++ b/talent-card-server/src/main/java/com/talentcard/server/service/ServiceAppointmentApplicationService.java
@@ -19,8 +19,10 @@
 import com.talentcard.server.common.SensitiveDataCrypto;
 import com.talentcard.server.entity.ChildInformation;
 import com.talentcard.server.entity.ServiceApplication;
+import com.talentcard.server.entity.ServiceApplicationOperationLog;
 import com.talentcard.server.mapper.ChildInformationMapper;
 import com.talentcard.server.mapper.ServiceApplicationMapper;
+import com.talentcard.server.mapper.ServiceApplicationOperationLogMapper;
 import org.springframework.dao.DuplicateKeyException;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -35,15 +37,18 @@
 
     private final ServiceApplicationMapper applicationMapper;
     private final ChildInformationMapper childInformationMapper;
+    private final ServiceApplicationOperationLogMapper operationLogMapper;
     private final SensitiveDataCrypto sensitiveDataCrypto;
 
     public ServiceAppointmentApplicationService(
             ServiceApplicationMapper applicationMapper,
             ChildInformationMapper childInformationMapper,
+            ServiceApplicationOperationLogMapper operationLogMapper,
             SensitiveDataCrypto sensitiveDataCrypto
     ) {
         this.applicationMapper = applicationMapper;
         this.childInformationMapper = childInformationMapper;
+        this.operationLogMapper = operationLogMapper;
         this.sensitiveDataCrypto = sensitiveDataCrypto;
     }
 
@@ -80,6 +85,19 @@
         ServiceApplication saved = applicationMapper.selectById(application.getId());
         if (saved == null) {
             throw new BusinessException(ErrorCode.INTERNAL_ERROR, "预约申请保存失败");
+        }
+        ServiceApplicationOperationLog log = new ServiceApplicationOperationLog();
+        log.setApplicationId(saved.getId());
+        log.setApplicationNo(saved.getApplicationNo());
+        log.setOperationType("SUBMIT");
+        log.setAfterStatus(saved.getStatus());
+        log.setOperatorType("TALENT");
+        log.setOperatorId(saved.getTalentId());
+        log.setOperatorName(saved.getTalentName());
+        log.setRemark("提交预约申请");
+        log.setCreatedAt(saved.getSubmittedAt());
+        if (operationLogMapper.insert(log) != 1) {
+            throw new BusinessException(ErrorCode.INTERNAL_ERROR, "预约申请操作日志保存失败");
         }
         return appResult(saved);
     }
@@ -580,4 +598,4 @@
     private String clean(String value) {
         return value == null ? "" : value.trim();
     }
-}
\ No newline at end of file
+}

--
Gitblit v1.7.1