Commit 784e593a authored by shiyu's avatar shiyu

模糊查询

parent 0cb1a5ce
......@@ -73,7 +73,9 @@ public class ItemDaoImpl implements ItemDao {
}
example.orderBy("update_time desc");
JdbcHelper.ifPresent(coinRequestDto.getId(), criteria :: andIdEqualTo);
JdbcHelper.ifPresent(coinRequestDto.getName(), criteria :: andNameLike);
if (StringUtils.hasLength(coinRequestDto.getName())) {
criteria.andNameLike("%" + coinRequestDto.getName() + "%");
}
JdbcHelper.ifPresent(coinRequestDto.getCid(), criteria :: andCidEqualTo);
PageHelper.startPage(coinRequestDto.getPage(), coinRequestDto.getLimit());
List<Item> list = itemMapper.selectByExampleWithBLOBs(example);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment