原因分析:
selectByExample()方法传递的参数错误,应该传example类型,而不是实体类。
错误代码如下:
@Override public PlantGrow selectPlantGrow(PlantGrow plantGrow1) { List<PlantGrow> plantGrows = plantGrowMapper.selectByExample(plantGrow1); if (!CollectionUtils.isEmpty(plantGrows)) { return plantGrows.get(0); } return null; }
解决:改为select