我个人建议实际“清理”数据库值,也许将列设置为不可为空。
但是,如果不能这样做,则可以修改设置器,以便检查
null:
public void setComm(Double comm) { if(null != comm){ this.comm = comm; }else{ this.comm = 0; }}希望这可以帮助

我个人建议实际“清理”数据库值,也许将列设置为不可为空。
但是,如果不能这样做,则可以修改设置器,以便检查
null:
public void setComm(Double comm) { if(null != comm){ this.comm = comm; }else{ this.comm = 0; }}希望这可以帮助