update
This commit is contained in:
@@ -46,4 +46,10 @@ public class CommentController {
|
||||
public String View_comment(){
|
||||
return commentService.View_comment();
|
||||
}
|
||||
|
||||
// 显示回复
|
||||
@RequestMapping(method = RequestMethod.GET, value = "/view_reply")
|
||||
public String View_reply(int id){
|
||||
return commentService.View_Reply(id);
|
||||
}
|
||||
}
|
||||
|
27
src/main/java/com/lovenav/controller/QRCodeController.java
Normal file
27
src/main/java/com/lovenav/controller/QRCodeController.java
Normal file
@@ -0,0 +1,27 @@
|
||||
package com.lovenav.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.lovenav.utils.QRCodeUtil;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
|
||||
public class QRCodeController {
|
||||
private QRCodeUtil qrCodeUtil;
|
||||
@RequestMapping(method = RequestMethod.GET, value = "/qrc")
|
||||
public String QRCode(String url){
|
||||
String text = url;
|
||||
String logoPath ="src/main/resources/static/logo/NAV.png";
|
||||
String destPath = "src/main/resources/static/qr";
|
||||
try {
|
||||
String url2 = qrCodeUtil.encode(text, logoPath, destPath, true);
|
||||
String base64 = qrCodeUtil.getBase64(url2);
|
||||
return JSON.toJSONString(base64);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user