|  | @@ -56,7 +56,7 @@ public class AppRedemptionCodeServiceImpl extends ServiceImpl<RedemptionCodeDao,
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      @Override
 |  |      @Override
 | 
											
												
													
														|  |      @Transactional(rollbackFor = Exception.class)
 |  |      @Transactional(rollbackFor = Exception.class)
 | 
											
												
													
														|  | -    public List<AppRedemptionCode> importRedemptionCode(MultipartFile file) throws Exception {
 |  | 
 | 
											
												
													
														|  | 
 |  | +    public String importRedemptionCode(MultipartFile file) throws Exception {
 | 
											
												
													
														|  |          Map<String, List<Map<String, Object>>> sheetsListMap = POIUtil.importExcel(
 |  |          Map<String, List<Map<String, Object>>> sheetsListMap = POIUtil.importExcel(
 | 
											
												
													
														|  |                  new ByteArrayInputStream(file.getBytes()), 0, file.getOriginalFilename());
 |  |                  new ByteArrayInputStream(file.getBytes()), 0, file.getOriginalFilename());
 | 
											
												
													
														|  |  
 |  |  
 | 
											
										
											
												
													
														|  | @@ -96,11 +96,12 @@ public class AppRedemptionCodeServiceImpl extends ServiceImpl<RedemptionCodeDao,
 | 
											
												
													
														|  |          try {
 |  |          try {
 | 
											
												
													
														|  |              redemptionCodeDao.insertBatch(redemptionCodesList);
 |  |              redemptionCodeDao.insertBatch(redemptionCodesList);
 | 
											
												
													
														|  |          } catch (DuplicateKeyException dupKeyEx) {
 |  |          } catch (DuplicateKeyException dupKeyEx) {
 | 
											
												
													
														|  | -            throw new BizException("数据重复:" + dupKeyEx.getCause(), dupKeyEx);
 |  | 
 | 
											
												
													
														|  | 
 |  | +            logger.error("数据导入重复: " + dupKeyEx.getCause());
 | 
											
												
													
														|  | 
 |  | +            return "数据重复:" + dupKeyEx;
 | 
											
												
													
														|  |          } catch (Exception ex) {
 |  |          } catch (Exception ex) {
 | 
											
												
													
														|  |              throw new BizException("导入数据出错:" + ex, ex);
 |  |              throw new BizException("导入数据出错:" + ex, ex);
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  | -        return redemptionCodesList;
 |  | 
 | 
											
												
													
														|  | 
 |  | +        return "成功导入 " + redemptionCodesList.size() + "条";
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      @Override
 |  |      @Override
 |