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