update comm
This commit is contained in:
@ -116,7 +116,9 @@ export default class CommonHelper {
|
|||||||
wtp.push(like);
|
wtp.push(like);
|
||||||
}
|
}
|
||||||
|
|
||||||
whereAttrPre.push('(' + wtp.join(' or ') + ')');
|
if (wtp.length > 0) {
|
||||||
|
whereAttrPre.push('(' + wtp.join(' or ') + ')');
|
||||||
|
}
|
||||||
|
|
||||||
if (param.col_any_eq.length > 0) {
|
if (param.col_any_eq.length > 0) {
|
||||||
whereVal['filter_eq'] = filter_any_val;
|
whereVal['filter_eq'] = filter_any_val;
|
||||||
@ -147,7 +149,10 @@ export default class CommonHelper {
|
|||||||
wtp.push(like);
|
wtp.push(like);
|
||||||
}
|
}
|
||||||
|
|
||||||
whereAttrPre.push('(' + wtp.join(' or ') + ')');
|
if (wtp.length > 0) {
|
||||||
|
whereAttrPre.push('(' + wtp.join(' or ') + ')');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (param.col_any_eq.length > 0) {
|
if (param.col_any_eq.length > 0) {
|
||||||
whereVal['filter_eq'] = param.filter.toLowerCase();
|
whereVal['filter_eq'] = param.filter.toLowerCase();
|
||||||
@ -158,8 +163,12 @@ export default class CommonHelper {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
let whereAttr = '';
|
||||||
const whereAttr = whereAttrPre.join(' and ') + (whereAttrPre.length > 0 && param.additional_where != '' ? ' and ' : '') + param.additional_where;
|
if (whereAttrPre.length > 0) {
|
||||||
|
whereAttr = whereAttrPre.join(' and ') + (whereAttrPre.length > 0 && param.additional_where != '' ? ' and ' : '') + param.additional_where;
|
||||||
|
} else {
|
||||||
|
whereAttr += param.additional_where;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return { whereAttr, whereVal };
|
return { whereAttr, whereVal };
|
||||||
|
|||||||
Reference in New Issue
Block a user