luodangjia
2025-02-06 4ea15c3e2a3f0434df79a1b49fe4e90f7337b025
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java
@@ -46,6 +46,7 @@
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
@@ -318,6 +319,9 @@
        if(StringUtils.isNotEmpty(orderPageList.getUserName())){
            List<AppUser> data = appUserClient.getAppUserByName(orderPageList.getUserName()).getData();
            List<Long> collect = data.stream().map(AppUser::getId).collect(Collectors.toList());
            if (CollectionUtils.isEmpty(collect)){
                return new PageInfo<>();
            }
            if(null != orderPageList.getAppUserIds()){
                List<Long> appUserIds = orderPageList.getAppUserIds();
                appUserIds.addAll(collect);
@@ -330,6 +334,9 @@
        if(StringUtils.isNotEmpty(orderPageList.getPhone())){
            List<AppUser> data = appUserClient.getAppUserByPhone(orderPageList.getPhone()).getData();
            List<Long> collect = data.stream().map(AppUser::getId).collect(Collectors.toList());
            if (CollectionUtils.isEmpty(collect)){
               return new PageInfo<>();
            }
            if(null != orderPageList.getAppUserIds()){
                List<Long> appUserIds = orderPageList.getAppUserIds();
                appUserIds.addAll(collect);
@@ -338,6 +345,8 @@
                orderPageList.setAppUserIds(collect);
            }
        }
        
        PageInfo<OrderPageListVo> pageInfo = new PageInfo<>(orderPageList.getPageCurr(), orderPageList.getPageSize());
@@ -944,7 +953,7 @@
            Workbook workbook = new XSSFWorkbook(fileInputStream);
            Sheet sheet = workbook.getSheetAt(0); // 获取第一个Sheet
            int lastRowNum = sheet.getLastRowNum();
            for (int i = 2; i <= lastRowNum; i++) {
            for (int i = 1; i <= lastRowNum; i++) {
                Row row = sheet.getRow(i);
                // 订单编号
                row.getCell(0).setCellType(CellType.STRING);