Upd:修改账单码

master
dulingling 5 years ago
parent c869da45f3
commit f4c65d3443

@ -9,7 +9,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId>
<version>2.2.3</version>
<version>2.2.4</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jib-maven-plugin.version>1.8.0</jib-maven-plugin.version>

@ -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();

@ -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){

Loading…
Cancel
Save