edit-api-deal_log
This commit is contained in:
@@ -108,7 +108,7 @@ class Contract extends Wxapp{
|
||||
$img = $this->input_param('img');
|
||||
|
||||
$row = $this->contracts_model->get(['type'=>$type,'o_id'=>$id]);
|
||||
$order = $this->orders_model->get(['id'=>$id],'brand_id,mobile,biz_id,ifentrust,srv_ids,info_json,payway');
|
||||
$order = $this->orders_model->get(['id'=>$id],'id,brand_id,mobile,biz_id,ifentrust,srv_ids,info_json,payway');
|
||||
if(!$row['file'] || !$img){
|
||||
throw new Exception('参数错误', API_CODE_INVILD_PARAM);
|
||||
}
|
||||
@@ -164,6 +164,12 @@ class Contract extends Wxapp{
|
||||
];
|
||||
$result = $this->contracts_model->update($update,['id'=>$row['id']]);
|
||||
if($result){
|
||||
//增加分销记录
|
||||
$this->load->library('entity/deal_entity',['app_id'=>1]);
|
||||
$deal_res = $this->deal_entity->deal_log($row['o_id']);
|
||||
if(time()<= strtotime('2021-12-24')){
|
||||
debug_log("[info]". __FUNCTION__ . ": order_id:{$row['o_id']},return:".json_encode($deal_log), 'deal_log.log');
|
||||
}
|
||||
if(!$order['srv_ids']){
|
||||
$userinfo = $this->app_user_model->get(['mobile'=>$order['mobile']]);
|
||||
$this->orders_entity->sign_after_v2($id,$userinfo);
|
||||
|
||||
@@ -233,10 +233,6 @@ class Cusorder extends Wxapp{
|
||||
//更新客户下单时间
|
||||
$this->customers_model->update(array('order_time' => date('Y-m-d H:i:s')),['id'=>$cus_id]);
|
||||
$this->customers_entity->add_log($cus_id, $this->session['uid'], $this->session['uname'], "新增订单");
|
||||
|
||||
//增加分销记录
|
||||
$this->load->library('entity/deal_entity',['app_id'=>1]);
|
||||
$this->deal_entity->deal_log($o_id);
|
||||
|
||||
return ['id'=>$o_id,'admin_img' => $orders_entity::API_ADMIN_IMG,'pay_img'=>$orders_entity::API_CREATE_PAY_IMG];
|
||||
}else{
|
||||
|
||||
@@ -110,9 +110,6 @@ class Cusorder2 extends Wxapp{
|
||||
$this->customers_model->update(array('order_time' => date('Y-m-d H:i:s')),['id'=>$cus_id]);
|
||||
$this->customers_entity->add_log($cus_id, $this->session['uid'], $this->session['uname'], "新增订单");
|
||||
|
||||
//增加分销记录
|
||||
$this->load->library('entity/deal_entity',['app_id'=>1]);
|
||||
$this->deal_entity->deal_log($o_id);
|
||||
//意向金订单
|
||||
$orders_entity = new Orders_entity();
|
||||
if($inten_money){
|
||||
|
||||
Reference in New Issue
Block a user