Mybatis-plus修改指定字段

Mybatis-plus修改指定字段

        UpdateWrapper updateWrapper = new UpdateWrapper();
        updateWrapper.eq("id", lpTypePojo.getId());
        updateWrapper.set("lp_name", lpTypePojo.getLpName());
        updateWrapper.set("update_at", lpTypePojo.getUpdateAt());
        int update = lpTypeDao.update(null, updateWrapper);

打印出的sql语句

UPDATE lp_type SET lp_name=?,update_at=? WHERE (id = ?) 

版权声明:本文为qq_42981242原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。