Skip to content

条件添加or查询

条件添加or查询

java
queryWrapper.and(
    wrapper -> wrapper.eq("fbr", AuthUtil.getCurrentUserId())
                 .or()
                 .exists("select 1 from bt_hy_ry b where b.hytzid = hytzid and b.userid = "+AuthUtil.getCurrentUserId()));

groupBy查询

 QueryWrapper<FxyjJcmxEntity> queryWrapperOne = new QueryWrapper<>();
 queryWrapperOne.select("count(fxdj) countfxdj,fxdj");
 queryWrapperOne.eq("fxyjid", fxyjEntity.getId());
 queryWrapperOne.groupBy("fxdj");
 List<FxyjJcmxEntity> fxyjJcmxEntities1 = fxyjJcmxMapper.selectList(queryWrapperOne);

学习使我快乐吗?