Mybaties 特殊寫法

亲爱的阿道君發表於2024-07-03
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);

相關文章