| | |
| | | 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; |
| | |
| | | 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); |
| | |
| | | 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); |
| | |
| | | orderPageList.setAppUserIds(collect); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | PageInfo<OrderPageListVo> pageInfo = new PageInfo(orderPageList.getPageCurr(), orderPageList.getPageSize()); |
| | | |
| | | PageInfo<OrderPageListVo> pageInfo = new PageInfo<>(orderPageList.getPageCurr(), orderPageList.getPageSize()); |
| | | |
| | | List<OrderPageListVo> list = this.baseMapper.getOrderPageList(pageInfo, orderPageList); |
| | | for (OrderPageListVo orderPageListVo : list) { |
| | | Long appUserId = orderPageListVo.getAppUserId(); |
| | |
| | | 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(1).setCellType(CellType.STRING); |
| | | String orderNum = row.getCell(1).getStringCellValue(); |
| | | // 订单编号 |
| | | row.getCell(0).setCellType(CellType.STRING); |
| | | String orderNum = row.getCell(0).getStringCellValue(); |
| | | // 快递单号 |
| | | row.getCell(7).setCellType(CellType.STRING); |
| | | String expressNum = row.getCell(7).getStringCellValue(); |
| | | row.getCell(1).setCellType(CellType.STRING); |
| | | String expressNum = row.getCell(1).getStringCellValue(); |
| | | // 快递公司名称 |
| | | row.getCell(8).setCellType(CellType.STRING); |
| | | String expressName = row.getCell(8).getStringCellValue(); |
| | | row.getCell(2).setCellType(CellType.STRING); |
| | | String expressName = row.getCell(2).getStringCellValue(); |
| | | // 省区划代码 |
| | | row.getCell(10).setCellType(CellType.STRING); |
| | | String provinceCode = row.getCell(10).getStringCellValue(); |
| | | row.getCell(3).setCellType(CellType.STRING); |
| | | String provinceCode = row.getCell(3).getStringCellValue(); |
| | | // 市区划代码 |
| | | row.getCell(12).setCellType(CellType.STRING); |
| | | String cityCode = row.getCell(12).getStringCellValue(); |
| | | row.getCell(4).setCellType(CellType.STRING); |
| | | String cityCode = row.getCell(4).getStringCellValue(); |
| | | Order order = this.getOne(new LambdaQueryWrapper<Order>() |
| | | .eq(Order::getOrderNumber, orderNum) |
| | | ); |