Background controller to DAO is no problem, the foreground page receives an entity class object, the service layer is also the object, the incoming mapper inside is also the object, no map, but the print table does not execute the SQL statement, there is no obvious error hint.
Finally find the reason, post the original SQL statement and the successful execution of the SQL statement, you can see the alias and if test after the judgment is removed can be executed. Specifically because the alias or if test interested friends can test, I will not try.
The original code
<select id= "Querybyprimarykey" parametertype= "java.lang.String" resulttype= " Com.suneee.scn.chtpub.wms.model.DictionaryDO "> Select dictionarycode as Dictionarycode, Dictionaryname as Dictionaryname, NextValue as NextValue, Mark as Mark from sp_wms_dictionary WHERE 1 = 1<if test= "Dictionarycode!=null and dictionarycode! =" "> = #{dictionarycode,jdbctype=VARCHAR} </if> </select>
Now the code:
<select id= "Querybyprimarykey" parametertype= "java.lang.String" resulttype= " Com.suneee.scn.chtpub.wms.model.DictionaryDO "> Select dictionarycode, dictionaryname, NextValue, Mark from sp_wms_dictionary WHERE 1 = 1 and = #{ Dictionarycode,jdbctype=VARCHAR} </select>
Non-executable SQL statement for "database _postgresql" entity class mapping problem