| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.sanshuo.ComSanshuoExpertDTO; |
| | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.user.AdministratorsUserVO; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.ExcelUtils; |
| | | import com.panzhihua.common.utlis.Snowflake; |
| | | import com.panzhihua.service_community.entity.ComEvent; |
| | | import com.panzhihua.service_community.entity.ComSanshuoExpert; |
| | | import com.panzhihua.service_community.service.ComSanShuoExpertService; |
| | | import com.panzhihua.service_community.service.IComEventService; |
| | | import com.panzhihua.service_community.util.ExcelListener; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.xml.crypto.Data; |
| | | import java.io.IOException; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | * 导入专家信息 |
| | | * */ |
| | | @PostMapping("/importExpert") |
| | | public R importExpert(){ |
| | | public R importExpert(MultipartFile multipartFile){ |
| | | try { |
| | | ExcelListener listener=new ExcelListener(comSanShuoExpertService); |
| | | EasyExcel.read(multipartFile.getInputStream(),ComSanshuoExpert.class,listener).sheet().doRead(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |