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
c66a313c
Commit
c66a313c
authored
Mar 05, 2018
by
zhuwei
Committed by
hujun
Mar 05, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客方搜索(select_by_phone)
parent
b52c7b7d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
11 deletions
+10
-11
Remark.php
application/index/controller/Remark.php
+9
-9
Agents.php
application/model/Agents.php
+1
-2
No files found.
application/index/controller/Remark.php
View file @
c66a313c
...
@@ -191,20 +191,20 @@ class Remark extends Basic
...
@@ -191,20 +191,20 @@ class Remark extends Basic
return
$this
->
response
(
"200"
,
"success!"
,
[
'user_info'
=>
$user_res
,
'user_date'
=>
$UPhoneFollowPp_res
,
'user_history'
=>
$records_result
]);
return
$this
->
response
(
"200"
,
"success!"
,
[
'user_info'
=>
$user_res
,
'user_date'
=>
$UPhoneFollowPp_res
,
'user_history'
=>
$records_result
]);
}
}
/**
* 客方搜索
*/
public
function
select_by_phone
()
{
public
function
select_by_phone
()
{
$params
=
$this
->
params
;
$params
=
$this
->
params
;
$params
[
'phone'
]
=
'181'
;
//
$params['phone'] ='181';
$phone
=
$params
[
'phone'
];
$phone
=
trim
(
$params
[
'phone'
]);
dump
(
$phone
);
$table
=
new
Agents
();
$table
=
new
Agents
();
$Agents_res
=
$table
->
select_by_phone
(
$phone
);
$Agents_res
=
$table
->
select_by_phone
(
$phone
);
// dump($Agents_res);
//dump($Agents_res);
if
(
$Agents_res
)
{
return
$this
->
response
(
"200"
,
"success!"
,
$Agents_res
);
return
$this
->
response
(
"200"
,
"success!"
,
$Agents_res
);
}
else
{
return
$this
->
response
(
"201"
,
"success!"
,
[
'user_date'
=>
''
]);
}
}
}
...
...
application/model/Agents.php
View file @
c66a313c
...
@@ -261,8 +261,7 @@ class Agents extends Model
...
@@ -261,8 +261,7 @@ class Agents extends Model
$agents
=
db
(
'agents'
)
$agents
=
db
(
'agents'
)
->
where
(
'phone'
,
'like'
,
'%'
.
$phone
.
'%'
)
->
where
(
'phone'
,
'like'
,
'%'
.
$phone
.
'%'
)
->
where
(
'level'
,
2
)
->
where
(
'level'
,
'in'
,[
2
,
5
])
->
whereor
(
'level'
,
5
)
->
field
(
'id,realname,agentshopname,phone'
)
->
field
(
'id,realname,agentshopname,phone'
)
->
limit
(
10
)
->
limit
(
10
)
->
page
(
1
)
->
page
(
1
)
...
...
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