|
@ -20,6 +20,7 @@ import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.mock.web.MockMultipartFile;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
import sun.plugin2.message.Message;
|
|
|
|
|
|
import javax.transaction.Transactional;
|
|
|
import java.io.InputStream;
|
|
@ -161,7 +162,7 @@ public class QrcodeService {
|
|
|
* @param token
|
|
|
* @throws
|
|
|
*/
|
|
|
public String makeQrcodeFromWeiXin(String content, String fileName, String token) throws Exception {
|
|
|
public String makeQrcodeFromWeiXin(String content, String fileName, String token) {
|
|
|
try {
|
|
|
String token_url = "https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token=" + token;
|
|
|
String params = "{\"action_name\": \"QR_LIMIT_STR_SCENE\", \"action_info\": {\"scene\": {\"scene_str\": \"" + content + "\"}}}";
|
|
@ -204,15 +205,16 @@ public class QrcodeService {
|
|
|
|
|
|
return uploadVO.getFullUri();
|
|
|
} else {
|
|
|
throw new Exception("请求微信生成二维码失败!");
|
|
|
}
|
|
|
System.out.println("请求微信生成二维码失败!");
|
|
|
}
|
|
|
} else {
|
|
|
throw new Exception("请求微信生成二维码失败!");
|
|
|
System.out.println("请求微信生成二维码失败!");
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
throw new Exception(e.getMessage());
|
|
|
System.out.println(e.getMessage());
|
|
|
}
|
|
|
return content;
|
|
|
}
|
|
|
|
|
|
}
|