zss
2025-01-13 8d85246f061e3da623c7b9eb4e323ee724b4de0b
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
27
28
29
30
31
32
33
34
package com.yuanchu.mom.controller;
 
import com.yuanchu.mom.annotation.ValueAuth;
import com.yuanchu.mom.enums.QrModelType;
import com.yuanchu.mom.service.QrShowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
 
@Controller
@RequestMapping("/qr")
public class QrShowController {
 
    @Autowired
    private QrShowService qrShowService;
 
    /**
     * 二维码扫码请求接口
     * @param model
     * @param code 编号
     * @param type 类型(word/device)
     * @return
     */
    @ValueAuth
    @GetMapping("/qrScan")
    public String hello(Model model, @RequestParam("code") String code,@RequestParam("type") String type){
        qrShowService.transformModelByType(model,code,type);
        return QrModelType.getValueByType(type);
    }
 
}