ソースを参照

update document

xuxueli 5 年 前
コミット
c35c23d75a

+ 22 - 6
xxl-job-admin/src/main/java/com/xxl/job/admin/service/impl/XxlJobServiceImpl.java ファイルの表示

@@ -91,9 +91,8 @@ public class XxlJobServiceImpl implements XxlJobService {
91 91
 		}
92 92
 
93 93
 		// ChildJobId valid
94
-        String childJobId = jobInfo.getChildJobId();
95
-        if (childJobId !=null && childJobId.trim().length()>0) {
96
-			String[] childJobIds = childJobId.split(",");
94
+        if (jobInfo.getChildJobId()!=null && jobInfo.getChildJobId().trim().length()>0) {
95
+			String[] childJobIds = jobInfo.getChildJobId().split(",");
97 96
 			for (String childJobIdItem: childJobIds) {
98 97
 				if (childJobIdItem!=null && childJobIdItem.trim().length()>0 && isNumeric(childJobIdItem)) {
99 98
 					XxlJobInfo childJobInfo = xxlJobInfoDao.loadById(Integer.parseInt(childJobIdItem));
@@ -106,6 +105,15 @@ public class XxlJobServiceImpl implements XxlJobService {
106 105
 							MessageFormat.format((I18nUtil.getString("jobinfo_field_childJobId")+"({0})"+I18nUtil.getString("system_unvalid")), childJobIdItem));
107 106
 				}
108 107
 			}
108
+
109
+			// join , avoid "xxx,,"
110
+			String temp = "";
111
+			for (String item:childJobIds) {
112
+				temp += item + ",";
113
+			}
114
+			temp = temp.substring(0, temp.length()-1);
115
+
116
+			jobInfo.setChildJobId(temp);
109 117
 		}
110 118
 
111 119
 		// add in db
@@ -147,9 +155,8 @@ public class XxlJobServiceImpl implements XxlJobService {
147 155
 		}
148 156
 
149 157
 		// ChildJobId valid
150
-        String childJobId = jobInfo.getChildJobId();
151
-        if (childJobId !=null && childJobId.trim().length()>0) {
152
-			String[] childJobIds = childJobId.split(",");
158
+        if (jobInfo.getChildJobId()!=null && jobInfo.getChildJobId().trim().length()>0) {
159
+			String[] childJobIds = jobInfo.getChildJobId().split(",");
153 160
 			for (String childJobIdItem: childJobIds) {
154 161
 				if (childJobIdItem!=null && childJobIdItem.trim().length()>0 && isNumeric(childJobIdItem)) {
155 162
 					XxlJobInfo childJobInfo = xxlJobInfoDao.loadById(Integer.parseInt(childJobIdItem));
@@ -162,6 +169,15 @@ public class XxlJobServiceImpl implements XxlJobService {
162 169
 							MessageFormat.format((I18nUtil.getString("jobinfo_field_childJobId")+"({0})"+I18nUtil.getString("system_unvalid")), childJobIdItem));
163 170
 				}
164 171
 			}
172
+
173
+			// join , avoid "xxx,,"
174
+			String temp = "";
175
+			for (String item:childJobIds) {
176
+				temp += item + ",";
177
+			}
178
+			temp = temp.substring(0, temp.length()-1);
179
+
180
+			jobInfo.setChildJobId(temp);
165 181
 		}
166 182
 
167 183
 		// group valid

+ 1 - 0
xxl-job-admin/src/main/resources/static/js/jobinfo.index.1.js ファイルの表示

@@ -119,6 +119,7 @@ $(function() {
119 119
                                 if ('BEAN' != row.glueType) {
120 120
                                     var codeUrl = base_url +'/jobcode?jobId='+ row.id;
121 121
                                     codeBtn = '<li><a href="'+ codeUrl +'" target="_blank" >GLUE IDE</a></li>\n';
122
+                                    codeBtn += '<li class="divider"></li>\n';
122 123
                                 }
123 124
 
124 125
                                 // data