changchen(提问者)您好,如果是这样类型的数据,请问应该如何字符串拼接? ${IF($class_date=\'ds1\', \"select * from ds1 where 1 = 1\" + ${if(len(a) == 0,\"\",\" and a = \'\" + a + \"\'\")} + ${if(len(b) == 0,\"\",\" and b= \'\" + b + \"\'\")}, \"select * from ds2 where 1 = 1\" + ${if(len(c) == 0,\"\",\" and c = \'\" + c + \"\'\")} + ${if(len(d) == 0,\"\",\" and d= \'\" + d + \"\'\")} )} 请问我这样写有错吗?谢谢!sql和参数是单独分开的