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
17986704
Commit
17986704
authored
Apr 09, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
d5f2d6ba
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
17 deletions
+51
-17
OrderLog.php
application/api_broker/controller/OrderLog.php
+14
-14
OrderLogService.php
application/api_broker/service/OrderLogService.php
+3
-3
OBargainModel.php
application/model/OBargainModel.php
+34
-0
No files found.
application/api_broker/controller/OrderLog.php
View file @
17986704
...
@@ -166,9 +166,9 @@ class OrderLog extends Basic
...
@@ -166,9 +166,9 @@ class OrderLog extends Basic
{
{
$params
=
$this
->
params
;
$params
=
$this
->
params
;
if
(
!
isset
(
$params
[
"submit_agent_id"
])
||!
isset
(
$params
[
"submit_agent_name"
])
||
!
isset
(
$params
[
"report_id"
])
||
if
(
!
isset
(
$params
[
"submit_agent_id"
])
||
!
isset
(
$params
[
"submit_agent_name"
])
||
!
isset
(
$params
[
"report_id"
])
||
!
isset
(
$params
[
"order_id"
])
||
!
isset
(
$params
[
"order_no"
])
||
!
isset
(
$params
[
"trade_type"
])
||
!
isset
(
$params
[
"order_id"
])
||
!
isset
(
$params
[
"order_no"
])
||
!
isset
(
$params
[
"trade_type"
])
||
!
isset
(
$params
[
"price"
])
||
!
isset
(
$params
[
"commission"
])
||
!
isset
(
$params
[
"commission_arr"
]))
{
!
isset
(
$params
[
"price"
])
||
!
isset
(
$params
[
"commission"
])
||
!
isset
(
$params
[
"commission_arr"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
}
/* $params = array(
/* $params = array(
...
@@ -193,7 +193,7 @@ class OrderLog extends Basic
...
@@ -193,7 +193,7 @@ class OrderLog extends Basic
$params
[
"commission_arr"
]
=
json_decode
(
$params
[
"commission_arr"
],
true
);
$params
[
"commission_arr"
]
=
json_decode
(
$params
[
"commission_arr"
],
true
);
$is_ok
=
$this
->
service_
->
addBargain
(
$params
[
"submit_agent_id"
],
$params
[
"submit_agent_name"
],
$params
[
"report_id"
],
$params
[
"order_id"
],
$params
[
"order_no"
],
$is_ok
=
$this
->
service_
->
addBargain
(
$params
[
"submit_agent_id"
],
$params
[
"submit_agent_name"
],
$params
[
"report_id"
],
$params
[
"order_id"
],
$params
[
"order_no"
],
$params
[
"trade_type"
],
$params
[
"price"
],
$params
[
"commission"
],
$params
[
"commission_arr"
]);
$params
[
"trade_type"
],
$params
[
"price"
],
$params
[
"commission"
],
$params
[
"commission_arr"
]);
if
(
$is_ok
>
0
)
{
if
(
$is_ok
>
0
)
{
...
@@ -238,13 +238,13 @@ class OrderLog extends Basic
...
@@ -238,13 +238,13 @@ class OrderLog extends Basic
public
function
selectReportAll
()
public
function
selectReportAll
()
{
{
$params
=
$this
->
params
;
$params
=
$this
->
params
;
if
(
!
isset
(
$params
[
"order_id"
]))
{
/*
if (!isset($params["order_id"])) {
return $this->response("101", "请求参数错误");
return $this->response("101", "请求参数错误");
}
}
*/
/*
$params = array(
$params
=
array
(
"order_id" => 5363
0,
"order_id"
=>
5367
0
,
);*/
);
$data
=
$this
->
service_
->
selectListByOrderNo
(
$params
[
"order_id"
]);
$data
=
$this
->
service_
->
selectListByOrderNo
(
$params
[
"order_id"
]);
return
$this
->
response
(
"200"
,
"request success"
,
$data
);
return
$this
->
response
(
"200"
,
"request success"
,
$data
);
}
}
...
@@ -287,11 +287,11 @@ class OrderLog extends Basic
...
@@ -287,11 +287,11 @@ class OrderLog extends Basic
public
function
searchOrder
()
public
function
searchOrder
()
{
{
$params
=
$this
->
params
;
$params
=
$this
->
params
;
/* $params = array(
/* $params = array(
"type" => 4, //0.客户电话 1.客户姓名 2.报备人电话 3.报备人姓名 4.商铺名称 5.商铺地址
"type" => 4, //0.客户电话 1.客户姓名 2.报备人电话 3.报备人姓名 4.商铺名称 5.商铺地址
"agent_id" => 1,
"agent_id" => 1,
"search_keyword" => "福气"
"search_keyword" => "福气"
);*/
);*/
if
(
!
isset
(
$params
[
"type"
])
||
!
isset
(
$params
[
"agent_id"
])
||
!
isset
(
$params
[
"search_keyword"
]))
{
if
(
!
isset
(
$params
[
"type"
])
||
!
isset
(
$params
[
"agent_id"
])
||
!
isset
(
$params
[
"search_keyword"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
}
...
...
application/api_broker/service/OrderLogService.php
View file @
17986704
...
@@ -278,9 +278,9 @@ class OrderLogService
...
@@ -278,9 +278,9 @@ class OrderLogService
}
}
//成交报告
//成交报告
$field_bargain
=
"
id,report_id,order_id,trade_type,submit_agent_id,submit_agent_name,price,commission,role,agent_id,
scale,
$field_bargain
=
"
a.id,a.report_id,a.order_id,a.trade_type,a.submit_agent_id,a.submit_agent_name,a.price,a.commission,a.role,a.agent_id,a.
scale,
scale_fee,create_tim
e"
;
a.scale_fee,a.create_time,b.name,b.phon
e"
;
$bargainData
=
$oBargainModel
->
selectBargainByOrderNo
(
$field_bargain
,
[
"order_id"
=>
$order_id
]);
$bargainData
=
$oBargainModel
->
selectBargain
List
ByOrderNo
(
$field_bargain
,
[
"order_id"
=>
$order_id
]);
if
(
count
(
$bargainData
)
>
0
)
{
if
(
count
(
$bargainData
)
>
0
)
{
foreach
(
$bargainData
as
$k
=>
$v
)
{
foreach
(
$bargainData
as
$k
=>
$v
)
{
$v
[
"step_name"
]
=
"bargain"
;
$v
[
"step_name"
]
=
"bargain"
;
...
...
application/model/OBargainModel.php
View file @
17986704
...
@@ -100,6 +100,40 @@ class OBargainModel extends Model
...
@@ -100,6 +100,40 @@ class OBargainModel extends Model
->
select
();
->
select
();
}
}
/**
* 查询成交报告记录
*
* @param $filed
* @param $params
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
selectBargainListByOrderNo
(
$filed
,
$params
)
{
$where_
=
[];
if
(
isset
(
$params
[
"report_id"
]))
{
$where_
[
"a.report_id"
]
=
$params
[
"report_id"
];
}
if
(
isset
(
$params
[
"order_no"
]))
{
$where_
[
"a.order_no"
]
=
$params
[
"order_no"
];
}
if
(
isset
(
$params
[
"order_id"
]))
{
$where_
[
"a.order_id"
]
=
$params
[
"order_id"
];
}
if
(
isset
(
$params
[
"agent_id"
]))
{
$where_
[
"a.agent_id"
]
=
$params
[
"agent_id"
];
}
return
$this
->
db_
->
field
(
$filed
)
->
alias
(
"a"
)
->
join
(
"a_agents b"
,
"a.agent_id = b.id"
,
"left"
)
->
where
(
$where_
)
->
select
();
}
/**
/**
* 获取我得成交
* 获取我得成交
*
*
...
...
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