admin 1 year ago
parent
commit
f7fbb72d6e

+ 6 - 4
xsky-service/src/main/java/com/itheima/file/controller/WmMaterialController.java

@@ -3,10 +3,7 @@ package com.itheima.file.controller;
 import com.itheima.file.service.WmMaterialService;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
 @Slf4j
@@ -22,4 +19,9 @@ public class WmMaterialController {
         return wmMaterialService.uploadPicture(multipartFile);
     }
 
+    @GetMapping("get")
+    public String get() {
+        return wmMaterialService.getList();
+    }
+
 }

+ 7 - 0
xsky-service/src/main/java/com/itheima/file/mapper/Demo1Mapper.java

@@ -0,0 +1,7 @@
+package com.itheima.file.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.itheima.file.pojo.Demo1;
+
+public interface Demo1Mapper  extends BaseMapper<Demo1> {
+}

+ 18 - 0
xsky-service/src/main/java/com/itheima/file/pojo/Demo1.java

@@ -0,0 +1,18 @@
+package com.itheima.file.pojo;
+
+import lombok.Data;
+
+@Data
+public class Demo1 {
+    private String id;
+    private String objid;
+    private String otype;
+    private String iscontacts;
+    private String objshort;
+    private String objstext;
+    private String begda;
+    private String endda;
+    private String isshow;
+    private String zzzlxbm;
+    private String aedtm;
+}

+ 7 - 0
xsky-service/src/main/java/com/itheima/file/service/Demo1Service.java

@@ -0,0 +1,7 @@
+package com.itheima.file.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.itheima.file.pojo.Demo1;
+
+public interface Demo1Service extends IService<Demo1> {
+}

+ 2 - 0
xsky-service/src/main/java/com/itheima/file/service/WmMaterialService.java

@@ -6,4 +6,6 @@ public interface WmMaterialService {
 
     String uploadPicture(MultipartFile multipartFile);
 
+    String getList();
+
 }

+ 10 - 0
xsky-service/src/main/java/com/itheima/file/service/impl/Demo1ServiceImpl.java

@@ -0,0 +1,10 @@
+package com.itheima.file.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.itheima.file.mapper.Demo1Mapper;
+import com.itheima.file.service.Demo1Service;
+import com.itheima.file.pojo.Demo1;
+
+public class Demo1ServiceImpl extends ServiceImpl<Demo1Mapper, Demo1> implements Demo1Service {
+
+}

+ 9 - 0
xsky-service/src/main/java/com/itheima/file/service/impl/WmMaterialServiceImpl.java

@@ -1,6 +1,7 @@
 package com.itheima.file.service.impl;
 
 import com.heima.file.service.FileStorageService;
+import com.itheima.file.service.Demo1Service;
 import com.itheima.file.service.WmMaterialService;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -17,6 +18,9 @@ public class WmMaterialServiceImpl implements WmMaterialService {
     @Autowired
     private FileStorageService fileStorageService;
 
+    @Autowired
+    private Demo1Service demo1Service;
+
     @Override
     public String uploadPicture(MultipartFile multipartFile) {
         // 1 检查参数
@@ -40,4 +44,9 @@ public class WmMaterialServiceImpl implements WmMaterialService {
         }
         return "上传成功:" + fileId;
     }
+
+    @Override
+    public String getList() {
+        return null;
+    }
 }

+ 0 - 7
xsky-service/src/main/java/com/itheima/file/test/XSkyTest.java

@@ -1,7 +0,0 @@
-package com.itheima.file.test;
-
-public class XSkyTest {
-    public static void main(String[] args) {
-
-    }
-}