فهرست منبع

bugfix:中台评价申诉

刘云鑫 2 روز پیش
والد
کامیت
645a29a39d
1فایلهای تغییر یافته به همراه10 افزوده شده و 1 حذف شده
  1. 10 1
      alien-store/src/main/java/shop/alien/store/service/impl/LicenseAuditAsyncService.java

+ 10 - 1
alien-store/src/main/java/shop/alien/store/service/impl/LicenseAuditAsyncService.java

@@ -7,7 +7,10 @@ import com.baomidou.mybatisplus.core.toolkit.StringUtils;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Value;
-import org.springframework.http.*;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
 import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
 import org.springframework.scheduling.annotation.Async;
 import org.springframework.stereotype.Service;
@@ -21,6 +24,8 @@ import shop.alien.mapper.storePlantform.StoreLicenseHistoryMapper;
 import shop.alien.store.util.ai.AiAuthTokenUtil;
 
 import java.text.SimpleDateFormat;
+import java.time.LocalDateTime;
+import java.time.ZoneId;
 import java.util.*;
 
 /**
@@ -121,6 +126,8 @@ public class LicenseAuditAsyncService {
             Integer remainingDays = (Integer) dataMap.get("remaining_days");
             String reason = (String) dataMap.get("reason");
             String licenseType = (String) dataMap.get("license_type");
+            String auditTime = (String) dataMap.get("audit_time");
+            Date reviewDate = Date.from(LocalDateTime.parse(auditTime).atZone(ZoneId.systemDefault()).toInstant());
 
             String licenseTypeName = licenseStatus == 1 ? "营业执照" : "其他资质证明";
             log.info("{}证照审核结果,门店ID:{},图片URL:{},is_valid={},expiry_date={},is_expired={},remaining_days={},license_type={}",
@@ -268,6 +275,7 @@ public class LicenseAuditAsyncService {
                     storeInfoMapper.update(null, new LambdaUpdateWrapper<StoreInfo>()
                             .eq(StoreInfo::getId, storeId)
                             .set(StoreInfo::getBusinessLicenseStatus, 3)
+                            .set(StoreInfo::getReviewDate, reviewDate)
                             .set(StoreInfo::getBusinessLicenseReason, rejectReason)
                     );
                     // 审核拒绝时,不需要操作store_img表
@@ -281,6 +289,7 @@ public class LicenseAuditAsyncService {
                     storeInfoMapper.update(null, new LambdaUpdateWrapper<StoreInfo>()
                             .eq(StoreInfo::getId, storeId)
                             .set(StoreInfo::getBusinessLicenseStatus, 1)
+                            .set(StoreInfo::getReviewDate,reviewDate)
                             .set(StoreInfo::getUpdateBusinessLicenseTime, new Date())
                     );