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
9bf9397f
Commit
9bf9397f
authored
Aug 08, 2018
by
clone
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'test' into test-0806-bug
# Conflicts: # application/api_broker/controller/Shop.php # public/resource/template/user_template_tpl.html
parents
6be217e5
eb1cc08f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
58 additions
and
38 deletions
+58
-38
Shop.php
application/api_broker/controller/Shop.php
+2
-1
User.php
application/api_broker/controller/User.php
+45
-28
Basic.php
application/index/extend/Basic.php
+2
-2
footer_tpl.html
application/index/view/global/footer_tpl.html
+2
-2
PrivacyNumber.php
application/task/controller/PrivacyNumber.php
+5
-4
user_template_tpl.html
public/resource/template/user_template_tpl.html
+2
-1
No files found.
application/api_broker/controller/Shop.php
View file @
9bf9397f
...
...
@@ -84,7 +84,7 @@ class Shop extends Basic
,shop_area_start,shop_area_end,shop_type,residue_num,shop_sign,is_carefully_chosen,rent_type,rent_price"
;
}
else
{
$field
=
"id,internal_title as title,internal_address as address,city,disc,business_district_id,status,industry_type
$field
=
"id,internal_title as title,internal_address as address,city,disc,business_district_id,status,industry_type
,shop_area_start,shop_area_end,shop_type,residue_num,shop_sign,is_carefully_chosen,rent_type,rent_price"
;
$conditions
[
"city"
]
=
trim
(
$this
->
city
);
...
...
@@ -194,6 +194,7 @@ class Shop extends Basic
}
//如果有传经纪人id则代表我的商铺不区分状态
if
(
isset
(
$params
[
'agent_id'
]))
{
unset
(
$conditions
[
"city"
]);
//$conditions['status'] = array( 'in', "1,2" ); //只显示上架或下架的
$conditions
[
'status'
]
=
!
empty
(
$params
[
'status'
])
?
$params
[
'status'
]
:
array
(
'in'
,
"1,2"
);
//只显示上架或下架的
}
...
...
application/api_broker/controller/User.php
View file @
9bf9397f
...
...
@@ -71,6 +71,7 @@ class User extends Basic
"start_time" => "2016-05-25",
"end_time" => "2018-05-30",
"pageNo" => 1,
"agent_id" => 5741,
"pageSize" => 15,
"status" => -1,
);*/
...
...
@@ -78,6 +79,8 @@ class User extends Basic
$conditions
=
[];
$is_show
=
true
;
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
...
...
@@ -95,6 +98,7 @@ class User extends Basic
$area_start
=
isset
(
$params
[
'area_start'
])
?
$params
[
'area_start'
]
:
-
1
;
$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
)
);
...
...
@@ -102,8 +106,10 @@ class User extends Basic
$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
;
if
(
$price_start
>=
0
&&
$price_end
>=
0
)
{
//金额
$conditions
[
'price_demand'
]
=
array
(
'between'
,
array
(
$price_start
,
$price_end
)
);
}
else
if
(
$price_start
>=
0
&&
$price_end
<
0
)
{
...
...
@@ -122,18 +128,29 @@ class User extends Basic
if
(
isset
(
$params
[
'status'
]))
{
$conditions
[
'status'
]
=
$params
[
'status'
];
}
//传了经纪人id则表示我的客户
if
(
isset
(
$params
[
"agent_id"
]))
{
$conditions
[
'agent_id'
]
=
$params
[
'agent_id'
];
$is_show
=
false
;
}
$userList
=
$this
->
userModel
->
selectUserList
(
$field
,
$conditions
,
$pageNo
,
$pageSize
,
"id desc"
);
if
(
empty
(
$userList
))
{
return
$this
->
response
(
"200"
,
"此条件没有找到数据"
);
}
$clientService
=
new
ClientService
();
$list
=
[];
foreach
(
$userList
as
$k
=>
$v
)
{
$is_show
=
$clientService
->
dialTotal
(
$v
[
"user_id"
]);
if
(
$is_show
)
{
array_push
(
$list
,
$v
);
if
(
$is_show
){
$clientService
=
new
ClientService
();
$list
=
[];
foreach
(
$userList
as
$k
=>
$v
)
{
$is_show
=
$clientService
->
dialTotal
(
$v
[
"user_id"
]);
if
(
$is_show
)
{
array_push
(
$list
,
$v
);
}
}
}
$vip_services
=
new
VipService
();
$data
[
'examine_vip'
]
=
$vip_services
->
vip
(
$this
->
agentId
);
$data
[
'user_date'
]
=
$userList
;
...
...
@@ -149,8 +166,8 @@ class User extends Basic
public
function
getLastOrNextUserID
()
{
header
(
'Access-Control-Allow-Origin:*'
);
$params
=
$this
->
params
;
$this
->
city
=
'上海市'
;
$params
=
$this
->
params
;
$this
->
city
=
'上海市'
;
/*$params = array(
"user_id" => 3,
"agent_id" => 9,
...
...
@@ -164,25 +181,25 @@ class User extends Basic
//todo 判断是 杭州还是上海
$where
[
'city'
]
=
trim
(
$this
->
city
);
if
(
$params
[
'type'
]
==
'last'
){
$where
[
'id'
]
=
[
'gt'
,
$params
[
'user_id'
]
];
$order
=
'id asc'
;
if
(
$params
[
'type'
]
==
'last'
)
{
$where
[
'id'
]
=
[
'gt'
,
$params
[
'user_id'
]
];
$order
=
'id asc'
;
}
else
{
$where
[
'id'
]
=
[
'lt'
,
$params
[
'user_id'
]
];
$order
=
'id desc'
;
}
else
{
$where
[
'id'
]
=
[
'lt'
,
$params
[
'user_id'
]
];
$order
=
'id desc'
;
}
//dump($where);
$field
=
'id,user_nick,agent_id,vip'
;
$user
=
new
Users
();
$user_res
=
$user
->
getLastOrNextUserID
(
$where
,
$field
,
$limit
=
1
,
$order
);
if
(
!
$user_res
)
{
$field
=
'id,user_nick,agent_id,vip'
;
$user
=
new
Users
();
$user_res
=
$user
->
getLastOrNextUserID
(
$where
,
$field
,
$limit
=
1
,
$order
);
if
(
!
$user_res
)
{
return
$this
->
response
(
"200"
,
"不符合条件0"
,
[]);
}
//todo 判断是否vip客户,如果是 只有是当前经纪人自己的客户才能查看
//vip客户 0:否 1:是
if
((
$user_res
[
'vip'
]
==
1
)
&&
(
$user_res
[
'agent_id'
]
!=
$params
[
'agent_id'
]))
{
if
((
$user_res
[
'vip'
]
==
1
)
&&
(
$user_res
[
'agent_id'
]
!=
$params
[
'agent_id'
]))
{
return
$this
->
response
(
"200"
,
"不符合条件1"
,
[]);
}
...
...
@@ -192,17 +209,17 @@ class User extends Basic
// return $this->response("200", "不符合条件2", []);
// }
$where
=
[];
$where
=
[];
$where
[
'city'
]
=
trim
(
$this
->
city
);
$field
=
'max(id) as max_id'
;
$order
=
'id asc'
;
$max_id
=
$user
->
getLastOrNextUserID
(
$where
,
$field
,
$limit
=
''
,
$order
);
$field
=
'MIN(id) as min_id'
;
$min_id
=
$user
->
getLastOrNextUserID
(
$where
,
$field
,
$limit
=
''
,
$order
);
$field
=
'max(id) as max_id'
;
$order
=
'id asc'
;
$max_id
=
$user
->
getLastOrNextUserID
(
$where
,
$field
,
$limit
=
''
,
$order
);
$field
=
'MIN(id) as min_id'
;
$min_id
=
$user
->
getLastOrNextUserID
(
$where
,
$field
,
$limit
=
''
,
$order
);
return
$this
->
response
(
"200"
,
"success!"
,
[
'user_id'
=>
$user_res
[
0
][
'id'
],
'max_user_id'
=>
$max_id
[
0
][
'max_id'
],
'min_user_id'
=>
$min_id
[
0
][
'min_id'
]
]
'user_id'
=>
$user_res
[
0
][
'id'
],
'max_user_id'
=>
$max_id
[
0
][
'max_id'
],
'min_user_id'
=>
$min_id
[
0
][
'min_id'
]
]
);
}
...
...
application/index/extend/Basic.php
View file @
9bf9397f
...
...
@@ -155,9 +155,9 @@ class Basic extends Controller
$m_user
=
new
Users
();
$where
[
'agent_id'
]
=
$this
->
userId
;
$where
[
'id'
]
=
$this
->
params
[
'id'
];
$is_
=
$m_user
->
selectUser
(
$where
,
'id,agent_id'
);
$is_
=
$m_user
->
getMyUserCount
(
$where
);
if
(
$is_
[
'agent_id'
]
==
0
)
{
if
(
$is_
)
{
$is_auth
=
1
;
}
else
{
$is_auth
=
$is_
>
0
?
1
:
0
;
...
...
application/index/view/global/footer_tpl.html
View file @
9bf9397f
<script
src=
'/resource/lib/js/require.min.js'
data-main=
'/resource/js/main?version=121231'
charset=
'utf-8'
></script>
\ No newline at end of file
<script
src=
'/resource/lib/js/require.min.js'
data-main=
'/resource/js/main?version=1212311'
charset=
'utf-8'
></script>
\ No newline at end of file
application/task/controller/PrivacyNumber.php
View file @
9bf9397f
...
...
@@ -99,6 +99,7 @@ class PrivacyNumber
*/
public
function
releaseNumber
()
{
set_time_limit
(
0
);
$m_bind
=
new
BindingPhone
();
$fields
=
'a.id,aliYun_phone_id,expiry_date,phone_x,phone_a,phone_b,subsId,a.type,a.mappingId'
;
...
...
@@ -218,17 +219,17 @@ class PrivacyNumber
*/
public
function
checkBindPhone
()
{
set_time_limit
(
0
);
$m_bind
=
new
BindingPhone
();
$where
[
'a.status'
]
=
1
;
$where
[
'a.type'
]
=
1
;
$select_data
=
$m_bind
->
getBindingPhoneList
(
'a.id,a.aliYun_phone_id,b.phone_x,a.subsId,a.expiry_date'
,
$where
);
$where
[
'a.expiry_date'
]
=
[
'<'
,
date
(
'Y-m-d H:i:s'
)];
$select_data
=
$m_bind
->
getBindingPhoneList
(
'a.id,a.aliYun_phone_id,b.phone_x,a.subsId,a.expiry_date'
,
$where
);
foreach
(
$select_data
as
$k
=>
$v
)
{
$query_status
=
PlsDemo
::
querySubscriptionDetail
(
$v
[
'subsId'
],
$v
[
'phone_x'
]);
$expiry_date
=
strtotime
(
$select_data
[
'expiry_date'
]);
if
(
isset
(
$query_status
->
code
)
&&
(
$query_status
->
Code
!=
'OK'
)
&&
(
$expiry_date
<
time
()))
{
if
(
isset
(
$query_status
->
Code
)
&&
(
$query_status
->
Code
!=
'OK'
))
{
$m_bind
->
unBindTable
(
$v
[
'id'
],
$v
[
'aliYun_phone_id'
]);
}
}
...
...
public/resource/template/user_template_tpl.html
View file @
9bf9397f
...
...
@@ -47,8 +47,9 @@
<
a
class
=
"btn1 caozuo genj_ure caozuo-add-color [%= getLoaclId(it[item]['id']) %]"
href
=
"#modal-record"
data
-
toggle
=
"modal"
data
-
phone
=
'[%= it[item]["user_phone"] %]'
data
-
id
=
'[%= it[item]["id"] %]'
data
-
agentId
=
'[%= it[item]["agent_id"] %]'
data
-
name
=
'[%= it[item]["user_name"] %]'
>
详情
/
跟进
<
/a> 
;
[
%
if
(
it
[
item
][
'agent_id'
]
==
it
[
item
][
'current_agent_id'
])
{
%
]
<
a
class
=
"btn1 btn-success caozuo"
href
=
"#modal-record-edit"
data
-
toggle
=
"modal"
data
-
phone
=
'[%= it[item]["user_phone"] %]'
data
-
id
=
'[%= it[item]["id"] %]'
>
客户编辑
<
/a> 
;
[
%
}
%
]
<!--<
a
class
=
"btn1 btn-success genj_ure"
href
=
"#modal-add"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
跟进
<
/a> --
>
<!--<
a
class
=
"btn1 btn-success take-look"
href
=
"#modal-takeLook"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
data
-
name
=
'[%= it[item]["user_name"] %]'
data
-
phone
=
'[%= it[item]["user_phone"] %]'
>
约带看
<
/a>--
>
...
...
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