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
efcde645
Commit
efcde645
authored
Mar 07, 2018
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单搜索
parent
f0c0a6d0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
10 deletions
+14
-10
OrderLog.php
application/api_broker/controller/OrderLog.php
+3
-3
OrderLogService.php
application/api_broker/service/OrderLogService.php
+5
-1
OrderModel.php
application/model/OrderModel.php
+6
-6
No files found.
application/api_broker/controller/OrderLog.php
View file @
efcde645
...
@@ -266,10 +266,10 @@ class OrderLog extends Basic
...
@@ -266,10 +266,10 @@ class OrderLog extends Basic
public
function
searchOrder
()
public
function
searchOrder
()
{
{
$params
=
$this
->
params
;
$params
=
$this
->
params
;
/*
$params = array(
/*
$params = array(
"type" =>
3, //
1.客户姓名 2.报备人电话 3.报备人姓名 4.商铺名称 5.商铺地址
"type" =>
0, //0.客户电话
1.客户姓名 2.报备人电话 3.报备人姓名 4.商铺名称 5.商铺地址
"agent_id"=>630,
"agent_id"=>630,
"search_keyword" => "1"
"search_keyword" => "1
4444
"
);*/
);*/
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 @
efcde645
...
@@ -283,6 +283,9 @@ class OrderLogService
...
@@ -283,6 +283,9 @@ class OrderLogService
$field
=
"a.id,a.order_no,a.f_id,a.house_id,a.house_title,b.report_agent_id,b.report_agent_phone,b.report_agent_name,
$field
=
"a.id,a.order_no,a.f_id,a.house_id,a.house_title,b.report_agent_id,b.report_agent_phone,b.report_agent_name,
b.user_id,b.user_phone,b.user_name,b.predict_see_time"
;
b.user_id,b.user_phone,b.user_name,b.predict_see_time"
;
switch
((
int
)
$params
[
"type"
]){
switch
((
int
)
$params
[
"type"
]){
case
0
:
$condition
[
"b.user_phone"
]
=
array
(
'like'
,
"%"
.
trim
(
$params
[
'search_keyword'
])
.
"%"
);
break
;
case
1
:
case
1
:
$condition
[
"b.user_name"
]
=
array
(
'like'
,
"%"
.
trim
(
$params
[
'search_keyword'
])
.
"%"
);
$condition
[
"b.user_name"
]
=
array
(
'like'
,
"%"
.
trim
(
$params
[
'search_keyword'
])
.
"%"
);
break
;
break
;
...
@@ -296,7 +299,8 @@ class OrderLogService
...
@@ -296,7 +299,8 @@ class OrderLogService
$condition
[
"b.house_title"
]
=
array
(
'like'
,
"%"
.
trim
(
$params
[
'search_keyword'
])
.
"%"
);
$condition
[
"b.house_title"
]
=
array
(
'like'
,
"%"
.
trim
(
$params
[
'search_keyword'
])
.
"%"
);
break
;
break
;
case
5
:
case
5
:
// $condition["b.house_title"] = array( 'like', "%" . trim($params['search_keyword']) . "%" );
//todo 列表没有显示商铺地址 和产品沟通暂时搁置
//$condition["c.house_title"] = array( 'like', "%" . trim($params['search_keyword']) . "%" );
break
;
break
;
default
:
default
:
return
[
"code"
=>
"101"
,
"msg"
=>
"搜索类型错误"
];
return
[
"code"
=>
"101"
,
"msg"
=>
"搜索类型错误"
];
...
...
application/model/OrderModel.php
View file @
efcde645
...
@@ -99,12 +99,12 @@ class OrderModel extends Model
...
@@ -99,12 +99,12 @@ class OrderModel extends Model
* @return false|\PDOStatement|string|\think\Collection
* @return false|\PDOStatement|string|\think\Collection
*/
*/
public
function
searchOrder
(
$field
,
$params
){
public
function
searchOrder
(
$field
,
$params
){
return
$this
->
db_
return
$this
->
db_
->
field
(
$field
)
->
field
(
$field
)
->
alias
(
"a"
)
->
alias
(
"a"
)
->
join
(
"o_report b"
,
"a.f_id = b.id"
,
"left"
)
->
join
(
"o_report b"
,
"a.f_id = b.id"
,
"left"
)
->
where
(
$params
)
->
where
(
$params
)
->
select
();
->
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