public Map<String, Object> getAssetInventory(AssetInventoryDto dto, PageableDto pageableDto) {
Pageable pageable = PageRequest.of(pageableDto.getPage() - 1, pageableDto.getSize(), Sort.Direction.DESC,
"createTimestamp");
AssetInventoryModel assetInventoryModel = new AssetInventoryModel();
UserInfoDto userInfoDto = ((SpringSecureUserInfo) MineSecureUtility.currentUser()).getUserInfo();
assetInventoryModel.setCreateId(userInfoDto.getId());
//Sort.Order order = new Sort.Order(Sort.Direction.DESC, "").nullsFirst();//空值放前面
ExampleMatcher matcher = ExampleMatcher.matching().withIgnorePaths("inventoryLoss").withIgnorePaths("quantity")
.withIgnorePaths("inventoryProfit")// 忽略属性:是否关注。因为是基本类型,需要忽略掉
.withMatcher("inventoryRunningNum", GenericPropertyMatchers.contains())// 全部模糊查询,即%{inventoryRunningNum}%
.withMatcher("inventoryName", GenericPrope
JPA动态查询之QBE查询
最新推荐文章于 2023-10-15 20:25:27 发布