Commit c357b289 authored by shiyu's avatar shiyu

同步商品查询

parent 9c19e655
......@@ -198,7 +198,7 @@ public class SynCoinJob {
CoinRequestDto coinRequestDto = new CoinRequestDto();
coinRequestDto.setPage(1);
coinRequestDto.setLimit(100);
coinRequestDto.setKind(ItemKindEnum.NEPHRITE.getCode());
// coinRequestDto.setKind(ItemKindEnum.NEPHRITE.getCode());
PageInfo<Item> pageInfo = itemDao.findPageExcludeFilter(coinRequestDto);
int totalPageNum = pageInfo.getPages();
logger.info("total page : {}, total : {}", totalPageNum, pageInfo.getTotal());
......
......@@ -156,7 +156,7 @@ public class ItemDaoImpl implements ItemDao {
public PageInfo<Item> findPageExcludeFilter(CoinRequestDto coinRequestDto) {
ItemExample example = new ItemExample();
ItemExample.Criteria criteria = example.createCriteria();
criteria.andKindEqualTo(coinRequestDto.getKind());
JdbcHelper.ifPresent(coinRequestDto.getKind(), criteria :: andKindEqualTo);
PageHelper.startPage(coinRequestDto.getPage(), coinRequestDto.getLimit());
List<Item> list = itemMapper.selectByExampleWithBLOBs(example);
return new PageInfo<>(list);
......
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