|
|
@@ -247,6 +247,17 @@ public class LicenseAuditAsyncService {
|
|
|
}
|
|
|
log.info("{}AI审核通过,门店ID:{},图片URL:{}", licenseTypeName, storeId, imageUrl);
|
|
|
|
|
|
+ // 审核通过后,先清除旧的其他资质证明图片(不在当前批次中的)
|
|
|
+ String[] currentBatchUrls = currentHistory.getImgUrl().split(",");
|
|
|
+ LambdaUpdateWrapper<StoreImg> cleanOldWrapper = new LambdaUpdateWrapper<>();
|
|
|
+ cleanOldWrapper.eq(StoreImg::getStoreId, storeId)
|
|
|
+ .eq(StoreImg::getImgType, 35)
|
|
|
+ .eq(StoreImg::getDeleteFlag, 0)
|
|
|
+ .notIn(StoreImg::getImgUrl, Arrays.asList(currentBatchUrls))
|
|
|
+ .set(StoreImg::getDeleteFlag, 1);
|
|
|
+ storeImgMapper.update(null, cleanOldWrapper);
|
|
|
+ log.info("其他资质证明审核通过,已清除旧图片,门店ID:{}", storeId);
|
|
|
+
|
|
|
// 审核通过后,插入store_img表(检查是否已存在,避免重复插入)
|
|
|
StoreImg existingImg = storeImgMapper.selectOne(
|
|
|
new LambdaQueryWrapper<StoreImg>()
|