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