|
@@ -1,7 +1,11 @@
|
|
|
package com.huimv.manager.controller;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.huimv.manager.dao.entity.ImagePathEntity;
|
|
|
import com.huimv.manager.service.IImageService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.CrossOrigin;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
@@ -14,6 +18,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
* @Author : ZhuoNing
|
|
|
* @Create : 2020-12-25
|
|
|
**/
|
|
|
+@CrossOrigin
|
|
|
@RestController
|
|
|
@RequestMapping("/imageManager")
|
|
|
public class ImageManagerController {
|
|
@@ -33,7 +38,8 @@ public class ImageManagerController {
|
|
|
@RequestMapping(value="/getLastImageAiResult",method = RequestMethod.GET)
|
|
|
public String getLastImageAiResult(){
|
|
|
//
|
|
|
- return imageService.getLastImage();
|
|
|
+ ImagePathEntity imagePathEntity = imageService.getLastImage();
|
|
|
+ return JSONObject.toJSON(imagePathEntity).toString();
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -51,4 +57,9 @@ public class ImageManagerController {
|
|
|
//
|
|
|
return imageService.getNextImage();
|
|
|
}
|
|
|
+
|
|
|
+// public JSONArray listImage(String startDate, String endDate){
|
|
|
+// imageService
|
|
|
+// }
|
|
|
+
|
|
|
}
|