ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/PageUtils.java
@@ -25,6 +25,13 @@ PageHelper.startPage(pageNum, pageSize, orderBy).setReasonable(reasonable); } public static void startPage(Integer pageNum,Integer pageSize){ PageDomain pageDomain = TableSupport.buildPageRequest(); String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy()); Boolean reasonable = pageDomain.getReasonable(); PageHelper.startPage(pageNum, pageSize, orderBy).setReasonable(reasonable); } /** * 清理分页的线程变量 */ ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/page/PageDomain.java
@@ -38,6 +38,8 @@ return pageNum; } public void setPageNum(Integer pageNum) { this.pageNum = pageNum; ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java
@@ -360,7 +360,7 @@ } catch (ParseException e) { throw new RuntimeException(e); } }).reversed()) })) .collect(Collectors.toList()); orderStatistics.setOrderStatisticsDetailList(sortedDetails); } ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java
@@ -209,7 +209,7 @@ @ApiOperation(value = "门店详情", tags = {"管理后台-门店管理"}) public R<Shop> getDetailById(@RequestParam("id") Integer id){ Shop shop = shopService.getById(id); if (shop.getPid()==0){ if (null != shop.getPid() && shop.getPid()==0){ shop.setPid(null); } return R.ok(shop); ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/SeckillActivityInfoServiceImpl.java
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ruoyi.account.api.feignClient.AppUserClient; import com.ruoyi.account.api.model.AppUser; import com.ruoyi.common.core.utils.PageUtils; import com.ruoyi.common.core.utils.ServletUtils; import com.ruoyi.common.core.utils.StringUtils; import com.ruoyi.common.security.service.TokenService; @@ -100,21 +101,20 @@ if (startIndex >= sortedList.size()) { return new ArrayList<>(); } return seckillActivityVOS; return sortedList.subList(startIndex, endIndex); } private Comparator<SeckillActivityVO> getComparator(String orderByColumn, String isAsc) { Comparator<SeckillActivityVO> comparator; switch (orderByColumn) { case "sellingPrice": case "tgs.selling_price": comparator = Comparator.comparing(SeckillActivityVO::getSellingPrice); break; case "integral": comparator = Comparator.comparing(SeckillActivityVO::getIntegral); break; case "saleNum": case "sale_num": comparator = Comparator.comparing(SeckillActivityVO::getSaleNum); break; // 添加其他排序字段 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianSubscribeServiceImpl.java
@@ -109,13 +109,17 @@ PageInfo<TechnicianSubscribeVO> pageInfo = new PageInfo(pageCurr, pageSize); List<TechnicianSubscribeVO> technicianSubscribeByUserAndShop1 = technicianSubscribeMapper.getTechnicianSubscribeByUserAndShop1(pageInfo, shopId, status, phone, name, serviceMode); if (StringUtils.isNotEmpty(name)){ List<AppUser> nameIds = appUserClient.getAppUserByPhone(name).getData(); technicianSubscribeByUserAndShop1 = technicianSubscribeByUserAndShop1.stream().filter(e -> nameIds.contains(e.getAppUserId())) List<AppUser> nameIds = appUserClient.getAppUserByName(name).getData(); List<Long> collect = nameIds.stream().map(AppUser::getId).collect(Collectors.toList()); if (collect.isEmpty())collect.add(-1L); technicianSubscribeByUserAndShop1 = technicianSubscribeByUserAndShop1.stream().filter(e -> collect.contains(e.getAppUserId())) .collect(Collectors.toList()); } if (StringUtils.isNotEmpty(phone)){ List<AppUser> phoneIds = appUserClient.getAppUserByPhone(phone).getData(); technicianSubscribeByUserAndShop1 = technicianSubscribeByUserAndShop1.stream().filter(e -> phoneIds.contains(e.getAppUserId())) List<Long> collect = phoneIds.stream().map(AppUser::getId).collect(Collectors.toList()); if (collect.isEmpty())collect.add(-1L); technicianSubscribeByUserAndShop1 = technicianSubscribeByUserAndShop1.stream().filter(e -> collect.contains(e.getAppUserId())) .collect(Collectors.toList()); } for (TechnicianSubscribeVO technicianSubscribeVO : technicianSubscribeByUserAndShop1) {