feat: 解决商城用户下单时无法创建定时任务的问题

This commit is contained in:
weizhiqiang 2024-12-04 20:11:08 +08:00
parent c9c723f043
commit 2f7990cc87

View file

@ -4,6 +4,7 @@
package com.skyeye.eve.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.fastjson.JSON;
import com.skyeye.common.client.ExecuteFeignClient;
import com.skyeye.common.constans.QuartzConstants;
@ -62,7 +63,11 @@ public class SysQuartzServiceImpl implements SysQuartzService {
private XxlJobInfo getXxlJobInfo(String objectId, String groupId, String delayedTime, String jobDesc, String taskType, String userId) {
XxlJobInfo xxlJobInfo = new XxlJobInfo();
Map<String, Object> user = iAuthUserService.queryDataMationById(userId);
xxlJobInfo.setAuthor(user.get("name").toString());
String author = "商城用户";
if (CollectionUtil.isNotEmpty(user)) {
author = user.get("name").toString();
}
xxlJobInfo.setAuthor(author);
xxlJobInfo.setJobGroup(Integer.parseInt(groupId));
xxlJobInfo.setJobDesc(QuartzConstants.QuartzMateMationJobType.getRemarkPrefixByTaskType(taskType, jobDesc));
xxlJobInfo.setScheduleType("CRON");