feat: 更新excel数据到数据库中
更新excel数据到数据库中更新excel数据到数据库中
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
package com.aos.fileidentify.controller;
|
||||
|
||||
import com.aos.fileidentify.entity.Employee;
|
||||
import com.aos.fileidentify.service.EmployeeService;
|
||||
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
/**
|
||||
* <p>Company: 成都返空汇网络技术有限公司</p>
|
||||
* <p>Description: </p>
|
||||
*
|
||||
* @author yangjiyu
|
||||
* @version x.x.x
|
||||
* @email "mailto:yangjiyu@fkhwl.com"
|
||||
* @date 2022.07.06 12:44
|
||||
* @since x.x.x
|
||||
*/
|
||||
@Api(value = "员工数据服务")
|
||||
@RestController
|
||||
@RequestMapping(value = "/employee")
|
||||
@AllArgsConstructor
|
||||
public class EmployeeController {
|
||||
|
||||
private final EmployeeService employeeService;
|
||||
|
||||
|
||||
/**
|
||||
* Gets all employee *
|
||||
*
|
||||
* @return the all employee
|
||||
* @since 0.0.1
|
||||
*/
|
||||
@ApiOperation(value = "员工所有数据查询")
|
||||
@GetMapping(value = "/list")
|
||||
public List<Employee> getAllEmployee() {
|
||||
return this.employeeService.getAllEmployee();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package com.aos.fileidentify.controller;
|
||||
import com.aos.fileidentify.service.FileIdentifyService;
|
||||
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestPart;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
@@ -22,7 +23,8 @@ import lombok.AllArgsConstructor;
|
||||
* @since x.x.x
|
||||
*/
|
||||
@Api(value = "PDF文件上传识别服务")
|
||||
@RestController("/fileIdentify")
|
||||
@RestController
|
||||
@RequestMapping(value = "/fileIdentify")
|
||||
@AllArgsConstructor
|
||||
public class FileIdentifyController {
|
||||
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.aos.fileidentify.service;
|
||||
|
||||
import com.aos.fileidentify.entity.Employee;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>Company: 成都返空汇网络技术有限公司</p>
|
||||
* <p>Description: </p>
|
||||
*
|
||||
* @author yangjiyu
|
||||
* @version x.x.x
|
||||
* @email "mailto:yangjiyu@fkhwl.com"
|
||||
* @date 2022.07.06 12:47
|
||||
* @since x.x.x
|
||||
*/
|
||||
public interface EmployeeService {
|
||||
/**
|
||||
* Gets all employee *
|
||||
*
|
||||
* @return the all employee
|
||||
* @since 0.0.1
|
||||
*/
|
||||
List<Employee> getAllEmployee();
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.aos.fileidentify.service.impl;
|
||||
|
||||
import com.aos.fileidentify.entity.Employee;
|
||||
import com.aos.fileidentify.mapper.EmployeeMapper;
|
||||
import com.aos.fileidentify.service.EmployeeService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* <p>Company: 成都返空汇网络技术有限公司</p>
|
||||
* <p>Description: </p>
|
||||
*
|
||||
* @author yangjiyu
|
||||
* @version x.x.x
|
||||
* @email "mailto:yangjiyu@fkhwl.com"
|
||||
* @date 2022.07.06 12:52
|
||||
* @since x.x.x
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class EmployeeServiceImpl implements EmployeeService {
|
||||
|
||||
private final EmployeeMapper employeeMapper;
|
||||
|
||||
@Override
|
||||
public List<Employee> getAllEmployee() {
|
||||
QueryWrapper<Employee> queryWrapper = new QueryWrapper<>();
|
||||
return employeeMapper.selectList(queryWrapper.lambda().eq(Employee::getEmployeeKey, "1f1c8258ba2226e6a6851e62741418d7"));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user