diff --git a/src/helpers/common.ts b/src/helpers/common.ts index d37f948..8f363a1 100644 --- a/src/helpers/common.ts +++ b/src/helpers/common.ts @@ -164,17 +164,7 @@ export default class CommonHelper { } } - const whereAttr = whereAttrPre.join(' and ') + (whereAttrPre.length > 0 && param.additional_where != '' ? ' and ' : '') + (param.additional_where ?? ''); - - // let whereAttr = ''; - // if (whereAttrPre.length > 0) { - // whereAttr = whereAttrPre.join(' and ') + (whereAttrPre.length > 0 && param.additional_where != '' ? ' and ' : '') + param.additional_where; - // } else { - // whereAttr += param.additional_where; - // } - - // console.log('whereAttr', whereAttr) - + const whereAttr = whereAttrPre.join(' and ') + (whereAttrPre.length > 0 && param.additional_where && param.additional_where != '' ? ' and ' : '') + (param.additional_where ?? ''); return { whereAttr, whereVal }; }