Commit 27ab449c authored by hujun's avatar hujun

alias

parent f48042ea
......@@ -886,6 +886,7 @@ class OfficePayLog extends Basic
* @return \think\Response
*/
public function getCollectionDetail() {
$this->params['pay_id'] = 25;
if (empty($this->params['pay_id'])) {
return $this->response(101, '参数错误');
}
......@@ -911,14 +912,13 @@ class OfficePayLog extends Basic
$bargain_where['id'] = $pay_data['bargain_id'];
$price = $this->m_bargain->getFieldValue('price', $bargain_where);
$pay_data['price'] = empty($price)? 0:$price;
$m_order = new OfficeOrderModel();
$house_data = $m_order->selectOrderByOrderId('b.id,c.address as internal_address,a.f_id', ['order_id'=>$pay_data['order_id']]);
$pay_data['house_id'] = empty($house_data[0]['id']) ? '':$house_data[0]['id'];
$pay_data['address'] = empty($house_data[0]['internal_address']) ? '':$house_data[0]['internal_address'];
}
$m_order = new OfficeOrderModel();
$house_data = $m_order->selectOrderByOrderId('b.id,c.address,a.f_id', ['order_id'=>$pay_data['order_id']]);
$pay_data['house_id'] = empty($house_data[0]['id']) ? '':$house_data[0]['id'];
$pay_data['address'] = empty($house_data[0]['address']) ? '':$house_data[0]['address'];
$m_pay_adjustment = new OfficeOPayLogAdjustment();
$source_id = $m_pay_adjustment->getFieldColumn('id', ['paylog_id'=> $pay_data['id']]);
$pay_data['source_id'] = empty($source_id) ? 0 : implode(',', $source_id);
......
......@@ -58,7 +58,7 @@ class OfficeOrderModel extends Model
->field($filed)
->alias("a")
->join("office_g_room b", "a.house_id = b.id", "left")
->join("office_g_building c", "c.id = b.building_id", "left")
->join("office_g_building c", "b.building_id = c.id", "left")
->where($where_)
->select();
//echo $this->db_->getLastSql();
......
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