不知道大家分享过没有,我在这里分享一下。
由于实体类中的字段不够用,需要额外添加查询条件,必须要在实体类中实现put方法。
private List<String> mongoId;
public List<String> getMongoId() {
return mongoId;
}
public void setMongoId(List<String> mongoId) {
this.mongoId = mongoId;
put("mongoId", mongoId);
}sql写法,截取一段:
#if(null!=mongoId) and content_id in ( #for(x:mongoId) #(for.index == 0 ? "" : ",") #para(x) #end ) #end
感谢你的分享,赞