diff --git a/pom.xml b/pom.xml
index 8e3941697..9504523b8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,7 +9,7 @@
4.0.0
manage
- 2.2.3
+ 2.2.4
UTF-8
1.8.0
diff --git a/src/main/java/au/com/royalpay/payment/manage/bill/core/impl/BillServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/bill/core/impl/BillServiceImpl.java
index f19d5edd8..75d6abbf8 100644
--- a/src/main/java/au/com/royalpay/payment/manage/bill/core/impl/BillServiceImpl.java
+++ b/src/main/java/au/com/royalpay/payment/manage/bill/core/impl/BillServiceImpl.java
@@ -50,6 +50,8 @@ public class BillServiceImpl implements BillService {
record.put("status", 1);
billMapper.save(record);
JSONObject result = new JSONObject();
+ //添加开关
+ String codeUrl = selectBillVersion(client,record.getString("bill_id"));
result.put("partner_name",client.getString("short_name"));
result.put("partner_code",client.getString("client_moniker"));
result.put("full_name",client.getString("company_name"));
@@ -58,6 +60,18 @@ public class BillServiceImpl implements BillService {
return result;
}
+ private String selectBillVersion(JSONObject clientInfo ,String billCodeId){
+ String billCodeVersion = clientInfo.containsKey("billcode_version")?clientInfo.getString("billcode_version"):"";
+ switch (billCodeVersion){
+ case "v1":
+ return PlatformEnvironment.getEnv().concatUrl("/api/v1.0/share_code/bills/payment/orders/" + billCodeId);
+ case "v2":
+ return PlatformEnvironment.getEnv().concatUrl("/api/v1.0/share_code/bills/payment/orders/"+billCodeId+"/link/payment");
+ default:
+ return PlatformEnvironment.getEnv().concatUrl("/api/v1.0/share_code/bills/payment/orders/" + billCodeId);
+ }
+ }
+
@Override
public JSONObject queryBills(int client_id, QueryBillBean queryBillBean) {
JSONObject params = queryBillBean.toParams();
diff --git a/src/main/java/au/com/royalpay/payment/manage/billqrcode/core/impl/PartnerBillServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/billqrcode/core/impl/PartnerBillServiceImpl.java
index 5e8d3ecd3..4bcb961fb 100644
--- a/src/main/java/au/com/royalpay/payment/manage/billqrcode/core/impl/PartnerBillServiceImpl.java
+++ b/src/main/java/au/com/royalpay/payment/manage/billqrcode/core/impl/PartnerBillServiceImpl.java
@@ -84,7 +84,7 @@ public class PartnerBillServiceImpl implements PartnerBillService {
record.put("code_urls",url);
record.put("code_url",QRCodeUtils.qrcodeImageCode(url, 250, false));
}
- return QRCodeUtils.qrcodeImageCode(code_url, 250, false);
+ return record.getString("code_url");
}
private String getQRCodeImg(JSONObject bill){