|
|
@@ -471,7 +471,7 @@ public class UserService {
|
|
|
|
|
|
public String shareImg(Long userId) throws IOException, WxErrorException {
|
|
|
User user = userRepo.findById(userId).orElseThrow(new BusinessException("用户不存在"));
|
|
|
- if (!(StringUtils.isNotEmpty(user.getShareImg()) && user.getShareImg().contains("/v1/"))) {
|
|
|
+ if (!(StringUtils.isNotEmpty(user.getShareImg()) && user.getShareImg().contains("/v2/"))) {
|
|
|
String url = createShareImg(userId);
|
|
|
user.setShareImg(url);
|
|
|
userRepo.save(user);
|
|
|
@@ -521,6 +521,6 @@ public class UserService {
|
|
|
.outputFormat("jpg")
|
|
|
.toOutputStream(out);
|
|
|
ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
|
|
|
- return storageService.uploadFromInputStream(in, "share_img/v1/" + userId + ".jpg");
|
|
|
+ return storageService.uploadFromInputStream(in, "share_img/v2/" + userId + ".jpg");
|
|
|
}
|
|
|
}
|