Mybaties 特殊写法

LambdaQueryWrapper<CAutoDistributionEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(CAutoDistributionEntity::getIsDelete, 0)
   .apply("concat('|',business_source_codes) like '%|" + value + "%|'");
LambdaUpdateWrapper<QxViewsNumEntity> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.setSql("update_time = now(), virtual_views = virtual_views + " + num)
      .in(QxViewsNumEntity::getSourceNumber, 1,2,3);
qxViewsNumMapper.update(null, updateWrapper);
posted @ 2024-07-03 14:34  亲爱的阿道君  阅读(1)  评论(0编辑  收藏  举报