| | |
| | | package com.product.device.service; |
| | | |
| | | |
| | | import cn.hutool.extra.qrcode.QrCodeUtil; |
| | | import cn.hutool.extra.qrcode.QrConfig; |
| | | import com.product.device.utils.QuickResponseCode; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.product.common.lang.StringUtils; |
| | | import com.product.device.config.QuickResponseCode; |
| | | |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | |
| | | |
| | | @Service |
| | | public class QuickResponseService { |
| | | @Resource |
| | |
| | | str.append( ",\"uuid\":\"").append(uuid ).append("\""); |
| | | } |
| | | str.append("}"); |
| | | |
| | | |
| | | //生成到本地文件 |
| | | QrCodeUtil.generate(str.toString(), QuickResponseCode.getQRConfig(), file); |
| | | } |
| | | |
| | | |
| | | public static void main(String args[]) { |
| | | QuickResponseService k=new QuickResponseService(); |
| | | File f=new File("d:/device.png"); |