Bigdecimal类型转Integer 从数据库查出来的数据经过sum函数返回的,都是decimal类型, 需要在代码中自己手动转成Integer 否则报错 在实体类里面得get方法返回得时候调用intValue();方法即可