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
36c1c999
Commit
36c1c999
authored
Aug 01, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
61ee8b32
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
12 deletions
+19
-12
Client.php
application/api_broker/controller/Client.php
+0
-0
User.php
application/api_broker/controller/User.php
+19
-12
No files found.
application/api_broker/controller/Client.php
View file @
36c1c999
This diff is collapsed.
Click to expand it.
application/api_broker/controller/User.php
View file @
36c1c999
...
...
@@ -3,6 +3,7 @@
namespace
app\api_broker\controller
;
use
app\api_broker\extend\Basic
;
use
app\api_broker\service\ClientService
;
use
app\api_broker\service\VipService
;
use
app\model\Users
;
use
think\Request
;
...
...
@@ -73,7 +74,7 @@ class User extends Basic
"pageSize" => 15,
"status" => -1,
);*/
$field
=
"id as user_id,sex,user_name,user_phone,user_status,agent_id,create_time,industry_type,price_demand,area_demand,vip"
;
$field
=
"id as user_id,sex,user_name,user_phone,user_status,agent_id,create_time,industry_type,price_demand,area_demand,vip"
;
$conditions
=
[];
...
...
@@ -82,7 +83,7 @@ class User extends Basic
if
(
isset
(
$params
[
'user_status'
]))
{
$conditions
[
'user_status'
]
=
$params
[
'user_status'
];
}
else
{
}
else
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
...
...
@@ -94,10 +95,10 @@ class User extends Basic
$area_end
=
isset
(
$params
[
'area_end'
])
?
$params
[
'area_end'
]
:
-
1
;
if
(
$area_start
>=
0
&&
$area_end
>=
0
)
{
//面积
$conditions
[
'area_demand'
]
=
array
(
'between'
,
array
(
$area_start
,
$area_end
)
);
$conditions
[
'area_demand'
]
=
array
(
'between'
,
array
(
$area_start
,
$area_end
)
);
$conditions
[
'area_demand'
]
=
array
(
'between'
,
array
(
$area_start
,
$area_end
)
);
}
else
if
(
$area_start
>=
0
&&
$area_end
<
0
)
{
//100米以上不用传结束面积
$conditions
[
'area_demand'
]
=
array
(
'egt'
,
$area_start
);
$conditions
[
'area_demand'
]
=
array
(
'egt'
,
$area_start
);
$conditions
[
'area_demand'
]
=
array
(
'egt'
,
$area_start
);
}
$price_start
=
isset
(
$params
[
'money_start'
])
?
$params
[
'money_start'
]
:
-
1
;
$price_end
=
isset
(
$params
[
'money_end'
])
?
$params
[
'money_end'
]
:
-
1
;
...
...
@@ -108,23 +109,29 @@ class User extends Basic
}
if
(
isset
(
$params
[
'start_time'
])
&&
isset
(
$params
[
'end_time'
]))
{
$start_time
=
date
(
'Y-m-d H:i:s'
,
$params
[
'start_time'
]);
$end_time
=
date
(
'Y-m-d H:i:s'
,
$params
[
'end_time'
]);
$start_time
=
date
(
'Y-m-d H:i:s'
,
$params
[
'start_time'
]);
$end_time
=
date
(
'Y-m-d H:i:s'
,
$params
[
'end_time'
]);
$conditions
[
'create_time'
]
=
array
(
'between'
,
array
(
$start_time
,
$end_time
)
);
}
if
(
isset
(
$params
[
'status'
]))
{
$conditions
[
'status'
]
=
$params
[
'status'
]
;
$conditions
[
'status'
]
=
$params
[
'status'
];
}
$userList
=
$this
->
userModel
->
selectUserList
(
$field
,
$conditions
,
$pageNo
,
$pageSize
,
"id desc"
);
$userList
=
$this
->
userModel
->
selectUserList
(
$field
,
$conditions
,
$pageNo
,
$pageSize
,
"id desc"
);
if
(
empty
(
$userList
))
{
return
$this
->
response
(
"200"
,
"此条件没有找到数据"
);
}
$vip_services
=
new
VipService
();
$data
[
'examine_vip'
]
=
$vip_services
->
vip
(
$params
[
'user_id'
]);
$data
[
'user_date'
]
=
$userList
;
$clientService
=
new
ClientService
();
foreach
(
$userList
as
$k
=>
$v
)
{
$is_show
=
$clientService
->
dialTotal
(
$v
[
"user_id"
]);
if
(
!
$is_show
)
{
unset
(
$userList
[
$k
]);
}
}
$vip_services
=
new
VipService
();
$data
[
'examine_vip'
]
=
$vip_services
->
vip
(
$params
[
'user_id'
]);
$data
[
'user_date'
]
=
array_merge
(
$userList
);
return
$this
->
response
(
"200"
,
'request success'
,
$data
);
}
...
...
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