Commit 4a2ecfbd authored by hujun's avatar hujun

调整详情

parent 08c912cb
...@@ -3126,7 +3126,7 @@ class Finance extends Basic ...@@ -3126,7 +3126,7 @@ class Finance extends Basic
return $this->response($code, '无调整信息'); return $this->response($code, '无调整信息');
} }
$num = $m_pay_adjustment->editData(['is_del'=>0], $this->params['id']); $num = $m_pay_adjustment->editData(['is_del'=>1], $this->params['id']);
if ($num > 0) { if ($num > 0) {
$m_pay = new OPayLogModel(); $m_pay = new OPayLogModel();
...@@ -3141,4 +3141,25 @@ class Finance extends Basic ...@@ -3141,4 +3141,25 @@ class Finance extends Basic
return $this->response($code, $msg); return $this->response($code, $msg);
} }
public function getAdjustmentDetail() {
$code = 101;
if (empty($this->params['id'])) {
return $this->response($code, '参数错误');
}
$m_pay_adjustment = new OPayLogAdjustment();
$adjustment_data = $m_pay_adjustment->getAdjustmentList('id,new_paylog_id,paylog_id,money', ['id'=>$this->params['id']]);
if (empty($adjustment_data[0]['id'])) {
return $this->response($code, '没有该调整详情');
}
$m_pay = new OPayLogModel();
$result['adjustment'] = $m_pay->getOrderHouse('a.id,a.order_id,b.house_id,c.internal_address,a.income_time,a.type,a.money', ['a.id'=> $adjustment_data[0]['new_paylog_id']]);
$result['adjustment_old'] = $m_pay->getOrderHouse('a.id,a.order_id,b.house_id,c.internal_address,a.income_time,a.type,a.type', ['a.id'=> $adjustment_data[0]['paylog_id']]);
$result['money'] = $adjustment_data[0]['money'];
$result['id'] = $adjustment_data[0]['id'];
$code = 200;
return $this->response($code, '', $result);
}
} }
...@@ -28,7 +28,7 @@ class OPayLogAdjustment extends BaseModel{ ...@@ -28,7 +28,7 @@ class OPayLogAdjustment extends BaseModel{
* @throws \think\db\exception\ModelNotFoundException * @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException * @throws \think\exception\DbException
*/ */
public function getAdjustmentList($field,$params){ public function getAdjustmentList($field, $params){
return $this->db_ return $this->db_
->field($field) ->field($field)
->where($params) ->where($params)
......
...@@ -456,6 +456,7 @@ class OPayLogModel extends Model ...@@ -456,6 +456,7 @@ class OPayLogModel extends Model
->select(); ->select();
} }
/** /**
* @param $filed * @param $filed
* @param $params * @param $params
...@@ -472,6 +473,16 @@ class OPayLogModel extends Model ...@@ -472,6 +473,16 @@ class OPayLogModel extends Model
->join("o_bargain c","c.order_id = b.id","left") ->join("o_bargain c","c.order_id = b.id","left")
->join("o_report d","a.report_id = d.id","left") ->join("o_report d","a.report_id = d.id","left")
->where($params) ->where($params)
public function getOrderHouse($field, $where, $limit = 0) {
return $this->db_->alias('a')
->field($field)
->join('o_order b', 'a.order_id=b.id', 'left')
->join('g_houses c', 'b.house_id=c.id', 'left')
->where($where)
->limit($limit)
->select(); ->select();
} }
} }
\ No newline at end of file
...@@ -279,6 +279,7 @@ Route::group('index', [ ...@@ -279,6 +279,7 @@ Route::group('index', [
'getBeForNum' => ['index/Finance/getBeForNum', ['method' => 'get']],//getBeForNum 'getBeForNum' => ['index/Finance/getBeForNum', ['method' => 'get']],//getBeForNum
'getAdjustment' => ['index/Finance/getAdjustment', ['method' => 'get']],//剩余可以调整或退款的钱 'getAdjustment' => ['index/Finance/getAdjustment', ['method' => 'get']],//剩余可以调整或退款的钱
'delAdjustment' => ['index/Finance/delAdjustment', ['method' => 'post']],//撤销调整 'delAdjustment' => ['index/Finance/delAdjustment', ['method' => 'post']],//撤销调整
'getAdjustmentDetail' => ['index/Finance/getAdjustmentDetail', ['method' => 'get']],//调整详情
'performanceInfo' => ['index/PerformanceInfo/performanceInfo', ['method' => 'post|get']],//业绩明细 'performanceInfo' => ['index/PerformanceInfo/performanceInfo', ['method' => 'post|get']],//业绩明细
'getPerformanceInfoExcel' => ['index/PerformanceInfo/getPerformanceInfoExcel', ['method' => 'post|get']],//业绩明细 'getPerformanceInfoExcel' => ['index/PerformanceInfo/getPerformanceInfoExcel', ['method' => 'post|get']],//业绩明细
......
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