Commit 3210b200 authored by zw's avatar zw

返回提交id

parent 7b57f567
......@@ -112,11 +112,32 @@ class OrderLog extends Basic
$params["collecting_bill"], $params["house_number"], $params["industry_type"], $remark, $transfer_img);
if ($is_ok > 0) {
return $this->response("200", "request success", []);
return $this->response("200", "request success", ["bill_id"=> $is_ok]);
}
return $this->response("101", "request faild");
}
/**
* 获取上次提交付款的门牌号业态等
* @return \think\Response
*/
public function getBeforeBillInfo(){
$params = $this->params;
/* $params = array(
"order_id" => 15523, //关联order表id
);*/
if ( !isset($params["order_id"])) {
return $this->response("101", "订单编号不能为空");
}
$billInfo = $this->service_->getBillInfo($params["order_id"]);
if(count($billInfo) > 0 ){
return $this->response("200","request success",$billInfo[0]);
}else{
return $this->response("200","request null");
}
}
/**
* 新增退款申请
* @return \think\Response
......
......@@ -70,12 +70,13 @@ class OrderLogService
}
}
}
//todo if bill_arr not null, save database table
if (!empty($bill_arr)) {
$id = $this->payLogModel->addPayLog($bill_arr);
if($father_id > 0){
$pushMarchIn = new PushMessageService($params["report_id"], 2);
$pushMarchIn->pushMarchInMessage($params["report_id"], 2); //推送
return $id;
}
//todo if bill_arr not null, save database table
if (!empty($bill_arr)) {
return $this->payLogModel->addPayLog($bill_arr);
}
return $father_id;
}
......@@ -886,4 +887,13 @@ class OrderLogService
return $list;
}
/**
* @param $order_id
* @return false|\PDOStatement|string|\think\Collection
*/
public function getBillInfo($order_id){
$filed = "house_number,industry_type";
return $this->payLogModel->getBeforeBillInfo($filed,["order_id"=>$order_id]);
}
}
\ No newline at end of file
......@@ -77,6 +77,30 @@ class OPayLogModel extends Model
->where($where_)
->select();
}
/**
* 获取上次提交记录
* @param $filed
* @param $params
* @return false|\PDOStatement|string|\think\Collection
*/
public function getBeforeBillInfo($filed , $params)
{
$where_ = [];
if (isset($params["order_id"])) {
$where_["order_id"] = $params["order_id"];
}
$where_["father_id"] = 0;
return $this->db_
->field($filed)
->where($where_)
->limit(1)
->select();
}
public function getPayLogByOrderId($field,$params){
$where_ = [];
if(isset($params["order_id"])){
......
......@@ -334,6 +334,7 @@ Route::group('broker', [
'addFollowUp' => [ 'api_broker/Report/addFollowUp', [ 'method' => 'get|post' ] ], //新增跟进
'getFollowUpList' => [ 'api_broker/Report/getFollowUpList', [ 'method' => 'get|post' ] ],
'marchIn' => [ 'api_broker/OrderLog/marchIn', [ 'method' => 'get|post' ] ],
'getBeforeBillInfo' => [ 'api_broker/OrderLog/getBeforeBillInfo', [ 'method' => 'get|post' ] ],
'collectingBill' => [ 'api_broker/OrderLog/collectingBill', [ 'method' => 'get|post' ] ],
'refund' => [ 'api_broker/OrderLog/refund', [ 'method' => 'get|post' ] ],
'bargain' => [ 'api_broker/OrderLog/bargain', [ 'method' => 'get|post' ] ],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment