资源推送微服务
parent
7213cba666
commit
0525ddefb5
|
@ -86,10 +86,6 @@
|
|||
<artifactId>cloud-common-rabbit</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>cloud-pay-common</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
|
|
|
@ -9,6 +9,7 @@ import com.muyu.common.security.annotation.RequiresPermissions;
|
|||
import com.muyu.common.system.domain.SysUser;
|
||||
import com.muyu.resource.service.ResourceService;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
@ -28,6 +29,7 @@ import static com.muyu.common.core.domain.Result.success;
|
|||
* @name:ResourceController
|
||||
* @Date:2024/8/10 10:35
|
||||
*/
|
||||
@Log4j2
|
||||
@RestController
|
||||
@RequestMapping("/ResourceInfo")
|
||||
public class ResourceController {
|
||||
|
@ -41,9 +43,17 @@ public class ResourceController {
|
|||
@RequiresPermissions("Resource:ResourceInfo:import")
|
||||
@PostMapping("/importData")
|
||||
public Result importData (@RequestParam("file") MultipartFile file) throws Exception {
|
||||
|
||||
String originalFilename = file.getOriginalFilename();
|
||||
|
||||
log.info("传入的文件名:"+originalFilename);
|
||||
|
||||
ExcelUtil<ResourceInfo> util = new ExcelUtil<ResourceInfo>(ResourceInfo.class);
|
||||
List<ResourceInfo> resourceList = util.importExcel(file.getInputStream());
|
||||
|
||||
for (ResourceInfo resourceInfo : resourceList) {
|
||||
log.info(resourceInfo);
|
||||
}
|
||||
|
||||
|
||||
// String operName = SecurityUtils.getUsername();
|
||||
|
|
Loading…
Reference in New Issue