| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.basic.dto.CustomerDto; |
| | | import com.ruoyi.basic.dto.CustomerImportDto; |
| | | import com.ruoyi.basic.pojo.Customer; |
| | | import com.ruoyi.basic.service.ICustomerService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | |
| | | } else { |
| | | list = customerService.selectCustomerLists(customer); |
| | | } |
| | | ExcelUtil<Customer> util = new ExcelUtil<Customer>(Customer.class); |
| | | ExcelUtil<Customer> util = new ExcelUtil<>(Customer.class); |
| | | util.exportExcel(response, list, "客户档案数据"); |
| | | } |
| | | |
| | | @PostMapping("/downloadTemplate") |
| | | @Log(title = "客户档案-下载模板", businessType = BusinessType.EXPORT) |
| | | public void downloadTemplate(HttpServletResponse response) { |
| | | ExcelUtil<Customer> util = new ExcelUtil<Customer>(Customer.class); |
| | | ExcelUtil<CustomerImportDto> util = new ExcelUtil<>(CustomerImportDto.class); |
| | | util.importTemplateExcel(response, "客户档案模板"); |
| | | } |
| | | |
| | |
| | | @Log(title = "客户档案", businessType = BusinessType.IMPORT) |
| | | @PostMapping("/importData") |
| | | public AjaxResult importData(MultipartFile file) throws Exception { |
| | | |
| | | return customerService.importData(file); |
| | | customerService.importData(file); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | /** |