Upd:修改账单码

master
dulingling 5 years ago
parent 7d054dd0ca
commit 3a10bef91f

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

@ -50,6 +50,8 @@ public class BillServiceImpl implements BillService {
record.put("status", 1); record.put("status", 1);
billMapper.save(record); billMapper.save(record);
JSONObject result = new JSONObject(); JSONObject result = new JSONObject();
//添加开关
String codeUrl = selectBillVersion(client,record.getString("bill_id"));
result.put("partner_name",client.getString("short_name")); result.put("partner_name",client.getString("short_name"));
result.put("partner_code",client.getString("client_moniker")); result.put("partner_code",client.getString("client_moniker"));
result.put("full_name",client.getString("company_name")); result.put("full_name",client.getString("company_name"));
@ -58,6 +60,18 @@ public class BillServiceImpl implements BillService {
return result; 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 @Override
public JSONObject queryBills(int client_id, QueryBillBean queryBillBean) { public JSONObject queryBills(int client_id, QueryBillBean queryBillBean) {
JSONObject params = queryBillBean.toParams(); JSONObject params = queryBillBean.toParams();

@ -84,7 +84,7 @@ public class PartnerBillServiceImpl implements PartnerBillService {
record.put("code_urls",url); record.put("code_urls",url);
record.put("code_url",QRCodeUtils.qrcodeImageCode(url, 250, false)); 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){ private String getQRCodeImg(JSONObject bill){

Loading…
Cancel
Save