|
@@ -230,17 +230,18 @@ public class WeixinApiController extends ApiController {
|
|
|
renderNull();
|
|
|
return;
|
|
|
}
|
|
|
- if (reports.getQrCode() == null || reports.getQrCode().isEmpty()) {
|
|
|
- String str = "{\"expire_seconds\": 2592000, \"action_name\": \"QR_STR_SCENE\", \"action_info\": {\"scene\": {\"scene_str\": \"ExamQR_" + reports.getExamId() + "\"}}}";
|
|
|
- ApiResult apiResult = QrcodeApi.create(str);
|
|
|
- apiResult.getStr("url");
|
|
|
- reports.setQrCode(apiResult.getStr("url"));
|
|
|
- reports.update();
|
|
|
- renderText(apiResult.getJson());
|
|
|
- }else {
|
|
|
- //ApiResult qrresult = new ApiResult(reports.getQrCode());
|
|
|
- renderText(reports.getQrCode());;
|
|
|
- }
|
|
|
+// if (reports.getQrCode() == null || reports.getQrCode().isEmpty()) {
|
|
|
+ String str = "{\"expire_seconds\": 2592000, \"action_name\": \"QR_STR_SCENE\", \"action_info\": {\"scene\": {\"scene_str\": \"ExamQR_"
|
|
|
+ + reports.getExamId() + "\"}}}";
|
|
|
+ ApiResult apiResult = QrcodeApi.create(str);
|
|
|
+ String url = apiResult.getStr("url");
|
|
|
+ reports.setQrCode(url);
|
|
|
+ reports.update();
|
|
|
+ renderText(url);
|
|
|
+// }else {
|
|
|
+// //ApiResult qrresult = new ApiResult(reports.getQrCode());
|
|
|
+// renderText(reports.getQrCode());;
|
|
|
+// }
|
|
|
}
|
|
|
|
|
|
/*/
|