Просмотр исходного кода

下载人脸的URL上加上时间戳

xiari 10 месяцев назад
Родитель
Сommit
f02fba12a8

+ 3 - 2
ruoyi-modules/ruoyi-backstage/src/main/java/org/dromara/backstage/payment/service/impl/PtUserAccountServiceImpl.java

@@ -653,7 +653,8 @@ public class PtUserAccountServiceImpl implements IPtUserAccountService {
                 ptCardVo = first.get();
             }
             userAccount.setCard(ptCardVo);
-            userAccount.setFacePicUrl(photoPrefix + userAccount.getPhoto());
+            // 加个时间戳,下载最新文件
+            userAccount.setFacePicUrl(photoPrefix + userAccount.getPhoto()+"?t="+System.currentTimeMillis());
 
             res.add(userAccount);
         }
@@ -677,7 +678,7 @@ public class PtUserAccountServiceImpl implements IPtUserAccountService {
             .between(PtUserAccount::getUpdateTime, startDate, date);
         List<PtUserAccountVo> userAccountVos = baseMapper.selectVoList(between);
         List<PtUserAccountVo> updatePhotos = userAccountVos.stream().filter(e -> StringUtils.isNotBlank(e.getPhoto())).toList();
-        updatePhotos.forEach(e -> e.setFacePicUrl(photoPrefix + e.getPhoto()));
+        updatePhotos.forEach(e -> e.setFacePicUrl(photoPrefix + e.getPhoto() +"?t="+System.currentTimeMillis()));
 
         List<PtUserAccountVo> rs = new ArrayList<>(updatePhotos);