java.lang.ClassCastException: tk.mybatis.springboot.model.PayProductCategory cannot be cast to tk.mybatis.springboot.model.PayProductCategory
PayProductCategory payProductCategorySelectCount = new PayProductCategory();
payProductCategorySelectCount.setState((byte)ShopConstants.State.LIVE.ordinal());
List payProductCategories = payProductCategoryMapper.select(payProductCategorySelectCount);
for(int i = 0; i < payProductCategories.size(); i++){
PayProductCategory payProductCategory = payProductCategories.get(i); //这里报错
Long productCategoryId = payProductCategory.getId();
}
}
java.lang.ClassCastException: tk.mybatis.springboot.model.PayProductCategory cannot be cast to tk.mybatis.springboot.model.PayProductCategory
PayProductCategory payProductCategorySelectCount = new PayProductCategory(); payProductCategorySelectCount.setState((byte)ShopConstants.State.LIVE.ordinal()); List payProductCategories = payProductCategoryMapper.select(payProductCategorySelectCount);
for(int i = 0; i < payProductCategories.size(); i++){ PayProductCategory payProductCategory = payProductCategories.get(i); //这里报错 Long productCategoryId = payProductCategory.getId(); } }
利用payProductCategoryMapper获取出来了数据,但是数据无法转化。这个是什么问题。同样的类