This commit is contained in:
sjm
2023-12-22 17:05:37 +08:00
parent b77f863fb5
commit b2cff4c97a
12 changed files with 557 additions and 1 deletions

View File

@@ -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);
}
}

View 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);
}
}
}