From 9dffb9722d9bf2a783b8bcc266dd75875be3ed49 Mon Sep 17 00:00:00 2001 From: luoyang Date: Fri, 6 Sep 2019 10:19:43 +0800 Subject: [PATCH] fix bill code string --- pom.xml | 3 ++- .../manage/billqrcode/web/PartnerBillController.java | 6 ++++-- src/main/ui/static/payment/billqrcode/bill-qrcode-manage.js | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 6115a95ca..a3ffde951 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,8 @@ 4.0.0 manage - 1.2.6 + 1.2.7 + UTF-8 1.4.0 diff --git a/src/main/java/au/com/royalpay/payment/manage/billqrcode/web/PartnerBillController.java b/src/main/java/au/com/royalpay/payment/manage/billqrcode/web/PartnerBillController.java index 745f281a8..c18f2f2a6 100644 --- a/src/main/java/au/com/royalpay/payment/manage/billqrcode/web/PartnerBillController.java +++ b/src/main/java/au/com/royalpay/payment/manage/billqrcode/web/PartnerBillController.java @@ -22,8 +22,10 @@ public class PartnerBillController { private PartnerBillService partnerBillService; @PartnerMapping(value = "/bills", method = RequestMethod.POST) - public String addBill(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject partner, @RequestBody NewBillQrCodeBean newBillQrCodeBean) { - return partnerBillService.saveBill(partner, newBillQrCodeBean); + public JSONObject addBill(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject partner, @RequestBody NewBillQrCodeBean newBillQrCodeBean) { + JSONObject billCode = new JSONObject(); + billCode.put("code_url", partnerBillService.saveBill(partner, newBillQrCodeBean)); + return billCode; } @PartnerMapping(value = "", method = RequestMethod.GET) diff --git a/src/main/ui/static/payment/billqrcode/bill-qrcode-manage.js b/src/main/ui/static/payment/billqrcode/bill-qrcode-manage.js index a5d0b2248..45474e136 100644 --- a/src/main/ui/static/payment/billqrcode/bill-qrcode-manage.js +++ b/src/main/ui/static/payment/billqrcode/bill-qrcode-manage.js @@ -43,7 +43,7 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS } $http.post('/partner/qrcode/bills',params).then(function (resp) { commonDialog.alert({title: 'Success', content: 'Success', type: 'success'}); - $scope.code_url = resp.data; + $scope.code_url = resp.data.code_url; $scope.loadBills(1); },function (resp) { commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});