| | |
| | | import com.xiaopeng.operation.service.IXpWhitelistService; |
| | | import io.swagger.annotations.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.poi.openxml4j.exceptions.NotOfficeXmlFileException; |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | import org.springframework.transaction.annotation.Propagation; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.ServletOutputStream; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.net.URLEncoder; |
| | |
| | | } |
| | | } |
| | | } |
| | | @Log(title = "邀请码导入", businessType = BusinessType.IMPORT) |
| | | @ApiOperation(value = "邀请码导入") |
| | | @PostMapping("/importExcel") |
| | | public R<String> importExcel(@RequestPart("file") MultipartFile file) { |
| | | ImportParams params = new ImportParams(); |
| | | // params.setTitleRows(1); // 标题行数 |
| | | params.setHeadRows(1); //表头行数 |
| | | InputStream inputStream = null; |
| | | // List<CustomerImportFailedData> failedData = new ArrayList<>(); |
| | | List<InvitationCodeImportExcel> invitationCodeImportExcels; |
| | | try { |
| | | inputStream = file.getInputStream(); |