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
3d0495b5
Commit
3d0495b5
authored
Aug 15, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
433b1270
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
23 deletions
+19
-23
HomePageLog.php
application/api_broker/controller/HomePageLog.php
+19
-23
No files found.
application/api_broker/controller/HomePageLog.php
View file @
3d0495b5
...
...
@@ -65,25 +65,21 @@ class HomePageLog extends Basic
$end_time
=
date
(
"Y-m-d H:i:s"
,
$params
[
"end_time"
]);
$where_
[
"f.create_time"
]
=
array
(
'between'
,
array
(
$start_time
,
$end_time
)
);
}
/*if (!empty($params["name_or_phone"])) {
$where_["a.name|a.phone"] = array( "like", "%" . trim($params["name_or_phone"]) . "%" );
}*/
if
(
!
empty
(
$params
[
"name_or_phone"
]))
{
if
((
preg_match
(
"/^1\d
{
10
}
$/"
,
$params
[
'name_or_phone'
])
!=
1
)
or
(
strlen
(
$params
[
'name_or_phone'
])
<
6
))
{
if
((
preg_match
(
"/^1\d
{
10
}
$/"
,
$params
[
'name_or_phone'
])
!=
1
)
or
(
strlen
(
$params
[
'name_or_phone'
])
<
6
))
{
return
$this
->
response
(
"300"
,
'手机号有误或者姓名不满两位汉字'
);
}
//$agent_params["phone|name"] = array( "like", "%" . trim($params["name_or_phone"]) . "%" );
$agent_params
[
"phone|name"
]
=
$params
[
"name_or_phone"
];
$agent_field
=
"id"
;
$model
=
new
AAgents
();
$res_a
=
$model
->
getAgentsIdsArray
(
$agent_field
,
$agent_params
);
if
(
$res_a
)
{
$where_
[
"f.agent_id"
]
=
[
'in'
,
$res_a
];
if
(
$res_a
)
{
$where_
[
"f.agent_id"
]
=
[
'in'
,
$res_a
];
}
}
$where_
[
"f.city"
]
=
trim
(
$this
->
city
)
?
trim
(
$this
->
city
)
:
'上海市'
;
$where_
[
"f.city"
]
=
trim
(
$this
->
city
)
?
trim
(
$this
->
city
)
:
'上海市'
;
$join
=
[];
$order
=
"f.id desc"
;
...
...
@@ -91,14 +87,14 @@ class HomePageLog extends Basic
$result
=
$this
->
uPhoneFollowUpModel
->
getSearch
(
$pageNo
,
$pageSize
,
$order
,
$field
,
$join
,
$where_
,
""
);
foreach
(
$result
as
$key
=>
$value
)
{
$agent_params
=
[];
$agent_params
=
[];
$agent_params
[
"a.id"
]
=
$value
[
'agent_id'
];
$agent_field
=
"a.name,a.img,b.store_name"
;
$model
=
new
AAgents
();
$res_a
=
$model
->
getAgentsInfo
(
$agent_field
,
$agent_params
);
$result
[
$key
][
'name'
]
=
$res_a
[
0
][
'name'
];
$result
[
$key
][
'img'
]
=
$res_a
[
0
][
'img'
];
$result
[
$key
][
'store_name'
]
=
$res_a
[
0
][
'store_name'
];
$result
[
$key
][
'name'
]
=
$res_a
[
0
][
'name'
];
$result
[
$key
][
'img'
]
=
$res_a
[
0
][
'img'
];
$result
[
$key
][
'store_name'
]
=
$res_a
[
0
][
'store_name'
];
}
...
...
@@ -158,9 +154,9 @@ class HomePageLog extends Basic
}
if
(
empty
(
$params
[
'city'
]))
{
$where_
[
"f.city"
]
=
trim
(
$this
->
city
)
?
trim
(
$this
->
city
)
:
'上海市'
;
$where_
[
"f.city"
]
=
trim
(
$this
->
city
)
?
trim
(
$this
->
city
)
:
'上海市'
;
}
else
{
$where_
[
"f.city"
]
=
$params
[
'city'
]
?
$params
[
'city'
]
:
'上海市'
;
$where_
[
"f.city"
]
=
$params
[
'city'
]
?
$params
[
'city'
]
:
'上海市'
;
}
if
(
!
empty
(
$params
[
'disc'
]))
{
...
...
@@ -168,7 +164,7 @@ class HomePageLog extends Basic
}
if
(
!
empty
(
$params
[
"name_or_phone"
]))
{
if
((
preg_match
(
"/^1\d
{
10
}
$/"
,
$params
[
'name_or_phone'
])
!=
1
)
or
(
strlen
(
$params
[
'name_or_phone'
])
<
6
))
{
if
((
preg_match
(
"/^1\d
{
10
}
$/"
,
$params
[
'name_or_phone'
])
!=
1
)
or
(
strlen
(
$params
[
'name_or_phone'
])
<
6
))
{
return
$this
->
response
(
"300"
,
'手机号有误或者姓名不满两位汉字'
);
}
//$agent_params["phone|name"] = array( "like", "%" . trim($params["name_or_phone"]) . "%" );
...
...
@@ -176,8 +172,8 @@ class HomePageLog extends Basic
$agent_field
=
"id"
;
$model
=
new
AAgents
();
$res_a
=
$model
->
getAgentsIdsArray
(
$agent_field
,
$agent_params
);
if
(
$res_a
)
{
$where_
[
"f.agent_id"
]
=
[
'in'
,
$res_a
];
if
(
$res_a
)
{
$where_
[
"f.agent_id"
]
=
[
'in'
,
$res_a
];
}
}
...
...
@@ -185,21 +181,21 @@ class HomePageLog extends Basic
$order
=
"f.id desc"
;
$result
=
$this
->
gHouseFollowUpModel
->
getSearch
(
$pageNo
,
$pageSize
,
$order
,
$field
,
$join
,
$where_
,
""
);
foreach
(
$result
as
$key
=>
$value
)
{
$agent_params
=
[];
$agent_params
=
[];
$agent_params
[
"a.id"
]
=
$value
[
'agent_id'
];
$agent_field
=
"a.name,a.img,b.store_name"
;
$model
=
new
AAgents
();
$res_a
=
$model
->
getAgentsInfo
(
$agent_field
,
$agent_params
);
$result
[
$key
][
'name'
]
=
$res_a
[
0
][
'name'
];
$result
[
$key
][
'img'
]
=
$res_a
[
0
][
'img'
];
$result
[
$key
][
'store_name'
]
=
$res_a
[
0
][
'store_name'
];
$result
[
$key
][
'name'
]
=
$res_a
[
0
][
'name'
];
$result
[
$key
][
'img'
]
=
$res_a
[
0
][
'img'
];
$result
[
$key
][
'store_name'
]
=
$res_a
[
0
][
'store_name'
];
$house_params
=
[];
$house_params
=
[];
$house_params
[
"id"
]
=
$value
[
'house_id'
];
$house_field
=
"internal_title"
;
$model
=
new
GHouses
();
$res_a
=
$model
->
getHouseInfo
(
$house_field
,
$house_params
);
$result
[
$key
][
'internal_title'
]
=
$res_a
[
0
][
'internal_title'
];
$result
[
$key
][
'internal_title'
]
=
$res_a
[
0
][
'internal_title'
];
}
$count
=
$this
->
gHouseFollowUpModel
->
getSearchCount
(
$join
,
$where_
);
...
...
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