updateWrapper.eq(UserEntity::getUserId,"0001"); userMapper.update(null, updateWrapper); 缺點(diǎn):需要一個(gè)一個(gè)屬性set,比較麻煩。我平常使用的都是從DTO直接copy到Entity里面,要是updateWrapper.set的話比較繁瑣,而且有的值為null時(shí)不更新。 優(yōu)化: 還是使用LambdaUpdateWrapper的set更新,方法update(entity, updateW...
www.dbjr.com.cn/program/318949t...htm 2025-6-6