@Transactional(rollbackFor = Exception.class) public int editComprehensive(ComprehensiveTarget comprehensiveTarget) { Example example=new Example(ComprehensiveTarget.class); Example.Criteria criteria = example.createCriteria(); criteria.andEqualTo("nBatch", comprehensiveTarget.getNBatch()); comprehensiveTarget.setUpdateTime(new Date()); return comprehensiveTargetMapper.updateByExample(comprehensiveTarget,example); }
tkmapper按照条件使用updateByExample更新
最新推荐文章于 2024-07-16 13:45:45 发布