whycxzp
2024-08-01 8814d819464c862dbf6657fd01fea3dcd1422dd7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package com.whyc.controller;
 
import com.whyc.dto.Response;
import com.whyc.service.QRCodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
/**
 * 二维码的识别和生成
 */
@RestController
@RequestMapping("qr")
public class QRCodeController{
 
    @Autowired
    private QRCodeService service;
 
    @PostMapping("extract")
    private Response extract(byte[] data){
        String res = service.extract(data);
        return new Response().set(1,res);
    }
 
}