use of com.goodskill.api.dto.SeckillResponseDTO in project goodsKill by techa03.
the class SeckillController method showQRcode.
/**
* 显示二维码
*
* @param filename
* @param response
* @throws IOException
*/
@GetMapping(value = "/Qrcode/{QRfilePath}")
@Deprecated
public void showQRcode(@PathVariable("QRfilePath") String filename, HttpServletResponse response) throws IOException {
response.setContentType("img/*");
SeckillResponseDTO responseDto = seckillService.getQrcode(filename);
try (OutputStream os = response.getOutputStream()) {
os.write(responseDto.getData());
} catch (FileNotFoundException e) {
logger.error("the error is :", e);
}
}
Aggregations