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
42fa6571
Commit
42fa6571
authored
May 18, 2018
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增分佣提成
parent
8b52e7be
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
8 deletions
+20
-8
OrderLog.php
application/api_broker/controller/OrderLog.php
+8
-4
OrderLogService.php
application/api_broker/service/OrderLogService.php
+12
-4
No files found.
application/api_broker/controller/OrderLog.php
View file @
42fa6571
...
...
@@ -198,6 +198,9 @@ class OrderLog extends Basic
/**
* 成交报告
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
bargain
()
{
...
...
@@ -518,8 +521,8 @@ class OrderLog extends Basic
$data
[
'msg'
]
=
""
;
$data
[
'data'
]
=
[];
if
(
empty
(
$this
->
params
[
'id'
])
||
empty
(
$this
->
params
[
'agent_id'
]))
{
return
$this
->
response
(
101
,
'Id or agent_id is null.'
);
if
(
empty
(
$this
->
params
[
'id'
])
||
empty
(
$this
->
params
[
'agent_id'
])
||
empty
(
$this
->
params
[
'source'
])
)
{
return
$this
->
response
(
101
,
'Id or agent_id
or source
is null.'
);
}
$bargain
=
new
OBargainModel
();
...
...
@@ -538,12 +541,13 @@ class OrderLog extends Basic
$insert_data
[
'price'
]
=
$bargain_data
[
'price'
];
$insert_data
[
'commission'
]
=
$bargain_data
[
'commission'
];
$insert_data
[
'status'
]
=
$bargain_data
[
'status'
];
$insert_data
[
'source'
]
=
1
;
$insert_data
[
'source'
]
=
$bargain_data
[
'source'
]
;
$insert_data
[
'role'
]
=
empty
(
$this
->
params
[
'role'
])
?
0
:
$this
->
params
[
'role'
];
$insert_data
[
'scale_fee'
]
=
empty
(
$this
->
params
[
'scale_fee'
])
?
0
:
$this
->
params
[
'scale_fee'
];
$insert_data
[
'practical_fee'
]
=
empty
(
$this
->
params
[
'practical_fee'
])
?
0
:
$this
->
params
[
'practical_fee'
];
$insert_data
[
'father_id'
]
=
empty
(
$this
->
params
[
'id'
])
?
0
:
$this
->
params
[
'id'
];
$insert_data
[
'father_id'
]
=
$this
->
params
[
'id'
];
$insert_data
[
'scale'
]
=
empty
(
$this
->
params
[
'scale'
])
?
0
:
$this
->
params
[
'scale'
];
$insert_data
[
'is_commission'
]
=
1
;
$data
[
'data'
][
'id'
]
=
$bargain
->
insertBargain
(
$insert_data
);
if
(
$data
[
'data'
]
==
0
)
{
...
...
application/api_broker/service/OrderLogService.php
View file @
42fa6571
...
...
@@ -117,7 +117,10 @@ class OrderLogService
* @param $price
* @param $commission
* @param $commission_arr
* @return int
* @return int|string
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @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
)
{
...
...
@@ -763,6 +766,9 @@ class OrderLogService
* 获取成交报告列表
* @param $params
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getBargainList
(
$params
)
{
...
...
@@ -780,7 +786,6 @@ class OrderLogService
$filed
=
"a.id,a.agent_id,a.create_time,b.user_phone,b.user_name,b.user_id,d.id as house_id,d.internal_title,d.internal_address"
;
$result
=
$bargainModel
->
selectBargainList
(
$filed
,
$params
,
$pageNo
,
$pageSize
);
foreach
(
$result
as
$k
=>
$v
)
{
//$result[$k]["user_phone"] = preg_replace('/(\d{3})\d{4}(\d{4})/','$1****$2',$v["user_phone"]);
$result
[
$k
][
"create_time"
]
=
date
(
"Y-m-d"
,
strtotime
(
$v
[
"create_time"
]));
}
return
$result
;
...
...
@@ -800,8 +805,8 @@ class OrderLogService
{
$bargainModel
=
new
OBargainModel
();
$filed
=
"a.id,a.trade_type,a.price,a.submit_agent_id,a.commission,a.role,
a.agent_id,a.scale,a.scale_fee,a.status,
b.name,b.phone"
;
$filed
=
"a.id,a.trade_type,a.price,a.submit_agent_id,a.commission,a.role,
a.agent_id,a.scale,a.scale_fee,a.status,
b.name,b.phone"
;
return
$bargainModel
->
selectBargainDetail
(
$filed
,
$params
);
}
...
...
@@ -809,6 +814,9 @@ class OrderLogService
/**
* 成交报告提交后用户状态从求租变成已租
* @param $report_id
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
userUpdateInfo
(
$report_id
)
{
...
...
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