Commit 37382df66d8e1a67fa8f378d0d441c7216e54ca6
Merge remote-tracking branch 'upstream/master'
Showing
12 changed files
with
58 additions
and
58 deletions
README.md
... | ... | @@ -105,4 +105,4 @@ |
105 | 105 | |
106 | 106 | ## 若依前后端分离交流群 |
107 | 107 | |
108 | -QQ群: [](https://jq.qq.com/?_wv=1027&k=5bVB1og) [](https://jq.qq.com/?_wv=1027&k=5eiA4DH) [](https://jq.qq.com/?_wv=1027&k=5AxMKlC) [](https://jq.qq.com/?_wv=1027&k=51G72yr) [](https://jq.qq.com/?_wv=1027&k=VvjN2nvu) [](https://jq.qq.com/?_wv=1027&k=5vYAqA05) [](https://jq.qq.com/?_wv=1027&k=kOIINEb5) [](https://jq.qq.com/?_wv=1027&k=UKtX5jhs) 点击按钮入群。 | |
109 | 108 | \ No newline at end of file |
109 | +QQ群: [](https://jq.qq.com/?_wv=1027&k=5bVB1og) [](https://jq.qq.com/?_wv=1027&k=5eiA4DH) [](https://jq.qq.com/?_wv=1027&k=5AxMKlC) [](https://jq.qq.com/?_wv=1027&k=51G72yr) [](https://jq.qq.com/?_wv=1027&k=VvjN2nvu) [](https://jq.qq.com/?_wv=1027&k=5vYAqA05) [](https://jq.qq.com/?_wv=1027&k=kOIINEb5) [](https://jq.qq.com/?_wv=1027&k=UKtX5jhs) [](https://jq.qq.com/?_wv=1027&k=EI9an8lJ) 点击按钮入群。 | |
110 | 110 | \ No newline at end of file |
... | ... |
ruoyi-admin/src/main/resources/application.yml
ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java
... | ... | @@ -163,5 +163,5 @@ public class Constants |
163 | 163 | * 定时任务违规的字符 |
164 | 164 | */ |
165 | 165 | public static final String[] JOB_ERROR_STR = { "java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml", |
166 | - "org.springframework", "org.apache" }; | |
166 | + "org.springframework", "org.apache", "com.ruoyi.common.utils.file" }; | |
167 | 167 | } |
... | ... |
ruoyi-generator/src/main/java/com/ruoyi/generator/service/GenTableServiceImpl.java
... | ... | @@ -7,6 +7,7 @@ import java.io.StringWriter; |
7 | 7 | import java.util.LinkedHashMap; |
8 | 8 | import java.util.List; |
9 | 9 | import java.util.Map; |
10 | +import java.util.function.Function; | |
10 | 11 | import java.util.stream.Collectors; |
11 | 12 | import java.util.zip.ZipEntry; |
12 | 13 | import java.util.zip.ZipOutputStream; |
... | ... | @@ -286,7 +287,7 @@ public class GenTableServiceImpl implements IGenTableService |
286 | 287 | { |
287 | 288 | GenTable table = genTableMapper.selectGenTableByName(tableName); |
288 | 289 | List<GenTableColumn> tableColumns = table.getColumns(); |
289 | - List<String> tableColumnNames = tableColumns.stream().map(GenTableColumn::getColumnName).collect(Collectors.toList()); | |
290 | + Map<String, GenTableColumn> tableColumnMap = tableColumns.stream().collect(Collectors.toMap(GenTableColumn::getColumnName, Function.identity())); | |
290 | 291 | |
291 | 292 | List<GenTableColumn> dbTableColumns = genTableColumnMapper.selectDbTableColumnsByName(tableName); |
292 | 293 | if (StringUtils.isEmpty(dbTableColumns)) |
... | ... | @@ -296,9 +297,20 @@ public class GenTableServiceImpl implements IGenTableService |
296 | 297 | List<String> dbTableColumnNames = dbTableColumns.stream().map(GenTableColumn::getColumnName).collect(Collectors.toList()); |
297 | 298 | |
298 | 299 | dbTableColumns.forEach(column -> { |
299 | - if (!tableColumnNames.contains(column.getColumnName())) | |
300 | + GenUtils.initColumnField(column, table); | |
301 | + if (tableColumnMap.containsKey(column.getColumnName())) | |
302 | + { | |
303 | + GenTableColumn prevColumn = tableColumnMap.get(column.getColumnName()); | |
304 | + column.setColumnId(prevColumn.getColumnId()); | |
305 | + if (column.isList()) | |
306 | + { | |
307 | + // 如果是列表,继续保留字典类型 | |
308 | + column.setDictType(prevColumn.getDictType()); | |
309 | + } | |
310 | + genTableColumnMapper.updateGenTableColumn(column); | |
311 | + } | |
312 | + else | |
300 | 313 | { |
301 | - GenUtils.initColumnField(column, table); | |
302 | 314 | genTableColumnMapper.insertGenTableColumn(column); |
303 | 315 | } |
304 | 316 | }); |
... | ... | @@ -359,7 +371,7 @@ public class GenTableServiceImpl implements IGenTableService |
359 | 371 | zip.putNextEntry(new ZipEntry(VelocityUtils.getFileName(template, table))); |
360 | 372 | IOUtils.write(sw.toString(), zip, Constants.UTF8); |
361 | 373 | IOUtils.closeQuietly(sw); |
362 | - zip.flush(); | |
374 | + zip.flush(); | |
363 | 375 | zip.closeEntry(); |
364 | 376 | } |
365 | 377 | catch (IOException e) |
... | ... | @@ -472,7 +484,7 @@ public class GenTableServiceImpl implements IGenTableService |
472 | 484 | String treeName = paramsObj.getString(GenConstants.TREE_NAME); |
473 | 485 | String parentMenuId = paramsObj.getString(GenConstants.PARENT_MENU_ID); |
474 | 486 | String parentMenuName = paramsObj.getString(GenConstants.PARENT_MENU_NAME); |
475 | - | |
487 | + | |
476 | 488 | genTable.setTreeCode(treeCode); |
477 | 489 | genTable.setTreeParentCode(treeParentCode); |
478 | 490 | genTable.setTreeName(treeName); |
... | ... |
ruoyi-generator/src/main/resources/vm/vue/v3/index-tree.vue.vm
... | ... | @@ -17,13 +17,12 @@ |
17 | 17 | v-model="queryParams.${column.javaField}" |
18 | 18 | placeholder="请输入${comment}" |
19 | 19 | clearable |
20 | - size="small" | |
21 | 20 | @keyup.enter="handleQuery" |
22 | 21 | /> |
23 | 22 | </el-form-item> |
24 | 23 | #elseif(($column.htmlType == "select" || $column.htmlType == "radio") && "" != $dictType) |
25 | 24 | <el-form-item label="${comment}" prop="${column.javaField}"> |
26 | - <el-select v-model="queryParams.${column.javaField}" placeholder="请选择${comment}" clearable size="small"> | |
25 | + <el-select v-model="queryParams.${column.javaField}" placeholder="请选择${comment}" clearable> | |
27 | 26 | <el-option |
28 | 27 | v-for="dict in ${dictType}" |
29 | 28 | :key="dict.value" |
... | ... | @@ -34,13 +33,13 @@ |
34 | 33 | </el-form-item> |
35 | 34 | #elseif(($column.htmlType == "select" || $column.htmlType == "radio") && $dictType) |
36 | 35 | <el-form-item label="${comment}" prop="${column.javaField}"> |
37 | - <el-select v-model="queryParams.${column.javaField}" placeholder="请选择${comment}" clearable size="small"> | |
36 | + <el-select v-model="queryParams.${column.javaField}" placeholder="请选择${comment}" clearable> | |
38 | 37 | <el-option label="请选择字典生成" value="" /> |
39 | 38 | </el-select> |
40 | 39 | </el-form-item> |
41 | 40 | #elseif($column.htmlType == "datetime" && $column.queryType != "BETWEEN") |
42 | 41 | <el-form-item label="${comment}" prop="${column.javaField}"> |
43 | - <el-date-picker clearable size="small" | |
42 | + <el-date-picker clearable | |
44 | 43 | v-model="queryParams.${column.javaField}" |
45 | 44 | type="date" |
46 | 45 | value-format="YYYY-MM-DD" |
... | ... | @@ -48,11 +47,9 @@ |
48 | 47 | </el-date-picker> |
49 | 48 | </el-form-item> |
50 | 49 | #elseif($column.htmlType == "datetime" && $column.queryType == "BETWEEN") |
51 | - <el-form-item label="${comment}"> | |
50 | + <el-form-item label="${comment}" style="width: 308px"> | |
52 | 51 | <el-date-picker |
53 | 52 | v-model="daterange${AttrName}" |
54 | - size="small" | |
55 | - style="width: 240px" | |
56 | 53 | value-format="YYYY-MM-DD" |
57 | 54 | type="daterange" |
58 | 55 | range-separator="-" |
... | ... | @@ -64,8 +61,8 @@ |
64 | 61 | #end |
65 | 62 | #end |
66 | 63 | <el-form-item> |
67 | - <el-button type="primary" icon="Search" size="mini" @click="handleQuery">搜索</el-button> | |
68 | - <el-button icon="Refresh" size="mini" @click="resetQuery">重置</el-button> | |
64 | + <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button> | |
65 | + <el-button icon="Refresh" @click="resetQuery">重置</el-button> | |
69 | 66 | </el-form-item> |
70 | 67 | </el-form> |
71 | 68 | |
... | ... | @@ -75,7 +72,6 @@ |
75 | 72 | type="primary" |
76 | 73 | plain |
77 | 74 | icon="Plus" |
78 | - size="mini" | |
79 | 75 | @click="handleAdd" |
80 | 76 | v-hasPermi="['${moduleName}:${businessName}:add']" |
81 | 77 | >新增</el-button> |
... | ... | @@ -132,21 +128,18 @@ |
132 | 128 | <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
133 | 129 | <template #default="scope"> |
134 | 130 | <el-button |
135 | - size="mini" | |
136 | 131 | type="text" |
137 | 132 | icon="Edit" |
138 | 133 | @click="handleUpdate(scope.row)" |
139 | 134 | v-hasPermi="['${moduleName}:${businessName}:edit']" |
140 | 135 | >修改</el-button> |
141 | 136 | <el-button |
142 | - size="mini" | |
143 | 137 | type="text" |
144 | 138 | icon="Plus" |
145 | 139 | @click="handleAdd(scope.row)" |
146 | 140 | v-hasPermi="['${moduleName}:${businessName}:add']" |
147 | 141 | >新增</el-button> |
148 | 142 | <el-button |
149 | - size="mini" | |
150 | 143 | type="text" |
151 | 144 | icon="Delete" |
152 | 145 | @click="handleDelete(scope.row)" |
... | ... | @@ -249,7 +242,7 @@ |
249 | 242 | </el-form-item> |
250 | 243 | #elseif($column.htmlType == "datetime") |
251 | 244 | <el-form-item label="${comment}" prop="${field}"> |
252 | - <el-date-picker clearable size="small" | |
245 | + <el-date-picker clearable | |
253 | 246 | v-model="form.${field}" |
254 | 247 | type="date" |
255 | 248 | value-format="YYYY-MM-DD" |
... | ... |
ruoyi-generator/src/main/resources/vm/vue/v3/index.vue.vm
... | ... | @@ -17,13 +17,12 @@ |
17 | 17 | v-model="queryParams.${column.javaField}" |
18 | 18 | placeholder="请输入${comment}" |
19 | 19 | clearable |
20 | - size="small" | |
21 | 20 | @keyup.enter="handleQuery" |
22 | 21 | /> |
23 | 22 | </el-form-item> |
24 | 23 | #elseif(($column.htmlType == "select" || $column.htmlType == "radio") && "" != $dictType) |
25 | 24 | <el-form-item label="${comment}" prop="${column.javaField}"> |
26 | - <el-select v-model="queryParams.${column.javaField}" placeholder="请选择${comment}" clearable size="small"> | |
25 | + <el-select v-model="queryParams.${column.javaField}" placeholder="请选择${comment}" clearable> | |
27 | 26 | <el-option |
28 | 27 | v-for="dict in ${dictType}" |
29 | 28 | :key="dict.value" |
... | ... | @@ -34,13 +33,13 @@ |
34 | 33 | </el-form-item> |
35 | 34 | #elseif(($column.htmlType == "select" || $column.htmlType == "radio") && $dictType) |
36 | 35 | <el-form-item label="${comment}" prop="${column.javaField}"> |
37 | - <el-select v-model="queryParams.${column.javaField}" placeholder="请选择${comment}" clearable size="small"> | |
36 | + <el-select v-model="queryParams.${column.javaField}" placeholder="请选择${comment}" clearable> | |
38 | 37 | <el-option label="请选择字典生成" value="" /> |
39 | 38 | </el-select> |
40 | 39 | </el-form-item> |
41 | 40 | #elseif($column.htmlType == "datetime" && $column.queryType != "BETWEEN") |
42 | 41 | <el-form-item label="${comment}" prop="${column.javaField}"> |
43 | - <el-date-picker clearable size="small" | |
42 | + <el-date-picker clearable | |
44 | 43 | v-model="queryParams.${column.javaField}" |
45 | 44 | type="date" |
46 | 45 | value-format="YYYY-MM-DD" |
... | ... | @@ -48,11 +47,9 @@ |
48 | 47 | </el-date-picker> |
49 | 48 | </el-form-item> |
50 | 49 | #elseif($column.htmlType == "datetime" && $column.queryType == "BETWEEN") |
51 | - <el-form-item label="${comment}"> | |
50 | + <el-form-item label="${comment}" style="width: 308px"> | |
52 | 51 | <el-date-picker |
53 | 52 | v-model="daterange${AttrName}" |
54 | - size="small" | |
55 | - style="width: 240px" | |
56 | 53 | value-format="YYYY-MM-DD" |
57 | 54 | type="daterange" |
58 | 55 | range-separator="-" |
... | ... | @@ -64,8 +61,8 @@ |
64 | 61 | #end |
65 | 62 | #end |
66 | 63 | <el-form-item> |
67 | - <el-button type="primary" icon="Search" size="mini" @click="handleQuery">搜索</el-button> | |
68 | - <el-button icon="Refresh" size="mini" @click="resetQuery">重置</el-button> | |
64 | + <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button> | |
65 | + <el-button icon="Refresh" @click="resetQuery">重置</el-button> | |
69 | 66 | </el-form-item> |
70 | 67 | </el-form> |
71 | 68 | |
... | ... | @@ -75,7 +72,6 @@ |
75 | 72 | type="primary" |
76 | 73 | plain |
77 | 74 | icon="Plus" |
78 | - size="mini" | |
79 | 75 | @click="handleAdd" |
80 | 76 | v-hasPermi="['${moduleName}:${businessName}:add']" |
81 | 77 | >新增</el-button> |
... | ... | @@ -85,7 +81,6 @@ |
85 | 81 | type="success" |
86 | 82 | plain |
87 | 83 | icon="Edit" |
88 | - size="mini" | |
89 | 84 | :disabled="single" |
90 | 85 | @click="handleUpdate" |
91 | 86 | v-hasPermi="['${moduleName}:${businessName}:edit']" |
... | ... | @@ -96,7 +91,6 @@ |
96 | 91 | type="danger" |
97 | 92 | plain |
98 | 93 | icon="Delete" |
99 | - size="mini" | |
100 | 94 | :disabled="multiple" |
101 | 95 | @click="handleDelete" |
102 | 96 | v-hasPermi="['${moduleName}:${businessName}:remove']" |
... | ... | @@ -107,7 +101,6 @@ |
107 | 101 | type="warning" |
108 | 102 | plain |
109 | 103 | icon="Download" |
110 | - size="mini" | |
111 | 104 | @click="handleExport" |
112 | 105 | v-hasPermi="['${moduleName}:${businessName}:export']" |
113 | 106 | >导出</el-button> |
... | ... | @@ -156,14 +149,12 @@ |
156 | 149 | <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
157 | 150 | <template #default="scope"> |
158 | 151 | <el-button |
159 | - size="mini" | |
160 | 152 | type="text" |
161 | 153 | icon="Edit" |
162 | 154 | @click="handleUpdate(scope.row)" |
163 | 155 | v-hasPermi="['${moduleName}:${businessName}:edit']" |
164 | 156 | >修改</el-button> |
165 | 157 | <el-button |
166 | - size="mini" | |
167 | 158 | type="text" |
168 | 159 | icon="Delete" |
169 | 160 | @click="handleDelete(scope.row)" |
... | ... | @@ -176,8 +167,8 @@ |
176 | 167 | <pagination |
177 | 168 | v-show="total>0" |
178 | 169 | :total="total" |
179 | - v-model:p:page="queryParams.pageNum" | |
180 | - v-model:p:limit="queryParams.pageSize" | |
170 | + v-model:page="queryParams.pageNum" | |
171 | + v-model:limit="queryParams.pageSize" | |
181 | 172 | @pagination="getList" |
182 | 173 | /> |
183 | 174 | |
... | ... | @@ -265,7 +256,7 @@ |
265 | 256 | </el-form-item> |
266 | 257 | #elseif($column.htmlType == "datetime") |
267 | 258 | <el-form-item label="${comment}" prop="${field}"> |
268 | - <el-date-picker clearable size="small" | |
259 | + <el-date-picker clearable | |
269 | 260 | v-model="form.${field}" |
270 | 261 | type="date" |
271 | 262 | value-format="YYYY-MM-DD" |
... | ... | @@ -284,10 +275,10 @@ |
284 | 275 | <el-divider content-position="center">${subTable.functionName}信息</el-divider> |
285 | 276 | <el-row :gutter="10" class="mb8"> |
286 | 277 | <el-col :span="1.5"> |
287 | - <el-button type="primary" icon="Plus" size="mini" @click="handleAdd${subClassName}">添加</el-button> | |
278 | + <el-button type="primary" icon="Plus" @click="handleAdd${subClassName}">添加</el-button> | |
288 | 279 | </el-col> |
289 | 280 | <el-col :span="1.5"> |
290 | - <el-button type="danger" icon="Delete" size="mini" @click="handleDelete${subClassName}">删除</el-button> | |
281 | + <el-button type="danger" icon="Delete" @click="handleDelete${subClassName}">删除</el-button> | |
291 | 282 | </el-col> |
292 | 283 | </el-row> |
293 | 284 | <el-table :data="${subclassName}List" :row-class-name="row${subClassName}Index" @selection-change="handle${subClassName}SelectionChange" ref="${subclassName}"> |
... | ... |
ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/SysJobController.java
... | ... | @@ -92,7 +92,7 @@ public class SysJobController extends BaseController |
92 | 92 | } |
93 | 93 | else if (StringUtils.containsAnyIgnoreCase(job.getInvokeTarget(), new String[] { Constants.LOOKUP_LDAP, Constants.LOOKUP_LDAPS })) |
94 | 94 | { |
95 | - return error("新增任务'" + job.getJobName() + "'失败,目标字符串不允许'ldap'调用"); | |
95 | + return error("新增任务'" + job.getJobName() + "'失败,目标字符串不允许'ldap(s)'调用"); | |
96 | 96 | } |
97 | 97 | else if (StringUtils.containsAnyIgnoreCase(job.getInvokeTarget(), new String[] { Constants.HTTP, Constants.HTTPS })) |
98 | 98 | { |
... | ... |
ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/ScheduleUtils.java
... | ... | @@ -121,7 +121,7 @@ public class ScheduleUtils |
121 | 121 | */ |
122 | 122 | public static boolean whiteList(String invokeTarget) |
123 | 123 | { |
124 | - String packageName = StringUtils.substringBefore(invokeTarget, ")"); | |
124 | + String packageName = StringUtils.substringBefore(invokeTarget, "("); | |
125 | 125 | int count = StringUtils.countMatches(packageName, "."); |
126 | 126 | if (count > 1) |
127 | 127 | { |
... | ... |
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictTypeServiceImpl.java
1 | 1 | package com.ruoyi.system.service.impl; |
2 | 2 | |
3 | +import java.util.Comparator; | |
4 | +import java.util.List; | |
5 | +import java.util.Map; | |
6 | +import java.util.stream.Collectors; | |
7 | +import javax.annotation.PostConstruct; | |
8 | +import org.springframework.beans.factory.annotation.Autowired; | |
9 | +import org.springframework.stereotype.Service; | |
10 | +import org.springframework.transaction.annotation.Transactional; | |
3 | 11 | import com.ruoyi.common.constant.UserConstants; |
4 | 12 | import com.ruoyi.common.core.domain.entity.SysDictData; |
5 | 13 | import com.ruoyi.common.core.domain.entity.SysDictType; |
... | ... | @@ -9,11 +17,6 @@ import com.ruoyi.common.utils.StringUtils; |
9 | 17 | import com.ruoyi.system.mapper.SysDictDataMapper; |
10 | 18 | import com.ruoyi.system.mapper.SysDictTypeMapper; |
11 | 19 | import com.ruoyi.system.service.ISysDictTypeService; |
12 | -import org.springframework.beans.factory.annotation.Autowired; | |
13 | -import org.springframework.stereotype.Service; | |
14 | -import org.springframework.transaction.annotation.Transactional; | |
15 | -import javax.annotation.PostConstruct; | |
16 | -import java.util.List; | |
17 | 20 | |
18 | 21 | /** |
19 | 22 | * 字典 业务层处理 |
... | ... | @@ -135,11 +138,12 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService |
135 | 138 | @Override |
136 | 139 | public void loadingDictCache() |
137 | 140 | { |
138 | - List<SysDictType> dictTypeList = dictTypeMapper.selectDictTypeAll(); | |
139 | - for (SysDictType dictType : dictTypeList) | |
141 | + SysDictData dictData = new SysDictData(); | |
142 | + dictData.setStatus("0"); | |
143 | + Map<String, List<SysDictData>> dictDataMap = dictDataMapper.selectDictDataList(dictData).stream().collect(Collectors.groupingBy(SysDictData::getDictType)); | |
144 | + for (Map.Entry<String, List<SysDictData>> entry : dictDataMap.entrySet()) | |
140 | 145 | { |
141 | - List<SysDictData> dictDatas = dictDataMapper.selectDictDataByType(dictType.getDictType()); | |
142 | - DictUtils.setDictCache(dictType.getDictType(), dictDatas); | |
146 | + DictUtils.setDictCache(entry.getKey(), entry.getValue().stream().sorted(Comparator.comparing(SysDictData::getDictSort)).collect(Collectors.toList())); | |
143 | 147 | } |
144 | 148 | } |
145 | 149 | |
... | ... |
ruoyi-ui/src/views/index.vue
... | ... | @@ -120,9 +120,9 @@ |
120 | 120 | <p> |
121 | 121 | <i class="el-icon-user-solid"></i> QQ群:<s>满937441</s> |
122 | 122 | <s>满887144332</s> <s>满180251782</s> <s>满104180207</s> |
123 | - <s>满186866453</s> <s>满201396349</s> <s>满101456076</s> | |
124 | - <a href="https://jq.qq.com/?_wv=1027&k=KmQbXyJ6" target="_blank"> | |
125 | - 101539465</a | |
123 | + <s>满186866453</s> <s>满201396349</s> <s>满101456076</s> <s>满101539465</s> | |
124 | + <a href="https://jq.qq.com/?_wv=1027&k=EI9an8lJ" target="_blank"> | |
125 | + 264312783</a | |
126 | 126 | > |
127 | 127 | </p> |
128 | 128 | <p> |
... | ... |
ruoyi-ui/src/views/login.vue
ruoyi-ui/src/views/register.vue