在使用 combobox 的时候,返回值的java对象尽量是使用 简单对象(即: 对象里只有字符串属性)
不要直接返回数据库对象
因为使用
方法来进行 json 转换的时候, 如果是数据库对象 而且做了关联的话,会载出很多数据.
而往往不需要那么多数据载出
也会导致 前台显示不正常
因此最好 返回的是一个page 对象
不要直接返回数据库对象
因为使用
com.alibaba.fastjson.JSON.toJSONStringWithDateFormat()
方法来进行 json 转换的时候, 如果是数据库对象 而且做了关联的话,会载出很多数据.
而往往不需要那么多数据载出
也会导致 前台显示不正常
因此最好 返回的是一个page 对象