CN-1049: Entity实体搜索框参数拼接错误

This commit is contained in:
刘洪洪
2023-05-31 15:28:27 +08:00
parent 9675a54455
commit df7cd7e289
3 changed files with 20 additions and 7 deletions

View File

@@ -751,8 +751,13 @@ export default class Parser {
// 使用单引号包裹
export function stringInQuot (value) {
if (value.indexOf("'") > -1) {
value = value.split("'").join("''") // 如xi'an多添加一个单引号处理为xi''an
}
const match = `${value}`.match(/^'.+?'$/)
return match ? value : `'${value}'`
// return match ? value : `'${value}'` // 单引号包裹,暂时保留
return match ? value : `${value}`
}
// IN和LIKE前后加空格