Caused by: com.justep.exception.BusinessException: 编码: JUSTEP150039; 提示: 执行sql: select fProvinceID as fParentID,2 as fLevel,false as fIsLeaves,concat_ws('-','3',CONVERT(fID,char)) as fID,fName from DEMO_City where fProvinceID = 3 GROUP BY fID limit 0,100, binds: []出错
at com.justep.exception.BusinessException.create(Unknown Source)
at com.justep.system.data.SQL.select(Unknown Source)
at com.justep.system.data.SQL.select(Unknown Source)
at Office.queryArea(Office.java:76)
... 27 more
Caused by: java.sql.SQLException: Column 'fProvinceID' not found.
select fProvinceID as fParentID,2 as fLevel,false as fIsLeaves,concat_ws('-','3',CONVERT(fID,char)) as fID,fName from DEMO_City where fProvinceID = 3 GROUP BY fID
到数据库中执行正确吗?
解决了;有点奇怪。
需要将 语句select fProvinceID as fParentID,2 as fLevel,false as fIsLeaves, fID,fName
from DEMO_City where fProvinceID =2 GROUP BY fID
改为:
select fParentID,fLevel, fIsLeaves,fID,fName from (
select fProvinceID as fParentID,2 as fLevel,false as fIsLeaves, fID,fName
from DEMO_City where fProvinceID =2 GROUP BY fID ) a