存酒接口修改
This commit is contained in:
@@ -54,7 +54,18 @@ public class ShopStorageServiceImpl extends ServiceImpl<ShopStorageMapper, ShopS
|
||||
queryWrapper.eq(ShopStorage::getPhone, phone);
|
||||
}
|
||||
queryWrapper.orderBy(ShopStorage::getId, false);
|
||||
return page(PageUtil.buildPage(), queryWrapper);
|
||||
Page<ShopStorage> shopStoragePage = page(PageUtil.buildPage(), queryWrapper);
|
||||
shopStoragePage.getRecords().forEach(item -> {
|
||||
if (item.getNum() == 0) {
|
||||
item.setStatus(0);
|
||||
}
|
||||
|
||||
if (item.getExpTime().isBefore(DateUtil.date().toLocalDateTime())) {
|
||||
item.setStatus(2);
|
||||
}
|
||||
});
|
||||
updateBatch(shopStoragePage.getRecords());
|
||||
return shopStoragePage;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user