|
|
@ -1,11 +1,10 @@ |
|
|
package com.youlai.boot.mini.service.impl; |
|
|
package com.youlai.boot.mini.service.impl; |
|
|
|
|
|
|
|
|
import cn.hutool.core.date.DateUtil; |
|
|
import cn.hutool.core.bean.BeanUtil; |
|
|
import cn.hutool.core.io.FileUtil; |
|
|
import cn.hutool.core.io.FileUtil; |
|
|
import cn.hutool.core.util.IdUtil; |
|
|
import cn.hutool.core.util.StrUtil; |
|
|
import cn.hutool.http.HttpRequest; |
|
|
import cn.hutool.http.HttpRequest; |
|
|
import cn.hutool.http.HttpResponse; |
|
|
import cn.hutool.http.HttpResponse; |
|
|
import cn.hutool.http.HttpUtil; |
|
|
|
|
|
import cn.hutool.json.JSONException; |
|
|
import cn.hutool.json.JSONException; |
|
|
import cn.hutool.json.JSONObject; |
|
|
import cn.hutool.json.JSONObject; |
|
|
import cn.hutool.json.JSONUtil; |
|
|
import cn.hutool.json.JSONUtil; |
|
|
@ -16,7 +15,6 @@ import com.youlai.boot.common.exception.MsgException; |
|
|
import com.youlai.boot.common.util.FileUtils; |
|
|
import com.youlai.boot.common.util.FileUtils; |
|
|
import com.youlai.boot.common.util.JavaVCUtils; |
|
|
import com.youlai.boot.common.util.JavaVCUtils; |
|
|
import com.youlai.boot.common.util.RandomNumberUtils; |
|
|
import com.youlai.boot.common.util.RandomNumberUtils; |
|
|
import com.youlai.boot.file.model.FileInfo; |
|
|
|
|
|
import com.youlai.boot.file.service.FileService; |
|
|
import com.youlai.boot.file.service.FileService; |
|
|
import com.youlai.boot.file.service.impl.AliyunFileService; |
|
|
import com.youlai.boot.file.service.impl.AliyunFileService; |
|
|
import com.youlai.boot.mini.mapper.MiniAiGenerationTaskMapper; |
|
|
import com.youlai.boot.mini.mapper.MiniAiGenerationTaskMapper; |
|
|
@ -24,18 +22,15 @@ import com.youlai.boot.mini.mapper.MiniAiTaskMediaMapper; |
|
|
|
|
|
|
|
|
import com.youlai.boot.mini.model.entity.MiniAiGenerationTask; |
|
|
import com.youlai.boot.mini.model.entity.MiniAiGenerationTask; |
|
|
import com.youlai.boot.mini.model.entity.MiniAiTaskMedia; |
|
|
import com.youlai.boot.mini.model.entity.MiniAiTaskMedia; |
|
|
import com.youlai.boot.mini.model.form.AiFourPanelGenerateForm; |
|
|
import com.youlai.boot.mini.model.form.*; |
|
|
import com.youlai.boot.mini.model.form.AiSingleImageCallbackForm; |
|
|
|
|
|
import com.youlai.boot.mini.model.form.AiSingleImageGenerateForm; |
|
|
|
|
|
import com.youlai.boot.mini.model.form.AiVideoGenerateForm; |
|
|
|
|
|
import com.youlai.boot.mini.model.form.MiniDeductPointForm; |
|
|
|
|
|
import com.youlai.boot.mini.model.vo.AiVideoCallbackVO; |
|
|
import com.youlai.boot.mini.model.vo.AiVideoCallbackVO; |
|
|
import com.youlai.boot.mini.model.form.AiCallbackImage; |
|
|
import com.youlai.boot.mini.model.vo.UserUploadMediaVO; |
|
|
import com.youlai.boot.mini.model.form.AiFourPanelCallbackForm; |
|
|
|
|
|
import com.youlai.boot.mini.service.AiGenerationService; |
|
|
import com.youlai.boot.mini.service.AiGenerationService; |
|
|
import com.youlai.boot.mini.service.MiniPointRecordService; |
|
|
import com.youlai.boot.mini.service.MiniPointRecordService; |
|
|
|
|
|
import com.youlai.boot.mini.service.WxSubscribeService; |
|
|
import lombok.RequiredArgsConstructor; |
|
|
import lombok.RequiredArgsConstructor; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
@ -46,7 +41,11 @@ import java.awt.image.BufferedImage; |
|
|
import java.io.File; |
|
|
import java.io.File; |
|
|
import java.io.InputStream; |
|
|
import java.io.InputStream; |
|
|
import java.net.URL; |
|
|
import java.net.URL; |
|
|
|
|
|
import java.time.LocalDateTime; |
|
|
|
|
|
import java.time.format.DateTimeFormatter; |
|
|
import java.util.*; |
|
|
import java.util.*; |
|
|
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
import java.util.concurrent.CompletableFuture; |
|
|
|
|
|
|
|
|
@Slf4j |
|
|
@Slf4j |
|
|
@Service |
|
|
@Service |
|
|
@ -58,6 +57,7 @@ public class AiGenerationServiceImpl implements AiGenerationService { |
|
|
private final FileService fileService; |
|
|
private final FileService fileService; |
|
|
private final AliyunFileService aliyunFileService; |
|
|
private final AliyunFileService aliyunFileService; |
|
|
private final MiniPointRecordService pointRecordService; |
|
|
private final MiniPointRecordService pointRecordService; |
|
|
|
|
|
private final WxSubscribeService wxSubscribeService; |
|
|
|
|
|
|
|
|
//OSS存储目录配置
|
|
|
//OSS存储目录配置
|
|
|
private static final String OSS_IMAGE_DIR = "ai/image/"; |
|
|
private static final String OSS_IMAGE_DIR = "ai/image/"; |
|
|
@ -91,6 +91,9 @@ public class AiGenerationServiceImpl implements AiGenerationService { |
|
|
@Value("${ai.default.video-model:doubao-seedance-2-0-260128}") |
|
|
@Value("${ai.default.video-model:doubao-seedance-2-0-260128}") |
|
|
private String aiDefaultVideoModel; |
|
|
private String aiDefaultVideoModel; |
|
|
|
|
|
|
|
|
|
|
|
@Value("${subscribe.template}") |
|
|
|
|
|
private String subscribeTemplate; |
|
|
|
|
|
|
|
|
//AI单图生成积分规则编码
|
|
|
//AI单图生成积分规则编码
|
|
|
private static final String AI_GENERATE_SINGLE_IMAGE_RULE = "AI_GENERATE_SINGLE_IMAGE"; |
|
|
private static final String AI_GENERATE_SINGLE_IMAGE_RULE = "AI_GENERATE_SINGLE_IMAGE"; |
|
|
//AI四宫格生成积分规则编码
|
|
|
//AI四宫格生成积分规则编码
|
|
|
@ -478,8 +481,8 @@ public class AiGenerationServiceImpl implements AiGenerationService { |
|
|
String videoTaskUuid = vo.getId(); |
|
|
String videoTaskUuid = vo.getId(); |
|
|
// 根据第三方返回的视频任务uuid查询对应的任务
|
|
|
// 根据第三方返回的视频任务uuid查询对应的任务
|
|
|
MiniAiGenerationTask task = aiGenerationTaskMapper.selectOne(new LambdaQueryWrapper<MiniAiGenerationTask>() |
|
|
MiniAiGenerationTask task = aiGenerationTaskMapper.selectOne(new LambdaQueryWrapper<MiniAiGenerationTask>() |
|
|
.eq(MiniAiGenerationTask::getVideoTaskUuid, videoTaskUuid) |
|
|
.eq(MiniAiGenerationTask::getVideoTaskUuid, videoTaskUuid) |
|
|
.eq(MiniAiGenerationTask::getDeleted, false)); |
|
|
.eq(MiniAiGenerationTask::getDeleted, false)); |
|
|
if (task == null) { |
|
|
if (task == null) { |
|
|
log.error("视频回调任务不存在,第三方视频任务UUID:{}", videoTaskUuid); |
|
|
log.error("视频回调任务不存在,第三方视频任务UUID:{}", videoTaskUuid); |
|
|
return false; |
|
|
return false; |
|
|
@ -515,28 +518,46 @@ public class AiGenerationServiceImpl implements AiGenerationService { |
|
|
MiniAiTaskMedia media = new MiniAiTaskMedia(); |
|
|
MiniAiTaskMedia media = new MiniAiTaskMedia(); |
|
|
String mediaUuid = UUID.randomUUID().toString().replace("-", ""); |
|
|
String mediaUuid = UUID.randomUUID().toString().replace("-", ""); |
|
|
media.setUuid(mediaUuid) |
|
|
media.setUuid(mediaUuid) |
|
|
.setTaskId(task.getId()) |
|
|
.setTaskId(task.getId()) |
|
|
.setMiniUserId(task.getMiniUserId()) |
|
|
.setMiniUserId(task.getMiniUserId()) |
|
|
.setFileSource("ai_generate") |
|
|
.setFileSource("ai_generate") |
|
|
.setMediaType("video") |
|
|
.setMediaType("video") |
|
|
.setSourceUrl(ossUrl) |
|
|
.setSourceUrl(ossUrl) |
|
|
.setDuration(vo.getDuration()) |
|
|
.setDuration(vo.getDuration()) |
|
|
.setCreateBy(task.getCreateBy()) |
|
|
.setCreateBy(task.getCreateBy()) |
|
|
.setCreateTimestamp(System.currentTimeMillis()) |
|
|
.setCreateTimestamp(System.currentTimeMillis()) |
|
|
.setCreateTime(new Date()); |
|
|
.setCreateTime(new Date()); |
|
|
aiTaskMediaMapper.insert(media); |
|
|
aiTaskMediaMapper.insert(media); |
|
|
|
|
|
|
|
|
// 更新用户上传的参考文件:关联当前任务ID并软删除
|
|
|
// 更新用户上传的参考文件:关联当前任务ID并软删除
|
|
|
LambdaUpdateWrapper<MiniAiTaskMedia> updateMediaWrapper = new LambdaUpdateWrapper<>(); |
|
|
LambdaUpdateWrapper<MiniAiTaskMedia> updateMediaWrapper = new LambdaUpdateWrapper<>(); |
|
|
updateMediaWrapper.eq(MiniAiTaskMedia::getMiniUserId, task.getMiniUserId()) |
|
|
updateMediaWrapper.eq(MiniAiTaskMedia::getMiniUserId, task.getMiniUserId()) |
|
|
.isNull(MiniAiTaskMedia::getTaskId) |
|
|
.isNull(MiniAiTaskMedia::getTaskId) |
|
|
.eq(MiniAiTaskMedia::getFileSource, "user_upload") |
|
|
.eq(MiniAiTaskMedia::getFileSource, "user_upload") |
|
|
.eq(MiniAiTaskMedia::getDeleted, false) |
|
|
.eq(MiniAiTaskMedia::getDeleted, false) |
|
|
.set(MiniAiTaskMedia::getTaskId, task.getId()) |
|
|
.set(MiniAiTaskMedia::getTaskId, task.getId()) |
|
|
.set(MiniAiTaskMedia::getDeleted, true) |
|
|
.set(MiniAiTaskMedia::getDeleted, true) |
|
|
.set(MiniAiTaskMedia::getUpdateTime, new Date()) |
|
|
.set(MiniAiTaskMedia::getUpdateTime, new Date()) |
|
|
.set(MiniAiTaskMedia::getUpdateTimestamp, System.currentTimeMillis()); |
|
|
.set(MiniAiTaskMedia::getUpdateTimestamp, System.currentTimeMillis()); |
|
|
aiTaskMediaMapper.update(null, updateMediaWrapper); |
|
|
aiTaskMediaMapper.update(null, updateMediaWrapper); |
|
|
|
|
|
|
|
|
|
|
|
// 同步发送订阅消息通知
|
|
|
|
|
|
if (StrUtil.isNotBlank(subscribeTemplate)) { |
|
|
|
|
|
try { |
|
|
|
|
|
WxSubscribeSendForm sendForm = new WxSubscribeSendForm(); |
|
|
|
|
|
sendForm.setUserId(task.getMiniUserId()); |
|
|
|
|
|
sendForm.setTemplateId(subscribeTemplate); |
|
|
|
|
|
sendForm.setPage("pages/index/index"); |
|
|
|
|
|
sendForm.setTemplateParams(Map.of( |
|
|
|
|
|
"thing1", "您的AI视频作品已完成", |
|
|
|
|
|
"time2", LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm")), |
|
|
|
|
|
"phrase3", "点击查看状态" |
|
|
|
|
|
)); |
|
|
|
|
|
wxSubscribeService.sendMessage(sendForm); |
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
log.error("视频任务{}发送订阅消息失败", task.getId(), e); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
success = true; |
|
|
success = true; |
|
|
@ -603,30 +624,49 @@ public class AiGenerationServiceImpl implements AiGenerationService { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
media.setUuid(mediaUuid) |
|
|
media.setUuid(mediaUuid) |
|
|
.setTaskId(task.getId()) |
|
|
.setTaskId(task.getId()) |
|
|
.setMiniUserId(task.getMiniUserId()) |
|
|
.setMiniUserId(task.getMiniUserId()) |
|
|
.setFileSource("ai_generate") |
|
|
.setFileSource("ai_generate") |
|
|
.setMediaType("image") |
|
|
.setMediaType("image") |
|
|
.setSourceUrl(ossUrl) |
|
|
.setSourceUrl(ossUrl) |
|
|
.setWidth(width) |
|
|
.setWidth(width) |
|
|
.setHeight(height) |
|
|
.setHeight(height) |
|
|
.setCreateBy(task.getCreateBy()) |
|
|
.setCreateBy(task.getCreateBy()) |
|
|
.setCreateTimestamp(System.currentTimeMillis()) |
|
|
.setCreateTimestamp(System.currentTimeMillis()) |
|
|
.setCreateTime(new Date()); |
|
|
.setCreateTime(new Date()); |
|
|
|
|
|
|
|
|
aiTaskMediaMapper.insert(media); |
|
|
aiTaskMediaMapper.insert(media); |
|
|
|
|
|
|
|
|
// 更新用户上传的参考文件:关联当前任务ID并软删除
|
|
|
// 更新用户上传的参考文件:关联当前任务ID并软删除
|
|
|
LambdaUpdateWrapper<MiniAiTaskMedia> updateMediaWrapper = new LambdaUpdateWrapper<>(); |
|
|
LambdaUpdateWrapper<MiniAiTaskMedia> updateMediaWrapper = new LambdaUpdateWrapper<>(); |
|
|
updateMediaWrapper.eq(MiniAiTaskMedia::getMiniUserId, task.getMiniUserId()) |
|
|
updateMediaWrapper.eq(MiniAiTaskMedia::getMiniUserId, task.getMiniUserId()) |
|
|
.isNull(MiniAiTaskMedia::getTaskId) |
|
|
.isNull(MiniAiTaskMedia::getTaskId) |
|
|
.eq(MiniAiTaskMedia::getFileSource, "user_upload") |
|
|
.eq(MiniAiTaskMedia::getFileSource, "user_upload") |
|
|
.eq(MiniAiTaskMedia::getDeleted, false) |
|
|
.eq(MiniAiTaskMedia::getDeleted, false) |
|
|
.set(MiniAiTaskMedia::getTaskId, task.getId()) |
|
|
.set(MiniAiTaskMedia::getTaskId, task.getId()) |
|
|
.set(MiniAiTaskMedia::getDeleted, true) |
|
|
.set(MiniAiTaskMedia::getDeleted, true) |
|
|
.set(MiniAiTaskMedia::getUpdateTime, new Date()) |
|
|
.set(MiniAiTaskMedia::getUpdateTime, new Date()) |
|
|
.set(MiniAiTaskMedia::getUpdateTimestamp, System.currentTimeMillis()); |
|
|
.set(MiniAiTaskMedia::getUpdateTimestamp, System.currentTimeMillis()); |
|
|
aiTaskMediaMapper.update(null, updateMediaWrapper); |
|
|
aiTaskMediaMapper.update(null, updateMediaWrapper); |
|
|
|
|
|
|
|
|
|
|
|
// 同步发送订阅消息通知
|
|
|
|
|
|
if (StrUtil.isNotBlank(subscribeTemplate)) { |
|
|
|
|
|
try { |
|
|
|
|
|
WxSubscribeSendForm sendForm = new WxSubscribeSendForm(); |
|
|
|
|
|
sendForm.setUserId(task.getMiniUserId()); |
|
|
|
|
|
sendForm.setTemplateId(subscribeTemplate); |
|
|
|
|
|
sendForm.setPage("pages/index/index"); |
|
|
|
|
|
// 根据实际模板字段调整参数
|
|
|
|
|
|
sendForm.setTemplateParams(Map.of( |
|
|
|
|
|
"thing1", "您的AI绘画作品已完成", |
|
|
|
|
|
"time2", LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm")), |
|
|
|
|
|
"phrase3", "点击查看状态" |
|
|
|
|
|
)); |
|
|
|
|
|
wxSubscribeService.sendMessage(sendForm); |
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
log.error("单图任务{}发送订阅消息失败", task.getId(), e); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
log.info("四宫格任务{}回调处理完成,状态:{}", taskUuid, status); |
|
|
log.info("四宫格任务{}回调处理完成,状态:{}", taskUuid, status); |
|
|
@ -703,14 +743,33 @@ public class AiGenerationServiceImpl implements AiGenerationService { |
|
|
// 更新用户上传的参考文件:关联当前任务ID并软删除
|
|
|
// 更新用户上传的参考文件:关联当前任务ID并软删除
|
|
|
LambdaUpdateWrapper<MiniAiTaskMedia> updateMediaWrapper = new LambdaUpdateWrapper<>(); |
|
|
LambdaUpdateWrapper<MiniAiTaskMedia> updateMediaWrapper = new LambdaUpdateWrapper<>(); |
|
|
updateMediaWrapper.eq(MiniAiTaskMedia::getMiniUserId, task.getMiniUserId()) |
|
|
updateMediaWrapper.eq(MiniAiTaskMedia::getMiniUserId, task.getMiniUserId()) |
|
|
.isNull(MiniAiTaskMedia::getTaskId) |
|
|
.isNull(MiniAiTaskMedia::getTaskId) |
|
|
.eq(MiniAiTaskMedia::getFileSource, "user_upload") |
|
|
.eq(MiniAiTaskMedia::getFileSource, "user_upload") |
|
|
.eq(MiniAiTaskMedia::getDeleted, false) |
|
|
.eq(MiniAiTaskMedia::getDeleted, false) |
|
|
.set(MiniAiTaskMedia::getTaskId, task.getId()) |
|
|
.set(MiniAiTaskMedia::getTaskId, task.getId()) |
|
|
.set(MiniAiTaskMedia::getDeleted, true) |
|
|
.set(MiniAiTaskMedia::getDeleted, true) |
|
|
.set(MiniAiTaskMedia::getUpdateTime, new Date()) |
|
|
.set(MiniAiTaskMedia::getUpdateTime, new Date()) |
|
|
.set(MiniAiTaskMedia::getUpdateTimestamp, System.currentTimeMillis()); |
|
|
.set(MiniAiTaskMedia::getUpdateTimestamp, System.currentTimeMillis()); |
|
|
aiTaskMediaMapper.update(null, updateMediaWrapper); |
|
|
aiTaskMediaMapper.update(null, updateMediaWrapper); |
|
|
|
|
|
|
|
|
|
|
|
// 同步发送订阅消息通知
|
|
|
|
|
|
if (StrUtil.isNotBlank(subscribeTemplate)) { |
|
|
|
|
|
try { |
|
|
|
|
|
WxSubscribeSendForm sendForm = new WxSubscribeSendForm(); |
|
|
|
|
|
sendForm.setUserId(task.getMiniUserId()); |
|
|
|
|
|
sendForm.setTemplateId(subscribeTemplate); |
|
|
|
|
|
sendForm.setPage("pages/index/index"); |
|
|
|
|
|
// 根据实际模板字段调整参数
|
|
|
|
|
|
sendForm.setTemplateParams(Map.of( |
|
|
|
|
|
"thing1", "您的AI绘画作品已完成", |
|
|
|
|
|
"time2", LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm")), |
|
|
|
|
|
"phrase3", "点击查看状态" |
|
|
|
|
|
)); |
|
|
|
|
|
wxSubscribeService.sendMessage(sendForm); |
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
log.error("单图任务{}发送订阅消息失败", task.getId(), e); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 更新任务状态
|
|
|
// 更新任务状态
|
|
|
@ -793,4 +852,48 @@ public class AiGenerationServiceImpl implements AiGenerationService { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public List<UserUploadMediaVO> getRecentUploadVO(Long userId) { |
|
|
|
|
|
List<MiniAiTaskMedia> mediaList = aiTaskMediaMapper.selectList(new LambdaQueryWrapper<MiniAiTaskMedia>() |
|
|
|
|
|
.eq(MiniAiTaskMedia::getMiniUserId, userId) |
|
|
|
|
|
.eq(MiniAiTaskMedia::getFileSource, "user_upload") |
|
|
|
|
|
.eq(MiniAiTaskMedia::getDeleted, false) |
|
|
|
|
|
.orderByDesc(MiniAiTaskMedia::getCreateTime) |
|
|
|
|
|
.last("limit 20")); |
|
|
|
|
|
|
|
|
|
|
|
if (mediaList == null || mediaList.isEmpty()) { |
|
|
|
|
|
return Collections.emptyList(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return mediaList.stream() |
|
|
|
|
|
.map(this::convertToVO) |
|
|
|
|
|
.toList(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private UserUploadMediaVO convertToVO(MiniAiTaskMedia media) { |
|
|
|
|
|
UserUploadMediaVO vo = new UserUploadMediaVO(); |
|
|
|
|
|
BeanUtil.copyProperties(media, vo); |
|
|
|
|
|
return vo; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public boolean deleteUploadMedia(Long userId, String uuid) { |
|
|
|
|
|
// 校验是否是当前用户的上传媒体
|
|
|
|
|
|
MiniAiTaskMedia media = aiTaskMediaMapper.selectOne(new LambdaQueryWrapper<MiniAiTaskMedia>() |
|
|
|
|
|
.eq(MiniAiTaskMedia::getUuid, uuid) |
|
|
|
|
|
.eq(MiniAiTaskMedia::getMiniUserId, userId) |
|
|
|
|
|
.eq(MiniAiTaskMedia::getFileSource, "user_upload") |
|
|
|
|
|
.eq(MiniAiTaskMedia::getDeleted, false) |
|
|
|
|
|
.last("limit 1")); |
|
|
|
|
|
if (media == null) { |
|
|
|
|
|
log.warn("用户{}删除媒体失败,媒体{}不存在或无权限", userId, uuid); |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
// 软删除
|
|
|
|
|
|
media.setDeleted(true); |
|
|
|
|
|
media.setUpdateTime(new Date()); |
|
|
|
|
|
media.setUpdateTimestamp(System.currentTimeMillis()); |
|
|
|
|
|
return aiTaskMediaMapper.updateById(media) > 0; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|