|
@@ -162,7 +162,7 @@ public class AdMuseTaskServiceImpl implements AdMuseTaskService {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- public String getStitchUrl(String url, String caption) {
|
|
|
+ public String getStitchUrl(String url, String subtitle) {
|
|
|
if (StringUtils.isEmpty(url)) {
|
|
|
return null;
|
|
|
}
|
|
@@ -170,7 +170,7 @@ public class AdMuseTaskServiceImpl implements AdMuseTaskService {
|
|
|
ImageParam imageParam = new ImageParam();
|
|
|
imageParam.setFont(new Font("微软雅黑", Font.PLAIN, 48));
|
|
|
imageParam.setColor(new Color(102, 102, 102));
|
|
|
- imageParam.setText(caption);
|
|
|
+ imageParam.setText(subtitle);
|
|
|
return ImageUtils.writeImageFromUrl(url, targetImgPath, imageParam);
|
|
|
}
|
|
|
|
|
@@ -263,10 +263,10 @@ public class AdMuseTaskServiceImpl implements AdMuseTaskService {
|
|
|
}
|
|
|
String url = OSSUploader.uploadToOSS(path);
|
|
|
if (StringUtils.isNotEmpty(url)) {
|
|
|
- AdMuseTask updateAdMuseTask = new AdMuseTask();
|
|
|
- updateAdMuseTask.setId(id);
|
|
|
- updateAdMuseTask.setFinalUrl(url);
|
|
|
- adMuseTaskMapper.updateByPrimaryKeySelective(updateAdMuseTask);
|
|
|
+ AdMuseImage updateAdMuseImage = new AdMuseImage();
|
|
|
+ updateAdMuseImage.setId(id);
|
|
|
+ updateAdMuseImage.setFinalUrl(url);
|
|
|
+ adMuseImageMapper.updateByPrimaryKeySelective(updateAdMuseImage);
|
|
|
return CommonResponse.success();
|
|
|
}
|
|
|
return CommonResponse.create(ExceptionCodeEnum.SYS_ERROR.getCode(), "系统异常,上传失败");
|