mybatis后台修改数据

//查询
QueryWrapper<Issue> qw = new QueryWrapper<>();

qw.eq(Issue::getUuid,"No0001","1111"); //Issue::getUuid 获取实体类对应的数据库表字段,若未在实体类添加@TableName,则会失效
List<Issue> iList = issueMapper.selectList(qw);


//更新
UpdateWrapper<Issue> updateWrapper = new UpdateWrapper<>();
updateWrapper.in("UUID", issueIdList).set("SUBMIT_HZ_STATUS", changeStatus);
Issue issue =new Issue();
int rows = issueMapper.update(issue, updateWrapper);
posted @ 2022-01-11 10:45  唯恐不及  阅读(97)  评论(0编辑  收藏  举报