|
@@ -1,11 +1,15 @@
|
|
|
package com.fdkankan.scene.controller;
|
|
|
|
|
|
+import com.fdkankan.common.constant.ConstantFilePath;
|
|
|
+import com.fdkankan.common.util.MatrixToImageWriterUtil;
|
|
|
import com.fdkankan.platform.api.feign.PlatformClient;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import java.io.File;
|
|
|
+
|
|
|
@RestController
|
|
|
@RequestMapping("/api/device")
|
|
|
public class TestController {
|
|
@@ -14,11 +18,21 @@ public class TestController {
|
|
|
PlatformClient platformClient;
|
|
|
|
|
|
@GetMapping("/test")
|
|
|
- public String test(){
|
|
|
+ public String test() throws Exception {
|
|
|
|
|
|
// platformClient.getCameraByChildName()
|
|
|
+ MatrixToImageWriterUtil.createQRCode("http://baidu.com" + "123123", ConstantFilePath.BASE_PATH + File.separator + "sceneQRcode/"+"123123"+".png",
|
|
|
+ null);
|
|
|
return null;
|
|
|
|
|
|
}
|
|
|
|
|
|
+ public static void main(String[] args) throws Exception {
|
|
|
+ MatrixToImageWriterUtil.createQRCode("http://baidu.com" + "123123", ConstantFilePath.BASE_PATH + File.separator + "sceneQRcode/"+"123123"+".png",
|
|
|
+ null);
|
|
|
+
|
|
|
+// MatrixToImageWriterUtil.createQRCode("http://baidu.com" + "123123", ConstantFilePath.BASE_PATH + File.separator + "sceneQRcode/"+"123123"+".png",
|
|
|
+// ConstantFilePath.SCENE_PATH + "images/images" + "123123" + "/QRShareLogo.png");
|
|
|
+ }
|
|
|
+
|
|
|
}
|