List<XXXXX> selectByExample = XXXXXMapper.selectByExample( new Example(XXXXX.class).createCriteria().andIn("XXXXId", XidSet) .andEqualTo("XXXId", X).andEqualTo(STATUS_FIELD, Constant.Common.ON_USE_YES));
mybatis语句报错There is no getter for property named ‘distinct‘ in ‘class tk.mybatis.mapper.entity.Example$Criteria,但实际上并没有该字段。
解决方法:把内联语句分开写
Example XXXXXXExample = new Example(XXXXXX.class);
Criteria criteria = XXXXXXExample.createCriteria();
criteria.andIn("XXXXXId", XXXSet)
.andEqualTo("XXXXId", X).andEqualTo(STATUS_FIELD, Constant.Common.ON_USE_YES);
List<XXXXXX> selectByExample = XXXXXXMapper.selectByExample(XXXXXXExample);
具体为什么gpt也说的含糊不清,有大神解释一下吗