Ksb_user user = ksbuser.fetch(Cnd.where("wxOpenId", "=", wxid));
TableName.set(1);
List<Ksb_customer> customerlist = ksbcustomer.query(Cnd.where("wxOpenId", "=", wxid));
TableName.clear();
return Result.success("success").addData(customerlist);
按上面这样写,查询时表名并没有动态变化,报错如下
java.lang.RuntimeException: org.nutz.dao.DaoException: !Nutz SQL Error: 'SELECT * FROM ksb_customer_ WHERE wxOpenId='oJYgp4_CQlHIcvccd2HBB7HDEkjQ''
PreparedStatement:
'SELECT * FROM ksb_customer_ WHERE wxOpenId=?'
CaseMessage=Table 'kbs.ksb_customer_' doesn't exist
org.nutz.dao.DaoException: !Nutz SQL Error: 'SELECT * FROM ksb_customer_ WHERE wxOpenId='oJYgp4_CQlHIcvccd2HBB7HDEkjQ''
PreparedStatement:
'SELECT * FROM ksb_customer_ WHERE wxOpenId=?'
CaseMessage=Table 'kbs.ksb_customer_' doesn't exist
at org.nutz.dao.impl.sql.run.NutDaoExecutor.exec(NutDaoExecutor.java:110)
哪位大神有空帮忙解答一下,该怎么写,非常感谢~