配置修改

1 个父辈 1e95d133
......@@ -38,6 +38,7 @@ public class GoodsService {
if(goods.getCreatetime() == null ) {
goods.setCreatetime(new java.util.Date());
}
goods.setDeleted(false);
goodsDao.updateByPrimaryKey(goods);
}
return goods;
......@@ -60,7 +61,11 @@ public class GoodsService {
c.andEqualTo("deleted", false);
RowBounds row = new RowBounds((page - 1) * size, size);
List<Goods> list = goodsDao.selectByExampleAndRowBounds(ex, row);
int count = goodsDao.selectCountByExample(ex);
int count = 1;
if (id != null && id > 0) {
}else {
count = goodsDao.selectCountByExample(ex);
}
PageResults<Goods> pageResults = new PageResults<>();
pageResults.setTotal(count);
pageResults.setPage(page);
......
Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
请先完成此消息的编辑!