|
|
@@ -222,7 +222,14 @@ public class XxlJobServiceImpl implements XxlJobService {
|
|
|
String[] childJobIds = jobInfo.getChildJobId().split(",");
|
|
|
for (String childJobIdItem: childJobIds) {
|
|
|
if (childJobIdItem!=null && childJobIdItem.trim().length()>0 && isNumeric(childJobIdItem)) {
|
|
|
- XxlJobInfo childJobInfo = xxlJobInfoDao.loadById(Integer.parseInt(childJobIdItem));
|
|
|
+ // parse child
|
|
|
+ int childJobId = Integer.parseInt(childJobIdItem);
|
|
|
+ if (childJobId == jobInfo.getId()) {
|
|
|
+ return new ReturnT<String>(ReturnT.FAIL_CODE, (I18nUtil.getString("jobinfo_field_childJobId")+"("+childJobId+")"+I18nUtil.getString("system_unvalid")) );
|
|
|
+ }
|
|
|
+
|
|
|
+ // valid child
|
|
|
+ XxlJobInfo childJobInfo = xxlJobInfoDao.loadById(childJobId);
|
|
|
if (childJobInfo==null) {
|
|
|
return new ReturnT<String>(ReturnT.FAIL_CODE,
|
|
|
MessageFormat.format((I18nUtil.getString("jobinfo_field_childJobId")+"({0})"+I18nUtil.getString("system_not_found")), childJobIdItem));
|