TASK:motion生成完成后邮件通知
This commit is contained in:
@@ -5,9 +5,11 @@ import com.ai.da.common.utils.DateUtil;
|
||||
import com.ai.da.mapper.primary.PoseTransformationMapper;
|
||||
import com.ai.da.mapper.primary.ToProductImageResultMapper;
|
||||
import com.ai.da.mapper.primary.entity.*;
|
||||
import com.ai.da.model.vo.PoseTransformationVO;
|
||||
import com.ai.da.service.APIGenerateService;
|
||||
import com.ai.da.service.CreditsService;
|
||||
import com.ai.da.service.GenerateService;
|
||||
import com.ai.da.service.MessageCenterService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import io.netty.util.internal.StringUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -31,6 +33,8 @@ public class GenerateTask {
|
||||
@Resource
|
||||
private GenerateService generateService;
|
||||
@Resource
|
||||
private MessageCenterService messageCenterService;
|
||||
@Resource
|
||||
private ToProductImageResultMapper toProductImageResultMapper;
|
||||
@Resource
|
||||
private PoseTransformationMapper poseTransformationMapper;
|
||||
@@ -99,7 +103,7 @@ public class GenerateTask {
|
||||
}
|
||||
|
||||
// 万相 -> pose transformation 补偿 一小时执行一次
|
||||
@Scheduled(fixedDelay = 60 * 60 * 1000)
|
||||
@Scheduled(fixedDelay = 5 * 60 * 1000)
|
||||
public void wxCompensationMechanism(){
|
||||
List<APIGenerate> apiGenerates = apiGenerateService.getPendingTaskByStatus("wx");
|
||||
if (apiGenerates != null && !apiGenerates.isEmpty()){
|
||||
@@ -132,6 +136,15 @@ public class GenerateTask {
|
||||
}
|
||||
}
|
||||
|
||||
public void sendSysMsgToUser(Long accountId, String content){
|
||||
Notification notification = new Notification();
|
||||
notification.setType("system");
|
||||
notification.setReceiverId(accountId);
|
||||
notification.setContent(content);
|
||||
|
||||
messageCenterService.prePushMessage(notification);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user