查询优化升级
This commit is contained in:
parent
1feca37cd4
commit
92e0f136bf
|
|
@ -135,7 +135,7 @@ public class TopSearchTableController extends EBTSController {
|
|||
* 导入表结构(保存)
|
||||
*/
|
||||
@PreAuthorize("@ebts.hasPermi('tool:table:import')")
|
||||
@Log(title = "代码生成", businessType = BusinessType.IMPORT)
|
||||
@Log(title = "top表数据维护", businessType = BusinessType.IMPORT)
|
||||
@PostMapping("/importTopTable")
|
||||
public Result<String> importTableSave(String tables) {
|
||||
String[] tableNames = Convert.toStrArray(tables);
|
||||
|
|
|
|||
|
|
@ -10,11 +10,23 @@ public class UniColumnInfo {
|
|||
private long queryId;
|
||||
private String prop;
|
||||
private String label;
|
||||
private String dictType;
|
||||
|
||||
public UniColumnInfo() {
|
||||
}
|
||||
|
||||
public UniColumnInfo(long queryId,String prop, String label) {
|
||||
public UniColumnInfo(long queryId, String prop, String label, String dictType) {
|
||||
this.dictType = dictType;
|
||||
this.queryId = queryId;
|
||||
if (StringUtils.isNull(label)){
|
||||
this.label = prop;
|
||||
}else {
|
||||
this.label = label;
|
||||
}
|
||||
this.prop = prop;
|
||||
}
|
||||
|
||||
public UniColumnInfo(long queryId, String prop, String label) {
|
||||
this.queryId = queryId;
|
||||
if (StringUtils.isNull(label)){
|
||||
this.label = prop;
|
||||
|
|
@ -47,4 +59,12 @@ public class UniColumnInfo {
|
|||
public void setLabel(String label) {
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
public String getDictType() {
|
||||
return dictType;
|
||||
}
|
||||
|
||||
public void setDictType(String dictType) {
|
||||
this.dictType = dictType;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ import javax.annotation.Resource;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* top万能查询主Service业务层处理
|
||||
|
|
@ -168,9 +169,10 @@ public class TopSearchTableServiceImpl implements TopSearchTableService {
|
|||
int row = topSearchTableDao.insertTopSearchTable(table);
|
||||
if (row > 0) {
|
||||
List<TopSearchColumn> searchColumns = topSearchTableDao.selectDbTableColumnsByName(tableName);
|
||||
for (TopSearchColumn searchColumn : searchColumns) {
|
||||
searchColumn.setSearchTableId(table.getId());
|
||||
}
|
||||
searchColumns = searchColumns.stream().peek(column->{
|
||||
column.setSearchTableId(table.getId());
|
||||
column.setIsUse(1);
|
||||
}).collect(Collectors.toList());
|
||||
if (searchColumns.size() > 0) {
|
||||
topSearchTableDao.batchTopSearchColumn(searchColumns);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue