Mapper method 'com.jeeplus.modules.business.dao.WuXIWaiShiDao.findStatus attempted to return null from
a method with a primitive return type (int).
取的数据太多了 我只想取两个数据,,但是把数据表中的所有数据都取一遍
attempted to return null from
a method with a primitive return type (int).
提示很明显,你返回的是null类型,但是定义的返回类型是int。
解决:
WuXIWaiShiDao类的findStatus方法,默认返回0,或者做一下判断处理,不要直接返回查询结果,可能查询结果为null.
是这样的两个,我这边retrue的就是结果取到的数据,我接口取数据可以取到所有的,但是我就要取两个,其他的就是全是null,然后就显示报错,可不可以只取两个数据,我还给接口定义了,只get两个数据 但是还是把其他的数据也取了
不是查询,是获取的数据太多了,我这个接口是用来接收数据,然后存到数据库的