|  | @ -10,6 +10,8 @@ import com.yihu.wlyy.service.BaseService;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.util.HttpUtil;
 | 
	
		
			
				|  |  | import org.apache.commons.lang3.StringUtils;
 | 
	
		
			
				|  |  | import org.json.JSONObject;
 | 
	
		
			
				|  |  | import org.slf4j.Logger;
 | 
	
		
			
				|  |  | import org.slf4j.LoggerFactory;
 | 
	
		
			
				|  |  | import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  | import org.springframework.beans.factory.annotation.Value;
 | 
	
		
			
				|  |  | import org.springframework.stereotype.Service;
 | 
	
	
		
			
				|  | @ -41,6 +43,8 @@ public class QrcodeService extends BaseService {
 | 
	
		
			
				|  |  |     @Value("${server.server_url}")
 | 
	
		
			
				|  |  |     private String server_url;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     private Logger logger= LoggerFactory.getLogger(QrcodeService.class);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 所有医生二维码生成
 | 
	
		
			
				|  |  |      *
 | 
	
	
		
			
				|  | @ -65,11 +69,15 @@ public class QrcodeService extends BaseService {
 | 
	
		
			
				|  |  |             // 二维码内容
 | 
	
		
			
				|  |  |             String content = "qr_" + doctor.getCode() + "_" + doctor.getName();
 | 
	
		
			
				|  |  |             // 二维码图片文件名
 | 
	
		
			
				|  |  |             String fileName = doctor.getMobile();
 | 
	
		
			
				|  |  |             String fileName = doctor.getMobile()+"-"+doctor.getName();
 | 
	
		
			
				|  |  |             if (StringUtils.isEmpty(fileName)) {
 | 
	
		
			
				|  |  |                 continue;
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             // 通过微信接口生成医生二维码
 | 
	
		
			
				|  |  |             logger.info("content:"+content);
 | 
	
		
			
				|  |  |             logger.info("fileName:"+fileName.replaceAll("\r\n", ""));
 | 
	
		
			
				|  |  |             logger.info("path:"+path);
 | 
	
		
			
				|  |  |             logger.info("token:"+token);
 | 
	
		
			
				|  |  |             makeQrcodeFromWeiXin(content, fileName.replaceAll("\r\n", ""), path, token);
 | 
	
		
			
				|  |  |             doctor.setQrcode(fileName + ".png");
 | 
	
		
			
				|  |  |         }
 |