cost plan fixbug json query use json_unquote
This commit is contained in:
@@ -647,6 +647,12 @@ class Order extends CI_Controller{
|
||||
if($money_json['price_loan']>0){
|
||||
$srv_json['loan_price'] = $money_json['price_loan'];
|
||||
$loan_row = $this->order_loans_model->get(['o_id'=>$item['id']]);
|
||||
if ($debug){
|
||||
echo "get 贷款信息: <br>";
|
||||
echo $this->order_loans_model->db->last_query()."<br>";
|
||||
var_dump($loan_row);
|
||||
echo "<br>";
|
||||
}
|
||||
$finance_id = $item['finance_id'];
|
||||
$srv_json['loan_product'] = '';
|
||||
if ($finance_id){
|
||||
@@ -656,10 +662,6 @@ class Order extends CI_Controller{
|
||||
}
|
||||
$srv_json['loan_num'] = $finance_num = $loan_row['num'] ? $loan_row['num'] : 36;
|
||||
if ($debug){
|
||||
echo "get 贷款信息: <br>";
|
||||
echo $this->order_loans_model->db->last_query()."<br>";
|
||||
var_dump($loan_row);
|
||||
echo "<br>";
|
||||
if ($finance_id){
|
||||
echo $this->sys_supplier_model->db->last_query()."<br>";
|
||||
var_dump($finance_row);
|
||||
@@ -684,8 +686,8 @@ class Order extends CI_Controller{
|
||||
'type' => 3,
|
||||
'status' => 1,
|
||||
's_effect_time<=' => date('Y-m-d',strtotime($item['bill_time'])),
|
||||
"json_extract(jsondata, '$.supplier_id') = '{$finance_id}'" => null,
|
||||
"json_extract(jsondata, '$.finance_num') = '{$finance_num}'" => null,
|
||||
"JSON_UNQUOTE(json_extract(jsondata, '$.supplier_id')) = '{$finance_id}'" => null,
|
||||
"JSON_UNQUOTE(json_extract(jsondata, '$.finance_num')) = '{$finance_num}'" => null,
|
||||
];
|
||||
$fd_row = $this->biz_settle_srv_model->get($where);
|
||||
if ($debug){
|
||||
@@ -696,7 +698,7 @@ class Order extends CI_Controller{
|
||||
}
|
||||
if(!$fd_row){
|
||||
$fd_row = $this->biz_settle_srv_model->get(['biz_id'=>$item['biz_id'],'is_def'=>1,'status'=>1,'type'=>3,
|
||||
"json_extract(jsondata, '$.supplier_id') = '{$finance_id}'" => null, "json_extract(jsondata, '$.finance_num') = '{$finance_num}'" => null]);
|
||||
"JSON_UNQUOTE(json_extract(jsondata, '$.supplier_id')) = '{$finance_id}'" => null, "JSON_UNQUOTE(json_extract(jsondata, '$.finance_num')) = '{$finance_num}'" => null]);
|
||||
if ($debug){
|
||||
echo "get 贷款配置(默认) : <br>";
|
||||
echo $this->biz_settle_srv_model->db->last_query()."<br>";
|
||||
|
||||
Reference in New Issue
Block a user