Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
f38b4140
Commit
f38b4140
authored
May 24, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
我的成交
parent
989c7b58
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
30 deletions
+28
-30
OrderLog.php
application/api_broker/controller/OrderLog.php
+2
-9
OrderLogService.php
application/api_broker/service/OrderLogService.php
+26
-21
No files found.
application/api_broker/controller/OrderLog.php
View file @
f38b4140
...
...
@@ -421,16 +421,9 @@ class OrderLog extends Basic
{
$params
=
$this
->
params
;
/* $params = array(
"bargain_id" => 6,
"house_id" => 1,
"house_title"=> "wwww",
"internal_address" =>"ewewerwer",
"user_id" => 1,
"user_name" =>"nihhkkk",
"user_phone"=>"123****3333"
"bargain_id" => 169,
);*/
if
(
!
isset
(
$params
[
"bargain_id"
])
||
!
isset
(
$params
[
"house_id"
])
||
!
isset
(
$params
[
"house_title"
])
||
!
isset
(
$params
[
"internal_address"
])
||
!
isset
(
$params
[
"user_id"
])
||
!
isset
(
$params
[
"user_name"
])
||
!
isset
(
$params
[
"user_phone"
]))
{
if
(
!
isset
(
$params
[
"bargain_id"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
...
...
application/api_broker/service/OrderLogService.php
View file @
f38b4140
...
...
@@ -55,7 +55,7 @@ class OrderLogService
* @throws \think\exception\DbException
*/
public
function
addCollectingBill
(
$agent_id
,
$agent_name
,
$report_id
,
$order_id
,
$order_no
,
$collecting_bill
,
$house_number
,
$industry_type
,
$remark
,
$transfer_img
,
$source
)
$industry_type
,
$remark
,
$transfer_img
,
$source
)
{
$bill_arr
=
$params
=
[];
$father_id
=
0
;
...
...
@@ -63,15 +63,15 @@ class OrderLogService
if
(
isset
(
$collecting
[
"type"
])
&&
isset
(
$collecting
[
"pay_type"
])
&&
isset
(
$collecting
[
"money"
]))
{
if
(
$father_id
==
0
)
{
$params
=
$this
->
collectingBillBin
(
$father_id
,
$collecting
,
$agent_id
,
$agent_name
,
$report_id
,
$order_id
,
$order_no
,
$house_number
,
$industry_type
,
$remark
,
$transfer_img
,
$source
);
$house_number
,
$industry_type
,
$remark
,
$transfer_img
,
$source
);
$father_id
=
$this
->
payLogModel
->
insertPayLog
(
$params
);
}
else
{
array_push
(
$bill_arr
,
$this
->
collectingBillBin
(
$father_id
,
$collecting
,
$agent_id
,
$agent_name
,
$report_id
,
$order_id
,
$order_no
,
$house_number
,
$industry_type
,
$remark
,
$transfer_img
,
$source
));
$house_number
,
$industry_type
,
$remark
,
$transfer_img
,
$source
));
}
}
}
if
(
$father_id
>
0
)
{
if
(
$father_id
>
0
)
{
$pushMarchIn
=
new
PushMessageService
(
$params
[
"report_id"
],
2
);
$pushMarchIn
->
pushMarchInMessage
(
$params
[
"report_id"
],
2
);
//推送
}
...
...
@@ -83,7 +83,7 @@ class OrderLogService
}
private
function
collectingBillBin
(
$father_id
,
$collecting_arr
,
$agent_id
,
$agent_name
,
$report_id
,
$order_id
,
$order_no
,
$house_number
,
$industry_type
,
$remark
,
$transfer_img
,
$source
)
$industry_type
,
$remark
,
$transfer_img
,
$source
)
{
$arr
[
"report_id"
]
=
$report_id
;
...
...
@@ -125,7 +125,7 @@ class OrderLogService
* @throws \think\exception\DbException
*/
public
function
addBargain
(
$submit_agent_id
,
$submit_agent_name
,
$report_id
,
$order_id
,
$order_no
,
$trade_type
,
$price
,
$commission
,
$commission_arr
,
$house_number
,
$is_open
)
$commission
,
$commission_arr
,
$house_number
,
$is_open
)
{
$bargain_arr
=
[];
$father_id
=
0
;
...
...
@@ -135,11 +135,11 @@ class OrderLogService
&&
isset
(
$commission_val
[
"scale_fee"
]))
{
if
(
$father_id
==
0
)
{
$params
=
$this
->
bargainBin
(
$father_id
,
$commission_val
,
$submit_agent_id
,
$submit_agent_name
,
$report_id
,
$order_id
,
$order_no
,
$trade_type
,
$price
,
$commission
,
$house_number
,
$is_open
);
$order_no
,
$trade_type
,
$price
,
$commission
,
$house_number
,
$is_open
);
$father_id
=
$this
->
bargainModel
->
insertBargain
(
$params
);
}
else
{
array_push
(
$bargain_arr
,
$this
->
bargainBin
(
$father_id
,
$commission_val
,
$submit_agent_id
,
$submit_agent_name
,
$report_id
,
$order_id
,
$order_no
,
$trade_type
,
$price
,
$commission
,
$house_number
,
$is_open
));
$order_id
,
$order_no
,
$trade_type
,
$price
,
$commission
,
$house_number
,
$is_open
));
}
}
array_push
(
$agent_arr
,
[
$commission_val
[
"agent_id"
]
]);
...
...
@@ -161,7 +161,7 @@ class OrderLogService
}
private
function
bargainBin
(
$father_id
,
$commission_val
,
$submit_agent_id
,
$submit_agent_name
,
$report_id
,
$order_id
,
$order_no
,
$trade_type
,
$price
,
$commission
,
$house_number
,
$is_open
)
$order_no
,
$trade_type
,
$price
,
$commission
,
$house_number
,
$is_open
)
{
$arr
[
"report_id"
]
=
$report_id
;
$arr
[
"father_id"
]
=
$father_id
;
...
...
@@ -726,7 +726,7 @@ class OrderLogService
$where_
=
$condition
;
if
(
$agentArr
)
{
$params
[
"report_agent_id"
]
=
$agentArr
;
$params
[
"agent_id_s"
]
=
array
(
"in"
,
$agentArr
);
$params
[
"agent_id_s"
]
=
array
(
"in"
,
$agentArr
);
$condition
.=
"and b.report_agent_id in ("
.
trim
(
$agentArr
)
.
") "
;
}
...
...
@@ -814,18 +814,21 @@ class OrderLogService
$bargain_info_filed
=
"a.id,a.house_number,a.is_open,a.trade_type,a.price,a.commission,c.id,c.internal_title,
c.internal_address,d.user_id,d.user_phone,d.user_name"
;
/**
* ->join("o_order b" ,"a.order_id = b.id","left")
->join("g_houses c" ,"b.house_id = b.id","left")
->join("o_report d","a.report_id = d.id","left")
*/
$result
=
[];
$bargainInfo
=
$bargainModel
->
selectBargainDetail
(
$bargain_info_filed
,
$params
);
if
(
count
(
$bargainInfo
)
>
0
){
}
$result
[
"bargainInfo"
]
=
$bargainInfo
;
//分佣提成
$cent_commission
=
[];
$result
[
"cent_commission"
]
=
$cent_commission
;
//税费
$taxes
=
[];
$result
[
"taxes"
]
=
$taxes
;
return
$result
;
}
...
...
@@ -908,9 +911,10 @@ class OrderLogService
* @param $order_id
* @return false|\PDOStatement|string|\think\Collection
*/
public
function
getBillInfo
(
$order_id
){
public
function
getBillInfo
(
$order_id
)
{
$filed
=
"house_number,industry_type"
;
return
$this
->
payLogModel
->
getBeforeBillInfo
(
$filed
,[
"order_id"
=>
$order_id
]);
return
$this
->
payLogModel
->
getBeforeBillInfo
(
$filed
,
[
"order_id"
=>
$order_id
]);
}
...
...
@@ -922,10 +926,11 @@ class OrderLogService
* @param $real_money
* @return false|int
*/
public
function
updateBillInfo
(
$id
,
$trade_no
,
$pay_time
,
$real_money
){
public
function
updateBillInfo
(
$id
,
$trade_no
,
$pay_time
,
$real_money
)
{
$params
[
"id"
]
=
$id
;
$params
[
"trade_no"
]
=
$trade_no
;
$params
[
"pay_time"
]
=
date
(
"Y-m-d H:i:s"
,
$pay_time
);
$params
[
"pay_time"
]
=
date
(
"Y-m-d H:i:s"
,
$pay_time
);
$params
[
"real_money"
]
=
$real_money
;
return
$this
->
payLogModel
->
updatePayLog
(
$params
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment