fix sql and via

This commit is contained in:
devezhao 2021-11-01 15:38:11 +08:00
parent 4c4a36df56
commit d95dc2a9bb
2 changed files with 2 additions and 2 deletions

View file

@ -177,7 +177,7 @@ public class ReferenceSearchController extends EntityController {
private List<Object> resultSearch(String sqlWhere, Entity entity, int maxResults) {
Field nameField = entity.getNameField();
String sql = MessageFormat.format("select {0},{1} from {2} where {3}",
String sql = MessageFormat.format("select {0},{1} from {2} where ({3})",
entity.getPrimaryField().getName(), nameField.getName(), entity.getName(), sqlWhere);
if (!sqlWhere.contains(" order by ")) {

View file

@ -555,7 +555,7 @@ const RbListCommon = {
})
// via 过滤
const via = $urlp('via', location.hash)
const via = $urlp('via') || $urlp('via', location.hash)
if (via) {
wpc.protocolFilter = `via:${via}`
const $cleanVia = $(`<div class="badge filter-badge">${$L('当前数据已过滤')}<a class="close" title="${$L('查看全部数据')}">&times;</a></div>`).appendTo('.dataTables_filter')