Commit 106dee92 authored by zw's avatar zw

bug

and 调整
parent b9679fd7
...@@ -232,7 +232,7 @@ class OrderLog extends Basic ...@@ -232,7 +232,7 @@ class OrderLog extends Basic
$params["collecting_bill"] = json_decode($params["collecting_bill"], true); $params["collecting_bill"] = json_decode($params["collecting_bill"], true);
$remark = isset($params["remark"]) ? $params["remark"] : ""; $remark = isset($params["remark"]) ? $params["remark"] : "";
$transfer_img = isset($params["transfer_img"]) ? $params["transfer_img"] : ""; $transfer_img = isset($params["transfer_img"]) ? json_decode($params["transfer_img"] ,true): "";
$source = $params["source"] ? $params["source"] : 0; $source = $params["source"] ? $params["source"] : 0;
$income_time = isset($params["income_time"]) ? $params["income_time"] : ""; $income_time = isset($params["income_time"]) ? $params["income_time"] : "";
......
...@@ -22,6 +22,10 @@ class PayLog extends Basic ...@@ -22,6 +22,10 @@ class PayLog extends Basic
$this->service_ = new PayLogService(); $this->service_ = new PayLogService();
} }
/**
* 获取上次提交收款的门牌号等
* @return \think\Response
*/
public function getBeForNum() public function getBeForNum()
{ {
$params = $this->params; $params = $this->params;
...@@ -40,4 +44,15 @@ class PayLog extends Basic ...@@ -40,4 +44,15 @@ class PayLog extends Basic
} }
} }
public function adjustment(){
$params = $this->params;
$params = array(
"pay_id" => 1,
);
if(empty($params["pay_id"])){
return $this->response("101","请求参数错误");
}
$this->service_->adjustment($params["pay_id"]);
}
} }
\ No newline at end of file
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
namespace app\api_broker\service; namespace app\api_broker\service;
use app\model\OPayLogAdjustment;
use app\model\OPayLogModel; use app\model\OPayLogModel;
/** /**
...@@ -14,10 +15,12 @@ use app\model\OPayLogModel; ...@@ -14,10 +15,12 @@ use app\model\OPayLogModel;
class PayLogService class PayLogService
{ {
private $payLogModel; private $payLogModel;
private $payLogAdjustmentModel;
public function __construct() public function __construct()
{ {
$this->payLogModel = new OPayLogModel(); $this->payLogModel = new OPayLogModel();
$this->payLogAdjustmentModel = new OPayLogAdjustment();
} }
public function getBeForNum($order_id) public function getBeForNum($order_id)
...@@ -26,4 +29,12 @@ class PayLogService ...@@ -26,4 +29,12 @@ class PayLogService
return $this->payLogModel->getBeforeBillInfo($filed, ["order_id" => $order_id]); return $this->payLogModel->getBeforeBillInfo($filed, ["order_id" => $order_id]);
} }
public function adjustment($pay_id){
//todo 1.计算剩余金额 查询调整表
$where_["paylog_id"] = $pay_id;
$where_["is_del"] = 0;
$this->payLogAdjustmentModel->getAdjustmentList($where_,"");
}
} }
\ No newline at end of file
<?php
namespace app\model;
use think\Db;
use think\Model;
/**
* Created by PhpStorm.
* User : zw
* Date : 2018/12/13
* Time : 4:29 PM
* Intro:
*/
class OPayLogAdjustment extends Model{
protected $table = "o_paylog_adjustment";
private $db_;
public function __construct()
{
$this->db_ = Db::name($this->table);
}
/**
* @param $field
* @param $params
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getAdjustmentList($field,$params){
return $this->db_
->field($field)
->where($params)
->select();
}
}
\ No newline at end of file
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