此问题出现在mybatis ,执行sql所造成的错误
是因为
SELECT count(tu.id) as count_number,tu.username,REPLACE(REPLACE(SUBSTRING_INDEX(city,'/',1),'市',''),'省','') as city
//(city,'/',1),'市',''),'省','') 替换省市区的应该是用点引号括起来,但是我却用了双引号,所以引起的报错
from tb_user as tu
LEFT JOIN tb_reci_address as ad ON tu.id=ad.user_id
WHERE 1=1
<if test="isDel !=null and isDel !=''">
AND is_del !=#{isDel}
</if>
<if test="auth !=null and auth !=''">
AND auth !=#{auth}
</if>
<if test="provinceName !=null and provinceName !=''">
AND REPLACE(REPLACE(SUBSTRING_INDEX(city,'/',1),'市',''),'省','')=#{provinceName}
</if>
//(city,’/’,1),‘市’,’’),‘省’,’’) 替换省市区的应该是用点引号括起来,但是我却用了双引号,所以引起的报错