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